Change a session locale using a GET parameter

2013-11-25 Thread Marcin Zajączkowski
Hi,

In the application an user should be able to change session locale with
a GET parameter (e.g. ?locale=pl). I implemented it in onConfigure for
my abstract WebPage where I check if the parameter exists and change
session locale and it works fine.

Nevertheless I wonder if it is a proper place for that action? Or maybe
I can tell Wicket to automatically use locale from every Request (not
only once when a session is created)?

Marcin

-- 
http://blog.solidsoft.info/ - Working code is not enough


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



Re: Change a session locale using a GET parameter

2013-11-25 Thread Marcin Zajączkowski
On 2013-11-25 17:45, Martin Grigorov wrote:
 Hi,
 
 See
 https://github.com/apache/wicket/blob/master/wicket-examples/src/main/java/org/apache/wicket/examples/requestmapper/LocaleFirstMapper.java?source=cc
 
 You can read the parameter from the query string.

Great, thanks Martin.

Marcin


 On Mon, Nov 25, 2013 at 6:31 PM, Marcin Zajączkowski msz...@wp.pl wrote:
 
 Hi,

 In the application an user should be able to change session locale with
 a GET parameter (e.g. ?locale=pl). I implemented it in onConfigure for
 my abstract WebPage where I check if the parameter exists and change
 session locale and it works fine.

 Nevertheless I wonder if it is a proper place for that action? Or maybe
 I can tell Wicket to automatically use locale from every Request (not
 only once when a session is created)?

 Marcin


-- 
http://blog.solidsoft.info/ - Working code is not enough



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



Re: Generated drop down list of countries in Wicket - any better way?

2013-11-20 Thread Marcin Zajączkowski
On 2013-11-20 09:28, Martin Grigorov wrote:
 Hi,
 
 On Wed, Nov 20, 2013 at 1:30 AM, Marcin Zajączkowski msz...@wp.pl wrote:
 
 On 2013-11-19 08:44, Martin Grigorov wrote:
 Hi,

 I think you can use IModelString for the dropdown. This will be the
 country code.
 The transformation from id to name and back (if needed) can be moved to a
 custom IChoiceRenderer. There you have access to the current locale for
 each rendering.
 CountryChoiceRenderer can delegate the actual work to
 CountryDatabase/CountryProvider/...

 Thanks Martin for your reply!

 Using your suggestions I was able to simplify the Wicket code to two
 classes: a custom DropDownChoice and a renderer. As a drawback I had to
 optimize/cache query in my service returning country name by ID/code.

 One thing is not clear for me. How can I get a current locale in
 CountryChoiceRenderer (without pass it from my DropDownChoice component)?

 
 To have the locale passed to you you can use custom IConverter.
 1) DropDownChoiceCountry
 2) CountryChoiceRenderer that returns the country id for #getIdValue() and
 the country name for #getDisplayValue()
 3) override DropDownChoice#getConverter (or register a global converter)
 that looks up a Country by its id

Thanks Martin for your explanation.

Marcin


 On Tue, Nov 19, 2013 at 12:51 AM, Marcin Zajączkowski msz...@wp.pl
 wrote:

 Hi,

 Working on Wicket frontend for AppFuse I had to implement a drop down
 choice of countries. I did it, but don't like the solution and I wonder
 if it could be done easier/prettier?

 Issues:
 1. In domain model there is a country represented as a String field (a
 country code) in an address class. In my Wicket component I wanted to
 use a Country class with a code and name. It forced me to create
 CountryDropDownChoice component which embed String model into Country
 model(with EmbeddedCountryModel):

 public class CountryDropDownChoice extends DropDownChoiceCountry {
 public CountryDropDownChoice(String id, PropertyModelString
 country, Locale locale) {
 super(id, new EmbeddedCountryModel(country, locale), new
 CountriesModel(locale), new ChoiceRenderer(name, locale));
 }
 }

 with a call in my panel/fragment:
 add(new CountryDropDownChoice(country, new
 PropertyModelString(getDefaultModel(), country), getLocale()));

 2. I would like to have country names depending on current user locales.
 I don't have access to Session in a model and there for I needed to pass
 current locale to both models (they call CountryService implemented as
 String bean using given locale). Could it be simplified?

 My files:


 https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-countrydropdownchoice-java

 https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-countriesmodel-java


 https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-embeddedcountrymodel-java
 https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-country-java


 https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-usereditpanel-java-L19


 https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-javalocalecountryservice-java

 Thanks in advance
 Marcin

 --
 http://blog.solidsoft.info/ - Working code is not enough



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


 


