com.xpn.xwiki.wysiwyg.server.filter
Class ConversionFilter
java.lang.Object
com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter
- All Implemented Interfaces:
- javax.servlet.Filter
public class ConversionFilter
- extends java.lang.Object
- implements javax.servlet.Filter
This filter is used to convert the values of request parameters that hold WYSIWYG output from HTML to XWiki syntax.
This is needed because the action processing the request expects XWiki syntax and not HTML code in these request
parameters. The conversion is done using the new rendering module. It has to be done on the server and not on the
client, like the old WYSIWYG editor does. Doing the conversion on the client side by making an asynchronous request
to the server is error-prone for the following reason: the WYSIWYG behaves like a text area that can be put anywhere
in an HTML page, inside or outside an HTML form; because of this the editor is not aware of what submit buttons are
present on the container page and what submit logic these buttons might have associated with them.
|
Method Summary |
void |
destroy()
|
void |
doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain)
|
void |
init(javax.servlet.FilterConfig config)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConversionFilter
public ConversionFilter()
destroy
public void destroy()
-
- Specified by:
destroy in interface javax.servlet.Filter
- See Also:
Filter.destroy()
doFilter
public void doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
-
- Specified by:
doFilter in interface javax.servlet.Filter
- Throws:
java.io.IOException
javax.servlet.ServletException- See Also:
Filter.doFilter(ServletRequest, ServletResponse, FilterChain)
init
public void init(javax.servlet.FilterConfig config)
throws javax.servlet.ServletException
-
- Specified by:
init in interface javax.servlet.Filter
- Throws:
javax.servlet.ServletException- See Also:
Filter.init(FilterConfig)
Copyright © 2004-2008 XWiki. All Rights Reserved.