[JBoss JIRA] Created: (RF-1341) Problems with Ajax requests within a a4j:repeat loop
by Peter Mahoney (JIRA)
Problems with Ajax requests within a a4j:repeat loop
----------------------------------------------------
Key: RF-1341
URL: http://jira.jboss.com/jira/browse/RF-1341
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.1.3
Environment: MyFaces, Richfaces 3.1.3 snapshot
Reporter: Peter Mahoney
I have come across two problems following a change to put some fields in an a4j:repeat loop. The backing beans have not changed. This is the code:
<a4j:repeat id="termClauses" value="#{collectionSearchHandler.termClauses}" var="clause">
<a4j:region id="vocabularyFilterRegion">
<h:selectOneMenu id="vocabularyFilter" value="#{clause.vocabulary}">
<a4j:support id="vocabularyAjaxSupport" event="onchange" reRender="termFilterPanel" ajaxSingle="true" />
<f:selectItem itemValue="#{collectionSearchHandler.blankVocabulary}" itemLabel="#{msgs.quizFirstVocabularySelectItemDescription}" />
<f:selectItems value="#{collectionSearchHandler.vocabularyFilterItems}" />
</h:selectOneMenu>
<a4j:status startText="#{msgs.quizTermSearchInProgressMessage}" />
</a4j:region>
<a4j:region id="termFilterRegion">
<a4j:outputPanel id="termFilterPanel">
<h:panelGroup rendered="#{clause.hasVocabulary}">
<ul style="list-style-type:none; margin:0px;">
<a4j:repeat id="termFilters" value="#{clause.termFilters}" var="termFilter" rowKeyVar="idx">
<li>
<h:selectOneMenu id="termFilter" value="#{termFilter.term}" converter="com.dbplc.quiz.Term" style="width:100%">
<a4j:support id="termAjaxSupport" event="onchange" reRender="termFilterPanel,qbankSearchResultsPanel" ajaxSingle="true" actionListener="#{collectionSearchHandler.searchPerformed}" />
<f:selectItem itemValue="#{collectionSearchHandler.blankTerm}" itemLabel="#{msgs.quizFirstTermSelectItemDescription}" />
<f:selectItems value="#{clause.termFilterItemMap[idx]}" />
</h:selectOneMenu>
<h:commandButton actionListener="#{collectionSearchHandler.searchPerformed}" />
</li>
</a4j:repeat>
</ul>
</h:panelGroup>
</a4j:outputPanel>
<rich:messages />
</a4j:region>
</a4j:repeat>
Firstly I get the following error when the form is submitted by changing the "VocabularyFilter" value:
/questionsearch.xhtml @25,77 value="#{clause.vocabulary}": Target Unreachable, identifier 'clause' resolved to null
If I add an onchange="this.form.submit()" to the field, to bypass the Ajax, it works fine.
So, with the above workaround, I then get the problem that the collectionSearchHandler.searchPerformed() method (referenced by the a4j:support tag) is only called every second form submit. This worked without problems before adding the outer a4j:repeat. Using the commandButton to submit the form works every time.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 7 months
[JBoss JIRA] Created: (RF-1255) Richfaces 3.1.2 breaks SJSAS 9.1 Admin web-app, when the libs are put into domain1/lib folder
by Rene Rattur (JIRA)
Richfaces 3.1.2 breaks SJSAS 9.1 Admin web-app, when the libs are put into domain1/lib folder
---------------------------------------------------------------------------------------------
Key: RF-1255
URL: http://jira.jboss.com/jira/browse/RF-1255
Project: RichFaces
Issue Type: Bug
Environment: Sun Java System Application Server 9.1 (build b58g-fcs)
Richfaces 3.1.2
Reporter: Rene Rattur
Attachments: stack_trace.zip
When the Richfaces 3.1.2 libs are put into a domains lib folder under SJSAS 9.1, the Admin web application breaks.
I filed a bug report on glassfish https://glassfish.dev.java.net/issues/show_bug.cgi?id=3626, here's what they had to say about this:
"In order to understand what is happening you have to know a little bit about how
JSF configures itself. It looks for faces-config.xml files in the classpath to
see if should add new jsf extensions (such as a new ViewHandler) to help it
process jsf pages. JSF does NOT do anything to ensure that a new component
(i.e. ViewHanler) doesn't break other custom jsf extensions. It is unfortunate
that these extensions can't be restricted to a subset of URLs, or be guarenteed
to behave well.
In this case, Ajax4JSF does not behave well. It both of your stack traces it
appears Ajax4JSF is not doing the right thing. In the first, it is not handling
the rendering of the page and has either changed the viewId or done something
else to cause the default viewHandler to also not handle it (it appears it is
redispatching recursively b/c of this). In the 2nd example, it is attempting to
handle a JSFTemplating page instead of delegating to JSFTemplating -- it is
unable to do so and fails.
Ajax4JSF could fix both of these problems -- I cannot. Based on these stack
traces, I would strongly suggest that you not include Ajax4JSF in a shared lib
area as it will effect ALL JSF applications, not just the ones you want it to
effect. Instead place the Ajax4JSF jar files in the WEB-INF/lib of your
application(s)."
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 7 months
[JBoss JIRA] Created: (RF-1284) RichFaces/Ajax4Jsf redeploy causes java.lang.OutOfMemory
by m m (JIRA)
RichFaces/Ajax4Jsf redeploy causes java.lang.OutOfMemory
--------------------------------------------------------
Key: RF-1284
URL: http://jira.jboss.com/jira/browse/RF-1284
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.1.0
Environment: Windows XP SP2, JBoss 4.0.3 SP1
Reporter: m m
Deploying many times (depending on amount of memory on the server) a RichFaces application under JBoss 4.0.3SP1 causes java.lang.OutOfMemory.
This is probably caused by Ajax4Jsf not releasing resources on undeploy. Looking in folder jboss/server/[instance]/tmp/deploy, i can find many folders of my web app, which contains only WEB-INF/lib/richfaces-impl-3.1.2.GA.jar and WEB-INF/lib/richfaces-ui-3.1.2.GA.jar (Except for the current deploy which contains the full application). Every time i redeploy the web app i get a new folder inside TMP.
This bug can be recreated using any RichFaces/Ajax4JSF application, just making multiple deploys without restarting the application server.
I had the same problem using ajax4jsf (see forum thread), and it seems restarting the server is the only workaround for now.
When using Ajax4JSF only, JProfiler allocation tree after undeploy was:
93,7% - 15.792 bytes - 749 alloc. org.apache.tomcat.util.net.MasterSlaveWorkerThread
..93,7% - 15.792 bytes - 749 alloc. org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter
....92,3% - 15.544 bytes - 741 alloc. org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter
......83,6% - 14.080 bytes - 674 alloc. org.ajax4jsf.framework.ajax.xmlfilter.tidy.TidyXMLFilter
........83,6% - 14.080 bytes - 674 alloc. org.ajax4jsf.framework.ajax.xmlfilter.tidy.TidyParser
..........83,6% - 14.080 bytes - 674 alloc. org.ajax4jsf.org.w3c.tidy.Tidy
............24,8% - 4.176 bytes - 156 alloc. org.ajax4jsf.org.w3c.tidy.TagTable
............24,0% - 4.048 bytes - 253 alloc. org.ajax4jsf.org.w3c.tidy.EntityTable
............22,8% - 3.840 bytes - 173 alloc. org.ajax4jsf.org.w3c.tidy.AttributeTable
............12,0% - 2.016 bytes - 92 alloc. org.ajax4jsf.org.w3c.tidy.Configuration
......8,0% - 1.344 bytes - 59 alloc. org.ajax4jsf.framework.ajax.xmlfilter.FilterServletResponseWrapper
........5,0% - 848 bytes - 37 alloc. org.ajax4jsf.io.parser.FastHtmlParser
..........5,0% - 848 bytes - 37 alloc. org.ajax4jsf.io.parser.ParsingStateManager
............2,9% - 496 bytes - 22 alloc. org.ajax4jsf.framework.ajax.xmlfilter.tidy.TidyParser
............2,9% - 496 bytes - 22 alloc. org.ajax4jsf.org.w3c.tidy.Tidy
..............1,6% - 264 bytes - 11 alloc. org.ajax4jsf.org.w3c.tidy.Lexer
..............1,4% - 232 bytes - 11 alloc.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 7 months