You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by T Ames <ta...@gmail.com> on 2010/02/22 16:59:52 UTC

Wicket and Reverse Proxy

A while ago I sent a message ( at bottom) and received no responses. In that
message I had thought that AJAX was not working, but I was mistaken. In the
Ajax Debug screen, Wicket is responding back with a stream.

Here is one of the issues that I found.

I get this error.
ERROR: Wicket.Ajax.Call.failure: Error while parsing response: 'src' is null
or not an object

The Juniper system adds strange things in the resource path.

Example. This is a snippet of the source view on initial load for wicket
javascript:

<script type="text/javascript"
src="../resources/org.apache.wicket.markup.html.WicketEventReference/,DanaInfo=159.116.216.35,Port=38080,CT=js+wicket-event.js"></script>
<script type="text/javascript"
src="../resources/org.apache.wicket.ajax.WicketAjaxReference/,DanaInfo=159.116.216.35,Port=38080,CT=js+wicket-ajax.js"></script>
<script type="text/javascript"
src="../resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/,DanaInfo=159.116.216.35,Port=38080,CT=js+wicket-ajax-debug.js"></script>
<script type="text/javascript"
id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
wicketAjaxDebugEnable=true;
/*-->]]>*/</script>


When the ajax stream is returned from the ajax call, the "added" stuff is
not there:

<script type="text/javascript"
src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
<script type="text/javascript"
src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
<script type="text/javascript"
id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
wicketAjaxDebugEnable=true;
/*-->]^]^>*/</script>

so I am assuming this is why I am getting the Wicket Ajax Error.

I am not understanding what Juniper is trying to do. I was hoping maybe
someone may be able to shed some light on this. Another strange thing I
noticed was when debugging the web page in Eclipse, my class level variables
were always set at the initial value even though I would change the value
within the ajax code.  If I run the application normally without using
Juniper, the class level values change as you would expect.  It is strange
but is seems like each time I am returned to the java code I am getting the
the initial page object.


>

Nabble link to original messsage ->
http://old.nabble.com/Reverse-Proxy-and-AJAX-td24094730.html#a24094730
--------------------------------------------------------------------------------------------------------------------
June 18, 2009

My company is going to start using a *Juniper* Reverse Proxy server for VPN
access.  We have a large mix of different web technologies in use. Wicket is

one of them. What this product does is URL rewriting to make things work.  I

am having a problem with Wicket AJAX functions working properly. Below is an

example of the way the URLs look where AJAX does work and where it does not.


.....

Re: Wicket and Reverse Proxy

Posted by T Ames <ta...@gmail.com>.
Makes sense, but I need to override this behavior.  Is there a way to stop
Wicket from sending the <script> elements at the time of the AJAX response?

On Fri, Mar 26, 2010 at 9:52 AM, Igor Vaynberg <ig...@gmail.com>wrote:

