Want to transfer the value from h:output box to h:inputbox in jsf

i am having a relational record list to add the value into the database.
In this a field called deptno is binded to the above relational record.
The same page as a drop down list and an outputbox.
whenever the value changed in the drop down list(contains depts name),the corresponding dept no will be displyaed in the output box.
I need this value shud be populated into the above specified inputbox.
and also i made that inputbox as disable.so user needed not to type the value in the text box.just he has to select the value in the drop down list..
wat r the changes i have to do to populate the value of output box to inputbox?<h:inputText id="text8"
styleClass="inputText"
valueChangeListener="#{pc_Add.handleText8ValueChange}"
value="#{pc_Add.add_record.DEPTNO}" disabled="true">
</h:inputText><h:selectOneMenu styleClass="selectOneMenu"
id="menu1"
                                                            valueChangeListener="#{pc_Add.handleMenu1ValueChange3}"
                                                            onchange="submit();">
                                                            <f:selectItems
                                                                 value="#{selectitems.pc_Add.addbean.deptlist.deptlist.toArray}" />
                                                       </h:selectOneMenu> <h:outputText styleClass="outputText"
                                                            id="text9" value="#{pc_Add.addbean.dno}"></h:outputText>

Are you trying to execute either #{bindings.CreateInsert.execute} or #{bindings.CreateInsert1.execute} using the same button conditionally?
There are multiple ways of doing this -
Try #{condition?bindings.CreateInsert.execute:bindings.CreateInsert1.execute}
Or in the button action listener, call a paremeterized bean method and then execute the appropriate binding based on the parameter..
Hope I understood this right.

Similar Messages

Maybe you are looking for

  • Generate PDF with FOP : Specific charactar are wrong

    Hello, I've finally tested FOP to convert HTML to PDF. It's GREAT. I have just a little problem, german specific characters are shown well under html, but not under PDF. Any idea about this issue ?

  • MRP Procurement process

    Hello Team , I am looking for the correct SAP business practice of MRP procurement process for existing setup. Current setup : Demand is based on the sales / market demand based on which material is planned . Sales order / Production order are posted

  • No sound from any email i open

    Since upgrading to ML i am not able to hear any sound when opening email attatchments IE WMV files or anything

  • I am unable to download my music to my ipod shuffle

    i am unable to download my music from library onto my ipod shuffle?

  • Colored lines in the highlights

    Hello All, As you can see I am getting these lines in the white highlights.  Have no idea way. Photoshop CS3,  Camera Raw 4.6,  Mac G4,  OS 10.4.11 Will get same result from Nikon D70 and Nikon D90. Used PS Elements several years ago without this iss