Return-Path: Delivered-To: apmail-incubator-myfaces-dev-archive@www.apache.org Received: (qmail 25536 invoked from network); 14 Nov 2004 15:09:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 14 Nov 2004 15:09:05 -0000 Received: (qmail 30954 invoked by uid 500); 14 Nov 2004 15:09:05 -0000 Delivered-To: apmail-incubator-myfaces-dev-archive@incubator.apache.org Received: (qmail 30876 invoked by uid 500); 14 Nov 2004 15:09:04 -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 30865 invoked by uid 99); 14 Nov 2004 15:09:03 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=FORGED_RCVD_HELO,HTML_50_60,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from [207.234.129.118] (HELO mailgwvw01.freelance.com) (207.234.129.118) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 14 Nov 2004 07:09:01 -0800 Received: from mailgwvw02.freelance.com (mailgwvw02.freelance.com [207.234.129.52]) by mailgwvw01.freelance.com (8.12.3/8.12.3) with ESMTP id iAEF9Fs5002256 for ; Sun, 14 Nov 2004 16:09:15 +0100 Received: from 10.0.0.34 ([81.65.10.12]) by mailgwvw02.freelance.com (Lotus Domino Release 5.0.12) with ESMTP id 2004111416082753:10469 ; Sun, 14 Nov 2004 16:08:27 +0100 Subject: Re: New AliasBean component From: Sylvain Vieujot To: MyFaces Development In-Reply-To: <2366B80A-3306-11D9-8470-000D9368D38E@mac.com> References: <1099945735.3359.47.camel@sv> <2366B80A-3306-11D9-8470-000D9368D38E@mac.com> Date: Sun, 14 Nov 2004 11:08:40 -0400 Message-Id: <1100444920.32663.8.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-3) X-MIMETrack: Itemize by SMTP Server on mailgw01/Freelance(Release 5.0.12 |February 13, 2003) at 11/14/2004 04:08:27 PM, Serialize by Router on mailgw01/Freelance(Release 5.0.12 |February 13, 2003) at 11/14/2004 04:08:28 PM, Serialize complete at 11/14/2004 04:08:28 PM Content-Type: multipart/alternative; boundary="=-J1guGmrXE83y3eby7Ruq" X-Spam-Status: No, hits=0.8 required=5.0 tests=HTML_30_40,HTML_MESSAGE autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on mailgwvw01.freelance.com X-Virus-Scanned: ClamAV 0.80rc/530/Thu Oct 14 04:41:39 2004 clamav-milter version 0.80 on 127.0.0.1 X-Virus-Status: Clean X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --=-J1guGmrXE83y3eby7Ruq Content-Transfer-Encoding: 7bit Content-Type: text/plain Done. On Wed, 2004-11-10 at 03:49 -0700, Bill Dudney wrote: > How about having a close that removes the alias? > > So you could do; > > > alias valid... > > alias not valid... > > So in encodeBegin(...) the alias is made and in encodeEnd(...) the > alias is removed. > > Thoughts? > > I personally like this approach better because it is more explicit and > if you have more than one subform on the same page the coming and going > of the alias would be explicit (probably helping me find bugs, or > preventing me from introducing them). > > -bd- > > On Nov 8, 2004, at 1:28 PM, Sylvain Vieujot wrote: > > > I'm about to commit a new component that allows to make a library of > > reusable generic subforms. > > > > The aliasBean tag allows you to link a fictive bean to a real bean. > > > > Let's suppose you have a subform you use often but with different > > beans. > > The aliasBean allows you to design the subform with a fictive bean > > and to include it in all the pages where you use it. > > You just need to make an alias to the real bean named after the > > fictive bean before invoking the fictive bean. > > > > example : > > > > In this example, the customerAddress bean is a managed bean, but the > > address bean isn't defined anywhere. > > After the aliasBean tag, we can use #{address.*} in place of > > #{custommerAddress.*}, so making it possible to have a generic address > > subforms (ok, this one it a bite simple form, but here is the idea). > > > > > > > > > > <%-- The next tag could be inserted by an %@ include or jsp:include > > --%> > > > > > > > > > > > > > > Thanks for your comments. > > > > > > > > Sylvain. > > > > > --=-J1guGmrXE83y3eby7Ruq Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=utf-8 Done.

On Wed, 2004-11-10 at 03:49 -0700, Bill Dudney wrote:
How about having a close that removes the alias?

So you could do;

<x:aliasBean...>
alias valid...
</x:aliasBean>
alias not valid...

So in encodeBegin(...) the alias is made and in encodeEnd(...) the 
alias is removed.

Thoughts?

I personally like this approach better because it is more explicit and 
if you have more than one subform on the same page the coming and going 
of the alias would be explicit (probably helping me find bugs, or 
preventing me from introducing them).

-bd-

On Nov 8, 2004, at 1:28 PM, Sylvain Vieujot wrote:

>  I'm about to commit a new component that allows to make a library of 
> reusable generic subforms.
>
>  The aliasBean tag allows you to link a fictive bean to a real bean.
>
>  Let's suppose you have a subform you use often but with different 
> beans.
>  The aliasBean allows you to design the subform with a fictive bean 
> and to include it in all the pages where you use it.
>  You just need to make an alias to the real bean named after the 
> fictive bean before invoking the fictive bean.
>
>  example :
>
>  In this example, the customerAddress bean is a managed bean, but the 
> address bean isn't defined anywhere.
>  After the aliasBean tag, we can use #{address.*} in place of 
> #{custommerAddress.*}, so making it possible to have a generic address 
> subforms (ok, this one it a bite simple form, but here is the idea).
>
>  <h:form>
>  <x:aliasBean sourceBean="#{customerAddress}" alias="#{address}"/>
>  <f:subview id="simulatedIncludedSubform">
>  <%-- The next tag could be inserted by an %@ include or jsp:include 
> --%>
>                          <h:inputText value="#{address}"/>
>  </f:subview>
>
>  <h:commandButton/>
>  </h:form>
>
>  Thanks for your comments.
>
>
>
>  Sylvain.
>
>
  
--=-J1guGmrXE83y3eby7Ruq--