> because wicket doesnt track what has been "sent" or not, it simply
> renders what you tell it to. the filtering of duplicates happens on
> the client side where js knows whats is there and what is not.
>
> -igor
>
> On Fri, Mar 26, 2010 at 5:53 AM, T Ames <ta...@gmail.com> wrote:
> > Hmmmm... No responses.  Maybe I can attack this little by little.
> >
> > When an AJAX response is sent back to the browser, is there a way to stop
> > Wicket from sending the <script>
> > elements?  These <script> elements are already there on the initial page
> > load so I don't see why it needs to send these again on the AJAX
> response.
> >
> >
> > On Mon, Feb 22, 2010 at 11:59 AM, T Ames <ta...@gmail.com> wrote:
> >
> >> A while ago I sent a message ( at bottom) and received no responses. In
> >> that message I had thought that AJAX was not working, but I was
> mistaken. In
> >> the Ajax Debug screen, Wicket is responding back with a stream.
> >>
> >> Here is one of the issues that I found.
> >>
> >> I get this error.
> >> ERROR: Wicket.Ajax.Call.failure: Error while parsing response: 'src' is
> >> null or not an object
> >>
> >> The Juniper system adds strange things in the resource path.
> >>
> >> Example. This is a snippet of the source view on initial load for wicket
> >> javascript:
> >>
> >> <script type="text/javascript"
> >>
> src="../resources/org.apache.wicket.markup.html.WicketEventReference/,DanaInfo=159.116.216.35,Port=38080,CT=js+wicket-event.js"></script>
> >> <script type="text/javascript"
> >>
> src="../resources/org.apache.wicket.ajax.WicketAjaxReference/,DanaInfo=159.116.216.35,Port=38080,CT=js+wicket-ajax.js"></script>
> >> <script type="text/javascript"
> >>
> src="../resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/,DanaInfo=159.116.216.35,Port=38080,CT=js+wicket-ajax-debug.js"></script>
> >> <script type="text/javascript"
> >> id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
> >> wicketAjaxDebugEnable=true;
> >> /*-->]]>*/</script>
> >>
> >>
> >> When the ajax stream is returned from the ajax call, the "added" stuff
> is
> >> not there:
> >>
> >> <script type="text/javascript"
> >>
> src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
> >> <script type="text/javascript"
> >>
> src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
> >> <script type="text/javascript"
> >> id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
> >> wicketAjaxDebugEnable=true;
> >> /*-->]^]^>*/</script>
> >>
> >> so I am assuming this is why I am getting the Wicket Ajax Error.
> >>
> >> I am not understanding what Juniper is trying to do. I was hoping maybe
> >> someone may be able to shed some light on this. Another strange thing I
> >> noticed was when debugging the web page in Eclipse, my class level
> variables
> >> were always set at the initial value even though I would change the
> value
> >> within the ajax code.  If I run the application normally without using
> >> Juniper, the class level values change as you would expect.  It is
> strange
> >> but is seems like each time I am returned to the java code I am getting
> the
> >> the initial page object.
> >>
> >>
> >>>
> >>
> >> Nabble link to original messsage ->
> >> http://old.nabble.com/Reverse-Proxy-and-AJAX-td24094730.html#a24094730
> >>
> >>
> --------------------------------------------------------------------------------------------------------------------
> >> June 18, 2009
> >>
> >> My company is going to start using a *Juniper* Reverse Proxy server for
> >> VPN
> >> access.  We have a large mix of different web technologies in use.
> Wicket
> >> is
> >> one of them. What this product does is URL rewriting to make things
> work.
> >>  I
> >> am having a problem with Wicket AJAX functions working properly. Below
> is
> >> an
> >> example of the way the URLs look where AJAX does work and where it does
> >> not.
> >>
> >> .....
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Wicket and Reverse Proxy

Posted by Igor Vaynberg <ig...@gmail.com>.
because wicket doesnt track what has been "sent" or not, it simply
renders what you tell it to. the filtering of duplicates happens on
the client side where js knows whats is there and what is not.

-igor

On Fri, Mar 26, 2010 at 5:53 AM, T Ames <ta...@gmail.com> wrote:
> Hmmmm... No responses.  Maybe I can attack this little by little.
>
> When an AJAX response is sent back to the browser, is there a way to stop
> Wicket from sending the <script>
> elements?  These <script> elements are already there on the initial page
> load so I don't see why it needs to send these again on the AJAX response.
>
>
> On Mon, Feb 22, 2010 at 11:59 AM, T Ames <ta...@gmail.com> wrote:
>
>> A while ago I sent a message ( at bottom) and received no responses. In
>> that message I had thought that AJAX was not working, but I was mistaken. In
>> the Ajax Debug screen, Wicket is responding back with a stream.
>>
>> Here is one of the issues that I found.
>>
>> I get this error.
>> ERROR: Wicket.Ajax.Call.failure: Error while parsing response: 'src' is
>> null or not an object
>>
>> The Juniper system adds strange things in the resource path.
>>
>> Example. This is a snippet of the source view on initial load for wicket
>> javascript:
>>
>> <script type="text/javascript"
>> src="../resources/org.apache.wicket.markup.html.WicketEventReference/,DanaInfo=159.116.216.35,Port=38080,CT=js+wicket-event.js"></script>
>> <script type="text/javascript"
>> src="../resources/org.apache.wicket.ajax.WicketAjaxReference/,DanaInfo=159.116.216.35,Port=38080,CT=js+wicket-ajax.js"></script>
>> <script type="text/javascript"
>> src="../resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/,DanaInfo=159.116.216.35,Port=38080,CT=js+wicket-ajax-debug.js"></script>
>> <script type="text/javascript"
>> id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
>> wicketAjaxDebugEnable=true;
>> /*-->]]>*/</script>
>>
>>
>> When the ajax stream is returned from the ajax call, the "added" stuff is
>> not there:
>>
>> <script type="text/javascript"
>> src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
>> <script type="text/javascript"
>> src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
>> <script type="text/javascript"
>> id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
>> wicketAjaxDebugEnable=true;
>> /*-->]^]^>*/</script>
>>
>> so I am assuming this is why I am getting the Wicket Ajax Error.
>>
>> I am not understanding what Juniper is trying to do. I was hoping maybe
>> someone may be able to shed some light on this. Another strange thing I
>> noticed was when debugging the web page in Eclipse, my class level variables
>> were always set at the initial value even though I would change the value
>> within the ajax code.  If I run the application normally without using
>> Juniper, the class level values change as you would expect.  It is strange
>> but is seems like each time I am returned to the java code I am getting the
>> the initial page object.
>>
>>
>>>
>>
>> Nabble link to original messsage ->
>> http://old.nabble.com/Reverse-Proxy-and-AJAX-td24094730.html#a24094730
>>
>> --------------------------------------------------------------------------------------------------------------------
>> June 18, 2009
>>
>> My company is going to start using a *Juniper* Reverse Proxy server for
>> VPN
>> access.  We have a large mix of different web technologies in use. Wicket
>> is
>> one of them. What this product does is URL rewriting to make things work.
>>  I
>> am having a problem with Wicket AJAX functions working properly. Below is
>> an
>> example of the way the URLs look where AJAX does work and where it does
>> not.
>>
>> .....
>>
>

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


