jsf-2.2

java.io.NotSerializableException: org.primefaces.component.datatable.DataTable after PrimeFaces is upgraded to 5.1

风格不统一 提交于 2019-12-06 03:49:49
Does someone get the following exception while redeploying/undeploying the application after upgrading PrimeFaces to 5.1 (community release)? INFO: Cannot serialize session attribute com.sun.faces.renderkit.ServerSideStateHelper.LogicalViewMap for session 14f27c51ac03df49279d2130b78f java.io.NotSerializableException: org.primefaces.component.datatable.DataTable at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1180) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1528) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1493) at java

GF4 incorrect timeout exception thrown in Servlet when multiple large responses are returned (requested)

淺唱寂寞╮ 提交于 2019-12-06 03:48:27
The issue occurs when multiple requests (in this example, for images) are handled by GF. For some reason, the response outputstream blocks (for larger writes) and I get a timeout after a few seconds. I downloaded the latest (2/12/2013) promoted built from glassfish repo and replaced nucleus-grizzly-all.jar but I still get the same issue. Any ideas of what causes this issue and how I can resolve it? Thanks. Exception java.io.IOException: java.util.concurrent.TimeoutException at org.glassfish.grizzly.utils.Exceptions.makeIOException(Exceptions.java:81) at org.glassfish.grizzly.http.io

CDI ViewScope & PrettyFaces: Multiple calls to @PostConstruct (JSF 2.2)

对着背影说爱祢 提交于 2019-12-06 03:04:50
I'v already check similar questions which declare that JSF 2.1 had this bug, but I'm using JSF 2.2 Let's detail: My environment: CDI: 1.1 Dynamic Web Module: 3.0 Java: 1.7 JSF: 2.2 PrettyFaces: 2.0.12.Final My Bean: @Named(value = "home") @javax.faces.view.ViewScoped public class HomeBean implements Serializable { @Inject private HomeController controller; private List<Store> myPopularStores; @PostConstruct public void postConstruct() { myPopularStores = controller.getStores(); LOG.log(Level.FINE, "HomeBean: initialized"); } public String buttonClicked() { // whatever } } That controller,

Utility methods in application scoped bean

心已入冬 提交于 2019-12-05 23:01:08
问题 Do you think it is a good idea to put all widely used utility methods in an application scoped bean? In the current implementation of the application I'm working on, all utility methods (manipulating with Strings, cookies, checking url, checking current page where the user is etc.) are all put in one big request scoped bean and they are referenced from every xhtml page. I couldn't find any information on stackoverflow if the approach of putting utility methods in an application scoped bean

Access raw expression of ValueExpression attribute to taglib component

倖福魔咒の 提交于 2019-12-05 21:49:31
Can I access the expression string of a ValueExpression passed as attribute value to my taglib component? My goal is to programmatically derive missing attribute values from it. In this case I'm trying to avoid having to repeat an attribute as a literal. now: <a:columnText title="name" value="#{entity.name}" sortBy="entity.name" /> desired: <a:columnText title="name" value="#{entity.name}" /> -taglib.xml <tag> <tag-name>columnText</tag-name> <source>column-text.xhtml</source> <attribute> <name>value</name> <required>true</required> </attribute> <attribute> <name>title</name> <required>false<

How to download Mojarra JSF nightly builds

三世轮回 提交于 2019-12-05 18:30:36
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. You can get the daily snapshot in flavor of loose library, sources and javadoc JAR files from here: jsf

Getting ViewExpiredException in clustered environment while state saving method is set to client and user session is valid

女生的网名这么多〃 提交于 2019-12-05 17:45:42
I have a JSF application that uses Mojarra 2.2.9 and is deployed on WebSphere 8.5.5.4 on clustered environement and javax.faces.STATE_SAVING_METHOD is set to client . Even though all my application beans are request scoped, sometimes when the user session is valid and the user is doing post request on a page he gets ViewExpiredException . What may be causing this issue and how can I solve it? Will changing the javax.faces.STATE_SAVING_METHOD to server solve it? If so, what is the impact of doing this on memory? Also, does this have anything to do with cluster environement and maybe there's

<f:ajax render> not working via <composite:clientBehavior>

微笑、不失礼 提交于 2019-12-05 14:16:44
I have a composite component which has ajax: <composite:interface> <composite:attribute name="question" required="true"/> <composite:attribute name="value" required="false"/> <composite:attribute name="id" required="true" /> <composite:clientBehavior name="alter" event="change" targets="input"/> </composite:interface> <composite:implementation> <label for="#{cc.attrs.id}"> <h:outputText value="#{cc.attrs.question}" /> </label> <div class="fld"> <h:selectOneRadio value="#{cc.attrs.value}" id="input"> <f:selectItem itemValue="true" itemLabel="Yes" /> <f:selectItem itemValue="false" itemLabel="No

Redirect if a f:viewParam is empty

北战南征 提交于 2019-12-05 12:29:10
С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? BalusC 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" ... required="true" /> </f:metadata> ... <h:message for="foo" /> Сan I do a redirect (or error) if a f

Get the returned value from managed bean in javascript

不问归期 提交于 2019-12-05 11:59:49
In my application I call a Javascript event which calls a p:remoteCommand named checkPageLayoutsAreSelected as following : $('selector').on('click', function (e) { checkPageLayoutsAreSelected(); }); This is the p:remoteCommand : <p:remoteCommand name="checkPageLayoutsAreSelected" actionListener="#{beanFormDashboard.checkPageLayoutsAreSelected}" /> This p:remoteCommand will call a method in the beanFormDashboard managed bean which will return a Boolean value : public Boolean checkPageLayoutsAreSelected(){ for(DashboardPage dp : dashboardPageList){ if(dp.getModel() == 0){ return false; } }