jsf-2.2

Pass MethodParameter through Composite Components

南笙酒味 提交于 2019-12-07 16:36:12
问题 Here my Code from the Composite: <cc:attribute name="step" type="Get.Model.Step"/> <cc:attribute name="removeQuantityAction" /> [...] <p:dataList id="quantities" value="#{cc.attrs.Quantities}" var="quantity" itemType="disc"> <com:Quantity removeQuantityAction="#{cc.attrs.removeQuantityAction(cc.attrs[step],quantity)}" /> </p:dataList> I also tried this: removeQuantityAction="#cc.attrs.removeQuantityAction(cc.attrs.step,quantity)}" But I do get /resources/Get.comp/Step.xhtml @51,156

Picketlink not picking my user defined authenticator

混江龙づ霸主 提交于 2019-12-07 14:50:40
问题 I'm trying to implement JSF authentication with PickeLink 2.6.0 (EAR, Wildfly 8.1.0), as shown in the PicketLink 'picketlink-authentication-jsf' quickstart. I provided an authentication marked with the @PicketLink annotation, but Identity.login() always returns FAILED. This is my JSF form: <h:form> <h:panelGrid styleClass="full"> <h:inputText value="#{loginCredentials.userId}" required="true" pt:placeholder="Username" /> <h:inputSecret value="#{loginCredentials.password}" required="true" pt

How to download Mojarra JSF nightly builds

孤街浪徒 提交于 2019-12-07 13:53:19
问题 I was glad to see that f:ajax now have built in delay support. Not so glad that it doesn't work though. There's a bug that makes it fail, seemingly caused by that the method recieving the specified delay expects a number and not a string. Anyway, it will be fixed in version 2.2.4 but I have no idea how to get that version or if it's even possible before it's publicly released. My question is if someone can explain how to get the nightly build of version 2.2.4 or if there's some workaround.

Error saying I need to use f:metadata even though I do

心已入冬 提交于 2019-12-07 12:58:07
问题 After update from JSF 2.1 to 2.2, I start getting the following error message: The metadata component needs to be nested within a f:metadata tag. Suggestion: enclose the necessary components within <f:metadata> It's a bit weird as the code looks like this: .... <ui:composition template="./resources/templates/template_base.xhtml"> <ui:define name="contentBody"> <h:outputStylesheet library="css/table" name="tableContent.css" /> <h:outputScript library="javascript" name="pagination.js" target=

f:ajax in ui:repeat renders h:outputText but fails to render/update h:inputText

风格不统一 提交于 2019-12-07 12:57:40
问题 I have a problem with <f:ajax> on a <h:inputText> inside <ui:repeat> . It successfully renders a <h:outputText> with the new value, but not a <h:inputText> (both are bound to the same property). However, if I change the <f:ajax> to render @form or @all , it works. But I obviously don't want/need to render the whole form. I'm using Mojarra 2.2.4. Here's the index.xhtml <h:form> <table> <ui:repeat var="line" value="#{myBean.lines}"> <tr> <td> <h:inputText value="#{line.number}"> <f:ajax event=

Redirect if a f:viewParam is empty

旧时模样 提交于 2019-12-07 07:21:35
问题 Сan I do a redirect (or error) if a f:viewParam is empty? <f:metadata> <f:viewParam name="accountId" value="#{accountMB.id}"/> </f:metadata> When I add required="true" , nothing happens. What are the options? 回答1: When I add required="true" , nothing happens You need <h:message(s)> to show faces messages associated with a given (input) component. You probably already know how to do that for <h:inputText> . You can do exactly the same for <f:viewParam> . <f:metadata> <f:viewParam id="foo" ...

How to exit a flow?

末鹿安然 提交于 2019-12-07 05:21:07
问题 Once I've entered a Faces Flow, I want to exit it by going to any page that is not part of the flow. The problem is that the flow is not destroyed if I go outside, for example via an h:link . Indeed, if I click again on a h:commandButton whose action is the flowId, I go back to the previous flow instead of creating a new flow. How to exit a flow without having the user to click explicitly on a h:commandButton whose action corresponds to the return node of the flow ? Is it even possible ? Edit

HTML 5 dropdown and JSF 2.2

穿精又带淫゛_ 提交于 2019-12-07 04:51:14
问题 I´m trying to send a <select> value to a JSF managed bean but I don´t know how to make it. My code is: <select id="cb-frentes" required="required" jsf:value="#{checkstyleBean.frente}"> <option value=""/> <ui:repeat var="frente" value="#{appBean.frentes}"> <option value="#{frente}" label="#{frente}"/> </ui:repeat> </select> It does not work. The value of frente attribute is always null , when I invoke my action method. How can I make this bind? 回答1: The <option> element is by default not

fileUpload doesn't fire event in PrimeFaces 3.5 with JSF 2.2

只愿长相守 提交于 2019-12-07 03:46:07
问题 I can't make fileUpload component on PrimeFaces 3.5 to fire the event. I have read many posts about that topic and followed advise there but still it doesn't work. I tried all of the modes (simple, auto, advanced) with no success. If I use standard inputFile tag from the JSF specification it works properly. This is my web.xml file: <?xml version="1.0" encoding="UTF-8"?> <web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi

p:fileUpload required=“true” and custom validator doesn't work [duplicate]

六月ゝ 毕业季﹏ 提交于 2019-12-07 01:18:16
问题 This question already has answers here : PrimeFaces <p:fileUpload mode=“advanced”> validator not fired (2 answers) Closed 25 days ago . Since the required attribute of <p:fileUpload> still doesn't seem to work in PrimeFaces 4.0 final, I have tried to create a custom validator as follows. @FacesValidator(value="fileUploadValidator") public final class FileUploadValidator implements Validator { @Override public void validate(FacesContext fc, UIComponent uic, Object o) throws ValidatorException