Text
Hierarchy
Buttin
Manual
Cronjob
Cache

Select One Menu

There is no specific jeesl component for a p:selectOneMenu available, but this page is summarising some important attributes:

  • effect="fade"
  • autoWidth="false" prevents setting of min-width, possibly preventing overflow of select
  • dynamic="true" prevents that menu artefacts are visible at the bottom of the page

There are a couple of Ajax listeners available, e.g.

  • <p:ajax event="change" listener="#{bean.listener}" update="id"/>

Warning :

  • When using filter options (with p:column inside), it seems the component does not work with dynamic=true
<p:panel styleClass="jeesl-panel">
	<f:facet name="header"><j:pHeader title="#{componentInputMarkupBean.mText.type.name[localeCode].lang}"/></f:facet>
	<f:facet name="actions">
		<j:svg type="jeeslSave" listener="#{componentInputMarkupBean.saveTxt()}" update=":sMarkup"/>
	</f:facet>
	<j:inputGrid>
		<jtp:label entity="Country"/>
		<p:selectOneMenu value="#{componentSelectOneMenuBean.country}" effect="fade" autoWidth="false" dynamic="true">
			<f:selectItems value="#{componentSelectOneMenuBean.countries}" var="c" itemLabel="#{c.name}" itemValue="#{c}"/>
		</p:selectOneMenu>
	</j:inputGrid>
</p:panel>
</ui:composition>