|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
escapeHtml problemI use reverse Ajax DWR and org.directwebremoting.proxy.dwr.Util class.
My code: public void addMessage(String text) { if (text != null && text.trim().length() > 0){ messages.addFirst(new Message(text)); //messages is LinkedList } //Reverse Ajax code to be added here shortly WebContext wctx = WebContextFactory.get(); String currentPage = wctx.getCurrentPage(); // Clear the input box in the browser that kicked off this page only Util utilThis = new Util(wctx.getScriptSession()); utilThis.setValue("text", ""); // For all the browsers on the current page: Collection sessions = wctx.getScriptSessionsByPage(currentPage); Util utilAll = new Util(sessions); // Clear the list and add in the new set of messages utilAll.addOptions("chatlog", messages, "text"); } I need to set "escapeHtml:false" for utilAll.addOptions("chatlog", messages, "text") but I do not know how. Please help me. |
|
|
Re: escapeHtml problemutilAll.addOptions("chatlog", messages, formatter, dwr.util.getValue('') ? { escapeHtml:false } : null);
On 7/16/07, radovan <radovan.deka@...> wrote:
-- ------------------------------- Enjoy life! Barco You |
|
|
Re: escapeHtml problemFor simple way as below:
utilAll.addOptions("chatlog", messages, formatter, escapeHtml:false );
On 7/17/07, Barco You <barcojie@...> wrote:
-- ------------------------------- Enjoy life! Barco You |
|
|
Re: escapeHtml problem![]() utilAll.addOptions("chatlog", messages, formatter, escapeHtml:false ); formatter cannot be resolved escapeHtml cannot be resolved
|
|
|
Re: escapeHtml problemfunction formatter(entry) { return "data=" + entry; }
dwr.util.addOptions(id, data, formatter, { escapeHtml:false }); or you can try this way:
utilAll.setEscapeHtml(false);
On 7/18/07, radovan <radovan.deka@...> wrote:
-- ------------------------------- Enjoy life! Barco You |
|
|
Re: escapeHtml problemI need Java code, not JavaScript code. And The method setEscapeHtml(boolean) is undefined for the type Util.
|
| Free Forum Powered by Nabble | Forum Help |