Re: How to get form submit to return to previous page?

2010-09-02 Thread bht
What about

redirectToInterceptPage(new FormPage());

and in FormPage onSubmit:

if (!continueToOriginalDestination()) {
setResponsePage(Application.get().getHomePage());
}

Regards,

Bernard


On Wed, 1 Sep 2010 20:30:20 -0700, you wrote:

do not pass the page, pass the page reference, see page#getpagereference()

-igor

On Wed, Sep 1, 2010 at 6:21 PM, Chris Merrill ch...@webperformance.com wrote:
 On 9/1/2010 7:26 PM, Chris Colman wrote:
 I have a form/page that can be invoked from different pages so I can't
 easily specify which page should be returned to after submit.

 When I needed to do this, I passed the original page into the page 
 constructor
 where it was passed to the onSubmit() handler. Then the onSubmit() method
 set it as the return page:
  getRequestCycle().setResponsePage(_return_to_page);


 --
  -
 Chris Merrill                           |  Web Performance, Inc.
 ch...@webperformance.com                |  http://webperformance.com
 919-433-1762                            |  919-845-7601

 Web Performance: Website Load Testing Software  Services
  -

 -
 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



DropDownChoice and generics

2010-09-02 Thread Sigmar Muuga
Hello,
the generics solution for the DropdownChoice is weird in my opinion.

I want to write like this:

ListGender genders = getGenderList();
DropdownChoicePerson new DropDownChoicePerson(fieldId, new
PropertyModelPerson(currentPerson, gender), genders);

But the compilation fails because of the mismatch between generics.
Actually how to solve such situations? Wicket's generic's are quite
weird in my opinion and I cannot understand them probably correctly...

I want to assign object(in my case Gender to Person) from the list via
PropertyModel to my object but cannot understand, how to do it. Did
not find even any examples from the manual.

Sigmar

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



Re: DropDownChoice and generics

2010-09-02 Thread Wilhelmsen Tor Iver
 ListGender genders = getGenderList();
 DropdownChoicePerson new DropDownChoicePerson(fieldId, new
 PropertyModelPerson(currentPerson, gender), genders);

The class type parameter for the dropdown and models there should be Gender: 
That the model delegates to a property in a Person object should not matter.

ListGender genders = getGenderList();
DropdownChoiceGender new DropDownChoiceGender(fieldId, new
PropertyModelGender(currentPerson, gender), genders);

 I want to assign object(in my case Gender to Person

No, you want to set a Gender property in a Person object. But that the 
PropertyModel uses a Person object is not something the dropdown really cares 
about.

- Tor Iver


Re: DropDownChoice and generics

2010-09-02 Thread bht
Hi,

IModelPerson personModel = getPersonModel();

ListGender genders = getGenderList();

DropDownChoice dropDownChoiceGender = new 
DropDownChoice(genderFieldId, new PropertyModelGender(personModel,
gender), genderList);

Regards,

Bernard


On Thu, 2 Sep 2010 10:02:27 +0300, you wrote:

Hello,
the generics solution for the DropdownChoice is weird in my opinion.

I want to write like this:

ListGender genders = getGenderList();
DropdownChoicePerson new DropDownChoicePerson(fieldId, new
PropertyModelPerson(currentPerson, gender), genders);

But the compilation fails because of the mismatch between generics.
Actually how to solve such situations? Wicket's generic's are quite
weird in my opinion and I cannot understand them probably correctly...

I want to assign object(in my case Gender to Person) from the list via
PropertyModel to my object but cannot understand, how to do it. Did
not find even any examples from the manual.

Sigmar

-
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



SV: Remove support for Portlets in Wicket 1.5

2010-09-02 Thread Wilhelmsen Tor Iver
 Usually -1 votes should be accompanied by a justification if you want
 them to be considered seriously.  Why are you voting -1?

Moving portlet support to a separate project (instead of core or extensions) 
makes more sense, that is at least one justification. 

(I guess this would in effect be making a portlet bridge like IIRC the 
support pre-1.4-m2 used. But then it could be moved over to the Apache portlet 
bridge project as a whole, if that is still active?)

Popularity of JSR-168/286 seems to be waning, and people instead use portals 
implemented directly on top of a content system instead...

- Tor Iver

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



Re: SV: Remove support for Portlets in Wicket 1.5

2010-09-02 Thread James Carman
A -1 vote would be a vote against dropping support.  You seem to be making
an argument for dropping it.  Plus it wasn't your -1, was it?

On Sep 2, 2010 3:41 AM, Wilhelmsen Tor Iver toriv...@arrive.no wrote:
 Usually -1 votes should be accompanied by a justification if you want
 them to be considered seriously. Why are you voting -1?

 Moving portlet support to a separate project (instead of core or
extensions) makes more sense, that is at least one justification.

 (I guess this would in effect be making a portlet bridge like IIRC the
support pre-1.4-m2 used. But then it could be moved over to the Apache
portlet bridge project as a whole, if that is still active?)

 Popularity of JSR-168/286 seems to be waning, and people instead use
portals implemented directly on top of a content system instead...

 - Tor Iver

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



SV: SV: Remove support for Portlets in Wicket 1.5

2010-09-02 Thread Wilhelmsen Tor Iver
 A -1 vote would be a vote against dropping support.  You seem to be
 making
 an argument for dropping it.  Plus it wasn't your -1, was it?

Ah, then I misunderstood. Was a bit early in the morning I guess.

And if you only wanted a reply from him you would have sent a private email 
instead of posting to the public list, would you not? :)

