Re: Wicket-Source: Click-through from browser back to Java source

2012-02-01 Thread Martin Grigorov
Awesome indeed!

@Minas: how hard is to integrate this in WicketForge (IDEA users) ? :-)

On Wed, Feb 1, 2012 at 3:21 AM, Jenny Brown jennybro...@gmail.com wrote:
 Working on someone else's complex wicket pages can result in a lot of time
 spent hunting for components in the source. What if you could click on an
 item in the web page and jump straight to the line of Java source that
 created it?

 The net.ftlines.wicket-source module, plus a couple of plugins, lets you do
 just that. There are three parts - a module for your WicketApplication, a
 Firefox plugin, and an Eclipse plugin.

 1. Wicket module records where in the source code each component is
 constructed and saves it in an HTML attribute.
 2. Firebug extension displays the html attribute in Firebug's sidebar and
 lets you click to open it in Eclipse. (Chrome extension pending.)
 3. Eclipse plugin listens for clicks from Firefox and opens the file to
 that line of the Java source.

 These three pieces together close the circle from wicket components and
 html rendering, to the browser, and back to the wicket component source,
 speeding work on existing but unfamiliar pages, and making minor wording
 tweaks quick and easy.

 For more information and installation, check out
 https://www.42lines.net/2012/01/31/announcing-wicket-source/

 Release 1.5.0_06 is available in maven central.  1.5.0.7-SNAPSHOT contains
 a bug fix for ajax components.


 Jenny Brown



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Google bot see my site with errors!!

2012-02-01 Thread Martin Grigorov
On Wed, Feb 1, 2012 at 1:01 AM, Paolo irresistible...@gmail.com wrote:
 Alle martedì 31 gennaio 2012, Martin Grigorov ha scritto:
 What exactly is the code at: org.wicket.example.QuoteResult. init
 (QuoteResult.java: 55) ?

 package org.wicket.example;

 import java.util.Locale;

 import javax.servlet.http.HttpServletRequest;

 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.Component;
 import org.apache.wicket.behavior.AbstractBehavior;
 import org.apache.wicket.markup.html.IHeaderResponse;
 import org.apache.wicket.markup.html.internal.HeaderResponse;
 import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.behavior.SimpleAttributeModifier;
 import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.markup.html.form.DropDownChoice;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.form.TextField;
 import org.apache.wicket.markup.html.panel.FeedbackPanel;
 import org.apache.wicket.markup.html.link.*;
 import org.apache.wicket.model.Model;
 import org.apache.wicket.PageParameters;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.protocol.http.WebRequest;
 import org.apache.wicket.protocol.http.WebResponse;
 import org.apache.wicket.request.target.coding.QueryStringUrlCodingStrategy;
 import 
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget;
 import org.apache.wicket.request.target.basic.RedirectRequestTarget;

 import javax.servlet.http.HttpServletRequest;

 public class QuoteResult extends WebPage // implements java.io.Serializable
 {
        private static final long serialVersionUID = 1L;
        public Model modelWww;
        public int i;
        public String ,cp,formato;
        public String vcode;
        public String urlcache,burlcache;

        public QuoteResult()
        {
                this ( new PageParameters() );

        }
 //

        public QuoteResult(PageParameters inparams) // PageParameters params)
        {
                final HttpServletRequest httpServletRequest = 
 ((WebRequest)getRequest()).getHttpServletRequest();
                final String lingua = 
 httpServletRequest.getHeader(Accept-Language);
                if (lingua.indexOf(en-tt)-1) getSession().setLocale(new 
 Locale (en-tt));     // *** THIS IS LINE 55

I guess lingue is null here, i.e. there is no Accept-Language header.




 NPEs are easy to debug ;-)
 What is NPEs?

NPE == NullPointerException

 I use Eclipse IDE. I don't know to debug, can you suggest a simple guide to 
 debug Wichet?

Take wicket quickstart (wicket.apache.org/start/quickstart.html) and
start src/test/java/.../Start.java in Eclipse with Debug As - Java
Application.
Put breakpoints in your code and reload the page in your browser.

 The app work well, on my laptop, where I code it, I tested it in localhost 
 with different language browsers.
 It also work well on server. It is very strange!

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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Cannot detect ModalWindow cancel

2012-02-01 Thread Andrea Del Bene

Hi Jered,

this is a known issue, you can find more informations here: 
https://issues.apache.org/jira/browse/WICKET-3809
I have a ModalWindow where I need to know if the user saved in the 
WindowClosedCallback or if they chose to click the X to close the 
window.  To do this in Wicket 1.4, I just set a variable on the page 
that the ModalWindow gets in the PageCreator and then check the 
variable in the WindowClosedCallback.  When I try this in Wicket 1.5 
it doesn't work.  My variable retains the value I initialized it to 
and not the value I updated it to when I submitted the form on the 
ModalWindow page.  I am attaching a quickstart with the 1.5.4 version 
of Wicket.  This is where the bug appears.  I updated the POM and a 
few files to test the same code with 1.4.19 and it works.




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




Re: Wicket-Source: Click-through from browser back to Java source

2012-02-01 Thread Minas Manthos
Sounds great! Would be nice to have it for IDEA too... will look into it. :-)


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Source-Click-through-from-browser-back-to-Java-source-tp4346532p4347366.html
Sent from the Users forum mailing list archive at Nabble.com.

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