-- 
http://blog.solidsoft.info/ - Working code is not enough



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



Re: Generated drop down list of countries in Wicket - any better way?

2013-11-19 Thread Marcin Zajączkowski
On 2013-11-19 08:44, Martin Grigorov wrote:
 Hi,
 
 I think you can use IModelString for the dropdown. This will be the
 country code.
 The transformation from id to name and back (if needed) can be moved to a
 custom IChoiceRenderer. There you have access to the current locale for
 each rendering.
 CountryChoiceRenderer can delegate the actual work to
 CountryDatabase/CountryProvider/...

Thanks Martin for your reply!

Using your suggestions I was able to simplify the Wicket code to two
classes: a custom DropDownChoice and a renderer. As a drawback I had to
optimize/cache query in my service returning country name by ID/code.

One thing is not clear for me. How can I get a current locale in
CountryChoiceRenderer (without pass it from my DropDownChoice component)?

Marcin



 On Tue, Nov 19, 2013 at 12:51 AM, Marcin Zajączkowski msz...@wp.pl wrote:
 
 Hi,

 Working on Wicket frontend for AppFuse I had to implement a drop down
 choice of countries. I did it, but don't like the solution and I wonder
 if it could be done easier/prettier?

 Issues:
 1. In domain model there is a country represented as a String field (a
 country code) in an address class. In my Wicket component I wanted to
 use a Country class with a code and name. It forced me to create
 CountryDropDownChoice component which embed String model into Country
 model(with EmbeddedCountryModel):

 public class CountryDropDownChoice extends DropDownChoiceCountry {
 public CountryDropDownChoice(String id, PropertyModelString
 country, Locale locale) {
 super(id, new EmbeddedCountryModel(country, locale), new
 CountriesModel(locale), new ChoiceRenderer(name, locale));
 }
 }

 with a call in my panel/fragment:
 add(new CountryDropDownChoice(country, new
 PropertyModelString(getDefaultModel(), country), getLocale()));

 2. I would like to have country names depending on current user locales.
 I don't have access to Session in a model and there for I needed to pass
 current locale to both models (they call CountryService implemented as
 String bean using given locale). Could it be simplified?

 My files:

 https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-countrydropdownchoice-java
 https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-countriesmodel-java

 https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-embeddedcountrymodel-java
 https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-country-java

 https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-usereditpanel-java-L19

 https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-javalocalecountryservice-java

 Thanks in advance
 Marcin

-- 
http://blog.solidsoft.info/ - Working code is not enough



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



Generated drop down list of countries in Wicket - any better way?

2013-11-18 Thread Marcin Zajączkowski
Hi,

Working on Wicket frontend for AppFuse I had to implement a drop down
choice of countries. I did it, but don't like the solution and I wonder
if it could be done easier/prettier?

Issues:
1. In domain model there is a country represented as a String field (a
country code) in an address class. In my Wicket component I wanted to
use a Country class with a code and name. It forced me to create
CountryDropDownChoice component which embed String model into Country
model(with EmbeddedCountryModel):

public class CountryDropDownChoice extends DropDownChoiceCountry {
public CountryDropDownChoice(String id, PropertyModelString
country, Locale locale) {
super(id, new EmbeddedCountryModel(country, locale), new
CountriesModel(locale), new ChoiceRenderer(name, locale));
}
}

with a call in my panel/fragment:
add(new CountryDropDownChoice(country, new
PropertyModelString(getDefaultModel(), country), getLocale()));

2. I would like to have country names depending on current user locales.
I don't have access to Session in a model and there for I needed to pass
current locale to both models (they call CountryService implemented as
String bean using given locale). Could it be simplified?

My files:
https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-countrydropdownchoice-java
https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-countriesmodel-java
https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-embeddedcountrymodel-java
https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-country-java
https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-usereditpanel-java-L19
https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-javalocalecountryservice-java

Thanks in advance
Marcin

-- 
http://blog.solidsoft.info/ - Working code is not enough

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



