jsf

Spring Security 4 and PrimeFaces 5 AJAX request handling

橙三吉。 提交于 2020-07-14 09:48:08
问题 Good Day. I've created a PrimeFaces 5 project (JSF 2.2) which makes use of Spring Security 4. I'm attempting to make use of p:dataTable control with single selection enabled, which through an ajax call, updates a p:pickList control. The problem is related with Spring Security. If I deactivate the security of the page where my page controls are located (admin.faces), the ajax behavior works fine. But if I activate security, I get 403 status codes and the pickList doesn't get updated. I must

call a custom listener for cancel in p:rowEditor

﹥>﹥吖頭↗ 提交于 2020-07-10 15:04:44
问题 I have been trying to call a custom listener when the cancel button is clicked in the primefaces rowEditor component. But I am not able to find the correct attribute to do this. The problem with the cancel button is that it works fine when the row is already present in the dataTable, if I try to add a new row dynamically to the dataTable and click on the cancel button [ if I think that it is not required ], the empty row is shown in the dataTable, when the empty row should be deleted. Would

call a custom listener for cancel in p:rowEditor

做~自己de王妃 提交于 2020-07-10 15:02:43
问题 I have been trying to call a custom listener when the cancel button is clicked in the primefaces rowEditor component. But I am not able to find the correct attribute to do this. The problem with the cancel button is that it works fine when the row is already present in the dataTable, if I try to add a new row dynamically to the dataTable and click on the cancel button [ if I think that it is not required ], the empty row is shown in the dataTable, when the empty row should be deleted. Would

p:remoteCommand inside iterating component like p:dataTable only works for last row

孤者浪人 提交于 2020-07-09 05:51:07
问题 i was trying to print the value entered in the inputText but it only shows 0 except for the last row it shows the right value! here's a minimal code (i didn't include all the fields and the getters/setters) @ManagedBean(name="medicament") @ViewScoped public class MedicamentBean { private List<Medicament> medicaments; private String libelle; private int qte_vente; public void test() { System.out.println(this.qte_vente); } } html: <h:form> <p:dataTable value ="#{medicament.medicaments}" var ="m

How to enter a JSF 2.2 flow with faces-redirect

笑着哭i 提交于 2020-07-04 12:55:07
问题 I've got a basic flow example working: src/main/webapp | |- index.xhtml |- flow1 |- flow1-flow.xml |- flow1.xhtml index.xhtml has a simple form that enters the flow with a parameter: <h:form> Click to enter flow1 <h:commandButton action="flow1" value="Flow 1"> <f:param name="testInput" value="hi there"/> </h:commandButton> </h:form> flow1.xhtml displays the param and lets you enter a value into flow scope: <h:form> Hi this is page 1. <h:inputText label="Enter something:" value="#{flowScope

How to pass submitted value of JSF custom component to managed bean?

♀尐吖头ヾ 提交于 2020-07-03 07:10:06
问题 I have created a custom component. I add a dynamic input text box to it (from the encode function). The component is correctly is rendered as HTML. But I want to bind the value of the text box to some property on the Managed Bean. So some other developer can use the component on his jsp with his managed bean. I want to know, what should I do, so that the value entered in the text box (which my component dynamically creates) is set to the some Managed bean property. 回答1: You need to ensure

How to pass submitted value of JSF custom component to managed bean?

依然范特西╮ 提交于 2020-07-03 07:08:57
问题 I have created a custom component. I add a dynamic input text box to it (from the encode function). The component is correctly is rendered as HTML. But I want to bind the value of the text box to some property on the Managed Bean. So some other developer can use the component on his jsp with his managed bean. I want to know, what should I do, so that the value entered in the text box (which my component dynamically creates) is set to the some Managed bean property. 回答1: You need to ensure

JSF datatable not complying to WCAG due to unsupported aria-label attribute

夙愿已清 提交于 2020-06-29 08:27:45
问题 I am using JSF to code my application and it has a datatable. Each row of the datatable has a checkbox in the first column, and some text in the rest of the columns. My application needs to comply to the WCAG 2.0 and I'm using a Chrome Extension "Axe" to scan my application. The "Axe" tool flagged out that the datatable with the checkboxes is not complying to the clause "Ensure every form element has a label" and the proposed solution is to add the "aria-label" attribute. However JSF

what are the minimal JSF jars needed to deploy a JSF app with Tomcat

给你一囗甜甜゛ 提交于 2020-06-27 17:08:26
问题 I know that a minimal API is 4 jars, I remember facelets*.jar. What are the minimal JSF jars needed to deploy a JSF app with Tomcat? 回答1: Just use the JAR files which are provided/required by the JSF implementation you choose to use. Just download the implementation and read their own installation/users guide if you don't actually need more JAR files (as dependencies). As of now there are only two major JSF implementations: Mojarra and MyFaces. The number of JAR files may vary per

View declared in <protected-views> still accessible after manipulating CSRF token

前提是你 提交于 2020-06-25 13:38:28
问题 I'm exploring the new features in JSF 2.2 (pretty cool so far) but I still don't understand how Protected Views works, I created a facelet1 with a link to facelet2, like this: <h:link styleClass="link" value="Go to protected page" id="link1" outcome="/protected/facelet2.xhtml"></h:link> and in my faces-config.xml I added this: <protected-views> <url-pattern>/protected/facelet2.xhtml</url-pattern> </protected-views> Now when I run the page a token is added in the url: http://localhost:8080/