Re: wicket-ajax.js header contribution with script that includes a less than character

2011-02-03 Thread Pedro Santos
What about escape you XML?

On Thu, Feb 3, 2011 at 5:56 AM, Randy S. randypo...@gmail.com wrote:

 Hi all.  I have narrowed a problem down to the following scenario:

 I have a panel with this:

wicket:head
 script
 if (someVariable  0) {
 someVariable = 0;
 }
 /script
/wicket:head

 This script fails to execute when the panel is loaded by ajax.  If I
 replace
 the less than character  with equals ==, then it executes (but of
 course, this is not what I need).

 I tested this in Firefox 4.0b10 and Chrome 8.

 I have searched a lot for others facing this issue, and also tried to dig
 through wicket-ajax.js, but it is time to ask here in case it is a known
 issue.

 I 'm sure I can put the code into a separate JS file as a workaround but I
 wanted to save another network hop. Another solution would be to embed the
 script in wicket:panel rather than wicket:head, but that has the
 disadvantage of re-sending the script with the panel content when the panel
 is re-used on the same page.

 Thanks for any help/info.




-- 
Pedro Henrique Oliveira dos Santos


Re: wicket-ajax.js header contribution with script that includes a less than character

2011-02-03 Thread Matthias Gasser
A time ago I faced a similar problem, but not with wicket...

I needed to escape the  character somehow, or try to reverse the arguments

like: 0  someVariable.


see http://www.informit.com/articles/article.aspx?p=1193471seqNum=9



Am 03.02.2011 um 08:56 schrieb Randy S.:

 Hi all.  I have narrowed a problem down to the following scenario:
 
 I have a panel with this:
 
wicket:head
 script
 if (someVariable  0) {
 someVariable = 0;
 }
 /script
/wicket:head
 
 This script fails to execute when the panel is loaded by ajax.  If I replace
 the less than character  with equals ==, then it executes (but of
 course, this is not what I need).
 
 I tested this in Firefox 4.0b10 and Chrome 8.
 
 I have searched a lot for others facing this issue, and also tried to dig
 through wicket-ajax.js, but it is time to ask here in case it is a known
 issue.
 
 I 'm sure I can put the code into a separate JS file as a workaround but I
 wanted to save another network hop. Another solution would be to embed the
 script in wicket:panel rather than wicket:head, but that has the
 disadvantage of re-sending the script with the panel content when the panel
 is re-used on the same page.
 
 Thanks for any help/info.


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



Re: wicket-ajax.js header contribution with script that includes a less than character

2011-02-03 Thread Randy S.
Matthias: of course, reversing the options should be the easiest and most
obvious workaround. Thank you.

Pedro: I could try to escape the . Presumably this would be using its
entity lt; but it's not immediately obvious whether that would work because
of the various levels of encoding. The entire header contribution is in a
CDATA for the XHR so it would not get decoded there. I'm away from the
project at the moment but I will try this later.

Anyway, I will submit it as a bug and may be able to offer some insight into
the reason and possible fix. I suspect it has to do with crazy
(browser-specific) hoop jumping in wicket-ajax.js's processing of the ajax
response. That looks like a good bit of volatile code to make it work as
well as it does.
On Feb 3, 2011 4:18 AM, Matthias Gasser matthias.gas...@gmail.com wrote:
 A time ago I faced a similar problem, but not with wicket...

 I needed to escape the  character somehow, or try to reverse the
arguments

 like: 0  someVariable.


 see http://www.informit.com/articles/article.aspx?p=1193471seqNum=9



 Am 03.02.2011 um 08:56 schrieb Randy S.:

 Hi all. I have narrowed a problem down to the following scenario:

 I have a panel with this:

 wicket:head
 script
 if (someVariable  0) {
 someVariable = 0;
 }
 /script
 /wicket:head

 This script fails to execute when the panel is loaded by ajax. If I
replace
 the less than character  with equals ==, then it executes (but of
 course, this is not what I need).

 I tested this in Firefox 4.0b10 and Chrome 8.

 I have searched a lot for others facing this issue, and also tried to dig
 through wicket-ajax.js, but it is time to ask here in case it is a known
 issue.

 I 'm sure I can put the code into a separate JS file as a workaround but