Re: Ability to simply enable jQuery.noConflict() globally for an application in Wicket 6

2012-11-20 Thread Marcin Zajączkowski
Thanks Martijn for your replies. I have just found them.

On 2012-11-13 13:23, Martijn Dashorst wrote:
 If you don't have a common base page for all your pages, then you can
 use a ComponentInstantiationListener that adds a behavior to all
 pages, rendering the specific javascript invocations.
 
 Else, just override the renderHead(IHeaderResponse) method in your
 base page and do the javascript voodoo there.

I tried the solution with renderHead(IHeaderResponse), but both
JavaScriptHeaderItem.forScript() and OnDomReadyHeaderItem.forScript()
generates script in the wrong place (between my script and JQuery from
Wicket or after jQuery and my script which already generates JS errors).
I need something which will be inserted just after jquery from Wicket,
before my custom scripts which are also inserted on particular pages in
renderHead(). ComponentInstantiationListener probably works in the same way.
In addition adding jQuery.noConflict(); globally for all my pages
generates full jQuery import also on pages where no Java Script is used
(probably small impact, but always).

Thereupon I think that an ability to simply switch jquery to a
non-conflict mode would be a nice feature for people having problems
similar to mine.

Marcin



 On Mon, Nov 12, 2012 at 8:44 AM, Martin Grigorov mgrigo...@apache.org wrote:
 Hi,

 For wicket-examples'
 http://www.wicket-library.com/wicket-examples-6.0.x/ajax/effectshttp://www.wicket-library.com/wicket-examples-6.0.x/ajax/effects?1
 all
 I had to do was to add

 @Override
 public void renderHead(IHeaderResponse response)
 {
 super.renderHead(response);

 response.render(OnDomReadyHeaderItem.forScript(jQuery.noConflict();));
 }

 to the page that uses Prototype (EffectsPage.java).

 But it is quite simple demo so maybe more work is needed in a real use case
 like yours.


 On Mon, Nov 12, 2012 at 2:58 AM, Marcin Zajączkowski msz...@wp.pl wrote:

 Hi, I have an application which internally uses prototype. After
 migration from Wicket 1.5 to 6 I had problems with conflicts. It helped
 to enable non conflict mode in jQuery, but to do this globally I had to
 do a few things:
  - an one line script
  - a corresponding JavaScriptResourceReference
  - a new JavaScriptBundle which bundle it with the original one
  - set a jQueryReference to my bundle

 Is there any simpler way to do that? There is probably more people
 facing with that problem and some build in solution which be useful.

 Regards
 Marcin

 --
 http://blog.solidsoft.info/ - Working code is not enough


 -
 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 http://jweekend.com/
 
 
 


-- 
http://blog.solidsoft.info/ - Working code is not enough



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



Ability to simply enable jQuery.noConflict() globally for an application in Wicket 6

2012-11-11 Thread Marcin Zajączkowski
Hi, I have an application which internally uses prototype. After
migration from Wicket 1.5 to 6 I had problems with conflicts. It helped
to enable non conflict mode in jQuery, but to do this globally I had to
do a few things:
 - an one line script
 - a corresponding JavaScriptResourceReference
 - a new JavaScriptBundle which bundle it with the original one
 - set a jQueryReference to my bundle

Is there any simpler way to do that? There is probably more people
facing with that problem and some build in solution which be useful.

Regards
Marcin

-- 
http://blog.solidsoft.info/ - Working code is not enough


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



Re: Problem with testing text field auto completion with WicketTester

2012-10-08 Thread Marcin Zajączkowski
On 2012-10-08 10:06, Martin Grigorov wrote:
 Hi,
 
 You need to do:
 
 tester.getRequest().setParameter(the:respective:name:of:the:input,
 some value);
 tester.executeBehavior()

It did a trick. Thanks!

