primefaces

How to rendered <p:selectOneMenu> [duplicate]

无人久伴 提交于 2020-01-05 06:40:37
问题 This question already has an answer here : Ajax update/render does not work on a component which has rendered attribute (1 answer) Closed 4 years ago . I am unable to rendered a selectOneMenu but only to disable the item for example this is working: <p:panel header="Field Chooser"> <h:panelGrid columns="2" cellpadding="5"> <p:selectOneMenu id="l1" value="#{acqBean.gb1}"> <f:selectItem itemLabel="Group By" itemValue="" /> <f:selectItems value="#{acqBean.level1}" /> <p:ajax update="l2" listener

Primefaces global tooltip with HTML content

二次信任 提交于 2020-01-05 05:33:07
问题 In my JSF page I am using a datatable with tooltip on a row column like this: <p:dataTable var="item" ...> <p:column headerText="#{bundle['item.name']}"> <!-- <h:outputText value="#{item.name}" title="#{simpleTooltipGenerator.generate(item)}"/> --> <h:outputText id="name" value="#{item.name}"/> <p:tooltip for="name" escape="false" value="#{simpleTooltipGenerator.generate(item)}"/> </p:column> </p:dataTable> The simpleTooltipGenerator.generate() is a method which generates the following HTML

Trying to nest JSF expression strings

▼魔方 西西 提交于 2020-01-05 04:50:14
问题 I'd like to know whether it is possible to adapt the ExtendedBeanELResolver from the question nesting-jsf-expression-strings as well to handle this nested EL expression: #{controllerBean.getBean('userProfileBean', component).street}* whereby controllerBean.getBean returns the bean userProfileBean . I'll get with the ExtenedBeanELResolver following exception: SCHWERWIEGEND: javax.el.PropertyNotFoundException: /WEB-INF/templates/modification/userProfile.xhtml @35,196 value="#{controllerBean

Language switcher implementation in JSF

假如想象 提交于 2020-01-05 04:36:10
问题 I have a complex jsf page with some widgets developed in PrimeFaces. Up to now, the application is completely ajaxified, meaning that there aren't submits, but all the events and updates are handled through Ajax behavior (this is not a must, but a nice-to-have feature). I have also done a SelectOneMenu for switching the language: <h:form> <p:panelGrid columns="2" > <h:outputText value="#{msgs.SelectLanguage}" /> <p:selectOneMenu value="#{languageSwitcher.selectedLanguage}" > <f:selectItems

customize lineChart in primefaces

戏子无情 提交于 2020-01-05 03:44:26
问题 I'm using of lineChart in primefaces on my project. I want to customize lineChart. how to change background color and remove grid of lineChart ? 回答1: You can set custom design with: <script type="text/javascript"> function customExtender() { this.cfg.grid = { ........... } } </script> ... <p:lineChart extender="customExtender" value="..." /> and just check jqplot documentation http://www.jqplot.com/docs/files/jqPlotOptions-txt.html section grid: { drawGridLines: true, // wether to draw lines

Primefaces wizard move to the next tab on an event

a 夏天 提交于 2020-01-05 03:44:19
问题 I have a prime faces wizard and a dataTable, my page successfully go to the next wizard tab if I selected an item from the dataTable, but my problem is when inserting a new data to the dataTable I want the wizard to go to the next tab if the insert was successful, any suggestions please? 回答1: You can use the client side API from backing bean, after the insert was successful. Add a widgetVar to your wizard <p:wizard widgetVar="wiz" ...> ... <p/wizard> Add the client execute, after the data is

customize lineChart in primefaces

拈花ヽ惹草 提交于 2020-01-05 03:44:07
问题 I'm using of lineChart in primefaces on my project. I want to customize lineChart. how to change background color and remove grid of lineChart ? 回答1: You can set custom design with: <script type="text/javascript"> function customExtender() { this.cfg.grid = { ........... } } </script> ... <p:lineChart extender="customExtender" value="..." /> and just check jqplot documentation http://www.jqplot.com/docs/files/jqPlotOptions-txt.html section grid: { drawGridLines: true, // wether to draw lines

How to set an action to primefaces keyboard's enter button

橙三吉。 提交于 2020-01-05 02:58:08
问题 I am new to JSF and PrimeFaces. I wish to use on-screen keyboard in my login page for my JSF project and I found primefaces keyboard. When I press the enter button in the primefaces keyboard, it doesn't work. Even if I added onkeypress="if (event.keyCode == 13) #{usersBean.login()};" I tried to add in <h:form> and the <p:keyboard> . It only work for pressing the physical enter button but not the one in the primefaces keyboard. Below is the sample of my login page that using the primefaces

Primefaces menuitem change custom icon

最后都变了- 提交于 2020-01-05 02:51:42
问题 I have some problems to customize the icon of menuitem component. I tried this form but i don't have success: <p:menuitem value="Clientes" outcome="/clientes/CadastroCliente" icon="resources/images/person.png"/> I too try use css <p:menuitem value="Clientes" outcome="/clientes/CadastroCliente" icon="user"/> .user{ background: url('resources/images/menu/users.png') no-repeat; height:16px; width:16px; } I use PrimeFaces 5. 回答1: Try this <p:menuitem value="Clientes" outcome="/clientes

Skip validation of Primefaces Inputtext on keyup event but validate on submit

僤鯓⒐⒋嵵緔 提交于 2020-01-05 02:49:31
问题 I have two requirements for my InputText: value of the p:inputText should be immediately displayed on screen in h:outputText with keyup-event the value should be unique in database I'm using Primefaces 4.0, JSF 2.2 with Glassfish 4 and Java 7 My code looks like this at the moment Example.xhtml <h:form> <p:inputText id="value" value="#{myBean.value}" > <p:ajax event="keyup" update="example" process="@this" /> <f:validator binding="#{uniqueValueValidator}" /> </p:inputText> <h:outputText id=