I
 wanted to save another network hop. Another solution would be to embed
the
 script in wicket:panel rather than wicket:head, but that has the
 disadvantage of re-sending the script with the panel content when the
panel
 is re-used on the same page.

 Thanks for any help/info.


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



Re: wicket-ajax.js header contribution with script that includes a less than character

2011-02-03 Thread Igor Vaynberg
wicket should do this for you. please file a bug.

-igor

On Thu, Feb 3, 2011 at 6:09 AM, Randy S. randypo...@gmail.com wrote:
 Matthias: of course, reversing the options should be the easiest and most
 obvious workaround. Thank you.

 Pedro: I could try to escape the . Presumably this would be using its
 entity lt; but it's not immediately obvious whether that would work because
 of the various levels of encoding. The entire header contribution is in a
 CDATA for the XHR so it would not get decoded there. I'm away from the
 project at the moment but I will try this later.

 Anyway, I will submit it as a bug and may be able to offer some insight into
 the reason and possible fix. I suspect it has to do with crazy
 (browser-specific) hoop jumping in wicket-ajax.js's processing of the ajax
 response. That looks like a good bit of volatile code to make it work as
 well as it does.
 On Feb 3, 2011 4:18 AM, Matthias Gasser matthias.gas...@gmail.com wrote:
 A time ago I faced a similar problem, but not with wicket...

 I needed to escape the  character somehow, or try to reverse the
 arguments

 like: 0  someVariable.


 see http://www.informit.com/articles/article.aspx?p=1193471seqNum=9



 Am 03.02.2011 um 08:56 schrieb Randy S.:

 Hi all. I have narrowed a problem down to the following scenario:

 I have a panel with this:

 wicket:head
 script
 if (someVariable  0) {
 someVariable = 0;
 }
 /script
 /wicket:head

 This script fails to execute when the panel is loaded by ajax. If I
 replace
 the less than character  with equals ==, then it executes (but of
 course, this is not what I need).

 I tested this in Firefox 4.0b10 and Chrome 8.

 I have searched a lot for others facing this issue, and also tried to dig
 through wicket-ajax.js, but it is time to ask here in case it is a known
 issue.

 I 'm sure I can put the code into a separate JS file as a workaround but
 I
 wanted to save another network hop. Another solution would be to embed
 the
 script in wicket:panel rather than wicket:head, but that has the
 disadvantage of re-sending the script with the panel content when the
 panel
 is re-used on the same page.

 Thanks for any help/info.


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



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



Re: wicket-ajax.js header contribution with script that includes a less than character

2011-02-03 Thread Emmanouil Batsis


Not sure i understand the issue but I would suggest escaping that to  
lt; although script contribs could just as well offer an option to  
wrap a CDATA like


script
// ![CDATA[

//script code

// ]]
/script

Manos

Quoting Igor Vaynberg igor.vaynb...@gmail.com:


wicket should do this for you. please file a bug.

-igor

On Thu, Feb 3, 2011 at 6:09 AM, Randy S. randypo...@gmail.com wrote:

Matthias: of course, reversing the options should be the easiest and most
obvious workaround. Thank you.

Pedro: I could try to escape the . Presumably this would be using its
entity lt; but it's not immediately obvious whether that would work because
of the various levels of encoding. The entire header contribution is in a
CDATA for the XHR so it would not get decoded there. I'm away from the
project at the moment but I will try this later.

Anyway, I will submit it as a bug and may be able to offer some insight into
the reason and possible fix. I suspect it has to do with crazy
(browser-specific) hoop jumping in wicket-ajax.js's processing of the ajax
response. That looks like a good bit of volatile code to make it work as
well as it does.
On Feb 3, 2011 4:18 AM, Matthias Gasser matthias.gas...@gmail.com wrote:

A time ago I faced a similar problem, but not with wicket...

I needed to escape the  character somehow, or try to reverse the

arguments


like: 0  someVariable.


see http://www.informit.com/articles/article.aspx?p=1193471seqNum=9



Am 03.02.2011 um 08:56 schrieb Randy S.:


Hi all. I have narrowed a problem down to the following scenario:

