Support 2 pass symbol replacement
---------------------------------

         Key: SHALE-201
         URL: http://issues.apache.org/struts/browse/SHALE-201
     Project: Shale
        Type: Improvement

  Components: Clay  
    Versions: Nightly    
 Environment: Linux, Windows
    Reporter: Ryan Wynn


The following illustrates a use case for 2 pass symbol replacement.


Client.html

<span id="id1" jsfid="clay" clayJsfid="Template.html" name="#{person.name}" 
email="#{person.address.email"} />


Template.html

<body>
       Name: <span id="id2" jsfid="tree" value="@name"/>
      
       Email: <span id="id3" jsfid="tree" value="@email"/>
</body>


Custom component

<component jsfid="tree" extends="panelGroup">
       <element renderId="1" jsfid="outputText">
               <attributes>
                       <set name="value" value="@value"/>
               </attributes>
       </element>
       <validator jsfid="lengthValidator">
               ...
       </validator>
</component>


Currently the nested attribute [value] inside of the 1st child of tree does not 
realize symbol replacement because the symbol
@value actually points to another symbol, either @name or @email depending on 
the context.

With 2-pass symbol replacement this attribute would ultimately get the value 
#{person.name} or #{person.address.email}


Span (id1) - > clay
        Symbol Table = { @name=#{person.name} , @email==#{person.address.email} 
}

Span (id2) -> tree
        Symbol Table = { @name=#{person.name} , @email==#{person.address.email} 
, @[EMAIL PROTECTED]

tree Child 1
        Symbol Table = { @name=#{person.name} , @email==#{person.address.email} 
, @[EMAIL PROTECTED]

                      Such that EvalSymbol(@value) -> EvalSymbol(@name) -> 
#{person.name} , instead of @name



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to