jsp - Use Struts2's <s:property> tag in <display:table> tags -


i trying add list table using displaytag.

everything works when add list property column in usual manner:

<display:column property="status" title="claim status"/> <display:column property="authno" title="authorization number" href="authslipmasteraction"> 

now, want check when authno not blank; if blank, not provide link, how can use <s:if test=''> , <s:property value=""> in <display:table> tag ?

i've tried display value using <s:property value="authno"/> no value shown (i have display value because want check condition)

this code

   <display:table uid="mytable" id="display-tag" name="session.claimreportlist">    <display:column title="authorization no">      <s:property value="#attr.mytable.transno" /> </display:column> 

have tried

      <s:property value="#session.mytable.transno" /> 

you need use #attr. notation in <s:property /> or <s:if /> when inside displaytag column; need use uid specified in <display:table> tag after #attr. access objects.

for example:

<display:table requesturi="actionurl" uid="mytable" />      <display:column title="authno">             <s:property value="#attr.mytable.authno" />     </display:column>  </display:table> 

from ognl basics - struts 2 named objects:

#attr['foo'] or #attr.foo

access pagecontext if available, otherwise searches request/session/application respectively

p.s: i'd consider taking @ newer grid jqgrid or datatables, though.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -