Dynamic table with dynamic drop-down list values
Hi,
I need to display a dynamic table with 2 columns on an interactive form.
My Context is defined as below:
Root
StudentData 0..n
StudentName
StudentCourses 0..n
Text
Value
The 1st column should display student name, 2nd column should display student courses. The courses will be different for each student. I populated the context properly. I checked it by printing them. My DDL is bound to "Student Courses".
When there is one row -> The DDL is populated with the courses of student 1 (as there is only one).
When there are more rows -> The DDLs for all the students are populated with all the courses of all the students.
I want to see the data populated like:
TEXTFIELD DROP-DOWN LIST
Student 1------Student1-Course1
Student1-Course2
Student1-Course3
Student 2------Student2-Course1
Student2-Course2
Student2-Course3
I tried to do this in plain web dynpro using SVS.. it is also working similarly.
I have set the singleton property of nodes "StudentData" and "StudentCourses" to false.
Could any one tell me where I am going wrong?
Thanks
Ram
Ram,
I'm not sure how much this will help, but I know I had the same problem as you when I tried to get a similar thing working, but I can't remember which of the many changes I made fixed the problem, so I'll just show you my code and perhaps you can see if anything is different than yours.
Here's where I'm creating my dropdown - in my case EastNew_RegOut is the same as your StudentData, and RateTypeDropValues is the same as your StudentCourses (the comments in the code are not meant to sound bossy to you, this is actually an example piece of code that other developers in my company "steal", so I have to put very specific instructions in there!):
int nodeSize = wdContext.nodeEastNew_RegOut().size();
for (int i = 0; i < nodeSize; i++) {
//create an element called "table", that's the element at i. So, basically it's a row. Maybe I should have
//called it "row" instead of table.
IPublicDeviceExchange.IEastNew_RegOutElement table = (IPublicDeviceExchange.IEastNew_RegOutElement)wdContext.nodeEastNew_RegOut().getElementAt(i);
//this line of code just executes an rfc that finds out what rates need to be in the dropdown for this particular row
executeRateTypeDropdown(rateCategory, table.getNum(), wdContext.currentEastNew_MeterOutElement().getReggrp());
//clear out what's already in there before we re-populate it.
table.nodeRateTypeDropValues().invalidate();
//now, I'm looping through all the values in the *actual* rate type dropdown (the one that's an RFC, populated by the above "execute" method)
for (int j = 0; j < wdContext.nodeEastRatetype_DropdownOut().size(); j++) {
//for each element in the *actual* Rate type dropdown, I'm going to create an element in my node that I created
//and set the values from the *actual* one as the values in my node.
IPublicDeviceExchange.IRateTypeDropValuesElement element = wdContext.createRateTypeDropValuesElement();
IPublicDeviceExchange.IEastRatetype_DropdownOutElement rateTypeOut = (IPublicDeviceExchange.IEastRatetype_DropdownOutElement)wdContext.nodeEastRatetype_DropdownOut().getElementAt(j);
element.setText(rateTypeOut.getText());
element.setValue(rateTypeOut.getRatetype());
//here's another key - notice how I don't say wdContext.nodeRateTypeDropValues() - it's the one that's
//directly off that table I created earlier - the thing that's essentially a row in my newReg table.
//So, what I'm doing here is adding that new element I created to the dropdown FOR THAT ROW!
//(btw, if you're trying to duplicate this, and this method does not exist for your "table" object, it's
//probably because you didn't listen to me above and you didn't create your node with the singleton property
//set to false.)
table.nodeRateTypeDropValues().addElement(element);
As for my layout... my table is bound to the EastNew_RegOut node, and the column with the dropdown is bound to RateTypeDropValues.Value (that's probably obvious, but there you have it anyway)
Finally, in my context, EastNew_RegOut is singleton = true (I was surprised about this, actually, I would have assumed it was false) with a selection of 0..1 and RateTypeDropValues has singleton set to false with a selection of 0..1
I hope that helps to some degree!
Jennifer
Similar Messages
-
Adding Drop Down List values from table fields
Hi all,
Recently we have switched from Microsoft's Infopath to Adobe's LiveCycle Designer. In InfoPath i was able to allow a user to enter data in a table and then use that data as values for a drop downlist, which could in turn be used in another table. Infopath made it relatively easy to do this, but I assume it requires scripting in LiveCycle. Here is an example that make make it easier to to explain:
Let's say we have a form with a table that has a colomn where the user can enter a value in a table let's say "Computer Name":
Computer Name | IP | Vendor | Serial Number|
PC 1
---------------------| 192.168.2.34| HP | US4839494
PC 2
PC 3
PC 4
Further down the form there is a nother table with a drop down list. I want the values of the drop down list to be what ever values were entered for "Computer Name" in the previous table. So in this case the table would look like this:
Computer Name | Acquisition Date| End of Life Date
<Drop DownList>| 07/21/2010 | 07/21/2014
The drop downlist values would be "PC1, PC2, PC3, PC4" or whatever values were entered in the previous table. Essentially, I am trying to avoid from having users type in "Computer Name" data every time the "Computer Name" needs to be entered. It would be so much easier to enter all "Computer Name" values and then use those values as part of a drop down list to avoid excessive typing.
I hope this makes sense, it is fairly easy to do in InfoPath and I am sure there is a way to do this in LiveCycle.
Let me know if my explanation is not clear enough.
Thanks!Thanks for the feedback, but it doesn't seem to quite accomplish what I am trying to do. I've tried using global binding as you specified, but the outcome is not exactly what I want. Perhaps this drawing can help depict what I am trying to do:
http://imageshack.us/photo/my-images/153/dropdownlist.png/
On the picture I manually defined the values for the drop down list. Again, I want these values to be taken from "Computer Name" in the table above.
Thanks! -
Dynamic Drop-down list - selected value can't be cleared ...
1. check out the following code of a dynamic drop down list using cursor :-
DECLARE
-- DROP-DOWN LIST OF ALL DEPARTMENTS
TEMPNUMBER NUMBER(2) := 2 ;
-- Because we've to initialize the list
-- at least with 1 item.
CURSOR C_DEPT IS
SELECT DEPT_ID FROM DEPARTMENT;
BEGIN
ABORT_QUERY ;
CLEAR_LIST('DEPTLIST');
FOR TEMP IN C_DEPT LOOP
ADD_LIST_ELEMENT( 'DEPTLIST', TEMPNUMBER, TEMP.DEPT_ID, TEMP.DEPT_ID );
:SRBLOCK.LST := TEMP.DEPTNO;
-- prev. line set the newly selected value
TEMPNUMBER := TEMPNUMBER + 1 ;
END LOOP;
END;
2. problem is as we've to atleast initialize with one list item... that item can't be cleared with CLEAR_LIST.
3. how can i actually clear that and still use cursor. because i've searched forum for this thing and found all those code not working ... for my project ...
4. quick help needed ...Hi Omar,
I have solution for you
To populating or refreshing the lists you can use
two procedures:
One of them - generic, which can be used for all types of list
Another is specific which contain a SQL statement to retrieve the data for
particular list.
1. Specific procedure:
PROCEDURE GET_DEPARTMENT_LIST
IS
sql_stat VARCHAR2(32767);
ret_code NUMBER;
BEGIN
-- SQL Statement for Drop-down List
-- (must have two columns for label and value - both VARCHAR2)
sql_stat := ' SELECT DEPARTMENT_NAME,TO_CHAR(DEPT_ID)'
||' FROM SCHEMA.DEPARTMENT';
POPULATE_MY_LIST('BLOCK.DEPARTMENT_LIST',sql_stat,ret_code);
END;
2. Generic procedure:
PROCEDURE POPULATE_MY_LIST
(item_name VARCHAR2,
sql_stat VARCHAR2,
out_code OUT NUMBER)
IS
rg_id RECORDGROUP;
rg_name VARCHAR2(100);
ret_code NUMBER;
item_id ITEM;
BEGIN
item_id := FIND_ITEM(item_name);
IF ID_NULL(item_id) THEN
out_code := -1;
RETURN;
END IF;
--Creating Record Group with Unique Name
rg_name := 'RG_'||SUBSTR(item_name,INSTR(item_name,'.',1)+1,LENGTH(item_name));
--Checking Record Group Name for existance
rg_id := FIND_GROUP(rg_name);
--If Group does exist - delete it
IF NOT ID_NULL(rg_id) THEN
DELETE_GROUP(rg_id);
END IF;
--Creating Record Group
rg_id := CREATE_GROUP_FROM_QUERY(rg_name,sql_stat);
ret_code := POPULATE_GROUP(rg_id);
IF (ret_code <> 0) THEN
out_code := ret_code;
RETURN;
END IF;
POPULATE_LIST(item_name,rg_id);
IF NOT FORM_SUCCESS THEN
out_code := -2;
RETURN;
ELSE
out_code := 0;
END IF;
DELETE_GROUP(rg_id);
END;
Hope it help.
Dmitry -
Dynamic drop down list in Adobe forms
I have created a drop down list using enumerated drop down list from webdynpro native tab and binded in the object palette by giving $record.sap-vhlist.DESCR\.DATA\.FIELD.item[]* in the list items dynamically.DESCR is the field in the internal table into which i fetched data from the database table .I have written this code in a BADI.I dont know whether my form's display type is activex or native? I am not getting any values in the drop down list.can anybody please tell me what might be missing and how should i know whether my form is ActiveX or Native?
My form is called from portal so i have used BADI to connect portal to formHi sarang,
I have done a dynamic drop down list in which DESCR field comes from database table and pops into the drop down dynamically. I was working for a PCR scenario so the adobe form was called from portal.I will tell u all the required steps.It might work for u as it is working for me:
1.In the form:
I used two elements from library first is a "ENUMERATED DROP DOWN LIST NO SELECT" from web-dynpro native tab and second is "ISR_TEXT DISPLAY INVISIBLE ON EDIT MODE" from ISR controls tab.Place them one on other inthe form.
For drop down list the setting are:
In object, field tab click on list items there in ITEMS put :$record.sap-vhlist.DESCR\.DATA\.FIELD.item[*].in ITEMS TEXT write text in ITEMS KEY write key.
In binding,in default binding put $record.DESCR.DATA[*].FIELD.
For text element the settings are:
In binding,default binding put Normal.
when we select ISR_TEXT DISPLAY INVISIBLE ON EDIT MODE it automatically comes with calculated read only int he value tab.so open script editor and place the below code:
$record.DESCR.DATA.FIELD (in calculate).
2.Now the code in BADI is as follows:
In BADI we have to write the code for drop down list in the METHOD "SCENARIO_SET_ADDITIONAL_VALUES"
As i didnt change the standard BADI i added an enhancement spot in which i wrote a function module which fills ADDITIONAL_DATA. and the below code fills the ADDITIONAL_DATA .
DATA: t_t572b TYPE STANDARD TABLE OF t572b WITH HEADER LINE,
t_t554t TYPE STANDARD TABLE OF t554t WITH HEADER LINE.
SELECT * FROM t572b INTO TABLE t_t572b WHERE sprsl EQ 'E'.
CLEAR ls_additional_data-fieldindex.
LOOP AT t_t572b.
ADD 1 TO ls_additional_data-fieldindex.
ls_additional_data-fieldname ='DESCR_KEY'.
ls_additional_data-fieldvalue = t_t572b-descd.
APPEND ls_additional_data TO additional_data.
ls_additional_data-fieldname ='DESCR_LABEL'.
ls_additional_data-fieldvalue = t_t572b-descr.
APPEND ls_additional_data TO additional_data.
CLEAR t_t572b.
ENDLOOP.
For DESCR field the we have to declare DESCR_KEY and DESCR_LABEL in the place holders for key values and palce holders for default values in characteristics tab(where all the fields for the form are defined) of ur respective scenario.(where ur pcr scenario is defined)
Hope ur problem got resolved.
Please let me know if any doubts.
If ur form is not called from portal and u want a dynamic drop down list the difference is put a data drop down list and in object, field tab click on list items there in ITEMS select the field into which u populated the data from the database table (this code shud be written in code Initialization in the respective interface) and in ITEMS TEXT put $ in ITEMS KEY put $.and in binding as we normally do bind it to the respective field in which the data is populated from database table.
It should work. -
Cteate 2 Dynamic drop down list
Hi all
i want to create 2 dynamic drop down list using struts and hibernate
i want the first one to display countries name then if i select a country name the second drop down list will automatic display the country cities .
i'm using database here and my tables like that :-
country table
country_id number(3) pk
country_name varchar(50)
city table
city_id number(5) pk
country_id(3) fk references country(country_id)
city_name varchar(50)
thank you in advanceHi Omar,
I have solution for you
To populating or refreshing the lists you can use
two procedures:
One of them - generic, which can be used for all types of list
Another is specific which contain a SQL statement to retrieve the data for
particular list.
1. Specific procedure:
PROCEDURE GET_DEPARTMENT_LIST
IS
sql_stat VARCHAR2(32767);
ret_code NUMBER;
BEGIN
-- SQL Statement for Drop-down List
-- (must have two columns for label and value - both VARCHAR2)
sql_stat := ' SELECT DEPARTMENT_NAME,TO_CHAR(DEPT_ID)'
||' FROM SCHEMA.DEPARTMENT';
POPULATE_MY_LIST('BLOCK.DEPARTMENT_LIST',sql_stat,ret_code);
END;
2. Generic procedure:
PROCEDURE POPULATE_MY_LIST
(item_name VARCHAR2,
sql_stat VARCHAR2,
out_code OUT NUMBER)
IS
rg_id RECORDGROUP;
rg_name VARCHAR2(100);
ret_code NUMBER;
item_id ITEM;
BEGIN
item_id := FIND_ITEM(item_name);
IF ID_NULL(item_id) THEN
out_code := -1;
RETURN;
END IF;
--Creating Record Group with Unique Name
rg_name := 'RG_'||SUBSTR(item_name,INSTR(item_name,'.',1)+1,LENGTH(item_name));
--Checking Record Group Name for existance
rg_id := FIND_GROUP(rg_name);
--If Group does exist - delete it
IF NOT ID_NULL(rg_id) THEN
DELETE_GROUP(rg_id);
END IF;
--Creating Record Group
rg_id := CREATE_GROUP_FROM_QUERY(rg_name,sql_stat);
ret_code := POPULATE_GROUP(rg_id);
IF (ret_code <> 0) THEN
out_code := ret_code;
RETURN;
END IF;
POPULATE_LIST(item_name,rg_id);
IF NOT FORM_SUCCESS THEN
out_code := -2;
RETURN;
ELSE
out_code := 0;
END IF;
DELETE_GROUP(rg_id);
END;
Hope it help.
Dmitry -
How to populate data from dynamic drop down list to the text field
Hi,
I tried to populate data from dynamic drop down list to city field. I would like to concat data from drop down list.When selecting add button to add the item and select item from drop down list, data should be displayed in the text field. However, Please help. I spent alot of time to make it works I am not successful.
Please see the link below.
https://acrobat.com/#d=SCPS0eVi6yz13ENV0cnUdw
Thanks for your help
CindyHi Rosalin,
Loop the hidden table, get the values and populate drop down in each iteration.
DropDownList1.addItem("Text","Value");
You can use one more solution for this scenario. If it is a matter of 2,3 dropdowns, put three dropDowns in the form layout and give seperate static data binding to them. At run time make the dropDowns hide/visible as per the requirement.
Hope this helps.
Thanks & Regards,
Sanoosh -
How to create Dynamic Drop down list ?
Hi experts
I want to create a Dynamic Drop down list that should be an Editable,after editing that i need to save.
thanks,
vikram.c.Hello,
Please go through this link:
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/vc/linking%2bdrop-down%2blists
If useful reward.
Vasanth -
Problem in sending drop down list value to jsp page showing null value
i am trying to send a drop down list value from client side to a jsp page but getting null value
this is first page where i have accessed data from database and putted it in a drop down list
<select name="sub">
<%
while(rs2.next())
cat=rs2.getString(1);
%><option value="<%=cat%>"><%=cat%></option><%
}%></select>
<input type="submit" value="Go"></input>
now on submit i am going to another page
where i want the selected value from drop down list to be printed
i have used there
<%
String subject= request.getParameter( "sub.value" );
out.println(subject);
%>
but it is printing null here what is the problem that i m facing
thanx & reagrds
sweetyhow to generate dynamically names for text boxes
i am generating text boxes in while loop when selecting data from database
while(rs1.next())
name=rs1.getString(1);%>
<tr>
<td>1</td>
<td><%out.println(name);
//i am printing here stud_id a unique key and want to update records from following text boxes to particular stud_id
%></td>
<td><input type="text" name="????"></input></td>
<td><input type="text" name="????"></input></td>
<td><input type="text" name="????"></input></td>
<td><input type="text" name="????"></input></td>
</tr><%
the structure is like
stud_id | attended theory | conducted theory | ateended practical | conducted practical
where attended theory, conducted theory............. are to be inputed manually for all students and then update in database
so i am facing problem in generating names for textboxes how to do that
so that those can be updated in database for particular student
Thanx & Regards
sweety -
Change values of drop down list when other drop-down list value is clicked
Hi Gurus,
I look for my requirement very much but I can't find. I think it must be very simple but I can't do it, please help :
I have to custom added fields. Both of them is made drop-down list by picklist defined in GET_P...methods.
When I click and select a value from the first drop-down list, I want that second drop-down values are fully changed, depend on what I select in the first list. If I select my value and press enter in the first drop down box, I can do my requirement with GET_V...method. But if I don't press enter, the values of second list doesn't change, they remain same. I want exactly that when I click and select a value from first drop-down list, second drop-down list values are automatically change, dependent on what selected. Do I have to define and event?? where and how, please help me..Hi,
You must have created the field as a dropdown using the below code in the get_p method.
CASE iv_property.
WHEN if_bsp_wd_model_setter_getter~fp_fieldtype.
rv_value = cl_bsp_dlc_view_descriptor=>field_type_picklist.
ENDCASE.
Here you need to add the below lines of code along with the previous code. for the first dropdown value
IF iv_property = if_bsp_wd_model_setter_getter=>fp_server_event.
rv_value = 'DDLB_CLICK'.
ENDIF.
This would refresh the screen when the user selects any value from the dropdown.
Regards,
Radhika -
How to modify drop down list values of a screen field in UDM_DISPUTE?
Hi All,
I have a requirement wherein i need to modify the drop down list for a screen field depending on the value of the other screen field in transaction UDM_DISPUTE.
Please suggest how this can be achived.
Any BADI 's or any other approach is available?
Thanks in advance,
Srilakshmi.Hi,
At what time do you want to modify the drop down list, while creating or after creating the dispute case. There are some BADI's where we can change the attribute drop down list values.
Thanks,
Sunil -
How do I configure a dynamic table with Data-Drop Down selections to store separate values?
I am attempting to use LiveCycle to create an Order Form that uses an ODBC to a SQL database. When a user makes a selection, a separate column in the table references the "Item #" associated in the SQL table, and generates a corresponding barcode.
My problem is that when I select an Item from the drop down list, all the items in the table change. What am I missing here to separate the rows as different line items? I tried adding a [*] to the end of the connection string, and that allows me to select different options but does not generate the "Item #" or "Barcode" field.
The screenshot below shows the basic form. When I select any of the data drop downs, all of the Items change.
I used the auto generated script for the "Add Row +" button shown below. Is this my issue? Or do I need to alter the way I'm setting up the Data Binding in for my Data Drop Down?
this.resolveNode('Table1._Row1').addInstance(1);
if (xfa.host.version <8) {
xfa.form.recalculate(1); }package pruebadedates;
import java.sql.*;
* @author J?s?
public class ClaseDeDates {
/** Creates a new instance of ClaseDeDates */
* @param args the command line arguments
public static void main(String[] args) {
java.sql.Date aDate[] = null;
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
try{
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://localhost/pruebafechas", "root", "picardias");
if(!con.isClosed()){
stmt = con.createStatement();
stmt.executeQuery ("SELECT dates FROM datestable");
rs = stmt.getResultSet();
while (rs.next())
aDate[] = rs.getDate("dates");
catch(Exception e)
System.out.println(e);
//System.out.println(aDate);
}Hi, There is my code and the errors that I get are:
found : java.sql.Date
required: java.sql.Date[]
aDate = rs.getDate("dates");
Actually I have No idea as How to get a Result set into an ArrayList or Collection. Please tell me how to do this Dynamically. I have like 25 records in that Database table, but they will grow, so I would really appreciate to know the code to do this. I suspect my problem is in the bolded part of my code.
Thank you very much Sir. -
Dynamic Drop-Down list in a table row or subform
Hi,
I need to display multiple drop-down list elements dynamically. Each of these DDLs will have different values.
For example:
The table will have 2 columns (Student Name text field and Courses drop-down)
Row 1: Student 1 & Courses of Student1 in DDL
Row 2: Student 2 & Courses of Student2 in DDL
When I execute my app, both the drop-downs (i.e. for both the students) are displaying all the courses of all the students. I tried a lot with binding options..
$record.Students[].Courses[]
is refering to all elements of the node. If I use the index 0 for Students node, I am getting 1st element rows.. if I use 1, I am getting 2nd element rows,,,
But How can I set the binding so that Row 1 has only Student 1 courses and Row 2 has Student 2 courses?
IS THERE A WAY TO DYNAMICALLY SET THE BINDING USING JAVASCRIPT?
I tried with tables, subforms.. it is not working. It is working fine in plain web dynpro table but not in an interactive form. I am using NW 2004s SP11, Web Dynpro Java. LiveCycle Designer 7.1, Adobe Reader 7.09.
There are some other posts talking about similar issue.. I tried the solutions mentioned there as well, but nothing worked.
I would really appreciate if any one can provide a solution or pointer to my problem.
Thanks
RamHey. Uh, this probably isn't the answer you were looking for, but it sounds like you've got a problem with your database design there. Generally speaking, your tables shouldn't have multi-valued fields, in the relational model anyway (sql). Instead, you should look at adding a separate table like EMPLOYEE_HOBBIES. Then you have a foreign key using the employees primary key as the foreign key in the employee_hobbies table, see what I mean? I might have misunderstood your explanation though, I'm not sure.
Alternatively, you could just have hobbies as a big freeform varchar field, and don't bother to make people separate their hobbies into different fields (you'd have to abandon the drop-down listbox idea in this case). If there's no really important reason to make the distinction, then it's probably easier just to not do it. -
Dynamic drop down list with dynamic sql
Hi all,
I am facing a problem here..Please see if any one can help.
I jave a JSP page which has two drop down list boxes.
One list box is populated from the databse.
ListBox1:
values: kishan
maha
tony
assuming all those were populated from database.
ListBox2:
values: Chennai
Bangalore
Hyderabad
should come if "kishan" is selected from the first listbox.
if "maha" is selected then
Values: Delhi
Goa
Mumbai
should be populated from the databse using the where condition
got by the first selection.
Both these boxes are in same page and i do not want to transfer
this to another page..staying in the same how to accomplish this.
An onChange function of the selection list on listBox1 can be
written which gives me what value is selected. This i can get in
Java script. But how to give this value to a jsp variable which
queries the database using the selected value.
Is there any other logic i can use.
remember there is no request that is passed. both are in same page and on selection it should stay in same page populating the
second one dynamically.Bcoz what i have said is the operation in one row.. the same should happed for 5 rows in a form so.. pls send me code if possible or links related to this problem
please help.You can use Ajax ;-) or you do a server roundtrip (aka postback) i.e. the onchange event of ListBox1 submits the form and the server returns the same page with the updated ListBox2
-
Hi Friends,
I am working on a Drop down list in Adobe Interactive Form.
I have a internal table contaning some values, i have binded my dropdown element wiht the field of the table containing the values. Thatu2019s working fine an I can select on value from the drop down list.
I want to add a new value to select another value from the drop down list or delete it.
The scenario is that when I click on add-Button to selects another value from the drop down list in subform, I add another Drop down list, but I canu2019t open the second or third drop down to select the value.
Iu2019m a new in JavaScript. I thing a missing something in JavaScript, wenn I click add-Button
Please let me know what is missing or send me an exampel.
Thanks and Regards.Hi Chintan,
Thank you for your help.
I will try to explain more clearly my problem .
In my case, my form will be used in ABAP system without any web dynpro applicatoin . forms are send by mail and retrieve by mail in SAP .
I define a PDF forms in the ABAP stack of SAP . in the form i create a table subforms , number of rows depend on what is store on the database.
In the fact, my field is defined as dropdownlist box and value are link to the content of the interface attributes .
For thr first row that works fine but when i add a line, the content is not populate automaticaly, and i can' t open the dropdownlist.
When user receive the forms, he can add lines to the table while it's define as dynamic. My problem is that on NEW LINE the dropdownlist box is empty.
How can i solved this issue ?
Tanks -
Hi -
I have written a piece of code to dynamically include data in the drop down list after querying the data base. I can print the values using out.print().. but they do not show up in the drop down list. Below is the code -
Please lemme know the mistake i am committing. Thanks you!
<form name="browse" method = "POST">
<select name="uid">
<%
//out.write("before vec");
unit.setCid(user.getCid());
Vector unitNumbers = unit.getUnitNumbers();
ListIterator iter1 = unitNumbers.listIterator();
while ( iter1.hasNext() ){
Integer num = (Integer)iter1.next();
// out.print(num.intValue());
// out.print("Hellooooooooo");
%>
<options> <%= num.intValue() %>
<% }
%>
</select>
</form>The correct tag should be <option value="val">Val</option>, like this:
<form name="browse" method = "POST">
<select name="uid">
<%
unit.setCid(user.getCid());
Vector unitNumbers = unit.getUnitNumbers();
ListIterator iter1 = unitNumbers.listIterator();
while ( iter1.hasNext() )
Integer num = (Integer)iter1.next();
%>
<option value="<%= num.intValue() %>"><%= num.intValue() %></option>
<% } %>
</select>
</form>
Maybe you are looking for
-
I have Thunderbird version 24.3.0 downloaded to my Windows 7 computer. When I send an email in Thunderbird it looks fine and when the recipient receives it, it looks fine on the screen, but when she tries to print it, the font is unreadably small. Th
-
Updating database table based on BAPI response in case of error
Dear Experts, My scenario includes pulling records from database stagging table, and push one record at a time to BAPI_ALM_NOTIF_CREATE. I am using sender JDBC adapter(with select query and update query to mark records as processed). My question is :
-
The file ".fcpcache.tmp" doesn't exist.
When importing a movie from my Sony HandyCam I can import the movie but when asked to fill in a selection box I answer "In Library"| and get this error message? I can't do anything else with iMovie with this selection box on screen Cheers in advance
-
Sorry, I'm new to BC and need to establish the best way to obtain and use new email addresses for my client. The site is created in Adobe Muse and I wish to host it with BC. THANK YOU!
-
Required Delivery Date Not coming good for only few customers
Hi Gurus, I have a very peculiar problem, related to the RDD (Required Delivery Date) in Sales Orders. We have configured the system with D+2 as the delivery date and the system is proposing us the dates accordingly. Also above VOV8 configuration of