jsf-2

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,

JSF - How can I retain the transient values within a ui:repeat after an immediate action

自古美人都是妖i 提交于 2021-01-28 00:50:31
问题 I created a very simple example based on my project in order to illustrate my doubt. Just a way to register a person with a list of telephone numbers. MainController.java private String name; private List<Phone> phoneList; // Getters and Setters @PostConstruct private void init() { phoneList = new ArrayList<>(); } public static class Phone implements Serializable { private String number; // Getters and Setters @Override public String toString() { return number != null ? number : "null"; } }

Changes in .xhtml file not reflected in browser, restart and build needed

空扰寡人 提交于 2021-01-27 06:28:56
问题 If I make changes in my .xhtml file, the changes are not getting reflected on the screen in my browser. To get it to work, I have to restart the server everytime. This seems unwieldy to me. I have added the following context parameters in my web.xml : <context-param> <param-name>javax.faces.PROJECT_STAGE</param-name> <param-value>Development</param-value> </context-param> <context-param> <param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name> <param-value>1</param-value> </context-param>

Changes in .xhtml file not reflected in browser, restart and build needed

旧时模样 提交于 2021-01-27 06:28:11
问题 If I make changes in my .xhtml file, the changes are not getting reflected on the screen in my browser. To get it to work, I have to restart the server everytime. This seems unwieldy to me. I have added the following context parameters in my web.xml : <context-param> <param-name>javax.faces.PROJECT_STAGE</param-name> <param-value>Development</param-value> </context-param> <context-param> <param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name> <param-value>1</param-value> </context-param>

Navigating to another page JSF

纵然是瞬间 提交于 2021-01-04 07:59:30
问题 I wrote a jsf application, this app inserts the data into mysql database and shows some of the inserted details in another page. I am successful in inserting the values into database, but unable to redirect to the other page even after writing the navigation rule. My action code <div align="center"><p:commandButton label="Submit" action="#{userData.add}" align="center" ajax="false" /></div> Navigation rule <managed-bean> <managed-bean-name>UserData</managed-bean-name> <managed-bean-class