This content has been marked as final.
Show 4 replies
-
1. Re: Workspace switcher
pmuir Jul 3, 2007 4:53 AM (in response to g00se24)Post some of the code you are using to achieve this.
-
2. Re: Workspace switcher
g00se24 Jul 3, 2007 5:04 AM (in response to g00se24)Here we go:
<rich:modalPanel xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:rich="http://richfaces.ajax4jsf.org/rich" id="workspaces" minHeight="200" minWidth="450" height="200" width="500"> <f:facet name="header"> <h:outputText value="Workspaces" /> </f:facet> <f:facet name="controls"> <h:graphicImage value="/resource/close.png" style="cursor:pointer" onclick="Richfaces.hideModalPanel('workspaces')" /> </f:facet> <h:form> <h:dataTable value="#{conversationList}" var="item" rendered="#{not empty conversationList}"> <h:column> <h:outputText value="#{item.startDatetime}"> <s:convertDateTime pattern="hh:mm - dd.MM.yy" /> </h:outputText> - <h:outputText value="#{item.lastDatetime}"> <s:convertDateTime pattern="hh:mm - dd.MM.yy" /> </h:outputText> </h:column> <h:column> <h:commandLink value="#{item.description}" action="#{item.select}" /> </h:column> <h:column> <h:outputText value="current" rendered="#{item.current}" /> </h:column> <h:column> <h:commandLink value="Select" action="#{item.select}" /> </h:column> <h:column> <h:commandLink value="Destroy" action="#{item.destroy}" /> </h:column> </h:dataTable> </h:form> </rich:modalPanel>
These part of my site is always included into the menubar!
So, if I'm in a conversation (example editing a user or something else) you can destroy these conversation, but I'm still on the same site (looks to the user like nothing have changed). The user doesn't see that the backing components are destroyed and so believes he could go on. The nice thing is that their are no exceptions thrown by seam in this case. ;)
Preferred solution:
I would like now to user a navigation rule to move after destroy method is called to the main page, but only if I destroyed the current conversation.
Have you any idea?
Another workaround would be to disable the destroy link for the current conversation. -
3. Re: Workspace switcher
pmuir Jul 3, 2007 5:13 AM (in response to g00se24)<page view-id="*"> <navigation from-action="#{item.destroy}"> <rule> <redirect view-id="/boo.xhtml"/> </rule> </navigation> </page>
might work (I'm not sure how JSF constructs from-action), or, you could set a property when calling destroy, and check it in the rule? -
4. Re: Workspace switcher
g00se24 Jul 3, 2007 5:52 AM (in response to g00se24)I see what you mean, but the solution is not working.
Their is no effect, I believe cause theirs is no #{item.destroy} is not the direct name of the seam component?