myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ir. ing. Jan Dockx" <>
Subject Re: General question about Action Listener
Date Fri, 30 Sep 2005 09:27:53 GMT
Because this is general code, and the rest of the world doesn't know 
about your book-ID.

But in essence, you're right. This is a major (performance and 
stability related) issue with JSF: too much stuff going on that is 
often not needed.

And the problem is far more severe than you state now: just keep on 
studying :-).

At this time, you have to choose: live with it, and enjoy the benefits 
of JSF that do exist; or go for more optimal, less complex code, and do 
it proprietary. Maybe Struts is an option for you: it has similar 
issues, but is a lot less intrusive than JSF.

One last point: you could use outputLink instead of commandLink/Button 
to trigger an action on another URL than the page-of-origin, but this 
actually defies JSF.

On 30 Sep 2005, at 11:16, Matthias Klein wrote:

I just read
> and don't understand one thing:
> All action listener methods access the session. Why?
> Take a look at the "deleteBook" method, for instance. Instead of 
> passing the
> book-ID direktly, its parameter is an event. Why?
> I mean, could the listBooks.jsp not simply pass the Book-ID as 
> parameter to
> the method so that the parameter of deleteBook would be ID instead of 
> event?
> Why is it necessary to access the session in every action listener and 
> pass
> them events instead of IDs?
> Thanks
> Matt
Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85
B-2660 Hoboken
Tel: +32 3 448.33.38
Fax: +32 3 448.32.66

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

View raw message