Marcin

 On Sun, Oct 7, 2012 at 3:26 AM, Marcin Zajączkowski msz...@wp.pl wrote:
 On 2012-10-07 02:14, Marcin Zajączkowski wrote:
 Hi,

 I try to test auto complete feature implemented with
 DefaultCssAutoCompleteTextField. I'm able to call it from a test using
 WicketTesterHelper.findBehavior:

 AbstractAutoCompleteBehavior behavior = (AbstractAutoCompleteBehavior)
 WicketTesterHelper.findBehavior(tester.getComponentFromLastRenderedPage(component),
 AbstractAutoCompleteBehavior.class);
 tester.executeBehavior(behavior);

 but I don't know how to pass a value entered into a text field (behavior
 always gets null as an input).

 I tried to get TextField using tester.getComponentFromLastRenderedPage()
 and set a value on model, but it doesn't reflect on a value visible by
 java script. I was using FormTester and setValue(), but also without any
 positive effect.

 I was also playing with tester.executeAjaxEvent() which could be helpful
 with simple events (like onkeyup), but I don't know how (if) can it
 trigger auto complete behavior.


 I'm not able to set a value in an input, which would be visible by a
 java script and later pass to a server side in a request. Maybe there is
 some easier way using WicketTester? How can I do it?

 I'm using Wicket 6.0.0.

 Regards
 Marcin


-- 
http://blog.solidsoft.info/ - Working code is not enough



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



Problem with testing text field auto completion with WicketTester

2012-10-06 Thread Marcin Zajączkowski
Hi,

I try to test auto complete feature implemented with
DefaultCssAutoCompleteTextField. I'm able to call it from a test using
WicketTesterHelper.findBehavior:

AbstractAutoCompleteBehavior behavior = (AbstractAutoCompleteBehavior)
WicketTesterHelper.findBehavior(tester.getComponentFromLastRenderedPage(component),
AbstractAutoCompleteBehavior.class);
tester.executeBehavior(behavior);

but I don't know how to pass a value entered into a text field (behavior
always gets null as an input).

I tried to get TextField using tester.getComponentFromLastRenderedPage()
and set a value on model, but it doesn't reflect on a value visible by
java script. I was using FormTester and setValue(), but also without any
positive effect.

I'm not able to set a value in an input, which would be visible by a
java script and later pass to a server side in a request. Maybe there is
some easier way using WicketTester? How can I do it?

I'm using Wicket 6.0.0.

Regards
Marcin

-- 
http://blog.solidsoft.info/ - Working code is not enough

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



Re: Problem with testing text field auto completion with WicketTester

2012-10-06 Thread Marcin Zajączkowski
On 2012-10-07 02:14, Marcin Zajączkowski wrote:
 Hi,
 
 I try to test auto complete feature implemented with
 DefaultCssAutoCompleteTextField. I'm able to call it from a test using
 WicketTesterHelper.findBehavior:
 
 AbstractAutoCompleteBehavior behavior = (AbstractAutoCompleteBehavior)
 WicketTesterHelper.findBehavior(tester.getComponentFromLastRenderedPage(component),
 AbstractAutoCompleteBehavior.class);
 tester.executeBehavior(behavior);
 
 but I don't know how to pass a value entered into a text field (behavior
 always gets null as an input).
 
 I tried to get TextField using tester.getComponentFromLastRenderedPage()
 and set a value on model, but it doesn't reflect on a value visible by
 java script. I was using FormTester and setValue(), but also without any
 positive effect.

I was also playing with tester.executeAjaxEvent() which could be helpful
with simple events (like onkeyup), but I don't know how (if) can it
trigger auto complete behavior.


 I'm not able to set a value in an input, which would be visible by a
 java script and later pass to a server side in a request. Maybe there is
 some easier way using WicketTester? How can I do it?
 
 I'm using Wicket 6.0.0.
 
 Regards
 Marcin
 


-- 
http://blog.solidsoft.info/ - Working code is not enough



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



Page with no markup - can be done better than with empty TextTemplate?

2011-02-12 Thread Marcin Zajączkowski
Hi,


In the application I need to have an util page which reloads application
configuration. No markup is required, page implementation calls reload
from service layer, set info message in a session and redirect to a
homepage.

I did it by creating EmptyMarkup class and returning it from
getMarkupResourceStream (IMarkupResourceStreamProvider interface) in my
page implementation.

public class EmptyMarkup extends TextTemplate {

@Override
public String getString() {
return ;
}

@Override
public TextTemplate interpolate(MapString, Object variables) {
return this;
}


It works, but looks quite artificial. I think many applications need
that functionality, so I suspect it can be done more native with Wicket,
can it?


Regards
Marcin


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



Re: Page with no markup - can be done better than with empty TextTemplate?

2011-02-12 Thread Marcin Zajączkowski
On 2011-02-12 23:26, Igor Vaynberg wrote:
 class mypage extends webpage {
   public mypage() {
  service.reset();
  getsession().info(..);
  throw new restartResponseException(getapplication().gethomepage());
   }
 }

I knew there is a way :). Thanks Igor.