- Tor Iver

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



Re: SV: Remove support for Portlets in Wicket 1.5

2010-09-02 Thread James Carman
On Thu, Sep 2, 2010 at 6:50 AM, Wilhelmsen Tor Iver toriv...@arrive.no wrote:
 And if you only wanted a reply from him you would have sent a private email 
 instead of posting to the public list, would you not? :)


No, because I would want their reply to go to the list.  The -1 should
be taken seriously if it has a valid justification.

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



Wicket + Guice + other framework (e.g. Jersey)

2010-09-02 Thread Johannes Schneider
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi guys,

I have created a webapp based on Wicket. This app uses the GuiceFilter.
And I have also created a REST API for my application using Jersey. It
is also using Guice.

Both applications run fine in different contexts.


Now I'd like to run both apps within one application (one Guice
injector, one of my business objects) so that they can share all those
memory intensive stuff.

Has anybody done this? I think it should be doable, shouldn't it? But I
really don't have an idea how I could share the modules.


Injection: The both webapps share several of their modules, but not all.
I think this can be solved using child injectors?

Prefix: I'd like to have one prefix (e.g. api) that is used for that
Jersey stuff. Can this be done transparently?


Anybody done something like that? Any hints?


Thanks,

Johannes
- -- 
Johannes Schneider - blog.cedarsoft.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJMf62LAAoJEAytD9R7Qv6dGI4IAM1G2062SJRDbmN2vCSvl2Fq
vLXLumqDBOD4MBxWW+9WakRBF8Jfc0Zf+ziPsb0pAlTK+ioVORoXYUsfRmdbnnFq
1ZPOEDD9Q+rzBN1gFrsZbO5XHlBKMwkmVSDcggImdHaS513ns5mVEuSrjWeNdmyR
VwxqUwtuLt4wAoMV2pHyXGjXtT7x4EsEVCPOl1gN1r0gd99GdKl8wGgSY0kvCQoR
N92G8ncqZSMJfh2wolWEWBO+JguL/GUqSYVJkgC/NVGD7AkB5EchF9QU5slSbt/x
iH7Q5AuKBf3++EiWuBVjbOgHnonL0oJZ7veQUm/bS4KZHx2Fa4rA9aQVsZzcbv8=
=8Ykg
-END PGP SIGNATURE-

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



onSelectionChanged and browser back button

2010-09-02 Thread nmetzger

Hi all,