RE: Wiquery and JQWicket crash each other!!!!

2012-02-01 Thread Hielke Hoeve
Better late than never:

To respond to your question again: why would you want to use both? They seem to 
do the same thing...

Hielke

-Original Message-
From: atomix [mailto:say_i_love_you_4e...@yahoo.com] 
Sent: donderdag 26 januari 2012 21:14
To: users@wicket.apache.org
Subject: Re: Wiquery and JQWicket crash each other

I got answer from Wiquey developer :

Hi!

JQWicket and WiQuery do not work well together. Both aim to do the same but 
using a different approach. Choose either one, not both. 

When you add WiQuery to the classpath it installs itself using a Wicket 
Initializer and sets a HeaderResponseDecorator. The HeaderResponseDecorator 
manages all resource references when they are of a certain type and manages the 
jQuery initializing statements.

Now , my question is : Did anyone have a solution for Wiquery and JQWicket work 
together, it's really a pity that we can't use them both!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wiquery-and-JQWicket-crash-each-other-tp4330840p4331638.html
Sent from the Users forum mailing list archive at Nabble.com.

-
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: Stateless and Ajax

2012-02-01 Thread zlatko99
Thank you all involved in this thread. With your help, I managed to build a
login/registration form, totally stateless and submitted with ajax. (Thanks,
Robert, for the referenced component, it works really good).

This was a proof of concept for me that such a page could be built in
Wicket. I want to continue further with my project in a completely stateless
manner. However, I see my project using many more complicated ajax
components (ajax-autocomplete, etc.), also incorporating jqwicket library
for integration with Jquery UI.

Is it possible to continue with this arsenal of stateless ajax components
(extended jolira) in order to achieve my plan? If I go this route (like the
login/registration form), can I be optimistic that I can overcome all or
most of other stateless ajax quirks waiting for me in the future?

I work with Wicket 6.0-SNAPSHOT and Roberts' components nicely fit in my
environment.

Thank you,
Zlatko

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Stateless-and-Ajax-tp4344007p4348144.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Stateless and Ajax

2012-02-01 Thread Martin Grigorov
On Wed, Feb 1, 2012 at 5:04 PM, zlatko99 zlatko.suslev...@gmail.com wrote:
 Thank you all involved in this thread. With your help, I managed to build a
 login/registration form, totally stateless and submitted with ajax. (Thanks,
 Robert, for the referenced component, it works really good).

 This was a proof of concept for me that such a page could be built in
 Wicket. I want to continue further with my project in a completely stateless
 manner. However, I see my project using many more complicated ajax
 components (ajax-autocomplete, etc.), also incorporating jqwicket library
 for integration with Jquery UI.

 Is it possible to continue with this arsenal of stateless ajax components
 (extended jolira) in order to achieve my plan? If I go this route (like the
 login/registration form), can I be optimistic that I can overcome all or
 most of other stateless ajax quirks waiting for me in the future?


I'm thinking of a problem which I'm not sure can be handled by stateless ajax.
A page has a panel and an ajax link that replaces this panel with a
another panel. So far so good.
The new panel also has an ajax link. Clicking on this link will lead
to ComponentNotFoundException I think, because it wont be in the
initial state of the re-created page.

Stateless Ajax users can you try this scenario ?

 I work with Wicket 6.0-SNAPSHOT and Roberts' components nicely fit in my
 environment.

Cool! More users testing the new Ajax impl in Wicket 6.0 !


 Thank you,
 Zlatko

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Stateless-and-Ajax-tp4344007p4348144.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Stateless and Ajax

2012-02-01 Thread vineet semwal
thats right :) ,even the small toggle visibility will have problem ;)
,i have a way of handling that i think but i have not completely
programmed it .i am saving all the state in url works well for the
small things like visiblty etc.
say for replace that  thing can be saved on url
oldcomponentmarkupid_replace=newcomponentmarkupId as page is created
on every request , that thing can be checked and replaced at that time
of creation,not very sure if its correct.,i will try to handle all
that thing internally so the the user's code doesnt look dirty .