Marcin


 2011/2/12 Marcin Zajączkowski msz...@wp.pl:
 Hi,


 In the application I need to have an util page which reloads application
 configuration. No markup is required, page implementation calls reload
 from service layer, set info message in a session and redirect to a
 homepage.

 I did it by creating EmptyMarkup class and returning it from
 getMarkupResourceStream (IMarkupResourceStreamProvider interface) in my
 page implementation.

 public class EmptyMarkup extends TextTemplate {

@Override
public String getString() {
return ;
}

@Override
public TextTemplate interpolate(MapString, Object variables) {
return this;
}


 It works, but looks quite artificial. I think many applications need
 that functionality, so I suspect it can be done more native with Wicket,
 can it?


 Regards
 Marcin


 -
 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
 
 


-- 
http://solidsoft.wordpress.com/ - Working code is not enough


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



Re: Truncated page when using Sitemesh with redirect after post (Was: Re: Page content sends twice in response to GET when redirecting after POST)

2011-01-10 Thread Marcin Zajączkowski
On 2011-01-10 01:40, Igor Vaynberg wrote:
 really strange because it doesnt happen to me:
 
 http://pastebin.com/fe1pjZjy

Thanks for your check Igor.

I've used Ethereal to sniff my traffic and in fact page from forminput
is sent properly. Maybe it's a bug in Firebug 1.5.4 (for Firefox 3.5).

Nevertheless even Ethereal shows the page in get after post is
truncated. I've found it's probably problem with Sitemesh.
Content-length has the same value for pure page generated by Wicket and
page with Sitemesh decorators. It could be:
http://jira.opensymphony.com/browse/SIM-217

Is Sitemesh compatible with Wicket? Maybe there is a better workaround
than switch to ONE_PASS_RENDER?


Regards
Marcin



 2011/1/9 Marcin Zajączkowski msz...@wp.pl:
 On 2011-01-09 22:00, Marcin Zajączkowski wrote:
 Hi,


 Following some problems with page rendering in my application after post
 a form I've noticed that when redirect after post strategy is used (both
 REDIRECT_TO_BUFFER and REDIRECT_TO_RENDER) page content is duplicated in
 a response to GET (after 302 Moved Temporarily on POST). I thought it's
 a problem with a configuration of my application (I'm playing with
 AppFuse as a base), but in the first Wicket example with form submission
 found on the web [1] it occurs as well.

 Tested it with Wicket 1.4.15. Response snipset bellow. Full response as
 attachment. I can be easily reproduced using forminput example (just
 Full response: http://pastebin.com/jQTRExjh


 Marcin


 submit form).

 [1] - http://www.wicketstuff.org/wicket14/forminput/


 I don't see a reason for that behavior, but I'm new to Wicket, so maybe
 it's a feature?


 html
 head
 titleWicket Examples - forminput/title
 link rel=stylesheet type=text/css href=../style.css/
 link rel=stylesheet type=text/css
 href=resources/org.apache.wicket.devutils.debugbar.DebugBar/wicket-debugbar.css;jsessionid=E218340AA4A63320747D134AA1985E7F
 /
 script type=text/javascript
 src=resources/org.apache.wicket.devutils.debugbar.DebugBar/wicket-debugbar.js;jsessionid=E218340AA4A63320747D134AA1985E7F/script
 /head
 body
 span
 diva href=../index.html style=color: #E9601A
 target=_topimg src=../logo.png//adiv id=wicketDebugBar
 class=wicketDebugBar
   a id=wicketDebugBarCollapse
 onclick=wicketDebugBarCollapse();img
 src=resources/org.apache.wicket.devutils.debugbar.DebugBar/
 (...)
 label for=siteSelectionyour favorite 
 sites/label
 select id=siteSelection name=siteSelection 
 multiple=multiple
 size=3
 option value=0The Server Side/html   --- seems to be cut off
 head-- one again starting from head
 titleWicket Examples - forminput/title
 link rel=stylesheet type=text/css href=../style.css/
 link rel=stylesheet type=text/css
 href=resources/org.apache.wicket.devutils.debugbar.DebugBar/wicket-debugbar.css;jsessionid=E218340AA4A63320747D134AA1985E7F
 /
 script type=text/javascript
 src=resources/org.apache.wicket.devutils.debugbar.DebugBar/wicket-debugbar.js;jsessionid=E218340AA4A63320747D134AA1985E7F/script
 /head
 body
 span
 diva href=../index.html style=color: #E9601A
 target=_topimg src=../logo.png//adiv id=wicketDebugBar
 class=wicketDebugBar
   a id=wicketDebugBarCollapse
 onclick=wicketDebugBarCollapse();img
 src=resources/org.apache.wicket.devutils.debugbar.DebugBar/
 (...)
 option value=0The Server Side/option --- second time not cut off
 option value=1Java Lobby/option
 option value=2Java.Net/option
 (...)
 /div
 /body
 /html


 Regards
 Marcin


