• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Evaluate A JSP Expression Inside A Tag Handler

 
Doug Ly
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am writing a tag handler generating HTML table.

The JSP syntax to define the table could be similar to this

<velcro:table tableId='table1' data='<%= list %>'>
<velcro:column columnId='name' displayName='Name' dataField='name' />
<velcro:column columnId='age' displayName='Age' dataField='age'>
<img src='' alt="<cut value='${rowData.url}'" />
</velcro:column>
</velcro:table>

So I define the column to be a BodyTagSupport because column can contain specific column renderer. For now I don't evaluate the body content of the column tag, since I need the row data and it's not available when the column tag handler is being processed.

The table tag is where the rowData is available. Now what I wish is that I can set the rowData object into the pageContext and get the body content of the column to re-evaluate! I just don't know how to do it yet.
Any help is appreciated.

Thanks
 
Deepak Chopra
Ranch Hand
Posts: 433
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
although i am not very much clear about your question,but still you can do following:

You can use Table column to extend BodyTagSupport, inside the doStartTag,you can use the inherit pageContext Ojbect to set the rowData. you will be having the column tag body also,you can use that one for re-evaluation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic