[JBoss Seam] - Re: Submitting using SelectOneRadio
by monkeyden
I've implemented a ValueChangeListener, to handle the change of the radio button, but I'm not sure how to change the value in my Seam component, to reflect the value change. I'm sure I am supposed to be looking up the Seam component a different way, since it fails with a ClassCastException when I try to get the Seam component from FacesContext.
The question now is, in what way is this code different when we're dealing with Seam components (SFSBs) vs. standard JSF managed beans? It finds the component just fine, and even tells me the beanClass is com.project.actions.EditUserRecordAction.
Here is the code:
package com.project.util;
|
| import javax.faces.application.Application;
| import javax.faces.context.FacesContext;
| import javax.faces.event.AbortProcessingException;
| import javax.faces.event.ValueChangeEvent;
| import javax.faces.event.ValueChangeListener;
|
| import com.project.actions.EditUserRecordAction;
|
| public class StateSelectorChangeListener implements ValueChangeListener {
|
| public void processValueChange(ValueChangeEvent event) throws AbortProcessingException {
| FacesContext facesContext = FacesContext.getCurrentInstance();
| Application app = facesContext.getApplication();
| Object myObj = app.getVariableResolver().resolveVariable(facesContext, "editProfileAction");
| try {
| EditUserRecordAction editRecordBean = (EditUserRecordAction)myObj;
| editRecordBean.setSelectedState((String)event.getNewValue());
| } catch (RuntimeException e) {
| e.printStackTrace();
| }
| }
|
| }
|
@Stateful
| @Name("editProfileAction")
| @Scope(SESSION)
| public class EditUserRecordAction implements EditUserRecord, Serializable {
| ...
| public void setSelectedState(String selectedState){
| this.selectedState = selectedState;
| }
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981870#3981870
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981870
19 years, 5 months
[JBoss Seam] - Re: Seam + Ajax4Jsf == Exception?
by bkyrlach
The relavent stack trace (get's thrown from both apps with state_saving_method = server)
15:54:41,914 ERROR [PhaseListenerManager] Exception in PhaseListener RENDER_RESPONSE(6) afterPhase
java.lang.IllegalStateException: No active application context
at org.jboss.seam.core.Pages.instance(Pages.java:298)
at org.jboss.seam.jsf.SeamStateManager.saveSerializedView(SeamStateManager.java:47)
at org.ajax4jsf.framework.ajax.AjaxStateManager.saveSerializedView(AjaxStateManager.java:83)
at org.ajax4jsf.framework.ajax.AjaxContext.saveViewState(AjaxContext.java:417)
at org.ajax4jsf.framework.renderer.AjaxPhaseListener.afterPhase(AjaxPhaseListener.java:103)
at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:391)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:67)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:223)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981868#3981868
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981868
19 years, 5 months
[JBoss jBPM] - Re: jBPM database USAGE
by moonrainbow
Ok, it seems there are no takers. I don't understand the lack of interest - maybe that's because I'm missing some really important point. Let me define where I'm coming from:
I'm going to run on average N*100000 workflows per day. That amounts to about 10*N*100000 variable instances and goodly quantity of tokens and such. So it stands to the reason that after about 10 days my db will start loosing performance even if the SQL it just perfect - no bad joins, no search by non-indexed fields etc. So I'd really love to partition all the tables by some field (say, date), add that field to the queries and just drop the partitions older that 2 days. All of this obviously is relevant to the DBMS with partitioning ability, like Oracle.
Then I'd love to build the proper indices in the db. Obviously, they'll have to be local, because I can not afford index-rebuild downtime following a partition drop.
So where could I find some information in respect to the queries and the update process? These issues have got to be common for all people with high load systems. Am I to understand that nobody runs jBPM for more than a few hundreds/thousands workflows per day?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981867#3981867
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981867
19 years, 5 months
[JBoss Seam] - Use of @Out with JSTL/ui:include
by ekusnitz
I have the following situation which seams to defy explanation:
In my xhtml page, I have this:
<c:if test="#{!MyBean.newObject}">
<ui:include src="/pages/Details.xhtml" />
</c:if>
<c:if test="#{MyBean.newObject}">
<ui:include src="/pages/Choose.xhtml" />
</c:if>
This works. However, if I outject the newObject variable instead and change the condition to test="#{newObject}", etc., it does the opposite of expected. But I can see the variable appearing correctly in the context. That is, I add
newObject:<h:outputText value="#{newObject}"/>
to the page to see the current value. This renders as expected, but the <c:if> logic follows the branch when the value is false and ignores it when it is true! Can anyone explain this?
I also tried using the rendered attribute for <ui:include> but that seemed to be ignored in all cases -- traditional jstl or outjection. I read somewhere that this wasn't supported?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981860#3981860
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981860
19 years, 5 months