Write to java object using netui:select tag

Hello,
I am iterating through a hashmap of java objects using a netui-data:repeater.
<netui-data:repeater dataSource="{pageFlow.MyHashMap}">
<netui-data:repeaterItem>
<netui-data:repeater dataSource= "{container.item.HashMapOfEmbeddedObjects}">
<netui-data:repeaterItem>
<netui:select dataSource= "{container.item.type}" optionsDataSource= "{container.item.typeChoices}" /> </td>
<netui:select dataSource= "{container.item.default}"
optionsDataSource= "{container.item.defaultChoices}" /> </td>
</netui-data:repeaterItem>
</netui-data:repeater>
</netui-data:repeaterItem>
</netui-data:repeater>
The java object has a field "HashMapOfEmbeddedObjects" that is itself a hashmap of java objects. I want to be able to make a selection and have it be written to the
"type" and "default" fields of the embedded objects, but dataSource="{container.item.default}" does not save the value of the selection.
Is there anyway to use the netui:select tag to write to the field on a java object? Any help is greatly appreciated.

I have done it in the past. The java object need not be actionForm. The following write-up I found in edocs will help you achieve this.
Page Flow-Scoped Form Beans
Page Flow-scoped Form Bean instances have the same life-cycle as the Controller file instance. They are created and destroyed when the Controller file instance is created and destroyed. This makes Page Flow-scoped Form Beans useful for storing data that has been accumulated across many different JSP pages.
To create a Page Flow-scoped Form Bean instance, construct a public member variable of the Form Bean in the Controller file.
public class myController extends PageFlowController
public MyFormBean pageFlowScopedBean = new MyFormBean();
Once you have created a Page Flow-scoped instance of a Form Bean, you can pass the instance to action methods by using the @action form="form_bean" annotation.
public class myController extends PageFlowController
public MyFormBean pageFlowScopedBean = new MyFormBean();
* @jpf:action form="pageFlowScopedBean"
* @jpf:forward name="success" path="displayData.jsp"
protected Forward submit( MyFormBean form )
return new Forward( "success" );
Each time the submit() method is invoked, it is passed the same instance of the Form Bean, namely, pageFlowScopedBean, the instance that was created when the Controller file instance was created.
For more info go to http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/netui/guide/conReqScopedVsPageScopedBean.html
Good luck.
--SJ                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Displaying Complex Java Objects using netui

    I have a java object with the following structure.
    obj1
    int name;
    String ID;
    ArrayList obj2;//coniatns multiple obj2 objects
    obj2
    int name;
    String ID;
    ArrayList obj3; //coniatns multiple obj3 objects
    obj3
    int name;
    String ID;
    How and what netui tags can I use to display this kind of structure for obj1?
    I tried repeaters and it is not working for me.
    Also if I have a structure like this
    ArrayList obj4; //contains arrays's of multiple items.
    obj4
    String[] eventTime;
    String[] eventDate;
    How can I display this in a grid fashion using netui? The netui:gid tag only
    wirks with RowSet and I have an ArrayList?
    If I want to use simple jsp and not use netui tags what is the context for accessing
    my form that I have in my page flow from the jsp? e.g. if I have a form in my
    page flow called listForm which has gets and sets for
    String[] eventTime;
    String[] eventDate;
    what is the context I use in my jsp to print values of eventTime and eventDate
    in a grid like fashion without using nteui? I tried 'request' context but it
    does not work. In netui we can use actionForm or pageFlow etc but what about
    simple jsp context?
    Please reply soon. Thanks

    Try the <netui-data:getData> tag in the workshop documentation, It gives an example
    "Kush" <[email protected]> wrote:
    >
    I have a java object with the following structure.
    obj1
    int name;
    String ID;
    ArrayList obj2;//coniatns multiple obj2 objects
    obj2
    int name;
    String ID;
    ArrayList obj3; //coniatns multiple obj3 objects
    obj3
    int name;
    String ID;
    How and what netui tags can I use to display this kind of structure for
    obj1?
    I tried repeaters and it is not working for me.
    Also if I have a structure like this
    ArrayList obj4; //contains arrays's of multiple items.
    obj4
    String[] eventTime;
    String[] eventDate;
    How can I display this in a grid fashion using netui? The netui:gid
    tag only
    wirks with RowSet and I have an ArrayList?
    If I want to use simple jsp and not use netui tags what is the context
    for accessing
    my form that I have in my page flow from the jsp? e.g. if I have a form
    in my
    page flow called listForm which has gets and sets for
    String[] eventTime;
    String[] eventDate;
    what is the context I use in my jsp to print values of eventTime and
    eventDate
    in a grid like fashion without using nteui? I tried 'request' context
    but it
    does not work. In netui we can use actionForm or pageFlow etc but what
    about
    simple jsp context?
    Please reply soon. Thanks

  • Set selected in netui:select tag

    Hi, all
    I wonder how to set the selected item after come back from server. I have
    --- jsp
    <netui:select dataSource="{actionForm.personStr}" optionsDataSource="{actionForm.personOptionsHashMap}" defaultValue="-- select one --">
    --- server (.jpf)
    form.setPersonStr(form.getPersonStr());
    form.setPersonOptionsHashMap(hashMap);
    So when screen come back, it has selected duplicated at bottom of the selection. Is there a way like normal html select behavior ?
    Thanks inadvance for any inputs.

    Murthy,
    Unfortunately, though a very reasonable requirement, there is no option for
    placing the default item.
    - john
    "Murthy" <[email protected]> wrote in message
    news:[email protected]..
    >
    Hi,
    I am using <netui:select dataSource="{actionForm.xyz}" defaultValue="Any"optionsDataSource="{actionForm.someMap}"
    />
    Now I am getting the values from database to populate the dropdown usingthe optionsDataSource.
    As I am using the defaultValue, it is being added to the end of thedropdown and
    selected by default when I a mopening the page on browser.
    In my dropdown, the values are as follows:
    apple
    orange
    banana
    Any
    Now my requirement is, the defaultValue, Any, must be there at the top ofthe
    list instead at the bottom of thge dropdown values. i.e., In the abovelist, "Any"
    must be above apple option.
    How can I achieve this using netui:select tag?
    Thanks & Regards,
    Murthy

  • How to keep the defaultValue in the netui:select tag at the beginning of the dropdown values?

    Hi,
    I am using <netui:select dataSource="{actionForm.xyz}" defaultValue="Any" optionsDataSource="{actionForm.someMap}"
    />
    Now I am getting the values from database to populate the dropdown using the optionsDataSource.
    As I am using the defaultValue, it is being added to the end of the dropdown and
    selected by default when I a mopening the page on browser.
    In my dropdown, the values are as follows:
    apple
    orange
    banana
    Any
    Now my requirement is, the defaultValue, Any, must be there at the top of the
    list instead at the bottom of thge dropdown values. i.e., In the above list, "Any"
    must be above apple option.
    How can I achieve this using netui:select tag?
    Thanks & Regards,
    Murthy

    Murthy,
    Unfortunately, though a very reasonable requirement, there is no option for
    placing the default item.
    - john
    "Murthy" <[email protected]> wrote in message
    news:[email protected]..
    >
    Hi,
    I am using <netui:select dataSource="{actionForm.xyz}" defaultValue="Any"optionsDataSource="{actionForm.someMap}"
    />
    Now I am getting the values from database to populate the dropdown usingthe optionsDataSource.
    As I am using the defaultValue, it is being added to the end of thedropdown and
    selected by default when I a mopening the page on browser.
    In my dropdown, the values are as follows:
    apple
    orange
    banana
    Any
    Now my requirement is, the defaultValue, Any, must be there at the top ofthe
    list instead at the bottom of thge dropdown values. i.e., In the abovelist, "Any"
    must be above apple option.
    How can I achieve this using netui:select tag?
    Thanks & Regards,
    Murthy

  • Form bean with int property and netui:select tag

    Hi,
    I've recently started using WebLogic 8.1 for a client project. There's
    been a bit of a learning curve, but I've been able to find most of my
    answers in the docs or on the dev2dev site. This one, though, I've been
    unable to manage.
    I have a database table, call it foo. In it I have columns for id
    (numeric) and name (string). I created a database control to read that
    data:
    select id, name
    from foo
    I then want to use this data to populate a select list in a form, which
    is going to be used to submit new records for another table. For the data:
    id     name
    1     Foo
    2     Bar
    3     Bletch
    I want to generate a select list (this is the output HTML, not the netui
    tags):
    <select name="foo">
    <option value="1">Foo</option>
    <option value="2">Bar</option>
    <option value="3">Bletch</option>
    </select>
    My first question is what the best way to do this is. I was able to get
    this working by creating a database control, which returns an array of a
    custom Foo class. I then pass that array into a utility method which
    converts it into a Map, and pass that map to the netui:select tag in the
    optionDataSource attribute. This works, but it seems rather roundabout,
    so I'm wondering if there's a better way to do it, without needing the
    conversion utility method in the middle. I tried playing around with
    the control, I tried using different netui tags (I thought I could do it
    with a repeater and netui:selectOption tags, but that didn't work), and
    nothing else worked.
    The second problem arose when I was tying the result to a Form Bean. I
    created a bean with all the data that I was reading from the form, and
    at first, I just made everything in the form bean be a String. For this
    select, though, the values are ids, so I thought I'd just make them be
    ints in the form bean instead. However, when I did that, WL decided
    that it wanted to add in a default option with a value of 0:
    <select name="foo">
    <option value="1">Foo</option>
    <option value="2">Bar</option>
    <option value="3">Bletch</option>
    <option value="0" selected>0</option>
    </select>
    I've tried to find a way to get rid of that 0, and I can't. Is there a
    way to prevent it from sticking in a default value like that? Or do I
    have to just leave it as a String in the form bean to get it to work the
    way I want?
    Thanks in advance for your help.
    Joe Robins                    Tel: 212-918-5057
    Thaumaturgix, Inc.               Fax: 212-918-5001
    19 W. 44th St., Suite 810          Email: [email protected]
    New York, NY 10036               http://www.tgix.com
    thau'ma-tur-gy, n. the working of miracles.

    wrt your 2nd problem, in the jpf, for the form bean, are you declaring your id
    like this:
    private int id;
    if so, try declaring it w/ a valid value, like:
    private int id = 1;
    -tanya
    Joe Robins <[email protected]> wrote:
    Hi,
    I've recently started using WebLogic 8.1 for a client project. There's
    been a bit of a learning curve, but I've been able to find most of my
    answers in the docs or on the dev2dev site. This one, though, I've been
    unable to manage.
    I have a database table, call it foo. In it I have columns for id
    (numeric) and name (string). I created a database control to read that
    data:
    select id, name
    from foo
    I then want to use this data to populate a select list in a form, which
    is going to be used to submit new records for another table. For the
    data:
    id     name
    1     Foo
    2     Bar
    3     Bletch
    I want to generate a select list (this is the output HTML, not the netui
    tags):
    <select name="foo">
    <option value="1">Foo</option>
    <option value="2">Bar</option>
    <option value="3">Bletch</option>
    </select>
    My first question is what the best way to do this is. I was able to
    get
    this working by creating a database control, which returns an array of
    a
    custom Foo class. I then pass that array into a utility method which
    converts it into a Map, and pass that map to the netui:select tag in
    the
    optionDataSource attribute. This works, but it seems rather roundabout,
    so I'm wondering if there's a better way to do it, without needing the
    conversion utility method in the middle. I tried playing around with
    the control, I tried using different netui tags (I thought I could do
    it
    with a repeater and netui:selectOption tags, but that didn't work), and
    nothing else worked.
    The second problem arose when I was tying the result to a Form Bean.
    I
    created a bean with all the data that I was reading from the form, and
    at first, I just made everything in the form bean be a String. For this
    select, though, the values are ids, so I thought I'd just make them be
    ints in the form bean instead. However, when I did that, WL decided
    that it wanted to add in a default option with a value of 0:
    <select name="foo">
    <option value="1">Foo</option>
    <option value="2">Bar</option>
    <option value="3">Bletch</option>
    <option value="0" selected>0</option>
    </select>
    I've tried to find a way to get rid of that 0, and I can't. Is there
    a
    way to prevent it from sticking in a default value like that? Or do
    I
    have to just leave it as a String in the form bean to get it to work
    the
    way I want?
    Thanks in advance for your help.
    Joe Robins                    Tel: 212-918-5057
    Thaumaturgix, Inc.               Fax: 212-918-5001
    19 W. 44th St., Suite 810          Email: [email protected]
    New York, NY 10036               http://www.tgix.com
    thau'ma-tur-gy, n. the working of miracles.

  • Persistenance for Java Objects Using Toplink

    Hi All Happy New Year
    I am trying the a tutorial in Jdeveloper 10.1.3.0.4 called
    Provide Persistenance for Java Objects Using Toplink.
    I have followed the instructions and get the following error.
    com.evermind.reflect.UndeclaredExceptionTypeException: oracle.oc4j.rmi.OracleRemoteException
         at __Proxy1.persistEntity(Unknown Source)
         at acme.ejb.session.EmpSessionClient.main(EmpSessionClient.java:29)
    oracle.oc4j.rmi.OracleRemoteException: Invocation error: java.lang.NoSuchMethodException: acme.ejb.session.EmpSession.persistEntity(java.lang.Object)
    The release notes mention TopLink POJO's Must Implement java.io.Serializable When Returned From a Session Bean's Remote Interface (4902787) When creating a session bean facade for TopLink POJO objects, you must implement java.io.Serializable for each of the TopLink POJO objects returned from the SessionBean facade through a remote interface. This is typically required when using ADF Swing, a EJB Sample Client, or when your EJB Session Bean resides on a separate application server from the client. You can also tell you you need to implement java.io.Serializable when you get the following exception:
    com.evermind.reflect.UndeclaredExceptionTypeException:
    /oracle.oc4j.rmi.OracleRemoteException/
    at __Proxy1.[Your Class Name Here] (Unknown Source)
    The workaround is to manually edit each POJO object to implement java.io.Serializable.
    I have only one POJO which is declared as follows:
    public class EmpInfo implements Serializable {
    Can anybody help me understand what I need to do to get it to work?
    Many Thanks in Advance

    Hi,
    can you send me your test scenario/project at anuj dot k dot jain at oracle dot com. I tried reproducing this but was unable to do so.
    Thanks,
    anuj dot k dot jain at oracle dot com

  • Netui:select tag

    Hi,
    I have a netui:select tag. When the user selects an option, I want it to execute
    the form's action (instead of having users to click a submit button).
    How do you do this?
    Thanks
    Laxman

    Hi,
    I think you can add a submit() javascript to the onselect action of the
    select tag. When the user selects a value the form will be subitted that
    means the form's action will be executed.
    BR,
    don
    Vangarapu Laxman wrote:
    Hi,
    I have a netui:select tag. When the user selects an option, I want it to execute
    the form's action (instead of having users to click a submit button).
    How do you do this?
    Thanks
    Laxman

  • How to instantiate a java object (using JNI)?(n'more)

    hey bschauwe, thanks for your last post, you were guessing but your 4th guess was right on the money of how id like to do it.
    "4. An alternative way to return data to java from C is to instantiate a java object (using JNI), then use JNI to call that object's setters, then return the object at the end of the C routine."
    I know now how to get the object's setters, I am just unsure how to instantiate a java object from the native C code using JNI. Also you said to returnt he object at the end of the c routine, that is just a good ol' return statement right? no other functions to release memory or anything are needed? So basically it would be something like:
    JNIEXPORT jobject retObj JNICALL Java_AbfaRegion_getJSourceData
      (JNIEnv *env, jobject thisObj)
            //instantiate the java object on retObj????
            //call setters with values from the c structures...
            //return retObj??? no other memory releasing needed?
    }Thanks again for all your help,
    Shane

    K sounds straight forward enough, the index in my book had nothing on <init> and I wasnt aware of the NewObject call. So my final (well for demonstration purposes) code should look something like:
    JNIEXPORT jobject retObj JNICALL Java_AbfaRegion_getJSourceData
      (JNIEnv *env, jobject thisObj)
         jclass clazz;
         jclass clazzTemp;
         jmethodID mid;
         jint val;
         jobject tempObj;
            //first instanciate the object
         clazz = (*env)->GetObjectClass(env, retObj);
         mid  = (*env)->GetMethodID(env, clazz, "<init>", "()V");     
            //Get Object
         tempObj = (*env)->NewObject(env, clazz, mid);
            //get Class reference to instantiated class
         clazzTemp = (*env)->GetObjectClass(env, tempObj);
            //Start calling setters to set the object up.
         mid = (*env)->GetMethodID(env, clazzTemp, "SetHeight", "(I)V");
         (*env)->CallVoidMethod(env,tempObj, mid, struct->myHeight);
            //set more members ...
            //return the object back to java with its members filled out.
            //before returning do I need to call (*env)->DeleteLocalRef(tempObj); ??
            return tempObj;
    }So is this how i do it for a function that is nativly defined as:
    public native JSources getJSourceData();?
    if this is right, then im cooking, and cannot thank you enough!
    -Shane

  • Generation of XML file from Java objects using castor

    I have the following java file(Customer.java).
    public class Customer
         private String ID;
         private FirstName firstName;
         private MiddleName middleName;
         private LastName lastName;
         private ArrayList address;
         public ArrayList getAddress() {
              return address;
         public void setAddress(ArrayList address) {
              this.address = address;
         public FirstName getFirstName() {
              return firstName;
         public void setFirstName(FirstName firstName) {
              this.firstName = firstName;
         public String getID() {
              return ID;
         public void setID(String id) {
              ID = id;
         public LastName getLastName() {
              return lastName;
         public void setLastName(LastName lastName) {
              this.lastName = lastName;
         public MiddleName getMiddleName() {
              return middleName;
         public void setMiddleName(MiddleName middleName) {
              this.middleName = middleName;
    Using castor i have created an xml file(customer.xml) which has the following format.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <customer ID="fbs0001">
    <FIRSTNAME>Fred</FIRSTNAME>
    <MIDDLENAME>B</MIDDLENAME>
    <LASTNAME>Scerbo</LASTNAME>
    - <ADDRESS>
    <FIRSTLINE>No 18, Sheshadri road</FIRSTLINE>
    <SECONDLINE>Gandhinagar Bangalore</SECONDLINE>
    </ADDRESS>
    - <ADDRESS>
    <FIRSTLINE>ITPL</FIRSTLINE>
    <SECONDLINE>Whitefield Bangalore</SECONDLINE>
    </ADDRESS>
    </customer>
    I have used a mapping file to get this output.Is there a way where i can get the output xml in the following format without changing the Java object structure.If yes then please suggest how this can be done.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <customer ID="fbs0001">
    <FIRSTNAME>Fred</FIRSTNAME>
    <MIDDLENAME>B</MIDDLENAME>
    <LASTNAME>Scerbo</LASTNAME>
    </customer>
    <ADDRESS>
    <FIRSTLINE>No 18, Sheshadri road</FIRSTLINE>
    <SECONDLINE>Gandhinagar Bangalore</SECONDLINE>
    </ADDRESS>
    - <ADDRESS>
    <FIRSTLINE>ITPL</FIRSTLINE>
    <SECONDLINE>Whitefield Bangalore</SECONDLINE>
    </ADDRESS>
    I mean the output xml file should have the address as a separate tag not withing the root tag customer.

    Hello,
    Castor's own discussion groups might be able to point you to the solution you're looking for (if this use case is possible using Castor).
    Oracle has its own object-to-XML mapping tool that is part of the TopLink product. It allows you to map existing objects to an existing XML Schema. This can be done visually using the TopLink Workbench, or programmatically using the TopLink APIs. TopLink OXM also supports the JAXB specification.
    Using TopLink OXM to get the desired XML result I would recommend the following. Map the Customer and Address classes to XML, but don't map the relationship between Customer and Address. Then make the calls to the marshaller something like the following:
    marshaller.marshal(aCustomer, System.out);
    for(int x=0; x<aCustomer.getAddress().size(); x++) {
         marshal(aCustomer.getAddress().get(x), System.out);
    Example - Using TopLink OXM to map an existing object model to an existing XML Schema:
    http://www.oracle.com/technology/products/ias/toplink/preview/10.1.3dp4/howto/ox/index.htm
    For more information on TopLink object-to-XML mapping:
    http://www.oracle.com/technology/products/ias/toplink/preview/10.1.3dp4/objectxml/index.html
    -Blaise

  • Reg XML generation from java objects using SAX 2.0

    i'm using java 1.6 and i've imported following class to generate XML from java objects
    import com.sun.org.apache.xml.internal.serialize.OutputFormat;
    import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
    the following class has been imple her to create a Xml file and tag elements ,
    OutputFormat of = new OutputFormat("XML", "iso-8859-1", true);
    XMLSerializer serializer = new XMLSerializer(fos, of);
    ContentHandler hd = serializer.asContentHandler();
    hd.startDocument();
    everything works fine but i'm getting warrnin reg the serializer and outputformat
    warring is:
    com.sun.org.apache.xml.internal.serialize.OutputFormat is Sun proprietary API and may be removed in a future release
    com.sun.org.apache.xml.internal.serialize.OutputFormat is Sun proprietary API and may be removed in a future release
    HOW CAN I AVOID DS WARRING PLZ HELP REG DS
    thanks ,
    with regards,
    Rajesh.S

    I've been having the same problem. Here is what i found:
    [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6476630]
    Hope that helps (or at least helps you feel better).

  • Sending Java object using E-Mail

    Dear Experts,
    In my application I am trying write java Object in a file. Then I have to attach that file with an E-Mail. In the receiver side I have to download the file and read the Java Object from file.
    The Problem is , when I am sending and receiving mail using outlook Express, My file is reduced by some Kbs(Example , I am sending 66kb but I am receiving only 64Kb).
    If any of you have some ideas to solve the above problem, please let me know.
    With Thanks
    Panneer

    Perhaps you are trying to send binary but e-mail must be in text or the data will get filtered/mangled.

  • How do i query for a html content using cm:select tag

    Hi i want to query the dmsBase directory for any html file(s).
    I am using..
    <cm:select> tag and using query ="mimeType like 'text/*' "
    But it doesnot work
    HELP....

    Thanks for the reply, however I did find that you can test for a NULL with a Velocity #if statement and it works. Here's what I found this at the below website:
    Conditional. Null can be checked for using #if ($obj) obj not null #end syntax.
    http://today.java.net/pub/a/today/2003/12/16/velocity.html
    Regards

  • Using outer Select tag  to Fill Inner Select Tag

    I had written a code as follows
    Where I have a table in which two of it's cells are Select tags. i want onchange of first Master Select tag the other combo should be filled with values of database. When I have more than one rows in a table the Values are not preserved in the both Select tags as soon as i Select the Master Select Tag[u[/b]]
    <table width="100%" border="1" cellspacing="0" cellpadding="0" bgcolor="#C7D3EB" >                               
            <tr>
             <th  colspan="1"><font size="2" face="Verdana">Sr.No.</font></th>
             <th  colspan="1"><font size="2" face="Verdana">Expence Catg.</font></th>
             <th  colspan="1"><font size="2" face="Verdana">Expence Desc.</font></th>
             <th  colspan="1"><font size="2" face="Verdana">Budget Amt.</font></th>
             <th  colspan="1"><font size="2" face="Verdana">FIL Share(%)</font></th>
             <th  colspan="1"><font size="2" face="Verdana">Uesr Remark</font></th>
             <th  colspan="1"><font size="2" face="Verdana">Mkt. Remark</font></th>
            </tr>
            <%
             if(strentry!=null)
               for(int i=1; i<=entry; i++)
            %>
            <tr>
             <td> <font size="2" face="Verdana"><input name="sr_no"  value=<%=i%> type="text" size="2" ></font></td>
             <td> <font size="2" face="Verdana">
                   <select name="exp_hd" onchange="Submitme()">
                    <%
                    int j=i;
                      ArrayList expctg = spb.getExpenseCategory();
                      Iterator ite = expctg.iterator();
                        while(ite.hasNext())
                                String exp_catg = (String)ite.next();
                    %>
                                  <option value="<%=exp_catg%>" <%if(exp_catg.equals(expense_catg) ) out.println("selected"); %>><%=exp_catg%></option>
                    <% 
                    %>
                    </select>
             </td>
             <%
               if(expense_catg!=null)
                %>
                  <td> <font size="2" face="Verdana">
                     <select name="exp_desc">
                    <%
                      ArrayList expdesc = spb.getExpenseDesc(expense_catg);
                      Iterator ited = expdesc.iterator();
                        while(ited.hasNext())
                            String exp_desc_cd = (String)ited.next();
                            String exp_desc = (String)ited.next();
                   %>
                  <option value="<%=exp_desc_cd%>" <%if(exp_desc_cd.equals(expense_desc)) out.println("selected"); %>><%=exp_desc%></option>
                  <% 
                  %>
                   </select>
                <%
                %>
             <td> <font size="2" face="Verdana"><input name="bud_amt" type="text" size="5" ></font></td>
             <td> <font size="2" face="Verdana"><input name="fil_share" type="text" size="5" ></font></td>
             <td> <font size="2" face="Verdana"><input name="user_rmk" type="text" size="35" ></font></td>
             <td > <font size="2" face="Verdana"><input   disabled="true"  STYLE="background-color: #FFFFCC;"  name="mkt_rmk" type="text" size="35" ></font></td>
           </tr>
            <%  
        %> 
       </tr>In this entry is a variable on which the rows of table are decided.
    So whwt i have to do to preserve the values of Options in Select tags
    in Previous rows

    I had written a code as follows
    Where I have a table in which two of it's cells are Select tags. i want onchange of first Master Select tag the other combo should be filled with values of database. When I have more than one rows in a table the Values are not preserved in the both Select tags as soon as i Select the Master Select Tag[u[/b]]
    <table width="100%" border="1" cellspacing="0" cellpadding="0" bgcolor="#C7D3EB" >                               
            <tr>
             <th  colspan="1"><font size="2" face="Verdana">Sr.No.</font></th>
             <th  colspan="1"><font size="2" face="Verdana">Expence Catg.</font></th>
             <th  colspan="1"><font size="2" face="Verdana">Expence Desc.</font></th>
             <th  colspan="1"><font size="2" face="Verdana">Budget Amt.</font></th>
             <th  colspan="1"><font size="2" face="Verdana">FIL Share(%)</font></th>
             <th  colspan="1"><font size="2" face="Verdana">Uesr Remark</font></th>
             <th  colspan="1"><font size="2" face="Verdana">Mkt. Remark</font></th>
            </tr>
            <%
             if(strentry!=null)
               for(int i=1; i<=entry; i++)
            %>
            <tr>
             <td> <font size="2" face="Verdana"><input name="sr_no"  value=<%=i%> type="text" size="2" ></font></td>
             <td> <font size="2" face="Verdana">
                   <select name="exp_hd" onchange="Submitme()">
                    <%
                    int j=i;
                      ArrayList expctg = spb.getExpenseCategory();
                      Iterator ite = expctg.iterator();
                        while(ite.hasNext())
                                String exp_catg = (String)ite.next();
                    %>
                                  <option value="<%=exp_catg%>" <%if(exp_catg.equals(expense_catg) ) out.println("selected"); %>><%=exp_catg%></option>
                    <% 
                    %>
                    </select>
             </td>
             <%
               if(expense_catg!=null)
                %>
                  <td> <font size="2" face="Verdana">
                     <select name="exp_desc">
                    <%
                      ArrayList expdesc = spb.getExpenseDesc(expense_catg);
                      Iterator ited = expdesc.iterator();
                        while(ited.hasNext())
                            String exp_desc_cd = (String)ited.next();
                            String exp_desc = (String)ited.next();
                   %>
                  <option value="<%=exp_desc_cd%>" <%if(exp_desc_cd.equals(expense_desc)) out.println("selected"); %>><%=exp_desc%></option>
                  <% 
                  %>
                   </select>
                <%
                %>
             <td> <font size="2" face="Verdana"><input name="bud_amt" type="text" size="5" ></font></td>
             <td> <font size="2" face="Verdana"><input name="fil_share" type="text" size="5" ></font></td>
             <td> <font size="2" face="Verdana"><input name="user_rmk" type="text" size="35" ></font></td>
             <td > <font size="2" face="Verdana"><input   disabled="true"  STYLE="background-color: #FFFFCC;"  name="mkt_rmk" type="text" size="35" ></font></td>
           </tr>
            <%  
        %> 
       </tr>In this entry is a variable on which the rows of table are decided.
    So whwt i have to do to preserve the values of Options in Select tags
    in Previous rows

  • Error Generating Java Objects using TopLink

    Running online tutorial: Build a Web Application with ADF Faces and Oracle TopLink
    Generated errors when trying to build Java Objects From Table Wizard at step 9.
    [b]java.lang.NullPointerException
         at oracle.ideimpl.log.TabbedLogManager.getMsgPage(TabbedLogManager.java:101)
         at oracle.toplink.addin.log.POJOGenerationLoggingAdapter.updateTask(POJOGenerationLoggingAdapter.java:42)
         at oracle.toplink.addin.mappingcreation.MappingCreatorImpl.fireTaskUpdated(MappingCreatorImpl.java:1049)
         at oracle.toplink.addin.mappingcreation.MappingCreatorImpl.generateMappedDescriptorsForTables(MappingCreatorImpl.java:231)
         at oracle.toplink.addin.mappingcreation.MappingCreatorImpl.generateMappedDescriptorsForTables(MappingCreatorImpl.java:201)
         at oracle.toplink.addin.wizard.jobgeneration.JobWizard$1.construct(JobWizard.java:401)
         at oracle.ide.util.SwingWorker$1.run(SwingWorker.java:119)
         at java.lang.Thread.run(Thread.java:595)
    Any help welcomed
    regards
    John

    Solved!!!
    I had installed JDeveloper 10g inside a directory that had a space in the directory name.

  • Help in using multiple select tag

    Hi all,
    I'm trying to make a jsp application that as follows:
    1- A multiple select control appears with a number of items in it
    2- Another multiple select is empty
    3- When you choose and item from the first select control and press a button the item moves to the second select control
    It is common to see such a thing in customizing ur yahoo page,
    the problem is that I don't know how to create an empty select control and then assign it items dynamicaly, please if any one can help me I would be grateful.
    Thanks...

    function insertNewOptions(x, y, field) {
         var mylength = 0;     
         myOption=new Option();       
         myOption.text  = y;
         myOption.value = x;
         mylength = field.length;     
         document.forms[0].field.options[field.length] = myOption;     
    }

Maybe you are looking for

  • Idea. Not sure if its available option

    I did some searching on a few occasions but have not been able to find what im looking for. Maybe I have used the wrong terms in the search IDK. What I would find incredibly useful between my Imac, Iphone and if I bought an ipad is the ability to sea

  • Urgent-creation of relationship query

    dear friends please tell me as to how to create relationship query between two tables for a particular field which is present in both the tables.pl reply to this mail id [email protected] thankyou cath

  • Cannot copy and paste from webmail in Firefox but can in Safari! Why?

    Last months (? after upgrade) I cannot copy and paste from my webmails but can with Safari. Any help with this? Infuriating.

  • How can i get todays date as an yyyy-MM-dd format instead of Time stamp

    how can i get todays date as an yyyy-MM-dd format instead of Time stamp,i try to do it in the fallowing way <code> java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd");      java.util.Date d = new java.util.Date();           

  • Errors running acrobat pro xi

    I was getting the security prompt each time I tried to run acrobat pro xi so I uninstalled and reinstalled.  Now when it launches, I have to pick english from the window since Italian is picked.  However, after I pick english, it still tries to make