• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

taglib c:out tag problem

 
seenu kris
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

as i am facing problem to display the value inside the table. following are the flow files of my code.

my jsp page............

<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>

<tr>
<td> </td>
<td nowrap><b>Client</b></td>
<td><c ut value="${ConstantDeclarations.ATTR_CMB_CLIENT.strClientName}" default="value is null" escapeXml="true"/></td>
<!--<td><label for="<%=ConstantDeclarations.ATTR_CMB_CLIENT%>"><%=strClientName%></label></td>-->
<td> </td>
</tr>


my c.tld file.....................


<tag>
<description>
Like <%= ... >, but for expressions.
</description>
<name>out</name>
<tag-class>org.apache.taglibs.standard.tag.rt.core.OutTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<description>
Expression to be evaluated.
</description>
<name>value</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>
Default value if the resulting value is null.
</description>
<name>default</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>
Determines whether characters <,>,&,'," in the
resulting string should be converted to their
corresponding character entity codes. Default value is
true.
</description>
<name>escapeXml</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>


so i am trying to display the value ConstantDeclarations.ATTR_CMB_CLIENT.strClientName in the table which is taking from the class file ProjectVO.class. in which getClientName is returning the value of strClientName. as shown below

public class ProjectVO extends ValueObjectImpl implements SearchableEntity{


............

public String getClientName(){
return strClientName;
}


}


i have tried different types like

ProjectVo.ATTR_CMB_CLIENT.strClientName
ProjectVO.getClientName.strClientName



so please refer the code and if u have any solution for this reply to me.

with regards
seenu
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ConstantDeclarations.ATTR_CMB_CLIENT.strClientName will translate to request.getAttribute("ConstantDeclarations").getATTR_CMB_CLIENT().getStrClientName(); which is unlikely to be what you want.

Put a VO in the request (for example as "vo") and do <cut value="${vo.clientName}"/>
 
seenu kris
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello sir,

thank you very much for ur reply.I tried with the thing as u said, but it is not working even , so please let me know the solution in clear. as i have given complete my problem so please. analyse once again , i hope you have a very good knowledge about taglib. so please help me in this reagard,

with regards
seenu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic