| Author |
bean:write
|
Vijay Chandran
Ranch Hand
Joined: Jan 07, 2007
Posts: 175
|
|
Dear friends, I am using <bean:write> tag for displaying data in a JSP. Is there any way to get a substring of the value i get in the property attribute of the <bean : write> Kindly provide your help. Regards, vijay
|
 |
Brent Sterling
Ranch Hand
Joined: Feb 08, 2006
Posts: 948
|
|
I do not know of a way to get a substring. I am not sure exactly what you are trying to do but in general if I find myself having to implement logic that is more than nontrivial in my JSP, I try to move that into a method in my form. For example, if I had an SSN and I wanted to mask all but the last 4 digits I would add a method to my form named getMaskedSSN(), move the logic there and then use the property maskedSSN in my JSP. - Brent
|
 |
RamandeepS Singh
Ranch Hand
Joined: Aug 25, 2009
Posts: 59
|
|
i was facing same problem
and find out solution something like this...
<bean:define id="text" scope="request">
<bean:write name="smsBean" property="strSmsText" />
</bean:define>
<%=text.substring(0,50);%>
hope this helps
Ramandeep
|
 |
 |
|
|
subject: bean:write
|
|
|