On Wed, Feb 1, 2012 at 8:51 PM, Martin Grigorov mgrigo...@apache.org wrote:
 On Wed, Feb 1, 2012 at 5:04 PM, zlatko99 zlatko.suslev...@gmail.com wrote:
 Thank you all involved in this thread. With your help, I managed to build a
 login/registration form, totally stateless and submitted with ajax. (Thanks,
 Robert, for the referenced component, it works really good).

 This was a proof of concept for me that such a page could be built in
 Wicket. I want to continue further with my project in a completely stateless
 manner. However, I see my project using many more complicated ajax
 components (ajax-autocomplete, etc.), also incorporating jqwicket library
 for integration with Jquery UI.

 Is it possible to continue with this arsenal of stateless ajax components
 (extended jolira) in order to achieve my plan? If I go this route (like the
 login/registration form), can I be optimistic that I can overcome all or
 most of other stateless ajax quirks waiting for me in the future?


 I'm thinking of a problem which I'm not sure can be handled by stateless ajax.
 A page has a panel and an ajax link that replaces this panel with a
 another panel. So far so good.
 The new panel also has an ajax link. Clicking on this link will lead
 to ComponentNotFoundException I think, because it wont be in the
 initial state of the re-created page.

 Stateless Ajax users can you try this scenario ?

 I work with Wicket 6.0-SNAPSHOT and Roberts' components nicely fit in my
 environment.

 Cool! More users testing the new Ajax impl in Wicket 6.0 !


 Thank you,
 Zlatko

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Stateless-and-Ajax-tp4344007p4348144.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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




-- 
thank you,

regards,
Vineet Semwal

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



Re: Stateless and Ajax

2012-02-01 Thread Igor Vaynberg
if you are using stateless ajax links like that then the fact that the
panel has been replaced should be added as a query parameter so the
page is reinitialized with the right panel, thats how stateless
frameworks work :)

-igor

On Wed, Feb 1, 2012 at 7:21 AM, Martin Grigorov mgrigo...@apache.org wrote:
 On Wed, Feb 1, 2012 at 5:04 PM, zlatko99 zlatko.suslev...@gmail.com wrote:
 Thank you all involved in this thread. With your help, I managed to build a
 login/registration form, totally stateless and submitted with ajax. (Thanks,
 Robert, for the referenced component, it works really good).

 This was a proof of concept for me that such a page could be built in
 Wicket. I want to continue further with my project in a completely stateless
 manner. However, I see my project using many more complicated ajax
 components (ajax-autocomplete, etc.), also incorporating jqwicket library
 for integration with Jquery UI.

 Is it possible to continue with this arsenal of stateless ajax components
 (extended jolira) in order to achieve my plan? If I go this route (like the
 login/registration form), can I be optimistic that I can overcome all or
 most of other stateless ajax quirks waiting for me in the future?


 I'm thinking of a problem which I'm not sure can be handled by stateless ajax.
 A page has a panel and an ajax link that replaces this panel with a
 another panel. So far so good.
 The new panel also has an ajax link. Clicking on this link will lead
 to ComponentNotFoundException I think, because it wont be in the
 initial state of the re-created page.

 Stateless Ajax users can you try this scenario ?

 I work with Wicket 6.0-SNAPSHOT and Roberts' components nicely fit in my
 environment.

 Cool! More users testing the new Ajax impl in Wicket 6.0 !


 Thank you,
 Zlatko

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Stateless-and-Ajax-tp4344007p4348144.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

 -
 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



generateCallbackScript in Wicket 1.5.4 with CryptoMapper

2012-02-01 Thread jchappelle
I have a behavior that generates a url to a page. This behavior is attached
to menu items. I have the behavior code below. After moving to Wicket 1.5.4
this is not working. I get a message in the WICKET DEBUG window like this
500 error had text: .

I will say that we are using the CryptoMapper and it works if I remove the
CryptoMapper. I have added the CryptoMapper as the last line in my
Application.init method. The line looks like this:

setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));

Also, I believe the links worked in Wicket 1.5.3, but I was getting error
messages because of  https://issues.apache.org/jira/browse/WICKET-4222
WICKET-4222  so I upgraded to Wicket 1.5.4 and the error messages have gone
away, but now my menu doesn't work.

Here is the code for my behavior:

