[jboss-user] [JBoss Seam] - Re: Trinidad PPR/Ajax and Seam

chane do-not-reply at jboss.com
Mon Apr 30 10:24:19 EDT 2007


I don't have a sample I can post.  But I'll help you through it if I can.  There might even be a better way.  Here's what I did/know:

1) I used the classes dajevtic posted at the start of this thread.  

- The ActionListener needs to be a subclass of the one provided by MyFaces or the Sun RI.  If you know another way to plug-in an ActionListener, let me know.

- The PhaseListener is a new class

- Also, I changed the conversationID to be cid (which I believe is what 2.1.0 is using now)

2) Actually, that's pretty much it.  The only other thing is: Do not use the "binding" attribute on any components.  If you do, this (and a lot of other stuff) will not work.  What I do is something like the following:

Component on xhtml (facelets) page:

  |                <tr:inputText value="#{backingBean.attribute}" 
  |                              readOnly="true" 
  |                              partialTriggers="dialog_id"/>
  |                <tr:commandLink action="#{backingBean.launch}"
  |                                partialSubmit="true" 
  |                                useWindow="true"
  |                                windowWidth="400" windowHeight="400"
  |                                returnListener="#{backingBean.return}"
  |                                id="dialog_id">

Backing Bean:

  |    public String launch(){
  |       return "dialog:pageName";
  |    }
  | 
  |    public void returnProduct(ReturnEvent event){
  |       bean.setProperty((String)event.getReturnValue());
  |    }

And then you need a faces-config.xml navigation entry (I have not tried this in pages.xml yet):

  |     <navigation-rule>
  |        <from-view-id>/*</from-view-id>
  |        
  |        <navigation-case>
  |           <from-outcome>dialog:pageName</from-outcome>
  |           <to-view-id>/path/page_dlg.its</to-view-id>
  |        </navigation-case>
  |     <navigation-rule>

Let me now if this works for you,
Chris....

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041845#4041845

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041845



More information about the jboss-user mailing list