escapeHtml problem

View: New views
6 Messages — Rating Filter:   Alert me  

escapeHtml problem

by radovan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I 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 problem

by Barco You :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

utilAll.addOptions("chatlog", messages, formatter, dwr.util.getValue('') ? { escapeHtml:false } : null);
 

 
On 7/16/07, radovan <radovan.deka@...> wrote:

I 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.

--
View this message in context: http://www.nabble.com/escapeHtml-problem-tf4086088.html#a11613531
Sent from the DWR - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...




--
-------------------------------
Enjoy life!
Barco You

Re: escapeHtml problem

by Barco You :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
For simple way as below:
 
utilAll.addOptions("chatlog", messages, formatter, escapeHtml:false );


 
On 7/17/07, Barco You <barcojie@...> wrote:
utilAll.addOptions("chatlog", messages, formatter, dwr.util.getValue('') ? { escapeHtml:false } : null);
 

 
On 7/16/07, radovan <radovan.deka@...> wrote:

I 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.

--
View this message in context: http://www.nabble.com/escapeHtml-problem-tf4086088.html#a11613531
Sent from the DWR - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...




--
-------------------------------
Enjoy life!
Barco You



--
-------------------------------
Enjoy life!
Barco You

Re: escapeHtml problem

by radovan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


utilAll.addOptions("chatlog", messages, formatter, escapeHtml:false );
formatter cannot be resolved
escapeHtml cannot be resolved


Barco You wrote:
For simple way as below:

utilAll.addOptions("chatlog", messages, formatter, escapeHtml:false );



On 7/17/07, Barco You <barcojie@gmail.com> wrote:
>
> utilAll.addOptions("chatlog", messages, formatter, dwr.util.getValue('') ?
> { escapeHtml:false } : null);
>
>
>
> On 7/16/07, radovan <radovan.deka@seznam.cz> wrote:
> >
> >
> > I 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.
> >
> > --
> > View this message in context:
> > http://www.nabble.com/escapeHtml-problem-tf4086088.html#a11613531
> > Sent from the DWR - Dev mailing list archive at Nabble.com<http://nabble.com/>
> > .
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@dwr.dev.java.net
> > For additional commands, e-mail: dev-help@dwr.dev.java.net
> >
> >
>
>
> --
> -------------------------------
> Enjoy life!
> Barco You




--
-------------------------------
Enjoy life!
Barco You

Re: escapeHtml problem

by Barco You :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

function 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:

:,(
utilAll.addOptions("chatlog", messages, formatter, escapeHtml:false );
formatter cannot be resolved
escapeHtml cannot be resolved



Barco You wrote:
>
> For simple way as below:
>
> utilAll.addOptions("chatlog", messages, formatter, escapeHtml:false );
>
>
>

> On 7/17/07, Barco You <barcojie@...> wrote:
>>
>> utilAll.addOptions("chatlog", messages, formatter, dwr.util.getValue('')
>> ?
>> { escapeHtml:false } : null);
>>
>>
>>
>> On 7/16/07, radovan <radovan.deka@...> wrote:
>> >
>> >
>> > I 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.
>> >
>> > --
>> > View this message in context:
>> > http://www.nabble.com/escapeHtml-problem-tf4086088.html#a11613531
>> > Sent from the DWR - Dev mailing list archive at
>> Nabble.com< http://nabble.com/>
>> > .
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@...
>> > For additional commands, e-mail: dev-help@...
>> >
>> >
>>
>>
>> --

>> -------------------------------
>> Enjoy life!
>> Barco You
>
>
>
>
> --
> -------------------------------
> Enjoy life!
> Barco You
>
>

--
View this message in context: http://www.nabble.com/escapeHtml-problem-tf4086088.html#a11654489
Sent from the DWR - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...




--
-------------------------------
Enjoy life!
Barco You

Re: escapeHtml problem

by radovan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I need Java code, not JavaScript code. And The method setEscapeHtml(boolean) is undefined for the type Util.

Barco You wrote:
function 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@seznam.cz> wrote:
>
>
> :,(
> utilAll.addOptions("chatlog", messages, formatter, escapeHtml:false );
> formatter cannot be resolved
> escapeHtml cannot be resolved
>
>
>
> Barco You wrote:
> >
> > For simple way as below:
> >
> > utilAll.addOptions("chatlog", messages, formatter, escapeHtml:false );
> >
> >
> >
> > On 7/17/07, Barco You <barcojie@gmail.com> wrote:
> >>
> >> utilAll.addOptions("chatlog", messages, formatter, dwr.util.getValue
> ('')
> >> ?
> >> { escapeHtml:false } : null);
> >>
> >>
> >>
> >> On 7/16/07, radovan <radovan.deka@seznam.cz> wrote:
> >> >
> >> >
> >> > I use reverse Ajax DWR and org.directwebremoting.proxy.dwr.Utilclass.
> >> > 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.
> >> >
> >> > --
> >> > View this message in context:
> >> > http://www.nabble.com/escapeHtml-problem-tf4086088.html#a11613531
> >> > Sent from the DWR - Dev mailing list archive at
> >> Nabble.com<http://nabble.com/>
> >> > .
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: dev-unsubscribe@dwr.dev.java.net
> >> > For additional commands, e-mail: dev-help@dwr.dev.java.net
> >> >
> >> >
> >>
> >>
> >> --
> >> -------------------------------
> >> Enjoy life!
> >> Barco You
> >
> >
> >
> >
> > --
> > -------------------------------
> > Enjoy life!
> > Barco You
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/escapeHtml-problem-tf4086088.html#a11654489
> Sent from the DWR - Dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@dwr.dev.java.net
> For additional commands, e-mail: dev-help@dwr.dev.java.net
>
>


--
-------------------------------
Enjoy life!
Barco You
LightInTheBox - Buy quality products at wholesale price