primefaces

Primefaces how to update content in a dialog and keep the dialog centered?

烂漫一生 提交于 2019-12-31 10:21:19
问题 I have a dialog that contains no content on page load and I'm dynamically setting the content of a dialog box based on the link that a user clicks on. <p:dialog widgetVar="dlg" modal="true" id="dialog"> <p:panel id="fullArticle"> <h:outputText value="#{content.newsArticle}" escape="false" /> </p:panel> </p:dialog> ... ... <p:commandLink value="Read more" actionListener="#{content.getFullArticle}" onclick='dlg.show();' update=":fullArticle"> <f:attribute name="contentId" value="#{news

How to avoid repeatedly click a button in a form?

我的梦境 提交于 2019-12-31 08:54:10
问题 My code: <h:form id="newBSTypePanel" > <h:panelGrid columns="2" id="newRecod" > <h:outputText value="Name"/><h:inputText value="#{treeTableController.newBStypeBean.currentObject.TYPENAME.value}" required="true" /> <p:commandButton value="save" action="#{treeTableController.saveNewNodes}" oncomplete="Dlg.hide()" update="productDataForm"/> <p:commandButton value="close" oncomplete="Dlg.hide()" /> </h:panelGrid> </h:form> There is quite a bit of functionality associated with the save action. If

How to avoid repeatedly click a button in a form?

我的梦境 提交于 2019-12-31 08:53:48
问题 My code: <h:form id="newBSTypePanel" > <h:panelGrid columns="2" id="newRecod" > <h:outputText value="Name"/><h:inputText value="#{treeTableController.newBStypeBean.currentObject.TYPENAME.value}" required="true" /> <p:commandButton value="save" action="#{treeTableController.saveNewNodes}" oncomplete="Dlg.hide()" update="productDataForm"/> <p:commandButton value="close" oncomplete="Dlg.hide()" /> </h:panelGrid> </h:form> There is quite a bit of functionality associated with the save action. If

difference between JSF, RichFaces, PrimeFaces and IceFaces

Deadly 提交于 2019-12-31 08:46:11
问题 I am new to jsf and want to know about the clear difference between JSF, Rich-/Prime-/IceFaces. In JSF we create pages with .jsp extension and write java code in the backing beans. But how exactly all "faces" are different and related to jsf. 回答1: I think if you put it very simply . ref : Source JSF is a request-driven MVC web framework for constructing user interfaces using components. And PrimeFaces/RichFaces/IceFaces are components/JSF libraries that you can use on top of JSF RichFaces :

What does <f:facet> do and when should I use it?

纵饮孤独 提交于 2019-12-31 08:43:16
问题 I have been having trouble with the tag <f:facet> . I am working form other examples of code which use it, but I'm not sure exactly what purpose it serves. I have written some code which in method is exactly the same as other code I have seen which works, except there's is wrapped in a <f:facet name=actions> tag. When I add this around my code the drop down box I am wrapping it around disappears when I deploy. Anyone able to suggest a reason for this or give me an insight into how and when to

What does <f:facet> do and when should I use it?

爷,独闯天下 提交于 2019-12-31 08:42:57
问题 I have been having trouble with the tag <f:facet> . I am working form other examples of code which use it, but I'm not sure exactly what purpose it serves. I have written some code which in method is exactly the same as other code I have seen which works, except there's is wrapped in a <f:facet name=actions> tag. When I add this around my code the drop down box I am wrapping it around disappears when I deploy. Anyone able to suggest a reason for this or give me an insight into how and when to

Set Focus for Primefaces Component in Bean with WidgetVar with RequestContex Execute

不羁岁月 提交于 2019-12-31 07:22:08
问题 Is there a way to set my component focus after an function call to an other component with Primefaces RequestContex? i tried: RequestContex.getCurrentInstance().execute("PF('WidgetVar').focus();"); and RequestContex.getCurrentInstance().execute("(((InputText) event.getComponent()).getWidgetVar()).focus();"); I dont get an error but nothing happens. Did i miss something or is this not possible? I use Primefaces 4.0.3 and MyFaces 2.0.2 EDIT Example Code Bean import java.io.Serializable; import

JSF Primefaces selectonemenu page navigation

て烟熏妆下的殇ゞ 提交于 2019-12-31 05:43:06
问题 I am developing a web application using JSF and Primefaces. I want o show the following menu and depending on the choosen option go to one page or another. XHTML code: <p:outputLabel for="car" value="Grouping: " /> <p:selectOneMenu id="car" value="#{selectOneMenuView.car}"> <f:selectItem itemLabel="Select One" itemValue="" /> <f:selectItems value="#{selectOneMenuView.cars}" /> </p:selectOneMenu> Managed bean code: import java.util.ArrayList; import java.util.HashMap; import java.util.List;

Error in Implementing PrimeFaces extensions

泄露秘密 提交于 2019-12-31 04:45:07
问题 I am new to primefaces and trying to implement the primefaces extensions. As per the guide I have added the following jars to my buildpath: 1) commons-lang3-3.1.jar 2) gson-2.3.1.jar 3) primefaces-5.0.jar 4) primefaces-5.0-sources.jar 5) primefaces-extensions-3.2.0.jar and I have created an xhtml and managed bean as suggested here: http://www.primefaces.org/showcase-ext/sections/timeline/basic.jsf Following is the error log for the same: Jun 25, 2015 4:07:05 PM com.sun.faces.context

How to update panel from datatable [duplicate]

巧了我就是萌 提交于 2019-12-31 04:24:49
问题 This question already has answers here : How to find out client ID of component for ajax update/render? Cannot find component with expression “foo” referenced from “bar” (5 answers) Closed 3 years ago . Commandbutton with id("myButtonId2") works fine. I mean it updates "myOutputPanel" but commandbutton which is inside datatable doesn't update outputPanel. Is there a specific update style for datatables? <h:form id="myForm" prependId="false"> <p:panel id="myPanel"> <p:dataTable id="myDatatable