Hi I want to join my list elements with a defined string. Like :

{1,2,3} join with "-", result is "1-2-3"

I have done like this

<s:iterator value="searchItems" status="st" >
        <s:property value='searchItems[#st.index]'/><s:if
test="!(#st.last)">-</s:if>
 </s:iterator>

But this is pretty ugly for me to see such kind of codes at my pages. I am
just curious that is there a way to make with struts or ognl natively. By
the way I have known that apache commons or spring stringUtil are able to
do... I want a native solution.

Thanks

-- 
View this message in context: 
http://old.nabble.com/Javascript-Join-Function-equivalent-with-OGNL-tp29192223p29192223.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to