-
1. Re: a4j commandlink re-renders the view
clintonjmurdoch Sep 8, 2012 3:55 AM (in response to clintonjmurdoch)the workaround i have put in place (which for all intents and purposes does work) is to remove the required parameter from the viewParam and then check for null in setting the bean field.
in terms of the framework though, should an ajax request re-render the view? isn't the idea of using ajax to avoid re-rendering?
-
2. Re: a4j commandlink re-renders the view
healeyb Sep 8, 2012 8:06 AM (in response to clintonjmurdoch)It shouldn't be doing a full submit for sure. You've not posted enough code for me to be able to see what is going wrong
really but you don't need a view parameter. You're not navigating to a different view or invoking an action, simply updating
an area on the same page? keep the setPropertyActionListener and lose the f:viewParam, that should do it.
Regards,
Brendan.
Freelance Java Enterprise Developer
JSF Richfaces Ajax Java 6/7 (scjp) EE 6 HTML CSS JavaScript jQuery MySQL JPA Hibernate Eclipselink
Spring Oracle SQL JPQL Sybase EJB CDI Glassfish Apache JAX-RS Primefaces UNIX Paypal and more..
-
3. Re: a4j commandlink re-renders the view
clintonjmurdoch Sep 20, 2012 5:25 PM (in response to healeyb)Hey brendan,
The view param is for when the page is loaded, to get the querystring from the request. I would have thought that once the page is loaded though, this is not used again, so each ajax request should only submit the form/a4j:region and re-render the elements specified by the render attribute of the button.
I have just noticed that the buttons are inside an a4j:region but not in a h:form, could this be causing the problem?
-
4. Re: a4j commandlink re-renders the view
healeyb Sep 20, 2012 5:33 PM (in response to clintonjmurdoch)>not in a h:form, could this be causing the problem?
definitely, they'll need to be inside an h:form for sure