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" />

                                   <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>

                                               <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 achieve it that the parameter is resolved????

 

 

TIA

 

Martin

 

Reply via email to