سؤال

I have a requirement, where selection of an item from one drop down, triggers the displays for another drop down. So i used a autosubmit on the 1st dropdown and valueChange Listener which set the flags for displaying the 2nd drop down.Thought the flag is set to true, the 2nd drop down is not getting rendered. Is this a right way to do, am i missing some thing here.

I am testing this in tomcat using trinidad 2.0.1 and JSF Core 2.0.2. Any help on this is highly appreciated

    <h:form>
        <tr:panelFormLayout labelWidth="30%">
            <tr:selectOneChoice id="prior" value="#{render.priority}"
                label="Priority" immediate="true" autoSubmit="true"
                valueChangeListener="#{render.valueChanged}"
                unselectedLabel="..Please select a priority">
                <f:selectItem itemLabel="Low" itemValue="1" />
                <f:selectItem itemLabel="Medium" itemValue="2" />
                <f:selectItem itemLabel="High" itemValue="3" />
            </tr:selectOneChoice>
        </tr:panelFormLayout>

        <tr:panelGroupLayout partialTriggers="prior"
            rendered="#{render.displayInput}">
            <tr:outputLabel value="Testing"></tr:outputLabel>
        </tr:panelGroupLayout>
    </h:form>
هل كانت مفيدة؟

المحلول

Is this your whole code? You would be missing some tags

<tr:document>
<tr:form>
    ........
</tr:form>
</tr:document>

////

<tr:form> instead of <h:form>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top