You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by Chandresh Turakhia <ch...@bhartitelesoft.com> on 2007/02/14 08:15:55 UTC

Tutorial....Re: Clay challange

Hi,

Where can i best tutorial from Shale

You may even send me tons of links . More interested in architecture.

Wondering if Shale can use used as "Half-object" pattern. Part of shale run 
on client machine, Part of shale runs on server- Reason is integration with 
Web 2.0 technologies

Thanks in advance.
Chand
----- Original Message ----- 
From: <he...@dnbnor.no>
To: <us...@shale.apache.org>
Sent: Tuesday, February 13, 2007 10:44 PM
Subject: RE: Clay challange


> Hi
>
> Thanks, Ryan. This is what you get when you copy/paste and then go blind 
> :) (I need to sit down and repeat to my self: DO NOT DO THIS! a thousand 
> times)
>
> Hermod
>
> -----Original Message-----
> From: Ryan Wynn [mailto:bigwynnr@gmail.com]
> Sent: Tuesday, February 13, 2007 11:23 PM
> To: user@shale.apache.org; hermod@opstvedt.com
> Subject: Re: Clay challange
>
>
> On 2/13/07, Hermod Opstvedt <he...@opstvedt.com> wrote:
>> Hi
>>
>> I'm struggling with a component that I have defined:
>>
>>        <component jsfid="navnpanel" extends="clay" id="navnpanel">
>>                <element jsfid="t:htmlTag" renderId="1">
>>                        <attributes>
>>                                <set name="value" value="fieldset" />
>>                        </attributes>
>>                        <element jsfid="t:htmlTag" renderId="2">
>>                                <attributes>
>>                                        <set name="value" value="legend" 
>> />
>>                                </attributes>
>>                                <element jsfid="outputText" renderId="2">
>>                                        <attributes>
>>                                                <set name="value"
>>
>> value="#{messages['navnpanel.text']}">
>>                                                </set>
>>                                        </attributes>
>>                                </element>
>>                        </element>
>>                        <element jsfid="outputLabel" renderId="2">
>>                                <attributes>
>>                                        <set name="value"
>> value="#{messages['navnpanel.text']}"></set>
>>                                </attributes>
>>                        </element>
>>                </element>
>>        </component>
>>
>> It is supposed to render a fieldset with a legend, and a label inside it.
>> However the label never appears and there are no errors what so ever.
>
> I think you might need to look at your renderIds.  The renderId
> attribute is a way of ordering component children.  RenderIds are only
> relevant for sibling elements.  If you have 2 sibling elements with
> the same renderId value then one of the elements will be
> "lost/replaced".
>
> In your case the t:htmlTag and outputLabel both have the same parent
> (t:htmlTag) but they also use the same renderId (2).  They should
> instead be 1 and 2.
>
> My renderIds usually start at 1 for each element set and increment
> from there.  I think only the relative values matter, so you could
> have renderIds 6 and 3 and you would still get 2 children with the 3
> renderId as the first child.
>
> With inheritance you are able to override a component's children
> selectively by specifying another component with the same renderId.
>
> <component jsfid="c1" extends="clay">
>   <element jsfid="outputText" renderId="1">...</element>
>  <element jsfid="outputText" renderId=2">...</element>
> </component>
>
> <component jsfid="c2" extends="c1">
> <element jsfid="inputText" renderId=2">..</element>
> </component>
>
> both c1 and c2 produce a clay component with 2 children.  c2 uses
> inheritance and the renderId attribute to override the second
> outputText in c1 with an inputText.  But, c2 still inherits the first
> outputText child from c1.
>
> Hope this helps.
>
>>
>> Hermod
>>
>>
>>
>
>
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
> *
>
> This email with attachments is solely for the use of the individual or
> entity to whom it is addressed. Please also be aware that DnB NOR cannot
> accept any payment orders or other legally binding correspondence with
> customers as a part of an email.
>
> This email message has been virus checked by the anti virus programs used
> in the DnB NOR Group.
>
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
> *
>
>
>