myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manfred Geiler <manol...@apache.org>
Subject Re: Scripting Support commandButton
Date Tue, 02 Nov 2004 08:27:15 GMT
Takashi,
Thanks for your offer.
My personal opinion is, that it's better to NOT mix GUI design and 
business logic within a JSF. This is one of the most important issues 
that is adressed by the MVC (model view controller) pattern. The clear 
separation between model and view is a paradigm.
On the other hand, your component is of course a convenient thing during 
development. And some people might find it useful in production too. I 
understand that the MVC principles are not a dogma for everyone  ;-)

Unfortunately my time is very limited at the moment. Anyone willing to 
help Takashi make a complete MyFaces component out of his commandButton?

Thanks,
Manfred


Takashi Okamoto wrote:
> Hi,
> 
> I made improved commandButton which support scripting support with
> BSF(Apache Jakarta Bean Scription Framework). For example.
> 
> [jsp]
> <%@ taglib prefix="nv" uri="http://nirvana.ultimania.org/jsf" %>
> ..
> <nv:commandButton type="submit" action="&calc.rb" />
> 
> [Ruby Script(WEB-INF/script/calc.rb]
> $bean.setResult($bean.getNumA()+$bean.getNumB())
> print $bean.getResult()
> "success";
> 
> calc.rb is executed when commandButton is pressed. $bean is managed
> bean. Any managed beans are refered as global variables in
> script. This taglib supports JavaScript and Python and any other
> script language supported by BSF.
> 
> This function makes extreme easily JSF development. You don't need
> recompile Java class to modify bussiness logic.
> 
> I made this commandButton for Nirvana framework (http://ultimania.org/nirvana/).
> However, if you think this is good idea, I would like to contribute
> my code for MyFaces.
> 
> Here is demo application included sourcecode:
> 
> http://tidus.ultimania.org/tmp/bsf-demo.war
> 
> This demo includes MyFaces and you can try it immediately:)
> 
> greetings,
> 
> Takashi Okamoto
> 
> 
> 

Mime
View raw message