Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6173687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:37:12+00:00 2026-05-23T23:37:12+00:00

<f:view> <h:form> <h:panelGrid> <f:facet name=header> <h:outputText value=Create Order/> </f:facet> <h:column> <h:outputText value=Customer Number :

  • 0
<f:view>
 <h:form>
  <h:panelGrid>
   <f:facet name="header">
    <h:outputText value="Create Order"/>
   </f:facet>
   <h:column>
    <h:outputText value="Customer Number : "></h:outputText>
    <h:inputText value="#{SalesCreate.orderBean.customerNumber}"/>
   </h:column>
   <h:column>
    <h:outputText value="Create With : "></h:outputText>
     <h:selectOneMenu id="createWith" value="#{SalesCreate.orderBean.createWith}">
      <f:selectItem itemLabel="Without Reference" itemValue="noRef"/>
      <f:selectItem itemLabel="Reference" itemValue="ref"/>                            
     </h:selectOneMenu>
    </h:column>        
    <h:column>
     <h:outputText value="Reference By : "></h:outputText>
      <h:selectOneMenu id="refBy" value="#{SalesCreate.orderBean.referenceBy}">
       <f:selectItem itemLabel="Quotation" itemValue="quotation"/>
       <f:selectItem itemLabel="Contract" itemValue="contract"/>
      </h:selectOneMenu>
     </h:column>  
     <h:column>
     <h:outputText value="Inquiry Reference Number : "></h:outputText>
      <h:inputText id="docNum" value="#{SalesCreate.orderBean.referenceNum}"/>
      <h:commandButton value="..." onclick="javascript:popUp('OpenRef.jsp',this)">                          
      </h:commandButton>
      <h:commandButton value="Load" action="#{SalesCreate.getQuotationListFromDb}">                  </h:commandButton>                        
     </h:column>           
   </h:panelGrid>
  </h:form>
 </f:view>

Above is my JSP which contains selectOneMenu, I’m trying to enable the field referenceBy only if the user selects withReference in the previous field. Also depending on the value of referenceBy the values in the popup should differ i.e., id user selects referenceBy as quotation, values in the popup should be related to quotation.
the popup JSP contains a datatable with values from a database.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T23:37:12+00:00Added an answer on May 23, 2026 at 11:37 pm

    Use <f:ajax> to re-render the second dropdown on change of the first dropdown with help of the new JSF 2.0 ajax powers and use the disabled attribute to disable the second dropdown when the value of the first dropdown is not ref.

    <h:selectOneMenu id="createWith" value="#{SalesCreate.orderBean.createWith}">
      <f:selectItem itemLabel="Without Reference" itemValue="noRef"/>
      <f:selectItem itemLabel="Reference" itemValue="ref"/>
      <f:ajax render="refBy" />
    </h:selectOneMenu>
    ...
    <h:selectOneMenu id="refBy" value="#{SalesCreate.orderBean.referenceBy}" disabled="#{SalesCreate.orderBean.createWith != 'ref'}">
      <f:selectItem itemLabel="Quotation" itemValue="quotation"/>
      <f:selectItem itemLabel="Contract" itemValue="contract"/>
    </h:selectOneMenu>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

JSF view code: <f:view> <h:form> <h:panelGrid> <h:inputText id=key value=#{myManagedBean.key}/> <h:selectBooleanCheckbox id=rerun value=#{myManagedBean.rerun} rendered=#{myManagedBean.displayRerun}/> <h:commandButton
I want to create a XML editor (form view type) for iphone. Can anyone
I have an MVC view with a form built with the Ajax.BeginForm() helper method,
When submitting one form from view, how can i also read or have controller
I have form area in my view. If I click button A , I
I have this form in my view: <!-- Bug (extra 'i') right here-----------v -->
I have a view which contains a form, the form posts and the data
I have a simple form on a view page, implemented as a user control,
I have a View with an exposed form . I am trying to a
A certain form in our application displays a graphical view of a model. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.