Nice piece of work, it looks familiar...
http://www.mail-archive.com/[EMAIL PROTECTED]/msg63442.html
...never thought feedback on the solution would be like this, but each to
their own. For those interested, the link contains code which can be used for
any such filter operation.
Arron.
I
Arron Bates ([EMAIL PROTECTED]) wrote:
Nice piece of work, it looks familiar...
http://www.mail-archive.com/[EMAIL PROTECTED]/msg63442.html
...never thought feedback on the solution would be like this, but each to
their own. For those interested, the link contains code which can be used
No such thing exists. May be you are already doing this on jsp. here we
go..
%
myString.replace(\n,br);
pageContext.setAttribute(anyName,myString);
%
bean:write name=anyName filter=false
.anil
Dan Allen wrote:
Are there any taglibs that have an attribute similar to
filter=true for
Anil Amarakoon ([EMAIL PROTECTED]) wrote:
No such thing exists. May be you are already doing this on jsp. here we
go..
%
myString.replace(\n,br);
pageContext.setAttribute(anyName,myString);
%
bean:write name=anyName filter=false
.anil
Fine, I'll write a custom taglib,
Attached is a hacked version of WriteTag.java from the struts
library to include a nl2br attribute which will convert \n to br
/ in the output. It was a pretty simple hack and you can just
update your .tld file to include the java class
net.creativerge.struts.taglib.bean.WriteTag and change your
...see, I'm fading here...trial #2
Dan
[WriteTag.java]
package net.creativerge.struts.taglib.bean;
import javax.servlet.jsp.JspException;
import org.apache.struts.util.RequestUtils;
import org.apache.struts.util.ResponseUtils;
public class WriteTag extends
Dan,
I think that you may have better luck in a tag that doesn't actually extend or
particularly work around the write tag, but simply filters the results of body
content. That way your not just restricted to filering the content of a bean
property. Markup would be like...
mylib:nl2br whatever
7 matches
Mail list logo