Return-Path: Delivered-To: apmail-incubator-myfaces-dev-archive@www.apache.org Received: (qmail 19362 invoked from network); 2 Nov 2004 15:51:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 2 Nov 2004 15:51:54 -0000 Received: (qmail 57536 invoked by uid 500); 2 Nov 2004 15:51:54 -0000 Delivered-To: apmail-incubator-myfaces-dev-archive@incubator.apache.org Received: (qmail 57505 invoked by uid 500); 2 Nov 2004 15:51:53 -0000 Mailing-List: contact myfaces-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list myfaces-dev@incubator.apache.org Received: (qmail 57493 invoked by uid 99); 2 Nov 2004 15:51:53 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from [210.255.121.217] (HELO ns.kun.ne.jp) (210.255.121.217) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 02 Nov 2004 07:51:52 -0800 Received: from localhost (YahooBB219180052044.bbtec.net [219.180.52.44]) by ns.kun.ne.jp (8.12.11/3.7W/040708) with ESMTP id iA2Fssv1023098 for ; Wed, 3 Nov 2004 00:54:55 +0900 (JST) Date: Wed, 03 Nov 2004 00:51:32 +0900 (LMT) Message-Id: <20041103.005132.59279542.tora@gloria.or.tp> To: myfaces-dev@incubator.apache.org Subject: Re: Scripting Support commandButton From: Takashi Okamoto In-Reply-To: <418744E3.3030805@apache.org> References: <20041031.230352.22893553.tora@gloria.or.tp> <418744E3.3030805@apache.org> X-FingerPrint: 8B37 1FE6 76B2 7BA6 D59A 9BF7 E7F4 46C8 5293 6E17 X-GPG-Key: http://db.debian.org/fetchkey.cgi?fingerprint=8B371FE676B27BA6D59A9BF7E7F446C852936E17 X-Mailer: Mew version 4.0.65 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N From: Manfred Geiler Subject: Re: Scripting Support commandButton Date: Tue, 02 Nov 2004 09:27:15 +0100 > My personal opinion is, that it's better to NOT mix GUI design and > business logic within a JSF. Of course I thought:) Devleloper can execute another scripts from the script is called by JSF. Nested scripts become model and the script called by JSF become controller such as Struts Action Class. > Unfortunately my time is very limited at the moment. Anyone willing to > help Takashi make a complete MyFaces component out of his > commandButton? Current demo is just prototype. I can refactor my taglib for myfaces. At least changing license and package name, and adding cache support should be done by me. If someone can commit them, I'll do it before commit. But I would like to ask one point. Where should I implement my function? I have a two opinion: (i)add bsf function into org.apache.myfaces.taglib.html.ext.HtmlCommandButtonTag and org.apache.myfaces.taglib.html.ext.HtmlCommandLinkTag. (ii)create new component at src/components/org/apache/myfaces/custom/bsf and Change tag class into: BSFHtmlCommandButtonTag.java BSFHtmlCommandLinkTag.java (i) seems smart way. When BSF extension detect string which is starting '&' like "&test.rb", action is recognized as script. If not, it manners plain commandButton and commandLink. Detecting script takes quite a few penalty and it's not influence performance. However MyFaces HtmlCommandButtonTag break compatibility for JSF when from-outcome value takes the string "&xxxx". x:commandButton and x:commandLink are MyFaces specific features and I think (i) is not become problem because developer can use plain h:commandXXXX if he keep compatibility with JSF. (ii) doesn't break any compatibility. But two tags will be added. BTW, I contributed some bugs fix and Japanese localization already. If I will become commiter with above contribute, I'm happy. I'm already Debian Official Developer and contribute some Java projects. I'm also developping Nirvana Framework which compile HTML into JSP (http://ultimania.org/nurvana/). greetings, Takashi Okamoto