Re: Wicket and Reverse Proxy

Posted by T Ames <ta...@gmail.com>.
Hmmmm... No responses.  Maybe I can attack this little by little.

When an AJAX response is sent back to the browser, is there a way to stop
Wicket from sending the <script>
elements?  These <script> elements are already there on the initial page
load so I don't see why it needs to send these again on the AJAX response.


On Mon, Feb 22, 2010 at 11:59 AM, T Ames <ta...@gmail.com> wrote:

> A while ago I sent a message ( at bottom) and received no responses. In
> that message I had thought that AJAX was not working, but I was mistaken. In
> the Ajax Debug screen, Wicket is responding back with a stream.
>
> Here is one of the issues that I found.
>
> I get this error.
> ERROR: Wicket.Ajax.Call.failure: Error while parsing response: 'src' is
> null or not an object
>
> The Juniper system adds strange things in the resource path.
>
> Example. This is a snippet of the source view on initial load for wicket
> javascript:
>
> <script type="text/javascript"
> src="../resources/org.apache.wicket.markup.html.WicketEventReference/,DanaInfo=159.116.216.35,Port=38080,CT=js+wicket-event.js"></script>
> <script type="text/javascript"
> src="../resources/org.apache.wicket.ajax.WicketAjaxReference/,DanaInfo=159.116.216.35,Port=38080,CT=js+wicket-ajax.js"></script>
> <script type="text/javascript"
> src="../resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/,DanaInfo=159.116.216.35,Port=38080,CT=js+wicket-ajax-debug.js"></script>
> <script type="text/javascript"
> id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
> wicketAjaxDebugEnable=true;
> /*-->]]>*/</script>
>
>
> When the ajax stream is returned from the ajax call, the "added" stuff is
> not there:
>
> <script type="text/javascript"
> src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
> <script type="text/javascript"
> src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
> <script type="text/javascript"
> id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
> wicketAjaxDebugEnable=true;
> /*-->]^]^>*/</script>
>
> so I am assuming this is why I am getting the Wicket Ajax Error.
>
> I am not understanding what Juniper is trying to do. I was hoping maybe
> someone may be able to shed some light on this. Another strange thing I
> noticed was when debugging the web page in Eclipse, my class level variables
> were always set at the initial value even though I would change the value
> within the ajax code.  If I run the application normally without using
> Juniper, the class level values change as you would expect.  It is strange
> but is seems like each time I am returned to the java code I am getting the
> the initial page object.
>
>
>>
>
> Nabble link to original messsage ->
> http://old.nabble.com/Reverse-Proxy-and-AJAX-td24094730.html#a24094730
>
> --------------------------------------------------------------------------------------------------------------------
> June 18, 2009
>
> My company is going to start using a *Juniper* Reverse Proxy server for
> VPN
> access.  We have a large mix of different web technologies in use. Wicket
> is
> one of them. What this product does is URL rewriting to make things work.
>  I
> am having a problem with Wicket AJAX functions working properly. Below is
> an
> example of the way the URLs look where AJAX does work and where it does
> not.
>
> .....
>

CompoundPropertyModel: continue traversal with multiple CPMs in the hierarchy

Posted by srm <sr...@schokokeks.org>.
Hi list, 
say I have a Component hierarchy like CompA->CompB->CompC. 
CompB and CompA each have a distinct CompoundPropertyModel. 
CompC will use it's ID as accessor to one of the CPM.modelObject's fields. 
Given that CompB's CPM doesn't have a coresponding property but CompA's 
CPM has, will Wicket continue the traversal after it wasn't successful with the first
CPM found in the hierarchy? If not, I would like to argue that this could be 
something useful, though I'll have to come up with a use-case which I don't
have at hand right now :)

Your input please.

Regards,
Stephan



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