-
1. Re: s:selectItems calls value action too many times
pwnell Apr 1, 2011 1:17 AM (in response to pwnell)Maybe this helps. this is the stack trace of the action listenr being called repeatedly:
... at za.co.matrixmarketing.matrixweb.web.actions.AdvancedSearchAction_$$_javassist_seam_13.getLookupData(AdvancedSearchAction_$$_javassist_seam_13.java) at sun.reflect.GeneratedMethodAccessor482.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:335) at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:280) at org.jboss.el.parser.AstMethodSuffix.getValue(AstMethodSuffix.java:59) at org.jboss.el.parser.AstValue.getValue(AstValue.java:67) at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186) at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71) at javax.faces.component.UISelectItems.getValue(UISelectItems.java:141) at org.jboss.seam.ui.component.UISelectItems.getValue(UISelectItems.java:161) at javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:149) at javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:61) at javax.faces.component.SelectUtils.matchValue(SelectUtils.java:82) at javax.faces.component.UISelectMany.validateValue(UISelectMany.java:465) at javax.faces.component.UIInput.validate(UIInput.java:875) at javax.faces.component.UIInput.executeValidate(UIInput.java:1072) at javax.faces.component.UIInput.processValidators(UIInput.java:672) at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058) at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058) at com.sun.facelets.component.UIRepeat.process(UIRepeat.java:366) at com.sun.facelets.component.UIRepeat.processValidators(UIRepeat.java:447) at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058) at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058) at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058) at org.ajax4jsf.component.UIAjaxRegion.processValidators(UIAjaxRegion.java:121) at org.ajax4jsf.component.AjaxViewRoot$3.invokeContextCallback(AjaxViewRoot.java:447) at org.ajax4jsf.component.ContextCallbackWrapper.invokeContextCallback(ContextCallbackWrapper.java:44) at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:711) at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:675) ...
-
2. Re: s:selectItems calls value action too many times
antibrumm.mfrey0.bluewin.ch Apr 1, 2011 1:08 PM (in response to pwnell)If i interpret it correctly you have an onclick event on each selectitem. Are you sure that this is what you want? Most probably you need the onchange or onblur event on the selectmanyListbox. This will happen only once or per change.
I dont think this has anything special to do with seam. It's
normal
web behavior If my assumption is correct. -
3. Re: s:selectItems calls value action too many times
pwnell Apr 1, 2011 1:33 PM (in response to pwnell)Nope. They are separate things, there is no onclick event handler in the select items. The onclick is in another piece of code elsewhere on the page.
-
4. Re: s:selectItems calls value action too many times
antibrumm.mfrey0.bluewin.ch Apr 1, 2011 2:07 PM (in response to pwnell)Then i don't get where this aj4 support is attached to. What happens if you remove it and use just a command button to submit the page? Do you have the same problem?
I've created a test case with 20 selectboxes with around 20'000 selectitems for testing the s:convertentity tag and i was able to get a continued response time of around 8 sec.
- http://seamframework.org/Community/NewEntityConverterPOC
Have you tried to use only String values as selectitems? Like this you can probably drill down the problem to be either a hibernate or a seam issue?
-
5. Re: s:selectItems calls value action too many times
pwnell Apr 1, 2011 7:20 PM (in response to pwnell)I removed any a4j:region tags, and then used another link I have outside of that select items control that posts to the same form:
<h:column>
<div class="remove_link"><h:commandLink action="#{advancedSearch.removeSearchConditionEntry(sc)}" ><img src="images/ui/remove_icon.png" alt="Remove" /></h:commandLink></div>
</h:column>
As you can see, it does perform validations. It causes the exact same behaviour - the lookupData call gets called once for every selected item. So this rules out Ajax as having any influence on this issue.
I am working on your other ideas. Thanks for your assistance so far.