primefaces

Primefaces: How to persist reordered data from a p:orderList?

不想你离开。 提交于 2021-01-28 04:07:20
问题 I am still working on with the primefaces component p:orderlist. I have managed to implement a drag and drop behaviour (to put items from another list in to the p:orderlist) and I also make the p:commandButton work inside the p:orderlist. Now I have a new problem. You can drag and drop items inside the p:order list, to give them a new order. (That is, why the component is called orderlist, nothing to do with a shopping order ;-) ). But if I reorder my items I get no notification or event,

p:resetInput does not reset the p:dialog when it is reopened

こ雲淡風輕ζ 提交于 2021-01-28 03:18:27
问题 Here is some html I am writing to allow categories to be added using a dialog: <p:dialog id="newCategoryDlg" header="Add New Category" widgetVar="newCategoryDialog" resizable="false"> <h:form id="newCategoryForm"> <p:panelGrid id="displayNewCategory" columns="2" cellpadding="4" style="margin:0 auto;"> <h:outputText value="Category Name :"></h:outputText> <p:inputText value="#{categoryController.newCategory.name}" required="true" requiredMessage="Please Enter a Category ID!" /> <f:facet name=

primefaces datagrid filter by inputtext

北战南征 提交于 2021-01-28 01:54:48
问题 I want to use inputtext to filter datagrid. Some code like this: <p:inputText value="#{bean.searchString}"> <p:ajax event="keyup" update="grid" /> </p:inputText> <p:dataGrid var="item" value="#{bean.findItemsByName}" columns="9" layout="grid" rows="130" paginator="false" id="grid"> 回答1: There us no built in feature that allows datagrid filtering, but you can code your own. Something like this (using google library): Bean: import com.google.common.base.Predicates; import com.google.common

How to build a dynamic menu

本小妞迷上赌 提交于 2021-01-27 18:09:27
问题 Hey I new using jsf so I want to build a dynamic menu with items loaded from database but I'm not sure what functions do I need or how to construct the backing bean for the menu. I already have the database create and three tables Rol, User, Rol x User, Items. Also what will be good attributes for the item table??. 回答1: Each Rol should have Items so you need an extra table ItemsXRol i would choose this columns for Item : id, label, url, tooltip, father_item, level something like that, of

How to build a dynamic menu

ぐ巨炮叔叔 提交于 2021-01-27 18:05:32
问题 Hey I new using jsf so I want to build a dynamic menu with items loaded from database but I'm not sure what functions do I need or how to construct the backing bean for the menu. I already have the database create and three tables Rol, User, Rol x User, Items. Also what will be good attributes for the item table??. 回答1: Each Rol should have Items so you need an extra table ItemsXRol i would choose this columns for Item : id, label, url, tooltip, father_item, level something like that, of