我希望根据firstoption和secondoption更改值 如果firstoption = go和second = true我想要MASK值" A" 如果firstoption = stop和second = true MASK =" B" 等
可以在没有managebean set inputbox的情况下使用,并且可以在inputbox中更改值吗?
<composite:interface>
<composite:attribute name="value" type="java.lang.String" />
<composite:attribute name="firstoption" type="java.lang.String"/>
<composite:attribute name="secondoption" d type="java.lang.Boolean" />
</composite:interface>
<composite:implementation>
<h:panelGrid>
<p:selectOneMenu id="first" value="#{cc.attrs.firstoption}" >
<p:ajax update="action"/>
<f:selectItem itemValue="GO" />
<f:selectItem itemValue="STOP"/>
</p:selectOneMenu>
<p:selectOneMenu id="second" value="#{cc.attrs.secondoption}" >
<p:ajax update="action"/>
<f:selectItem itemValue="#{true}" />
<f:selectItem itemValue="#{false}"/>
</p:selectOneMenu>
<p:inputText id="action" value="#{cc.attrs.value}"
<h:panelGrid>
</composite:implementation>
也许这样的按钮?
<f:setPropertyActionListener target="#{cc.attrs.value}" value="A" />
但不能使用它来输入文本/ selectonemenu