jsf

Single Sign on implementation in Tomcat

最后都变了- 提交于 2021-01-28 12:00:38
问题 I have three jsf web application deployed on tomcat web server with SSL/TLS enabled. Now I want to build some kind of SSO authentication with particular roles. In tomcat conf/server.xml there is line: <Valve className="org.apache.catalina.authenticator.SingleSignOn" /> so I got idea that tomcat maybe have his own SSO implementation. Does anyone know where to find more information about this or some code examples? Thanks in advance 回答1: After many hours of research I found solution, so I will

ajax changes target attribute on multipart/form-data form

浪子不回头ぞ 提交于 2021-01-28 08:34:10
问题 When I try to render a component with f:ajax inside a multipart/form-data form, the target attribute of the form gets changed to JSFFrameId . Is this a bug? Here is a sample code when this occur: <h:form enctype="multipart/form-data"> <h:inputText> <f:ajax event="change" render="@this" execute="@this"/> </h:inputText> <h:inputFile /> </h:form> In my real code this is not what I'm trying to do but the same issue occurs with the sample code. When visiting this page I get the following HTML

Children component does not contain id parent in facet

ぐ巨炮叔叔 提交于 2021-01-28 05:26:20
问题 In a datatable there is the possibility to define custom facet. The facet I'm trying to define contains one p:menubutton , because those facets are contained in a paginator, p:menubutton is display on top and bottom of the datatable. First issue was, client id was duplicated (and i couldn't open the menubutton) . I fixed this issue by setting a specific id, see https://github.com/primefaces/primefaces/pull/2651/files, but works partially... Because, if a put two p:menubutton (or another

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,

Springboot Whitelabel Error Page with JSF (AWS)

和自甴很熟 提交于 2021-01-28 03:47:28
问题 I have an old (inherited) project that I need to deploy on AWS but I get some problems related to the template folder. This project has an index.xhtml on "src\main\webapp" instead of "src\main\resources\templates", I think it is beacuse it uses jsf but I'm new on Springboot and jsf pages. In the documentation I've got it says that in order to open the web you need to visit http://localhost:5000/index.jsf so to solve it I made a class with @Controller public class IndexController {

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

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"; } }

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