Jun 22, 2012, 12:08 PM
7 Posts

Dynamic editable box creation

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags: javascript
  • Replies: 1
 
 

can some one share the code to create an editable box on a button click event in XPages. What method do we use to create a core control in javascript(client side or serverside).

Its very urgent please help

Jun 22, 2012, 4:27 PM
126 Posts
Re: Dynamic editable box creation
 If you want to creat X number of edit boxes use client side script like the answer posted here (2nd answer):
 
 http://stackoverflow.com/questions/5656392/how-to-create-input-type-text-dynamically
 
If you have an XPages input field with event handlers or converters etc. and you just want to make it appear on a button click. You can create it and set its "rendered"  propery to false and then use server side script to set it to true like below:
 
getComponent(controlID).setRendered(true);
 
 this will make it appear on the page when button is clicked