public class YuiMenuBarItemSelectionBehavior extends
AbstractDefaultAjaxBehavior
{
private YuiMenuBarItem menuItem;

public YuiMenuBarItemSelectionBehavior(YuiMenuBarItem menuItem)
{
this.menuItem = menuItem;
}

@Override
protected void onBind()
{
super.onBind();
menuItem.setUrl(javascript:  + 
generateCallbackScript(wicketAjaxGet('
+ getCallbackUrl() + ').toString());
}

@Override
protected void respond(AjaxRequestTarget target)
{
menuItem.onMenuItemClicked(target);
}
}

Any help is appreciated.

Thanks,

Josh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/generateCallbackScript-in-Wicket-1-5-4-with-CryptoMapper-tp4348734p4348734.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: generateCallbackScript in Wicket 1.5.4 with CryptoMapper

2012-02-01 Thread jchappelle
By the way the ajax response above is not rendering what I put in there. It
has a CDATA section and contains
[../../../fyBfZ9p6trO9WTR7h0OMLw/fyBce/R7h42].

Josh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/generateCallbackScript-in-Wicket-1-5-4-with-CryptoMapper-tp4348734p4348745.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket-Source: Click-through from browser back to Java source

2012-02-01 Thread Jenny Brown
On Wed, Feb 1, 2012 at 3:57 AM, Minas Manthos minas.mant...@gmail.comwrote:

 Sounds great! Would be nice to have it for IDEA too... will look into it.
 :-)


I'm glad it sounds useful!  :)

Let me know if I can be of any assistance in the porting effort.  The core
behavior is simply listening for an http get request with a parameter for
which file to open, and optionally a password (to reduce dev team
pranks!).  So, it's hopefully very straightforward.


Jenny Brown


RE: Cannot detect ModalWindow cancel

2012-02-01 Thread Chris Colman
In trying to solve your problem of determining how the user closed the
form you might find the ModalX library in Wicketstuff useful.

ModalX (Modal eXtensions) for Wicket (part of Wickestuff) provides a
generic modal panel, modal form which you can simply extend to build
your own modal panels, modal forms and when you use that you not only
have extremely easy modal construction but you also inherit some
standard behaviours that are common to modal windows in many different
traditional OO UI frameworks.

One of the standard behaviours available in many OO UI frameworks is the
concept of a 'modal result' whereby the method by which the user closed
the modal is stored and accessible in the form object after closure.

In the ModalFormPanel the possible values returned by getModalResult()
are:

public static final int MR_OK = 1;
public static final int MR_CANCEL = 2;

MR_CANCEL indicates the user closed the form using the cancel button or
the X button in the top right corner. Both of these actions are
semantically the same.

In MessageBox that extends MessageBox the following addition
getModalResults() values are:

public static final int MR_YES = 3;
public static final int MR_NO = 4;

because MessageBox can be constructed with a variety of OK/Cancel/Yes/No
combinations in the control panel. These constants are MB_ not MR_
because they aren't modal results but rather specify the combination of
buttons to display in the Message Box.

public static final int MB_OK = 0;
public static final int MB_OK_CANCEL = 1;
public static final int MB_YES_NO = 2;
public static final int MB_YES_NO_CANCEL = 3;

-Original Message-
From: Andrea Del Bene [mailto:adelb...@ciseonweb.it]
Sent: Wednesday, 1 February 2012 8:49 PM
To: users@wicket.apache.org
Subject: Re: Cannot detect ModalWindow cancel

Hi Jered,

this is a known issue, you can find more informations here:
https://issues.apache.org/jira/browse/WICKET-3809
 I have a ModalWindow where I need to know if the user saved in the
 WindowClosedCallback or if they chose to click the X to close the
 window.  To do this in Wicket 1.4, I just set a variable on the page
 that the ModalWindow gets in the PageCreator and then check the
 variable in the WindowClosedCallback.  When I try this in Wicket 1.5
 it doesn't work.  My variable retains the value I initialized it to
 and not the value I updated it to when I submitted the form on the
 ModalWindow page.  I am attaching a quickstart with the 1.5.4 version
 of Wicket.  This is where the bug appears.  I updated the POM and a
 few files to test the same code with 1.4.19 and it works.



 -
 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: Cannot detect ModalWindow cancel

2012-02-01 Thread Jered Myers

Thanks for your help!  I will look into this.

On 02/01/2012 11:34 AM, Chris Colman wrote:

In trying to solve your problem of determining how the user closed the
form you might find the ModalX library in Wicketstuff useful.

ModalX (Modal eXtensions) for Wicket (part of Wickestuff) provides a
generic modal panel, modal form which you can simply extend to build
your own modal panels, modal forms and when you use that you not only
have extremely easy modal construction but you also inherit some
standard behaviours that are common to modal windows in many different
traditional OO UI frameworks.

One of the standard behaviours available in many OO UI frameworks is the
concept of a 'modal result' whereby the method by which the user closed
the modal is stored and accessible in the form object after closure.

In the ModalFormPanel the possible values returned by getModalResult()
are:

public static final int MR_OK = 1;
public static final int MR_CANCEL = 2;

MR_CANCEL indicates the user closed the form using the cancel button or
the X button in the top right corner. Both of these actions are
semantically the same.

In MessageBox that extends MessageBox the following addition
getModalResults() values are:

public static final int MR_YES = 3;
public static final int MR_NO = 4;

because MessageBox can be constructed with a variety of OK/Cancel/Yes/No
combinations in the control panel. These constants are MB_ not MR_
because they aren't modal results but rather specify the combination of
buttons to display in the Message Box.

public static final int MB_OK = 0;
public static final int MB_OK_CANCEL = 1;
public static final int MB_YES_NO = 2;
public static final int MB_YES_NO_CANCEL = 3;


-Original Message-
From: Andrea Del Bene [mailto:adelb...@ciseonweb.it]
Sent: Wednesday, 1 February 2012 8:49 PM
To: users@wicket.apache.org
Subject: Re: Cannot detect ModalWindow cancel

Hi Jered,

this is a known issue, you can find more informations here:
https://issues.apache.org/jira/browse/WICKET-3809

I have a ModalWindow where I need to know if the user saved in the
WindowClosedCallback or if they chose to click the X to close the
window.  To do this in Wicket 1.4, I just set a variable on the page
that the ModalWindow gets in the PageCreator and then check the
variable in the WindowClosedCallback.  When I try this in Wicket 1.5
it doesn't work.  My variable retains the value I initialized it to
and not the value I updated it to when I submitted the form on the
ModalWindow page.  I am attaching a quickstart with the 1.5.4 version
of Wicket.  This is where the bug appears.  I updated the POM and a
few files to test the same code with 1.4.19 and it works.



-
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



SetResponsePage Ajax

2012-02-01 Thread Richard W. Adams
I'm having a hard time understanding what happens when setResponsePage() 
is called while processing an Ajax request. Does Wicket:

1. Render the response page's HTML  send it back through the Ajax 
connection?

2. Tell the browser to make a new request (i.e., redirect) to the new 
page?

3. Something else?


This question is part of  larger problem I'm trying to solve: Getting 
feedback messages to appear on the response page. In my scenario, I make 
an Ajax request to perform a transaction. If it fails, I stay on the 
current page  display an error feedback panel. That works fine.  If the 
transaction succeeds, I want to go the next page (the response page), but 
I may or may not have warning or info feedback to show there.  It's not 
working smoothly,  I suspect the problem is I'm misunderstanding 
something about how response pages work with Ajax.

**

This email and any attachments may contain information that is confidential 
and/or privileged for the sole use of the intended recipient.  Any use, review, 
disclosure, copying, distribution or reliance by others, and any forwarding of 
this email or its contents, without the express permission of the sender is 
strictly prohibited by law.  If you are not the intended recipient, please 
contact the sender immediately, delete the e-mail and destroy all copies.
**


Re: SetResponsePage Ajax

2012-02-01 Thread Sven Meier
Take a look at WebPageRenderer#respond(): Inside Ajax requests it 
responds with a redirect, which is then analyzed and performed by 
wicket-ajax.js in the browser.


Sven

On 02/01/2012 09:43 PM, Richard W. Adams wrote:

I'm having a hard time understanding what happens when setResponsePage()
is called while processing an Ajax request. Does Wicket:

1. Render the response page's HTML  send it back through the Ajax
connection?

2. Tell the browser to make a new request (i.e., redirect) to the new
page?

3. Something else?


This question is part of  larger problem I'm trying to solve: Getting
feedback messages to appear on the response page. In my scenario, I make
an Ajax request to perform a transaction. If it fails, I stay on the
current page  display an error feedback panel. That works fine.  If the
transaction succeeds, I want to go the next page (the response page), but
I may or may not have warning or info feedback to show there.  It's not
working smoothly,  I suspect the problem is I'm misunderstanding
something about how response pages work with Ajax.

**

This email and any attachments may contain information that is confidential 
and/or privileged for the sole use of the intended recipient.  Any use, review, 
disclosure, copying, distribution or reliance by others, and any forwarding of 
this email or its contents, without the express permission of the sender is 
strictly prohibited by law.  If you are not the intended recipient, please 
contact the sender immediately, delete the e-mail and destroy all copies.
**




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