I have a problem with a page in which I exchange a lot of panels via Ajax.
It worked the way I intended, especially the fact that pressing the browser
back button returned the user to the previous page.
Now I added a new panel that included a CheckGroup with an
onSelectionChanged() method that basically switched my text fields in the
new panel from read-only to editable and vice versa. When I click the submit
button and then the browser back button, the new Panel is displayed again
instead of the previous page. The panel form then of course has lost the
data including my check if the form already has been submitted, and I run
into errors.

Why is the back button not working as expected? What can I do to get rid of
this behavior?

Thanks,
Natalie
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/onSelectionChanged-and-browser-back-button-tp2523367p2523367.html
Sent from the Wicket - User 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 + Guice + other framework (e.g. Jersey)

2010-09-02 Thread Bas Gooren

Johannes,

yes, this is no problem, see http://code.google.com/p/wicket-guice-jaxws/

Bas

- Original Message - 
From: Johannes Schneider maili...@cedarsoft.com

To: users@wicket.apache.org
Sent: Thursday, September 02, 2010 3:58 PM
Subject: Wicket + Guice + other framework (e.g. Jersey)



-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi guys,

I have created a webapp based on Wicket. This app uses the GuiceFilter.
And I have also created a REST API for my application using Jersey. It
is also using Guice.

Both applications run fine in different contexts.


Now I'd like to run both apps within one application (one Guice
injector, one of my business objects) so that they can share all those
memory intensive stuff.

Has anybody done this? I think it should be doable, shouldn't it? But I
really don't have an idea how I could share the modules.


Injection: The both webapps share several of their modules, but not all.
I think this can be solved using child injectors?

Prefix: I'd like to have one prefix (e.g. api) that is used for that
Jersey stuff. Can this be done transparently?


Anybody done something like that? Any hints?


Thanks,

Johannes
- -- 
Johannes Schneider - blog.cedarsoft.com

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJMf62LAAoJEAytD9R7Qv6dGI4IAM1G2062SJRDbmN2vCSvl2Fq
vLXLumqDBOD4MBxWW+9WakRBF8Jfc0Zf+ziPsb0pAlTK+ioVORoXYUsfRmdbnnFq
1ZPOEDD9Q+rzBN1gFrsZbO5XHlBKMwkmVSDcggImdHaS513ns5mVEuSrjWeNdmyR
VwxqUwtuLt4wAoMV2pHyXGjXtT7x4EsEVCPOl1gN1r0gd99GdKl8wGgSY0kvCQoR
N92G8ncqZSMJfh2wolWEWBO+JguL/GUqSYVJkgC/NVGD7AkB5EchF9QU5slSbt/x
iH7Q5AuKBf3++EiWuBVjbOgHnonL0oJZ7veQUm/bS4KZHx2Fa4rA9aQVsZzcbv8=
=8Ykg
-END PGP SIGNATURE-

-
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



Inconsistent wicket error mesage

2010-09-02 Thread Martin Makundi
Hi!

Does this wicket error message make sense? To me it looks like renderhead:

2010-09-02 13:46:31,307 267219809 [18145...@qtp-23684178-2226] ERROR
RequestCycle  - Only methods that can be called on IHeaderResponse
outside renderHead() are renderOnLoadJavascript and
renderOnDomReadyJavascript
org.apache.wicket.WicketRuntimeException: Only methods that can be
called on IHeaderResponse outside renderHead() are
renderOnLoadJavascript and renderOnDomReadyJavascript
   at 
org.apache.wicket.ajax.AjaxRequestTarget$AjaxHeaderResponse.checkHeaderRendering(AjaxRequestTarget.java:872)
   at 
org.apache.wicket.ajax.AjaxRequestTarget$AjaxHeaderResponse.renderJavascriptReference(AjaxRequestTarget.java:929)
   at com.application.MainPage.renderHead(MainPage.java:231)
   at org.apache.wicket.Component.renderHead(Component.java:2692)
   at 
org.apache.wicket.markup.html.internal.HtmlHeaderContainer.renderHeaderSections(HtmlHeaderContainer.java:218)
   at 
