myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Werner Punz <we...@gmx.at>
Subject Re: Replacing JSF EL with JavaScript
Date Tue, 19 Jul 2005 08:06:56 GMT
Aleksei Valikov wrote:
> Hi.
> 
>> Instead, IMHO, the expression language should encourage you to
>> manipulate server side model data with model tier techniques ... it
>> was designed to serve as a *binding* between the tiers, rather than as
>> a general purpose computational technology.  If we had wanted that, we
>> would likely have adopted essentially the entire JavaScript language
>> as the expression language mechanism in the first place (it was
>> considered and rejected during the initial deliberations in the JSTL
>> expert group, for the reasons outlined above).
> 
> 
> Well, probably I'm missing something.
> Here's a simple example. I have a documentDao with the possibility to 
> load document and give back the document list. I want to display a 
> table, where rows correspond to the documents returned by the dao. In 
> every row, I'd like to have a "Load" button to load the corresponding 
> document.
> With JS in EL it is as easy as #{[documentDao.load(document)]} as a 
> button action.
> 
> What would be the easiest way to implement this with standard EL, 
> without JS?
> 

Guess you brought up the classical example of having to fight with the 
table element, due to el limitations, I worked around that by setting 
command links and passing parameters down to that, but it is not as 
compact as having a direct method call.

I also would have preferred to have a less rigid, less academic approach 
regarding el and mvc, and having more flexibility. In the end you will 
end up with lots of shoehorn constructs that way in a real world 
application.




Mime
View raw message