Adding Dynamic rows(group of html controls).
Hi!
I need to add group of HTML fields i.e., textboxes,dropdown, radio buttions by clicking a button on to the existing JSP Page.
The sample page as "http://www.rj2t.com/test/deca/advisors/sec_form.asp". I also need to accept the data and print them to another JSP from these dynamically generated fields.
Please help.!!!!
The sample page you provided reloads when the rows are requested.
This posts a number in the <textfield name="examplename"> field, the method being POST (there is no query string). The form target in the sample page is itself. When it loads with no 'examplename' parameter passed to it, 20 rows are outputed, then it reloads itself with the value given in the textfield when the submit ("Generate Lines") button is clicked
The JSP would then use a loop such as
int numberOfRows=20;
try{numberOfRows=Integer.parseInt(HttpServletRequest.getParameter("examplename")}
catch (NumberFormatException exc){}//this is one of the few circumstances where the exception can be
//consumed as the variable is still 20 if the 'examplename' parameter is null or unparsable;
for (int loop=0 ; loop<numberOfRows ; loop++)
//the HTML for a single row of form fields goes here;
}
Similar Messages
-
Adding dynamic rows to gridview from control outside the gridview
Hi,
I have a checkboxlist outside the gridview. When user clicks the checkbox I want the item he selected added to the gridview . I want the user to be able to remove the item from the gridview also. I want to avoid postbacks- i want it on the client side
Only after he clicks the button to make order I want all the rows in the gridview to be saved to the database.
Any ideas?
ThanksHello,
As this forum is for VB.NET I am moving your question out of this forum. Your best choice is as Cor mentioned, ask in the ASP.NET forum
Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. -
Implicit coercion Error while Adding Dynamic Rows To Flex DataGrid
Hi friends
I want to add interger for in next next rows while clicking tab button,one i enter all the values in one row if i press tab means next row will be editable.for making that i added the following code.i have some error shows like this
[Bindable]
private var tasks:ArrayCollection;
private static const ADD_TASK:int= "";
private function init():void
tasks = new ArrayCollection();
tasks.addItem(new Task(0.01,100000,0));
tasks.addItem({frmAmount:ADD_TASK});
private function checkEdit(e:DataGridEvent):void
// Do not allow editing of Add Task row except for
// "Click to Add" column
if(e.rowIndex == tasks.length - 1 && e.columnIndex != 0)
e.preventDefault();
private function editEnd(e:DataGridEvent):void
// Adding a new task
if(e.rowIndex == tasks.length - 1)
var txtIn:TextInput =TextInput(e.currentTarget.itemEditorInstance);
var dt:Object = e.itemRenderer.data;
// Add new task
if(parseInt(txtIn.text) != ADD_TASK)
tasks.addItemAt(new Task(parseInt(txtIn.text), 0, ""), e.rowIndex);----->Multiple markers at this line:
-1067: Implicit coercion of a value of type String to an unrelated type int.
-txtIn
// Destroy item editor
commPlanDetGrid.destroyItemEditor();
// Stop default behavior
e.preventDefault();
]]>
Please help if any suggession
Thanks in advance
B.VenkatesanVenktesan,
You are trying compare String and int..! which is not possible try to case the txtIn.text to int using parseInt(txtIn.text).
ORIGINAL:
if(txtIn.text != ADD_TASK).---->error : Comparison between a value with static type String and a possibly unrelated type int
tasks.addItemAt(new Task(txtIn.text, 0, ""), e.rowIndex);----> error:Implicit coercion of a value of type String to an unrelated type int.
EDITED:
if(parseInt(txtIn.text) != ADD_TASK).---->error : Comparison between a value with static type String and a possibly unrelated type int
tasks.addItemAt(new Task(parseInt(txtIn.text), 0, ""), e.rowIndex);----> error:Implicit coercion of a value of type String to an unrelated type int.
Thanks
Pradeep -
Error while Adding Dynamic Rows To Flex DataGrid
Hi friends
I want to add interger for in next next rows while clicking tab button,one i enter all the values in one row if i press tab means next row will be editable.for making that i added the following code.i have some error shows like this
[Bindable]
private static const ADD_TASK:int = 0;
private function editEnd(e:DataGridEvent):void
// Adding a new task
if(e.rowIndex == tasks.length - 1)
var txtIn:TextInput =TextInput(e.currentTarget.itemEditorInstance);
var dt:Object = e.itemRenderer.data;
// Add new task
if(txtIn.text != ADD_TASK).---->error : Comparison between a value with static type String and a possibly unrelated type int
tasks.addItemAt(new Task(txtIn.text, 0, ""), e.rowIndex);----> error:Implicit coercion of a value of type String to an unrelated type int.
// Destroy item editor
commPlanDetGrid.destroyItemEditor();
// Stop default behavior
e.preventDefault();
Please if any suggession welcome.
Thanks in advance.
B.venktesanVenktesan,
You are trying compare String and int..! which is not possible try to case the txtIn.text to int using parseInt(txtIn.text).
ORIGINAL:
if(txtIn.text != ADD_TASK).---->error : Comparison between a value with static type String and a possibly unrelated type int
tasks.addItemAt(new Task(txtIn.text, 0, ""), e.rowIndex);----> error:Implicit coercion of a value of type String to an unrelated type int.
EDITED:
if(parseInt(txtIn.text) != ADD_TASK).---->error : Comparison between a value with static type String and a possibly unrelated type int
tasks.addItemAt(new Task(parseInt(txtIn.text), 0, ""), e.rowIndex);----> error:Implicit coercion of a value of type String to an unrelated type int.
Thanks
Pradeep -
Implicit coercion of a value of type String to an unError while Adding Dynamic Rows To Flex DataGrid
Hi friends
I want to add interger for in next next rows while clicking tab button,one i enter all the values in one row if i press tab means next row will be editable.for making that i added the following code.i have some error shows like this
[Bindable]
private var tasks:ArrayCollection;
private static const ADD_TASK:int= "";
private function init():void
tasks = new ArrayCollection();
tasks.addItem(new Task(0.01,100000,0));
tasks.addItem({frmAmount:ADD_TASK});
private function checkEdit(e:DataGridEvent):void
// Do not allow editing of Add Task row except for
// "Click to Add" column
if(e.rowIndex == tasks.length - 1 && e.columnIndex != 0)
e.preventDefault();
private function editEnd(e:DataGridEvent):void
// Adding a new task
if(e.rowIndex == tasks.length - 1)
var txtIn:TextInput =TextInput(e.currentTarget.itemEditorInstance);
var dt:Object = e.itemRenderer.data;
// Add new task
if(parseInt(txtIn.text) != ADD_TASK)
tasks.addItemAt(new Task(parseInt(txtIn.text), 0, ""), e.rowIndex);----->Multiple markers at this line:
-1067: Implicit coercion of a value of type String to an unrelated type int.
-txtIn
// Destroy item editor
commPlanDetGrid.destroyItemEditor();
// Stop default behavior
e.preventDefault();
]]>
Please help if any suggession
Thanks in advance
B.VenkatesanThe error message indicates the problem fairly clearly. _feed_list is defined as a ComboBox in your first line of code. You are passing that as an argument in your populate(_feed_list) line of code. However, the populate function is expecting an XMLList object to be passed, not a ComboBox.
You probably really mean to be using...
populate(feed_items);
since that is the only XMLList to be found -
Button inconsistently working when Adding dynamic rows in table
I have a very weird situation at hand.
I have several pages in my interactive form. 6 pages total.
Pages 3-6 have dynamic tables wherein I used a button to add rows to my tables.
Page 3: 2 tables working ok
Page 4: 3 tables, 1st table working ok, the rest add button not responding
Page 5-6: all add buttons are not responding
I have this javascript that should run when the button is clicked.
Table5.Data_Row5.instanceManager.addInstance(1);
I have checked the table names and body rownames and all are correct.
Would anyone point me what I did wrong? I tried deleting the buttons and recreating them and of course reentering the script again but still not working.I got it! I forgot to tick the Repeat Row for each data item on the body row for the succeeding tables.
-
Adding more rows in a html table(enclosed inside a jsf tabbed pane)
hi,
i m facing a problem. i have a html Table inside a jsf Tabbed Pane and a button to add more rows.whenever i click on the button it should add 5 more rows to the table using javscript.
can anyone hlp me in solving this problem.
thankx in advanceUse the elegant JSF h:dataTable instead of plain HTML table with a heap of DOM stuff.
-
Generating Indiex for dynamically added table rows in HRFORMS
Hi ,
We are developing Payslip in HRFORMS by copying standard form.
We have got one business scenario which requires a table rows needs to generated dynamically to populate the retro values in the form.
We could able to generate the table rows dynamically by below command in HRFORMs scripts.
Table1.Row.InstanceManager.addInstance(1) but it is not generating with correct index.
Please help in adding table rows dynamically at specified index.
Regards,
akulaYou can do that with 2 differents ways :
by creating a colomn key which is the concatenation of the key for each lin
by using field groups
I think you have to use the second one.
[sample by help|http://help.sap.com/saphelp_nw70/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm]
In this case you can put dynamiquely what are you wanted in your keys.
Regards,
Christophe. -
Hi Experts,
My Requirement is create a table control with 5 coloumns. The rows have to be displayed dynamically...
I created a screen , and placed a table control.
For eg :
if my internal table having 2 entries , then the table control should only have two rows....(no disable/greyout)
if internal table having say 40 entries , then the table control should have 40 rows...
Thanks,
Lakshmiraj.AHi,
Refer
table control dynamic rows
Dynamic rows increment according to user input in Table Control Module Pool
Hope this helps
Sumana -
How to dynamically load data from DB in an HTML control present in jsp
Hi Friends,
Can anyone help me with this problem:
I am working on a portal application. My requirement is to dynamically load data in an HTML control present in my JSPs. The controls are combo-boxes, text-fields, list-boxes etc. . Also, the events to load the data are like On Form load, On selecting a value from the combo-box, on clicking on a text-field etc.
If any one can help me with a code snippet, than that would be highly appreciable. If not then the approach to achieve this will also be helpful.
Thanks and Regards,
Gaive.Refer
http://www.developer.com/db/article.php/3384201
http://www.developer.com/db/article.php/10920_3399331_1 -
Changing number of rows oin a table control dynamically
Hi all
Is there a way to change the no of rows dynamically.
I have a requirement that at run time , depending on a condition, I have to change the no of rows in the table control to 1 row.
Is this possible to do?If else How?
Thanks.You can redefine table control attributes eachtime PBO is called, because those attributes are dynamic. So although you defined tc-lines as 1 in first PBO execution, you can redefine to 2 if some condition is achieved,
One idea could be to create a global var, called tc_lines which is initialized as 1. In your PBO you shoud use: <tc>-lines = tc_lines.
In PAI, when you obtain your condition, you shoud here add or subract one from this global variable.
Regards,
Valter Oliveira. -
Adding dynamic columns in Table Control
Hi All,
Can we add dynamic columns in a table control? The requirement is something like this. When the user clicks a button it should add a column to the table. Also is it possible for the same column to refer to different fields of the Internal Table of the Database table. Example. The first row in the table control must refer to MARA-MATNR and the second row must refer to MAKT-MAKTX.
Regards,
SudhindraHello Sudhindra,
If you know all the columns that the table control will ever contain, then I suppose it is possible to add and delete the columns dynamically.
What cannot be dynamic, is the determination of which coulmn would be displayed in the table control.
To elaborate, In SE51, you have to define the table control with all the possible columns. In the program, during the PBO, you can choose to hide some of these columns. When the user performs certain action (PAI), you can determine which opf the hidden columns would be displayed in the table control after the next PBO.
Coming to your second requirement, I don't think it is directly possible in case of table conrols. You will have to do some manipulation to achieve it. But even if you can I think you should not. Because, It is not elegant from a good-UI design perspective. ANd during the course of the necessary manipulations, we might have to forgo some of the features like Automatic Field Validation, Automatic Input Help etc. You can use ALV for the same.
Please be judicious in deciding which approach to consider and if you run into some more problems, please do get back with some more details like how many columns you have, how many different row-types do you want, what are the features for the fields that you wish to provide (eg. F4 help) an so on...
Regards,
Anand Mandalika. -
Row action event on data table does not occur when rows added dynamically
Row action event on data table does not occur (only refreshes the page) when the rows in the data table are added dynamically at run time using button click and java bean.
please tell me a way to catch the row click event when adding rows dynamically to data table. i m using RAD 6.0 to develop Faces jsp pages.
thanks
amiti got the answer
-
How to Controll Dynamic Checkbox Groups
i want to create checkbox groups dynamically. Each group will have at least one child checkbox. if i select parent check box all child checkboxes should be checked.if i uncheck parent checkbox all child checkboxes should be unchecked.
that check box group name also coming dynamically. i am trying to pass group name dynamically but it's not recognizing that name in javascript.
pls help me on this how to controll dynamic checkbox groups.recognizing that name in javascript.Are you dynamically creating checkboxes with JSP?
-
How to show all the rows in PRint html option in obiee 11g
Hi ,
I am facing a issue in obiee 11g(windows 2003 server). I have 2 environments (SIT & dev)
In dev I am not facing any issue but in SIT when i print the report in html only 1-25 rows are displayed.
What should i do to see all the rows
Thanks in advance
AbdulHi,
In your Dev Server its configured on instanceconfig.xml file that why are getting the all rows with setting pdf/print control properties.
1. Change instanceconfig.xml file in <biee11g_install>\instances\instance1\config\OracleBIPresentationServicesComponent\coreapplication_obips1 as following
<Views>
<Pivot>
<!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager-->
<DefaultRowsDisplayedInDelivery>75</DefaultRowsDisplayedInDelivery>
<!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager-->
<DefaultRowsDisplayedInDownload>2500</DefaultRowsDisplayedInDownload>
<!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager-->
<DisableAutoPreview>false</DisableAutoPreview>
<MaxVisibleColumns>5000</MaxVisibleColumns>
<MaxVisiblePages>2500</MaxVisiblePages>
<MaxVisibleRows>500000</MaxVisibleRows>
<MaxVisibleSections>5000</MaxVisibleSections>
</Pivot>
<Table>
<!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager-->
<DefaultRowsDisplayedInDelivery>75</DefaultRowsDisplayedInDelivery>
<!--This Configuration setting is managed by Oracle Business Intelligence Enterprise Manager-->
<DefaultRowsDisplayedInDownload>2500</DefaultRowsDisplayedInDownload>
<MaxVisiblePages>2500</MaxVisiblePages>
<MaxVisibleRows>500000</MaxVisibleRows>
<MaxVisibleSections>5000</MaxVisibleSections>
</Table>
</Table>
</Views>
3. Note the new elements added are the following to both <Pivot> and <Table>, the Pivot part controls Pivot view, and Table part controls Table View, my testing was done with Table View.
<MaxVisiblePages>2500</MaxVisiblePages>
<MaxVisibleRows>500000</MaxVisibleRows>
<MaxVisibleSections>5000</MaxVisibleSections>
4. Restart Presentation Server from EM, then run your request, do pdf export to verify.
Note:
When a table or pivot table includes a large number of rows, a set of buttons can be displayed under the view. You can use the following buttons to page through the rows in the view:
•First 25 Rows — Displays the first 25 rows of data for the view. The number that is used for the First, Previous, and Next buttons is specified by the Rows per Page field in the "Table Properties dialog: Style tab".
•Previous 25 Rows — Displays the previous 25 rows of data for the view.
•Next 25 Rows — Displays the next 25 rows of data for the view.
•Display maximum (500) rows per page — Allows you to display as many as the maximum number of rows per page at one time temporarily. The default is 500. The administrator can specify a different maximum value that is displayed on the tooltip for the button using the MaxVisibleRows element in the configuration file.
For more Refer my blog post
http://obieeelegant.blogspot.sg/2011/09/unable-to-export-all-rows-from-request.html
Note: this same thing you can also configure your UAT/Prod Server. then its will automated so you no need to configure each report.its will affect all the pivot/table view
also its noted as a bug in obiee11g(11.1.1.3/5) and its fixed in obiee11.1.1.6.0 and above version
FYI:
Thanks
Deva
Maybe you are looking for
-
Ipod frozen ("Do not disconnect") Restore attempt triggers error message
The sequence of events: 1. ITunes did not recognize my Ipod this morning (My ipod icon did not appear in itunes) 2. Itunes froze. (Computer froze generally) During attempts to restart computer, realized that computer failed to start if Ipod firewall
-
So here I am again, baffled by the simple freeze of a computer. I've installed arch Linux to me desktop and didn't receive any errors but when I boot I barely get past Grub. Computer boots to post, bio's, and grub without problem. I select arch Linux
-
How do you add a phone to "find my iphone"
how do you add a phone to "find my iphone"? My ipad does not seem to know aobut my iphone4.
-
Update a subtype attribute in Oracle 11g
Hi All, I am trying to update a subtype attribute of an object table, but getting error. If anybody can show me sample of it, I would be thankful. create or replace type supobj as object (a number) not final; create or replace type subobj under supob
-
Is it possible for me to host 2 web servers using 1 public ip, if I do a nat statement to both of them, how will it know which server to use from the outside ?