org.apache.wicket.markup.html.internal.HtmlHeaderContainer.onComponentTagBody(HtmlHeaderContainer.java:137)
   at org.apache.wicket.Component.renderComponent(Component.java:2619)
   at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
   at org.apache.wicket.Component.render(Component.java:2450)


**
Martin

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



Re: Radio buttons in modal window in IE6

2010-09-02 Thread Andrea Del Bene
 
 Visually I can switch through radio buttons, but, when I submit form - it's
 always the same value -

Hi!

Have you tried adding model to RadioGroup?

es: RadioGroup choiseGroup = new RadioGroup(searchParam, new Model()); 

Grafas martynas.jurkus at gmail.com writes:



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



Re: SV: Remove support for Portlets in Wicket 1.5

2010-09-02 Thread Igor Vaynberg
this has already been done, its a bit too late for -1 votes. the
thread was started aug 11.

-igor

On Thu, Sep 2, 2010 at 3:52 AM, James Carman ja...@carmanconsulting.com wrote:
 On Thu, Sep 2, 2010 at 6:50 AM, Wilhelmsen Tor Iver toriv...@arrive.no 
 wrote:
 And if you only wanted a reply from him you would have sent a private email 
 instead of posting to the public list, would you not? :)


 No, because I would want their reply to go to the list.  The -1 should
 be taken seriously if it has a valid justification.

 -
 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: onSelectionChanged and browser back button

2010-09-02 Thread Igor Vaynberg
if you override wantonselectionchangednotification to return true then
it is done with a regular request instead of ajax.

-igor

On Thu, Sep 2, 2010 at 7:04 AM, nmetzger nmetz...@odu.edu wrote:

 Hi all,

 I have a problem with a page in which I exchange a lot of panels via Ajax.
 It worked the way I intended, especially the fact that pressing the browser
 back button returned the user to the previous page.
 Now I added a new panel that included a CheckGroup with an
 onSelectionChanged() method that basically switched my text fields in the
 new panel from read-only to editable and vice versa. When I click the submit
 button and then the browser back button, the new Panel is displayed again
 instead of the previous page. The panel form then of course has lost the
 data including my check if the form already has been submitted, and I run
 into errors.

 Why is the back button not working as expected? What can I do to get rid of
 this behavior?

 Thanks,
 Natalie
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/onSelectionChanged-and-browser-back-button-tp2523367p2523367.html
 Sent from the Wicket - User 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



WicketRuntimeException: loginPage is already mounted for BookmarkablePageEncoder[page=class com.xxx.LoginPage]

2010-09-02 Thread Fernando Wermus
Hi all,
I am using wicketTester to render html for emails. I pass my current app
to WicketTester and I get the following error:

WicketRuntimeException: loginPage is already mounted for
BookmarkablePageEncoder[page=class com.xxx.LoginPage]

Which makes no sense. The Application is running and I just passing it to
the WicketTester constructor.

any help would be really appreciated.

thanks in advance

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: onSelectionChanged and browser back button

2010-09-02 Thread nmetzger

Yes, I did override it. I wasn't aware that this would change the process to
a normal request.

So, what's the best way to implement the onSelectionChanged behavior and
keep my ajax behavior? 

Thanks for you help,
Natalie
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/onSelectionChanged-and-browser-back-button-tp2523367p2524435.html
Sent from the Wicket - User 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: onSelectionChanged and browser back button

2010-09-02 Thread Igor Vaynberg
ajaxformchoicecomponentupdatingbehavior?

-igor

On Thu, Sep 2, 2010 at 9:23 AM, nmetzger nmetz...@odu.edu wrote:

 Yes, I did override it. I wasn't aware that this would change the process to
 a normal request.

 So, what's the best way to implement the onSelectionChanged behavior and
 keep my ajax behavior?

 Thanks for you help,
 Natalie
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/onSelectionChanged-and-browser-back-button-tp2523367p2524435.html
 Sent from the Wicket - User 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: WicketRuntimeException: loginPage is already mounted for BookmarkablePageEncoder[page=class com.xxx.LoginPage]

