hi,

you have to mark your attribute as a parameter. you can do this bye adding a 
<parameter> tag to you jwc or 
by using the @Parameter annotation. you should avoid using private members in 
you component classes.

-----Ursprüngliche Nachricht-----
Von: bhomass [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 27. März 2007 18:29
An: [email protected]
Betreff: Tapestry: implicit component reference not passing parameter


I made an implicit component reference in a html template and set a parameter
value for it.

<table>
<tr>
<td jwcid="@EntityElement" tableName="literal:ButtonRow" >
</td>
</tr>
</table>

in EntityElement.jwc, I have the following code

public abstract class EntityElement extends AbstractComponent {
      private String m_tablename;
      
      public String getTableName(){
            return m_tablename;
      }
      
      public void setTableName(String tablename){
            m_tablename = tablename;
      }

      @Override
      protected void renderComponent(IMarkupWriter writer, IRequestCycle
arg1) {
            .............
            
      }

At runtime, the code execution reaches renderComponent() but not
setTableName(). I also tried making getTableName() and setTableName()
abstract, with the same result.

What is wrong? Why is the tableName="literal:ButtonRow" not setting the
tablename property?
-- 
View this message in context: 
http://www.nabble.com/Tapestry%3A-implicit-component-reference-not-passing-parameter-tf3474171.html#a9696054
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to