jsf-2.2

Error in Name Space after migrating to JSF 2.2

こ雲淡風輕ζ 提交于 2019-12-01 07:35:08
问题 I am facing below issue, after I migrated to JSF2.2 com.sun.faces.config.ConfigurationException: The tag named passThroughAttribute from namespace http://xmlns.jcp.org/jsf/core has a null handler-class defined at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processHandlerClass(FaceletTaglibConfigProcessor.java:422) [:2.2.0] at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags(FaceletTaglibConfigProcessor.java:378) [:2.2.0] at com.sun.faces.config.processor

Using a p:remoteCommand to update a p:dataTable

徘徊边缘 提交于 2019-12-01 06:31:29
Given the following XHTML code that has one <p:inputText> and a <p:dataTable> having only two columns. <p:remoteCommand name="updateTable" update="dataTable"/> <p:panel id="panel"> <p:inputText id="txtValue" value="#{testManagedBean.txtValue}" required="true"/> <p:message for="txtValue" showSummary="false"/> <p:commandButton actionListener="#{testManagedBean.submitAction}" oncomplete="if(!args.validationFailed) {updateTable();}" update="panel" value="Submit"/> </p:panel> <p:panel id="dataTablePanel" header="Data"> <p:dataTable id="dataTable" var="row" value="#{testManagedBean}" lazy="true"

JSF: Mojarra 2.1 to 2.2 migration causing ViewExpiredException

两盒软妹~` 提交于 2019-12-01 06:12:29
问题 I'm porting my applications from PrimeFaces 3.5.18 + Mojarra 2.1.26 to PrimeFaces 4.0.2 + Mojarra 2.2.4. When I restart the server I get a ViewExpiredException. Server log contains this: ERROR: MAC did not verify! I know that by default MyFaces generates a random secret to encode the view state, so each time the server restart, a new random secret is generated. Is Mojarra 2.2 behaving the same way? In that case, what context parameters do I need to set? Googling for Mojarra 2.2 context

Using a p:remoteCommand to update a p:dataTable

人走茶凉 提交于 2019-12-01 05:32:24
问题 Given the following XHTML code that has one <p:inputText> and a <p:dataTable> having only two columns. <p:remoteCommand name="updateTable" update="dataTable"/> <p:panel id="panel"> <p:inputText id="txtValue" value="#{testManagedBean.txtValue}" required="true"/> <p:message for="txtValue" showSummary="false"/> <p:commandButton actionListener="#{testManagedBean.submitAction}" oncomplete="if(!args.validationFailed) {updateTable();}" update="panel" value="Submit"/> </p:panel> <p:panel id=

Modifiying default “Choose File” label of <h:InputFile>

笑着哭i 提交于 2019-12-01 04:25:56
问题 I would like to know if there is a method to label and rename the text displayed by JSF Choose a File when I'm using the tag <h:InputFile> in JSF. 回答1: That's not possible with native HTML. The appearance and the button's label is browser-dependent. The particular "Choose File" label is recognizable as the one from Chrome with English language pack (e.g. FireFox uses "Browse..."). As JSF is in the context of this question just a HTML code generator, it can't do much for you either. There are

BLOB images are displayed only on refreshing a page after an update via p:dataTable is made in PrimeFaces

╄→гoц情女王★ 提交于 2019-12-01 04:16:38
I'm displaying images stored in the form of BLOB in MySQL on a <p:graphicImage> as follows. <p:dataTable var="row" value="#{testManagedBean}" lazy="true" editable="true" rows="10"> <p:column headerText="id"> <h:outputText value="#{row.brandId}"/> </p:column> <p:column headerText="Image"> <p:cellEditor> <f:facet name="output"> <p:graphicImage value="#{brandBean.image}" height="100" width="100"> <f:param name="id" value="#{row.brandId}"/> </p:graphicImage> </f:facet> <f:facet name="input"> <p:graphicImage id="image" value="#{brandBean.image}" height="100" width="100"> <f:param name="id" value="#

CDI Eager Application scoped bean

▼魔方 西西 提交于 2019-12-01 04:12:47
问题 Since @ManagedBean(eager = true) will be deprecated, How do you create a eager application scoped cdi bean ? 回答1: Solved this by making use of CDI extension framework: Create Qualifier: @Qualifier @Target(value = {ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE}) @Retention(value = RetentionPolicy.RUNTIME) public @interface Eager { } Create Extension implementation with observer method: public class EagerCDIExtension implements Extension { public void

BLOB images are displayed only on refreshing a page after an update via p:dataTable is made in PrimeFaces

笑着哭i 提交于 2019-12-01 02:27:25
问题 I'm displaying images stored in the form of BLOB in MySQL on a <p:graphicImage> as follows. <p:dataTable var="row" value="#{testManagedBean}" lazy="true" editable="true" rows="10"> <p:column headerText="id"> <h:outputText value="#{row.brandId}"/> </p:column> <p:column headerText="Image"> <p:cellEditor> <f:facet name="output"> <p:graphicImage value="#{brandBean.image}" height="100" width="100"> <f:param name="id" value="#{row.brandId}"/> </p:graphicImage> </f:facet> <f:facet name="input"> <p

Using the page event with p:dataList in PrimeFaces

不打扰是莪最后的温柔 提交于 2019-12-01 00:25:37
Does a <p:dataList> support the page event? I'm trying to use the page event in the following way (blocking a <p:dataList> using <pe:blockUI> while going through pages). <pe:blockUI target="dataList" widgetVar="blockDataListUIWidget"> <h:panelGrid columns="2"> <h:graphicImage library="default" name="images/ajax-loader1.gif"/> <h:outputText value="Fetching..." class="block-ui-text"/> </h:panelGrid> </pe:blockUI> <p:dataList id="dataList" var="orderRow" value="#{orderDetailsManagedBean}" first="0" rows="1" paginator="true" paginatorAlwaysVisible="false" type="definition" lazy="true" emptyMessage

Reusing ViewState value in other session (CSRF)

为君一笑 提交于 2019-11-30 22:28:17
I'm using a *myfaces-api-2.2.3 with javax.faces.STATE_SAVING_METHOD set to client , I got the following scenario, 1) User X logs into the system and adds user XXX (using jsf f:ajax action) , while inspecting the chrome dev tools you can see the form that being submitted along with the ViewState value. 2) Copy that ViewState value (from chrome dev tools --> network tab) --> place it into html file with form (that mimics my original add user X ) 3) Logout from user X session (session being invalidated during that process) 4) Login with user Y --> open that html file in browser and hit the submit