I have a panel with this:

wicket:head
script
if (someVariable  0) {
someVariable = 0;
}
/script
/wicket:head

This script fails to execute when the panel is loaded by ajax. If I

replace

the less than character  with equals ==, then it executes (but of
course, this is not what I need).

I tested this in Firefox 4.0b10 and Chrome 8.

I have searched a lot for others facing this issue, and also tried to dig
through wicket-ajax.js, but it is time to ask here in case it is a known
issue.

I 'm sure I can put the code into a separate JS file as a workaround but

I

wanted to save another network hop. Another solution would be to embed

the

script in wicket:panel rather than wicket:head, but that has the
disadvantage of re-sending the script with the panel content when the

panel

is re-used on the same page.

Thanks for any help/info.



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





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





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



Re: wicket-ajax.js header contribution with script that includes a less than character

2011-02-03 Thread Randy S.
Thanks, Igor.

https://issues.apache.org/jira/browse/WICKET-3420



On Thu, Feb 3, 2011 at 11:01 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 wicket should do this for you. please file a bug.

 -igor

 On Thu, Feb 3, 2011 at 6:09 AM, Randy S. randypo...@gmail.com wrote:
  Matthias: of course, reversing the options should be the easiest and most
  obvious workaround. Thank you.
 
  Pedro: I could try to escape the . Presumably this would be using its
  entity lt; but it's not immediately obvious whether that would work
 because
  of the various levels of encoding. The entire header contribution is in a
  CDATA for the XHR so it would not get decoded there. I'm away from the
  project at the moment but I will try this later.
 
  Anyway, I will submit it as a bug and may be able to offer some insight
 into
  the reason and possible fix. I suspect it has to do with crazy
  (browser-specific) hoop jumping in wicket-ajax.js's processing of the
 ajax
  response. That looks like a good bit of volatile code to make it work as
  well as it does.
  On Feb 3, 2011 4:18 AM, Matthias Gasser matthias.gas...@gmail.com
 wrote:
  A time ago I faced a similar problem, but not with wicket...
 
  I needed to escape the  character somehow, or try to reverse the
  arguments
 
  like: 0  someVariable.
 
 
  see http://www.informit.com/articles/article.aspx?p=1193471seqNum=9
 
 
 
  Am 03.02.2011 um 08:56 schrieb Randy S.:
 
  Hi all. I have narrowed a problem down to the following scenario:
 
  I have a panel with this:
 
  wicket:head
  script
  if (someVariable  0) {
  someVariable = 0;
  }
  /script
  /wicket:head
 
  This script fails to execute when the panel is loaded by ajax. If I
  replace
  the less than character  with equals ==, then it executes (but of
  course, this is not what I need).
 
  I tested this in Firefox 4.0b10 and Chrome 8.
 
  I have searched a lot for others facing this issue, and also tried to
 dig
  through wicket-ajax.js, but it is time to ask here in case it is a
 known
  issue.
 
  I 'm sure I can put the code into a separate JS file as a workaround
 but
  I
  wanted to save another network hop. Another solution would be to embed
  the
  script in wicket:panel rather than wicket:head, but that has the
  disadvantage of re-sending the script with the panel content when the
  panel
  is re-used on the same page.
 
  Thanks for any help/info.
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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




wicket-ajax.js header contribution with script that includes a less than character

2011-02-02 Thread Randy S.
Hi all.  I have narrowed a problem down to the following scenario:

I have a panel with this:

wicket:head
script
if (someVariable  0) {
someVariable = 0;
}
/script
/wicket:head

This script fails to execute when the panel is loaded by ajax.  If I replace
the less than character  with equals ==, then it executes (but of
course, this is not what I need).

I tested this in Firefox 4.0b10 and Chrome 8.

I have searched a lot for others facing this issue, and also tried to dig
through wicket-ajax.js, but it is time to ask here in case it is a known
issue.

I 'm sure I can put the code into a separate JS file as a workaround but I
wanted to save another network hop. Another solution would be to embed the
script in wicket:panel rather than wicket:head, but that has the
disadvantage of re-sending the script with the panel content when the panel
is re-used on the same page.

Thanks for any help/info.