[JBoss Seam] - Redirecting to Previous Long Running Conversations
by trickyvail
I have fixed a small error in the last version.
@Name("stickyConversationManager")
| @Scope(ScopeType.SESSION)
| public class StickyConversationManager
| {
| private Stack<String> conversationStack = new Stack<String>();
|
| @Logger
| private Log log;
|
| @In(create = true)
| @Out
| private CartHome cartHome;
|
| public String stick()
| {
| Manager manager = Manager.instance();
| HttpServletRequest httpServletRequest = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
| String conversationIdRequestParameter = httpServletRequest.getParameter(manager.getConversationIdParameter());
|
| if(! manager.isLongRunningOrNestedConversation())
| {
| ConversationEntries conversationEntries = ConversationEntries.instance();
|
| if(conversationEntries.getConversationEntries().size() == 0)
| {
| manager.beginConversation();
|
| // the following change to the conversation timeout
| // is gone on the next page submission
| Conversation.instance().setTimeout(24 * 60 * 60 * 1000);
| conversationStack.push(Conversation.instance().getId());
| }
| else if(conversationIdRequestParameter == null)
| {
| while(conversationStack.size() > 0)
| {
| ConversationEntry conversationEntry = conversationEntries.getConversationEntry(conversationStack.peek());
| if(conversationEntry != null)
| {
| conversationEntry.redirect();
| break;
| }
| else
| {
| conversationStack.pop();
| }
| }
| }
| }
| else if(manager.isLongRunningConversation())
| {
| try
| {
| if(conversationStack.peek() != Conversation.instance().getId())
| {
| conversationStack.remove(Conversation.instance().getId());
| conversationStack.push(Conversation.instance().getId());
| }
| }
| catch(EmptyStackException e){}
| }
|
| log.debug(toString());
| return null;
| }
|
| @Override
| public String toString()
| {
| StringBuffer stringBuffer = new StringBuffer();
| stringBuffer
| .append("<ConversationManager>")
| .append("<Stack>");
| for(String conversationId : conversationStack)
| {
| stringBuffer
| .append("<ConversationId>")
| .append(conversationId)
| .append("</ConversationId>");
| }
| stringBuffer
| .append("</Stack>")
| .append("</ConversationManager>");
| return stringBuffer.toString();
| }
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082639#4082639
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082639
18 years, 7 months
[JBoss Seam] - Checkbox in rich:datatable
by francof
Hi
This might be an easy one for experienced users.
I converted to a rich:datatable and I see a minor problem that I can't put my finger on.
I'm trying to do crud on a single page, so i have the datatable with these cols
name active
abc(hyperlink) chkbox (disabled)
The checkbox code
<rich:column align="center" > <h:selectBooleanCheckbox id="rcActiveCatalog" value="#{_catalog.active}" disabled="true"/></rich:column>
is tied to an entity column
@Column (name="active", nullable=false, length=1)
@Type(type="yes_no")
private boolean active;
When I click the link, it shows the detail in a separate form. The problem I'm experiencing is that after a successful update, the checkbox value in the rich datatable is not updated immediately, if I click any name hyperlink again, it is updated. the updates for the name field display ok. This did not happen with the regular h:datatable
Any hints for me ?
I'm using ajax4jsf-1.1.1-SNAPSHOT.jar and richfaces-3.0.1-SNAPSHOT.jar
Thanks
Franco
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082635#4082635
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082635
18 years, 7 months
[JBoss Seam] - The entity was referenced, but not declared.
by jdefe
Hi Im new at seam and im migrating my site from simple jsp pages to a xhtml structure using facelets.
My problem is that when jboss compiles my jsp pages an exception occurs. It seems the parser used by jboss doesnt recognize the entities I use ( á ñ etc...) I have no problems using &#x; but I don't want to do that.
I've been searching all over the web and I didn't find a solution that worked for me.
The exception:
javax.servlet.ServletException: Error Parsing /paginas/publico/bienvenida.jsp: Error Traced[line: 9] The entity "nbsp" was referenced, but not declared.
javax.faces.webapp.FacesServlet.service(FacesServlet.java:249)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
com.sun.facelets.FaceletException: Error Parsing /paginas/publico/bienvenida.jsp: Error Traced[line: 9] The entity "nbsp" was referenced, but not declared.
com.sun.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:234)
com.sun.facelets.compiler.Compiler.compile(Compiler.java:105)
com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:197)
com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:144)
com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:95)
com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:496)
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:546)
org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:221)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082633#4082633
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082633
18 years, 7 months