2010-09-02 Thread Igor Vaynberg
you should pass a new instance of application. wicket tester inits the
application and so it would call the init method which will execute
the mounts - and on already initialized instance it would cause that
error.

-igor

On Thu, Sep 2, 2010 at 9:13 AM, Fernando Wermus
fernando.wer...@gmail.com wrote:
 Hi all,
    I am using wicketTester to render html for emails. I pass my current app
 to WicketTester and I get the following error:

 WicketRuntimeException: loginPage is already mounted for
 BookmarkablePageEncoder[page=class com.xxx.LoginPage]

 Which makes no sense. The Application is running and I just passing it to
 the WicketTester constructor.

 any help would be really appreciated.

 thanks in advance

 --
 Fernando Wermus.

 www.linkedin.com/in/fernandowermus


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



Re: Radio buttons in modal window in IE6

2010-09-02 Thread Grafas

Oh, yeah, sorry, the code sample doesn't show it... Sorry about that.
Yeah, RadioGroup has model set.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Radio-buttons-in-modal-window-in-IE6-tp2403103p2524455.html
Sent from the Wicket - User 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: Localizer in a new Thread

2010-09-02 Thread Fernando Wermus
Ale,
I got a

org.hibernate.HibernateException: createCriteria is not valid without active
transaction

because the page that I am trying to render need to get an entity using
hibernate.

how could I solve this situation?

thanks in advance

On Fri, Jul 30, 2010 at 5:38 PM, Alex Objelean alex.objel...@gmail.comwrote:


 Yes, the solution I've mentioned in previous post should solve your
 problem.

 Alex

 On 30 July 2010 22:44, Fernando Wermus-3 [via Apache Wicket] 
 ml-node+2308410-419528218-229...@n4.nabble.comml-node%2b2308410-419528218-229...@n4.nabble.com
 ml-node%2b2308410-419528218-229...@n4.nabble.comml-node%252b2308410-419528218-229...@n4.nabble.com
 
  wrote:

  Ale,
 Related to what you have mentioned. I render mails with some
  mockHTTPrequest and mockeHTTPResponse, etc. But, I need to render mails
 in
  a
  different thread than wicket's one. I have another servlet that runs
  Blazeds
  (Flex) where I also need to render some mails, but  I got  There is no
  application
  attached to current thread According to what you mentioned, could I
  solve this issue?
 
  thanks in advance.
 
  On Fri, Jul 30, 2010 at 5:46 AM, Alex Objelean [hidden email]
 http://user/SendEmail.jtp?type=nodenode=2308410i=0wrote:
 
 
  
   There was a long discussion about this. One of the proposal was to use
   InheritableThreadLocal which would solve this problem, but there was a
  lot
   of concerns about this approach.
  
   The solution I have found was this:
   If you create the thread with ExecutorService, you could do the
  following:
  
  final ExecutorService service = new ScheduledThreadPoolExecutor(1) {
@Override
protected void beforeExecute(final Thread t, final Runnable r) {
  Application.set(app);
};
@Override
protected void afterExecute(final Runnable r, final Throwable t) {
  Application.unset();
}
  };
  
   and execute you thread like this:
   service.submit(new Runnable() {
  @Override
  public void run() {
//do stuff
  }
});
  
   This will ensure that Application is accessible from within newly
 created
 
   thread.
  
   Alex
   --
   View this message in context:
  
 
 http://apache-wicket.1842946.n4.nabble.com/Localizer-in-a-new-Thread-tp2307306p2307732.html
 
 http://apache-wicket.1842946.n4.nabble.com/Localizer-in-a-new-Thread-tp2307306p2307732.html?by-user=t
 
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
   -
   To unsubscribe, e-mail: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=2308410i=1
   For additional commands, e-mail: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=2308410i=2
  
  
 
 
  --
  Fernando Wermus.
 
  www.linkedin.com/in/fernandowermus
 
 
  --
   View message @
 
 http://apache-wicket.1842946.n4.nabble.com/Localizer-in-a-new-Thread-tp2307306p2308410.html
  To unsubscribe from RE: Localizer in a new Thread, click here
 http://apache-wicket.1842946.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=YWxleC5vYmplbGVhbkBnbWFpbC5jb218MjMwNzczMnwtNDA5MTE1Njc3
 .
 
 
 

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Localizer-in-a-new-Thread-tp2307306p2308459.html
 Sent from the Wicket - User mailing list archive at Nabble.com.




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: WicketRuntimeException: loginPage is already mounted for BookmarkablePageEncoder[page=class com.xxx.LoginPage]

