Thanks, now it works.

 

Martin

 


Von: Gary VanMatre [mailto:[EMAIL PROTECTED]
Gesendet: Samstag, 22. April 2006 16:26
An: MyFaces Discussion
Betreff: Re: [shale] Shale Clay symbol problems

 

>Hi,
>
>
>I try to use Shale Clay and to build reusable components. One simple
>component for example could be an input box.
>
>But I have problems with passing parameters from one Clay component
>to another.
>
>
>
>I did the following definition in a clay-config.xml File:
>
>
>
><view>
>
> <component jsfid="coBaseLabel" extends="outputLabel" allowBody="false">
>      <attributes>
>         <set name="value" value="@paLabel" />
>         <set name="styleClass" value="@paClass" />
>      </attributes>
>      <symbols>
>        <set name="@paLabel" value="Label" />
>    &nb sp;&nb sp;  <set name="@paClass" value="fieldLabel" />
>      </symbols>
> </component>
>
>
> <component jsfid="coInputPanel" extends="panelGrid" >
>   <attributes>
>      <set name="columns" value="2" />
>      <set name="style" value="border:1px solid red; width:200px" />
>   </attributes>
>   <symbols>
>      <set name="@label1" />
>   </symbols>
>   <element renderId="1" jsfid="coBaseLabel">
>      <attributes>
>         <set name="value" value="@paLabel" />
>      </attributes>
>      <symbols>
>  &nbs p;&nbs p;     <set name="@paLabel" value="@label1" />
>      </symbols>
>   </element>
> </component>
>
></view>
>
>
>When I use the “coBaseLabel” componet it works fine.  e.g.:
>
><clay:clay id="testLabel" jsfid="coBaseLabel">
>  <clay:symbol name="@paLabel" value="My Label" />
></clay:clay>
>
>
>When I try to use the “coInputPanel” in a JSP the parameter value “@label1” is
>passed through as text  ( the result is <label>@label1</label> )  and not the
>value “Label1111” like in the example specified below.
>
><clay:clay id="testInput" jsfid="coInputPanel">
>  <clay:symbol name="@label1" value="Label1111" />
></clay:clay>
>
>Could anybody give me a hint how to achie ve it that the parameter is resolved????
>
>

The symbols are scope from the outer to the inner.  From the outer they will be pass
on until overridden.  I think symbol "@label1" defined in "coInputPanel" is
overriding the value defined in the outer most scope.  Try removing the "label1"
symbol from the "coInputPanel".

 
>
>TIA
>
>
>
>Martin

Gary


 

Reply via email to