Thiago and Filip, thank you very much!

Actually, I have an object ProjectVersion with the composite primary key. 
So in ListProjectVersionPage I would like to go to EditProjectVersionPage
this way:

    public Object onActionFromEditProjectVersion(EventContext context) {
        
        Integer proCodigo = context.get(Integer.class, 0);
        Integer vprCodigo = context.get(Integer.class, 1);        
        projectVersion =
projectVersionService.getProjectVersionFromPK(proCodigo, vprCodigo);
        
        editProjectVersionPage.setProjectVersion(projectVersion);
        return editProjectVersionPage;
    }

It works fine! But maybe it's not the best way.

Is there any other way to have only one parameter ProjectVersion like this?

    public Object onActionFromEditProjectVersion(ProjectVersion
projectVersion) {
        
        editProjectVersionPage.setProjectVersion(projectVersion);
        return editProjectVersionPage;
    }

Thanks again!


Thiago H. de Paula Figueiredo wrote:
> 
> On Wed, Apr 1, 2009 at 7:45 PM, Filip S. Adamsen <f...@fsadev.com> wrote:
>> What about contributing a ValueEncoder that converts between a ProductId
>> and a String? I haven't needed to work with composite primary keys, so I
>> can't say if it'd work, but it's worth a shot.
> 
> This is a more reusable solution than the one I've suggested before,
> so that's the one I recommend. ;)
> 
> -- 
> Thiago
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 


-----
Fernanda Cristina do Carmo
System Analyst and Java Developer
MSN/GoogleTalk: fernanda.ca...@gmail.com

-- 
View this message in context: 
http://www.nabble.com/multiple-context-values-tp16941976p22849424.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to