2010-09-02 Thread Fernando Wermus
Igor,
When I don't pass the application I got the following error

RuntimeException: There is no application attached to current thread
btpool0-3 - /messagebroker/amf

This is because I need to render the emails from a different servlet. Do I
have any solution for this situation?

How can I get the WebApplication from a different servlet?

On Thu, Sep 2, 2010 at 1:26 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 you should pass a new instance of application. wicket tester inits the
 application and so it would call the init method which will execute
 the mounts - and on already initialized instance it would cause that
 error.

 -igor

 On Thu, Sep 2, 2010 at 9:13 AM, Fernando Wermus
 fernando.wer...@gmail.com wrote:
  Hi all,
 I am using wicketTester to render html for emails. I pass my current
 app
  to WicketTester and I get the following error:
 
  WicketRuntimeException: loginPage is already mounted for
  BookmarkablePageEncoder[page=class com.xxx.LoginPage]
 
  Which makes no sense. The Application is running and I just passing it to
  the WicketTester constructor.
 
  any help would be really appreciated.
 
  thanks in advance
 
  --
  Fernando Wermus.
 
  www.linkedin.com/in/fernandowermus
 

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




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Within the wicket lifecyle, what is the best place to add a call on the page request

2010-09-02 Thread Ben Tilford
If your using wicket 1.4.10 you may want to look at the new onConfigure
method that was added.

On Thu, Sep 2, 2010 at 3:38 PM, Brown, Berlin [GCG-PFS] 
berlin.br...@primerica.com wrote:

 Where is the best place to add logic to get invoked always when the page
 is requested?

 The logic may or may not be tied to the model.



 Berlin Brown



Re: Within the wicket lifecyle, what is the best place to add a call on the page request

2010-09-02 Thread Avraham Rosenzweig
Or you can override onBeforeRender as we used to do before 1.4.10 :-)
Just don't forget to call super.onBeforeRender().

On Fri, Sep 3, 2010 at 12:10 AM, Ben Tilford [via Apache Wicket] 
ml-node+2524782-1377046621-117...@n4.nabble.comml-node%2b2524782-1377046621-117...@n4.nabble.com
 wrote:

 If your using wicket 1.4.10 you may want to look at the new onConfigure
 method that was added.

 On Thu, Sep 2, 2010 at 3:38 PM, Brown, Berlin [GCG-PFS] 
 [hidden email] http://user/SendEmail.jtp?type=nodenode=2524782i=0
 wrote:

  Where is the best place to add logic to get invoked always when the page
  is requested?
 
  The logic may or may not be tied to the model.
 
 
 
  Berlin Brown
 


 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/Within-the-wicket-lifecyle-what-is-the-best-place-to-add-a-call-on-the-page-request-tp2524669p2524782.html
 To start a new topic under Wicket - User, email
 ml-node+1842947-58522394-117...@n4.nabble.comml-node%2b1842947-58522394-117...@n4.nabble.com
 To unsubscribe from Wicket - User, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=1842947code=YXZyYWhhbXJAZ21haWwuY29tfDE4NDI5NDd8LTEwMTIyNDQ2OTU=.





-- 
[]'s
Avraham Rosenzweig
avrah...@gmail.com


Re: WicketRuntimeException: loginPage is already mounted for BookmarkablePageEncoder[page=class com.xxx.LoginPage]

2010-09-02 Thread Igor Vaynberg
you can create a new instance

-igor