-- 
http://solidsoft.wordpress.com/ - Working code is not enough



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



Re: Page content sends twice in response to GET when redirecting after POST

2011-01-09 Thread Marcin Zajączkowski
On 2011-01-09 22:00, Marcin Zajączkowski wrote:
 Hi,
 
 
 Following some problems with page rendering in my application after post
 a form I've noticed that when redirect after post strategy is used (both
 REDIRECT_TO_BUFFER and REDIRECT_TO_RENDER) page content is duplicated in
 a response to GET (after 302 Moved Temporarily on POST). I thought it's
 a problem with a configuration of my application (I'm playing with
 AppFuse as a base), but in the first Wicket example with form submission
 found on the web [1] it occurs as well.
 
 Tested it with Wicket 1.4.15. Response snipset bellow. Full response as
 attachment. I can be easily reproduced using forminput example (just

Full response: http://pastebin.com/jQTRExjh


Marcin


 submit form).
 
 [1] - http://www.wicketstuff.org/wicket14/forminput/
 
 
 I don't see a reason for that behavior, but I'm new to Wicket, so maybe
 it's a feature?
 
 
 html
 head
 titleWicket Examples - forminput/title
 link rel=stylesheet type=text/css href=../style.css/
 link rel=stylesheet type=text/css
 href=resources/org.apache.wicket.devutils.debugbar.DebugBar/wicket-debugbar.css;jsessionid=E218340AA4A63320747D134AA1985E7F
 /
 script type=text/javascript
 src=resources/org.apache.wicket.devutils.debugbar.DebugBar/wicket-debugbar.js;jsessionid=E218340AA4A63320747D134AA1985E7F/script
 /head
 body
 span
 diva href=../index.html style=color: #E9601A
 target=_topimg src=../logo.png//adiv id=wicketDebugBar
 class=wicketDebugBar
   a id=wicketDebugBarCollapse
 onclick=wicketDebugBarCollapse();img
 src=resources/org.apache.wicket.devutils.debugbar.DebugBar/
 (...)
 label for=siteSelectionyour favorite sites/label
 select id=siteSelection name=siteSelection 
 multiple=multiple
 size=3
 option value=0The Server Side/html   --- seems to be cut off
 head-- one again starting from head
 titleWicket Examples - forminput/title
 link rel=stylesheet type=text/css href=../style.css/
 link rel=stylesheet type=text/css
 href=resources/org.apache.wicket.devutils.debugbar.DebugBar/wicket-debugbar.css;jsessionid=E218340AA4A63320747D134AA1985E7F
 /
 script type=text/javascript
 src=resources/org.apache.wicket.devutils.debugbar.DebugBar/wicket-debugbar.js;jsessionid=E218340AA4A63320747D134AA1985E7F/script
 /head
 body
 span
 diva href=../index.html style=color: #E9601A
 target=_topimg src=../logo.png//adiv id=wicketDebugBar
 class=wicketDebugBar
   a id=wicketDebugBarCollapse
 onclick=wicketDebugBarCollapse();img
 src=resources/org.apache.wicket.devutils.debugbar.DebugBar/
 (...)
 option value=0The Server Side/option --- second time not cut off
 option value=1Java Lobby/option
 option value=2Java.Net/option
 (...)
 /div
 /body
 /html
 
 
 Regards
 Marcin
 


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