On Thu, Sep 2, 2010 at 1:49 PM, Fernando Wermus
fernando.wer...@gmail.com wrote:
 Igor,
    When I don't pass the application I got the following error

 RuntimeException: There is no application attached to current thread
 btpool0-3 - /messagebroker/amf

 This is because I need to render the emails from a different servlet. Do I
 have any solution for this situation?

 How can I get the WebApplication from a different servlet?

 On Thu, Sep 2, 2010 at 1:26 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 you should pass a new instance of application. wicket tester inits the
 application and so it would call the init method which will execute
 the mounts - and on already initialized instance it would cause that
 error.

 -igor

 On Thu, Sep 2, 2010 at 9:13 AM, Fernando Wermus
 fernando.wer...@gmail.com wrote:
  Hi all,
     I am using wicketTester to render html for emails. I pass my current
 app
  to WicketTester and I get the following error:
 
  WicketRuntimeException: loginPage is already mounted for
  BookmarkablePageEncoder[page=class com.xxx.LoginPage]
 
  Which makes no sense. The Application is running and I just passing it to
  the WicketTester constructor.
 
  any help would be really appreciated.
 
  thanks in advance
 
  --
  Fernando Wermus.
 
  www.linkedin.com/in/fernandowermus
 

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




 --
 Fernando Wermus.

 www.linkedin.com/in/fernandowermus


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



Wicket AjaxButton multiple responses

2010-09-02 Thread DmitryM

Hello, everybody

I have a long-running Ajax request (about 7 seconds) and would like to
notify user about its progress.
A preferred way would be to push multiple ajax responses back to the
Response (for the current request).

Is there any way to do that?
I would prefer to avoid using 'push' from the server since it doesn't
support Comet anyway.

I can do a kind of lame implementation via JavaScript (to display fake
process status updates) but would prefer something corresponding to the
actual request processing status.
Any other suggestions?

Regards,
Dmitry
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-AjaxButton-multiple-responses-tp2525096p2525096.html
Sent from the Wicket - User 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 AjaxButton multiple responses

2010-09-02 Thread Igor Vaynberg
search this list for ajaxpoller

-igor

On Thu, Sep 2, 2010 at 9:16 PM, DmitryM nsk...@aol.com wrote:

 Hello, everybody

 I have a long-running Ajax request (about 7 seconds) and would like to
 notify user about its progress.
 A preferred way would be to push multiple ajax responses back to the
 Response (for the current request).

 Is there any way to do that?
 I would prefer to avoid using 'push' from the server since it doesn't
 support Comet anyway.

 I can do a kind of lame implementation via JavaScript (to display fake
 process status updates) but would prefer something corresponding to the
 actual request processing status.
 Any other suggestions?

 Regards,
 Dmitry
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Wicket-AjaxButton-multiple-responses-tp2525096p2525096.html
 Sent from the Wicket - User 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: Wicket AjaxButton multiple responses

2010-09-02 Thread DmitryM

Thanks for the immediate response.

But that's not really what I was asking for. =(
I didn't really want to start a session-attached thread on the server and
then poll it for the status.

I would really appreciate if the AjaxButton.onSubmit allowed for several XML
responses to be pushed down the response output stream to be picket up in
the browser.
I would push some Javascript calls which would update the page to indicate
the request processing progress.

That would save on requests (only one request would be made to the server).
I appreciate the fact it's like AjaxStreaming and may not be supported
consistently by all browsers. =(
Right now I'm only concerned about WebKit (mobile Safari).

Regards,
Dmitry

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-AjaxButton-multiple-responses-tp2525096p2525149.html
Sent from the Wicket - User 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 AjaxButton multiple responses

2010-09-02 Thread DmitryM

Igor, one more thing:

I can probably 'hack' the system and try to get to the current request's
response output stream and even make up a chunk of XML emulating an ajax
response.

But most likely the client Wicket javascript would not allow for multiple
XML chunks returned from one request.
Am I right here?

-Dmitry
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-AjaxButton-multiple-responses-tp2525096p2525151.html
Sent from the Wicket - User 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