Re: Panel not getting refreshed...

2012-06-10 Thread kshitiz
Did u mean this:


final SearchResultPanel searchResultPanel = new
SearchResultPanel(searchResultPanel,
searchDomain, error, searchContainer);
*   searchResultPanel.setOutputMarkupId(true);*



AjaxFallbackButton ajaxSearchButton = new AjaxFallbackButton(
searchButton, searchForm) {
/*
 * 
 */
private static final long serialVersionUID = 1L;

@Override
public void onSubmit(AjaxRequestTarget target, final 
Form? form) {

/*
 * Populating postDomain instance for 
submitting post. This
 * instance is then passed to PostService class
 */
if (target != null) {

try {
*   target.add(searchFeedbackPanel);
target.add(searchResultPanel);*
} catch (Exception exception) {
error(exception.getMessage());
error = true;
}

}
}

};

Actually the above change is also not working..:(


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Panel-not-getting-refreshed-tp4649807p4649810.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: Panel not getting refreshed...

2012-06-10 Thread Sebastien
Hi,

Yes, that's what I mean.
You can also change this, in order for the feedback panel to be re-rendered
even in case of error:

if (target != null) {

try {
target.add(searchResultPanel);
} catch (Exception exception) {
error(exception.getMessage());
error = true;
}

*target.add(searchFeedbackPanel);
}

Regards,
Sebastien.

On Sun, Jun 10, 2012 at 8:48 AM, kshitiz k.agarw...@gmail.com wrote:

 Did u mean this:


 final SearchResultPanel searchResultPanel = new
 SearchResultPanel(searchResultPanel,
searchDomain, error, searchContainer);
 *   searchResultPanel.setOutputMarkupId(true);*



 AjaxFallbackButton ajaxSearchButton = new AjaxFallbackButton(
searchButton, searchForm) {
 /*
 *
 */
private static final long serialVersionUID = 1L;

@Override
 public void onSubmit(AjaxRequestTarget target,
 final Form? form) {

 /*
 * Populating postDomain instance for
 submitting post. This
 * instance is then passed to PostService
 class
 */
 if (target != null) {

try {
 *
 target.add(searchFeedbackPanel);

  target.add(searchResultPanel);*
 } catch (Exception exception) {

  error(exception.getMessage());
error = true;
}

}
}

};

 Actually the above change is also not working..:(


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Panel-not-getting-refreshed-tp4649807p4649810.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




Building wicket-stuff

2012-06-10 Thread Sven Meier

Hi all,

can someone enlighten me on how to build wicket-stuff 6.0-SNAPSHOT ?

[ERROR] Engines.java:[53,15] cannot find symbol
symbol  : class ScalaEngine
location: class org.wicketstuff.console.engine.Engines

I can't remember how I solved this maven puzzle the last time :/.

Thanks
Sven


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



CheckGroup question

2012-06-10 Thread Jürgen Lind

Hi,

I have a little problem in getting a CheckGroup to work... The setup is as 
follows:
the page has a Form with a CheckGroup that contains a ListView where each list 
item
adds a Check component - giving me a bulk select mechanism. Now, everything 
works
great if the form is submitted successfully. However, when a required TextField 
is
omitted, the selected Checks are not maintained (whereas other form fields are
maintained). Am I missing something here?

Cheers,

J.



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



Re: CheckGroup question

2012-06-10 Thread Jürgen Lind

Ok, I'm answering myself here... The problem was obviously, that upon each 
render
the Check components had new values and so the state was not cleanly 
maintained. I kind
of solved it by overriding the getValue methode and providing a unique id that 
remains
the same on each page rendering.

However, I still wonder if that is the way to go or just weird hack which 
solves the
problem more or less by coincidence.

Any help would be appreciated.

J.

On 10.06.2012 12:21, Jürgen Lind wrote:

Hi,

I have a little problem in getting a CheckGroup to work... The setup is as 
follows:
the page has a Form with a CheckGroup that contains a ListView where each list 
item
adds a Check component - giving me a bulk select mechanism. Now, everything 
works
great if the form is submitted successfully. However, when a required TextField 
is
omitted, the selected Checks are not maintained (whereas other form fields are
maintained). Am I missing something here?

Cheers,

J.



-
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: CheckGroup question

2012-06-10 Thread Sven Meier
See ListView#setReuseItems()

Jürgen Lind juergen.l...@iteratec.de schrieb:

Ok, I'm answering myself here... The problem was obviously, that upon each 
render
the Check components had new values and so the state was not cleanly 
maintained. I kind
of solved it by overriding the getValue methode and providing a unique id that 
remains
the same on each page rendering.

However, I still wonder if that is the way to go or just weird hack which 
solves the
problem more or less by coincidence.

Any help would be appreciated.

J.

On 10.06.2012 12:21, Jürgen Lind wrote:
 Hi,

 I have a little problem in getting a CheckGroup to work... The setup is as 
 follows:
 the page has a Form with a CheckGroup that contains a ListView where each 
 list item
 adds a Check component - giving me a bulk select mechanism. Now, 
 everything works
 great if the form is submitted successfully. However, when a required 
 TextField is
 omitted, the selected Checks are not maintained (whereas other form fields 
 are
 maintained). Am I missing something here?

 Cheers,

 J.



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


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


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



Re: CheckGroup question

2012-06-10 Thread Jürgen Lind

Thanks for the hint. Unfortunately, I was incorrect in my initial post: it is 
not a
ListView but a DataView I am using within the form. Is there a similar 
mechanism for
this case?

J.

On 10.06.2012 12:40, Sven Meier wrote:

See ListView#setReuseItems()

Jürgen Lindjuergen.l...@iteratec.de  schrieb:


Ok, I'm answering myself here... The problem was obviously, that upon each 
render
the Check components had new values and so the state was not cleanly 
maintained. I kind
of solved it by overriding the getValue methode and providing a unique id that 
remains
the same on each page rendering.

However, I still wonder if that is the way to go or just weird hack which 
solves the
problem more or less by coincidence.

Any help would be appreciated.

J.

On 10.06.2012 12:21, Jürgen Lind wrote:

Hi,

I have a little problem in getting a CheckGroup to work... The setup is as 
follows:
the page has a Form with a CheckGroup that contains a ListView where each list 
item
adds a Check component - giving me a bulk select mechanism. Now, everything 
works
great if the form is submitted successfully. However, when a required TextField 
is
omitted, the selected Checks are not maintained (whereas other form fields are
maintained). Am I missing something here?

Cheers,

J.



-
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




Mit freundlichen Grüßen,

Jürgen Lind

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

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



Re: CheckGroup question

2012-06-10 Thread Adam's Gmail
I'm unfortunately nowhere near my computer right now, but I just ran into this 
problem exactly the other day with checkgroup and datatable and would be very 
interested to know the solution as well.  In my case, the checks didn't seem to 
persist between post attempts (in the case of validation failures) but the 
model still held the selected object.  I wish I could offer code, but from here 
all I can offer is anecdotal scenarios. 

On Jun 10, 2012, at 7:10 AM, Jürgen Lind juergen.l...@iteratec.de wrote:

 Thanks for the hint. Unfortunately, I was incorrect in my initial post: it is 
 not a
 ListView but a DataView I am using within the form. Is there a similar 
 mechanism for
 this case?
 
 J.
 
 On 10.06.2012 12:40, Sven Meier wrote:
 See ListView#setReuseItems()
 
 Jürgen Lindjuergen.l...@iteratec.de  schrieb:
 
 Ok, I'm answering myself here... The problem was obviously, that upon each 
 render
 the Check components had new values and so the state was not cleanly 
 maintained. I kind
 of solved it by overriding the getValue methode and providing a unique id 
 that remains
 the same on each page rendering.
 
 However, I still wonder if that is the way to go or just weird hack which 
 solves the
 problem more or less by coincidence.
 
 Any help would be appreciated.
 
 J.
 
 On 10.06.2012 12:21, Jürgen Lind wrote:
 Hi,
 
 I have a little problem in getting a CheckGroup to work... The setup is as 
 follows:
 the page has a Form with a CheckGroup that contains a ListView where each 
 list item
 adds a Check component - giving me a bulk select mechanism. Now, 
 everything works
 great if the form is submitted successfully. However, when a required 
 TextField is
 omitted, the selected Checks are not maintained (whereas other form fields 
 are
 maintained). Am I missing something here?
 
 Cheers,
 
 J.
 
 
 
 -
 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
 
 
 
 Mit freundlichen Grüßen,
 
 Jürgen Lind
 
 -- 
 Dr. Jürgen Lind
 iteratec GmbHFon: +49 (0)89 614551-44
 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
 82008 Unterhaching   Web: www.iteratec.de
 
 Sitz und Registergericht der iteratec GmbH: München HRB 113 519
 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel
 
 -
 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: Panel not getting refreshed...

2012-06-10 Thread kshitiz
I have tried that out...*no luck till now...:(*

Just for the info..what I am doing is that a search form is there which is
populating result in domain object. I am passing that object in
searchResultPanel to get displayed. Now, *form and panel...both are part of
a container.* I want to refresh that panel only when users submits for
search. I am not able to understand what can be the issue. *Feedback panel
is getting refreshed properly in case of no search found but result panel is
not getting refreshed. It is not even entering in that panel as I have some
sysouts in that panel to check...*

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Panel-not-getting-refreshed-tp4649807p4649818.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: CheckGroup question

2012-06-10 Thread Sven Meier
DataView has an IItemReuseStrategy.

Sven

Jürgen Lind juergen.l...@iteratec.de schrieb:

Thanks for the hint. Unfortunately, I was incorrect in my initial post: it is 
not a
ListView but a DataView I am using within the form. Is there a similar 
mechanism for
this case?

J.

On 10.06.2012 12:40, Sven Meier wrote:
 See ListView#setReuseItems()

 Jürgen Lindjuergen.l...@iteratec.de  schrieb:

 Ok, I'm answering myself here... The problem was obviously, that upon each 
 render
 the Check components had new values and so the state was not cleanly 
 maintained. I kind
 of solved it by overriding the getValue methode and providing a unique id 
 that remains
 the same on each page rendering.

 However, I still wonder if that is the way to go or just weird hack which 
 solves the
 problem more or less by coincidence.

 Any help would be appreciated.

 J.

 On 10.06.2012 12:21, Jürgen Lind wrote:
 Hi,

 I have a little problem in getting a CheckGroup to work... The setup is as 
 follows:
 the page has a Form with a CheckGroup that contains a ListView where each 
 list item
 adds a Check component - giving me a bulk select mechanism. Now, 
 everything works
 great if the form is submitted successfully. However, when a required 
 TextField is
 omitted, the selected Checks are not maintained (whereas other form fields 
 are
 maintained). Am I missing something here?

 Cheers,

 J.



 -
 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



Mit freundlichen Grüßen,

Jürgen Lind

-- 
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

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



Re: Building wicket-stuff

2012-06-10 Thread kshitiz
Do you mean creating wicket maven project ? If that is the case, please refer
to this link:

https://cwiki.apache.org/WICKET/windows-guide-to-installing-wicket-on-eclipse-with-maven.html
https://cwiki.apache.org/WICKET/windows-guide-to-installing-wicket-on-eclipse-with-maven.html
 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Building-wicket-stuff-tp4649812p4649820.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: Panel not getting refreshed...

2012-06-10 Thread Sebastien
 but result panel is not getting refreshed. It is not even entering in
that panel as I have some sysouts in that panel to check...

Try to put one sysout in searchResultPanel#onBeforeRender, to check whether
the panel is going to be refreshed.
Additionally, look at the ajax debug window to see if there is no error and
if you see the panel in the result of the call...


On Sun, Jun 10, 2012 at 1:34 PM, kshitiz k.agarw...@gmail.com wrote:

 I have tried that out...*no luck till now...:(*

 Just for the info..what I am doing is that a search form is there which is
 populating result in domain object. I am passing that object in
 searchResultPanel to get displayed. Now, *form and panel...both are part of
 a container.* I want to refresh that panel only when users submits for
 search. I am not able to understand what can be the issue. *Feedback panel
 is getting refreshed properly in case of no search found but result panel
 is
 not getting refreshed. It is not even entering in that panel as I have some
 sysouts in that panel to check...*

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Panel-not-getting-refreshed-tp4649807p4649818.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: Can't deal with wicket atmosphere

2012-06-10 Thread Martin Grigorov
Hi,


On Sat, Jun 9, 2012 at 12:06 PM, coincoinfou olivierandr...@gmail.com wrote:
 I migrate my app from 5 to 6 and everything work fine.
 However i'm unable to try atmosphere due to network 500 server error

Error 500 means that there must be an exception in the server logs.
See what exactly fails.


 Here is my configuration :

        FilterHolder atmosphere = new FilterHolder(AtmosphereFilter.class);
        atmosphere.setName(AtmosphereApplication);
        atmosphere.setClassName(org.atmosphere.cpr.AtmosphereFilter);
        atmosphere.setInitParameter(applicationClassName,
 com.mycompany.WicketApplication);
        atmosphere.setInitParameter(org.atmosphere.filter,
 org.apache.wicket.protocol.http.WicketFilter);
        atmosphere.setInitParameter(org.atmosphere.useWebSocket, true);
        atmosphere.setInitParameter(org.atmosphere.useNative, true);

 atmosphere.setInitParameter(org.atmosphere.cpr.CometSupport.maxInactiveActivity,
 3);
        atmosphere.setInitParameter(filterMappingUrlPattern,
 /atmosphere/*);

 atmosphere.setInitParameter(org.atmosphere.websocket.WebSocketProtocol,
 org.atmosphere.websocket.protocol.EchoProtocol);

        bb.addFilter(atmosphere, /atmosphere/*, 0);

        FilterHolder wicket = new
 FilterHolder(org.apache.wicket.protocol.http.WicketFilter.class);
        wicket.setName(wicket.csstest);
        wicket.setClassName(org.apache.wicket.protocol.http.WicketFilter);
        wicket.setInitParameter(applicationClassName,
 com.mycompany.WicketApplication);
        wicket.setInitParameter(WicketFilter.FILTER_MAPPING_PARAM, /*);

        bb.addFilter(wicket, /*, 1);

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Can-t-deal-with-wicket-atmosphere-tp4649792.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: setHeaders not working in 1.5

2012-06-10 Thread Martin Grigorov
Hi,

On Sat, Jun 9, 2012 at 4:54 PM, kshitiz k.agarw...@gmail.com wrote:
 Hi,

 I want to remove login page from browser cache after user logs in. I am
 using the code :

 protected void setHeaders(WebResponse response) {

                *response.setHeader(Pragma, no-cache);
                response.setHeader(Expires, 0);
                response.setHeader(Cache-Control,
                                no-cache, max-age=0, must-revalidate, 
 no-store);*

This is exactly what WebResponse#disableCache() does.
I don't see you calling super.setHeaders(response). Are you sure
that something doesn't execute later and override your headers ?

        }

 But it is not working. *Even I have tried the changes given in *

 https://cwiki.apache.org/WICKET/caching-in-wicket-15.html
 *https://cwiki.apache.org/WICKET/caching-in-wicket-15.html*

 What I am missing??

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/setHeaders-not-working-in-1-5-tp4649796.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: Back button is troubling session management...

2012-06-10 Thread Martin Grigorov
On Sat, Jun 9, 2012 at 7:53 PM, kshitiz k.agarw...@gmail.com wrote:
 I used the same logic in onBeforeRender and it is working...

Right!
Page constructor is executed only once.
Page#onConfigure/onBeforeRender() are executed for every rendering of
the page.


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Re-Back-button-is-troubling-session-management-tp4649801p4649805.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: CheckGroup question

2012-06-10 Thread Jürgen Lind

Ah, thanks. Simply using ReuseIfModelsEqualStrategy did it...

J.

On 10.06.2012 13:48, Sven Meier wrote:

DataView has an IItemReuseStrategy.

Sven

Jürgen Lindjuergen.l...@iteratec.de  schrieb:


Thanks for the hint. Unfortunately, I was incorrect in my initial post: it is 
not a
ListView but a DataView I am using within the form. Is there a similar 
mechanism for
this case?

J.

On 10.06.2012 12:40, Sven Meier wrote:

See ListView#setReuseItems()

Jürgen Lindjuergen.l...@iteratec.de   schrieb:


Ok, I'm answering myself here... The problem was obviously, that upon each 
render
the Check components had new values and so the state was not cleanly 
maintained. I kind
of solved it by overriding the getValue methode and providing a unique id that 
remains
the same on each page rendering.

However, I still wonder if that is the way to go or just weird hack which 
solves the
problem more or less by coincidence.

Any help would be appreciated.

J.

On 10.06.2012 12:21, Jürgen Lind wrote:

Hi,

I have a little problem in getting a CheckGroup to work... The setup is as 
follows:
the page has a Form with a CheckGroup that contains a ListView where each list 
item
adds a Check component - giving me a bulk select mechanism. Now, everything 
works
great if the form is submitted successfully. However, when a required TextField 
is
omitted, the selected Checks are not maintained (whereas other form fields are
maintained). Am I missing something here?

Cheers,

J.



-
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




Mit freundlichen Grüßen,

Jürgen Lind

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

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


B�CB��[��X��ܚX�KK[XZ[�\�\��][��X��ܚX�P�X��]�\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[�\�\��Z[�X��]�\X�K�ܙ�B�


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



Re: Building wicket-stuff

2012-06-10 Thread Martin Grigorov
Hi Sven,

I fixed this by fixing scala-maven-plugin's config.
But now there are some other problems ... I don't have more time at
the moment to fix them.

On Sun, Jun 10, 2012 at 1:04 PM, Sven Meier s...@meiers.net wrote:
 Hi all,

 can someone enlighten me on how to build wicket-stuff 6.0-SNAPSHOT ?

    [ERROR] Engines.java:[53,15] cannot find symbol
    symbol  : class ScalaEngine
    location: class org.wicketstuff.console.engine.Engines

 I can't remember how I solved this maven puzzle the last time :/.

 Thanks
 Sven


 -
 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



set locale in cookie

2012-06-10 Thread oliver.stef
Hi,

I'm bulidng my application and i want the user to set is prefered language.

My problem is that i want to save the user selecteion in a cookie (i need to
set the cookie locale, no?) but i havn't found any working implementation
that can show me how it's done.

Is there any one that can help? please...

Thanks!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/set-locale-in-cookie-tp4649827.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: set locale in cookie

2012-06-10 Thread oliver.stef
Hi Martin,

Thank you for your fast replay!

What do you mean by saying:  ...parse it and set it in the session. 
How to do it?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/set-locale-in-cookie-tp4649827p4649829.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: set locale in cookie

2012-06-10 Thread Martin Grigorov
On Sun, Jun 10, 2012 at 7:32 PM, oliver.stef ova...@gmail.com wrote:
 Hi Martin,

 Thank you for your fast replay!

 What do you mean by saying:  ...parse it and set it in the session. 
 How to do it?

The cookie value will be a String like en or en_US or en_US_variation.
Create a Locale object with:
new Locale(en)
new Locale(en, US)
new Locale(en, US, variation)

and then do: Session.get().setLocale(locale)


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/set-locale-in-cookie-tp4649827p4649829.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: set locale in cookie

2012-06-10 Thread oliver.stef
Thanks again!
It's now much clearer!!

for some reason i have error on CookieUtils... so i implement it like this:
(on my HomePage.java) 

form.add(new SubmitLink(English){ 
@Override
public void onSubmit() {
getSession().setLocale(new Locale(en_US));
 
Cookie languageCookie = new
Cookie(WicketApplication.LANGUAGE_COOKIE_NAME, en_US);

languageCookie.setMaxAge(WicketApplication.LANGUAGE_COOKIE_AGE);
((WebResponse)getResponse()).addCookie(languageCookie);
}
});

*one last thing:*
so the Session.get().setLocale(locale) i should implement in
WicketApplication?
like this: 
@Override
public Session newSession(Request request, Response response) {

Session session = super.newSession(request, response);
session = trySetLanguageFromCookie(session, request, response);

return session;
}

private Session trySetLanguageFromCookie(Session session, Request 
request,
Response response) {

Cookie[] cookies = ((WebRequest) request).getCookies();

if (cookies == null || cookies.length == 0) {
return session;
}

for (Cookie cookie : cookies) {
if (LANGUAGE_COOKIE_NAME.equals(cookie.getName())) {
session.setLocale(new Locale(cookie.getValue()));

cookie.setMaxAge(LANGUAGE_COOKIE_AGE);

((WebResponse)response).addCookie(cookie);
break;
}
}

return session;
}

10x!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/set-locale-in-cookie-tp4649827p4649831.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: set locale in cookie

2012-06-10 Thread Daniel Suckow
You can use RequestCycleListener to change locale setting in case . In
Application init():

getRequestCycleListeners().add(new RequestLocaleListener());

public class RequestLocaleListener extends AbstractRequestCycleListener
{

public static final String LOCALE_COOKIE = LC;

public void onBeginRequest(RequestCycle cycle) {
if
(WebRequest.class.isAssignableFrom(cycle.getRequest().getClass())) {
WebRequest webrequest = (WebRequest) cycle.getRequest();
Cookie localeCookie = webrequest.getCookie(LOCALE_COOKIE);
if (localeCookie != null) {
for (Locale l : Locale.getAvailableLocales()) {
// expect language as cookie value
if
(localeCookie.getValue().equalsIgnoreCase(l.getLanguage())) {
Session.get().setLocale(l);
break;
}
}
}
}
}
}

2012/6/10 oliver.stef ova...@gmail.com

 Thanks again!
 It's now much clearer!!

 for some reason i have error on CookieUtils... so i implement it like this:
 (on my HomePage.java)

 form.add(new SubmitLink(English){
@Override
public void onSubmit() {
getSession().setLocale(new Locale(en_US));

Cookie languageCookie = new
 Cookie(WicketApplication.LANGUAGE_COOKIE_NAME, en_US);

  languageCookie.setMaxAge(WicketApplication.LANGUAGE_COOKIE_AGE);
((WebResponse)getResponse()).addCookie(languageCookie);
}
});

 *one last thing:*
 so the Session.get().setLocale(locale) i should implement in
 WicketApplication?
 like this:
 @Override
public Session newSession(Request request, Response response) {

Session session = super.newSession(request, response);
session = trySetLanguageFromCookie(session, request, response);

return session;
}

private Session trySetLanguageFromCookie(Session session, Request
 request,
 Response response) {

Cookie[] cookies = ((WebRequest) request).getCookies();

if (cookies == null || cookies.length == 0) {
return session;
}

for (Cookie cookie : cookies) {
if (LANGUAGE_COOKIE_NAME.equals(cookie.getName())) {
session.setLocale(new Locale(cookie.getValue()));

cookie.setMaxAge(LANGUAGE_COOKIE_AGE);

((WebResponse)response).addCookie(cookie);
break;
}
}

return session;
}

 10x!

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/set-locale-in-cookie-tp4649827p4649831.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




-- 
Daniel Suckow


Re: set locale in cookie

2012-06-10 Thread oliver.stef
YAP!!! WORKING

MARTIN - Thanks again!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/set-locale-in-cookie-tp4649827p4649833.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: set locale in cookie

2012-06-10 Thread oliver.stef
YAP!!! WORKING

MARTIN - Thanks again!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/set-locale-in-cookie-tp4649827p4649834.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: set locale in cookie

2012-06-10 Thread Martin Grigorov
On Sun, Jun 10, 2012 at 7:57 PM, oliver.stef ova...@gmail.com wrote:
 Thanks again!
 It's now much clearer!!

 for some reason i have error on CookieUtils... so i implement it like this:
 (on my HomePage.java)

 form.add(new SubmitLink(English){
        @Override
        public void onSubmit() {
                getSession().setLocale(new Locale(en_US));

            Cookie languageCookie = new
 Cookie(WicketApplication.LANGUAGE_COOKIE_NAME, en_US);
                    
 languageCookie.setMaxAge(WicketApplication.LANGUAGE_COOKIE_AGE);
                    ((WebResponse)getResponse()).addCookie(languageCookie);
                }
        });

 *one last thing:*
 so the Session.get().setLocale(locale) i should implement in
 WicketApplication?

You can also provide your own MySession that does this in its constructor.


 like this:
 @Override
    public Session newSession(Request request, Response response) {

        Session session = super.newSession(request, response);
        session = trySetLanguageFromCookie(session, request, response);

        return session;
    }

        private Session trySetLanguageFromCookie(Session session, Request 
 request,
 Response response) {

                Cookie[] cookies = ((WebRequest) request).getCookies();

        if (cookies == null || cookies.length == 0) {
            return session;
        }

        for (Cookie cookie : cookies) {
            if (LANGUAGE_COOKIE_NAME.equals(cookie.getName())) {
                session.setLocale(new Locale(cookie.getValue()));

                cookie.setMaxAge(LANGUAGE_COOKIE_AGE);

                ((WebResponse)response).addCookie(cookie);
                break;
            }
        }

        return session;
    }

 10x!

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/set-locale-in-cookie-tp4649827p4649831.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: Panel not getting refreshed...

2012-06-10 Thread kshitiz
*u are right...it is entering onBeforeRender method but it is not going in
the panel portion. As far as debug part is concern...I dont see any error:*

INFO: 
?xml version=1.0 encoding=UTF-8?ajax-responseheader-contribution
encoding=wicket1 /header-contributioncomponent id=id9c
/componentcomponent id=id9b /component/ajax-response
INFO: Response parsed. Now invoking steps...
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: refocus last focused component not needed/allowed


*Do you see any error..?*

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Panel-not-getting-refreshed-tp4649807p4649836.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: Panel not getting refreshed...

2012-06-10 Thread kshitiz
Hi,

I have removed almost everything...resultPanel contains only sysout:

public class SearchResultPanel extends BasePanel {

private static int temp = 0;

@Override
protected void onBeforeRender() {
super.onBeforeRender();
System.out.println(I am here.);
}
*   public SearchResultPanel(String id) {
super(id);
System.out.println(temp is  + temp);
temp++;
*}

*And there is no container now. Search page where result panel is :*


public Search(final PageParameters pageParameters) {

super(pageParameters);

FormSearchDomain searchForm = new 
FormSearchDomain(searchForm,
new 
CompoundPropertyModelSearchDomain(searchDomain));

final Panel searchFeedbackPanel = new FeedbackPanel(
searchFeedbackPanel);
searchFeedbackPanel.setOutputMarkupId(true);
searchFeedbackPanel.setOutputMarkupPlaceholderTag(true);

*   final SearchResultPanel searchResultPanel = new 
SearchResultPanel(
searchResultPanel);
searchResultPanel.setOutputMarkupId(true);
searchResultPanel.setOutputMarkupPlaceholderTag(true);
*
searchForm.setModelObject(searchDomain);

// defining text field for user to search
final RequiredTextFieldString searchTextField = new
RequiredTextFieldString(
search, Model.of(searchDomain.getSearch()));

AjaxFallbackButton ajaxSearchButton = new AjaxFallbackButton(
searchButton, searchForm) {

@Override
public void onSubmit(AjaxRequestTarget target, final 
Form? form) {

if (target != null) {

try {
   
target.add(searchResultPanel);
target.add(searchFeedbackPanel);
} catch (Exception exception) {
error(exception.getMessage());
error = true;
}


}
}


};

searchForm.add(searchTextField);
*   searchForm.add(searchFeedbackPanel);
searchForm.add(searchResultPanel);
*   searchForm.add(ajaxSearchButton);


add(searchForm);

}

*Actually what is happening, when I refresh the whole page manually, it
enters the resultPanel and temp value is displayed in console. But nothing
happens when that panel is refreshed...!!*



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Panel-not-getting-refreshed-tp4649807p4649838.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



call to Wicket.Ajax.get gives object is undefined

2012-06-10 Thread vineet semwal
Hi,

in wicket 6.x, call to  Wicket.Ajax.get method gives me undefined
object inn firefox and in chrome it gives  Ajax request:TypeError:
Cannot read property 'length' of undefined.

-- 
thanks,

Vineet Semwal

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



Re: Can't deal with wicket atmosphere

2012-06-10 Thread coincoinfou
he didn't find org.atmosphere.cpr.AtmosphereResource

Caused by: java.lang.IllegalStateException: MeteorServlet not defined in
web.xml
at org.atmosphere.cpr.Meteor.build(Meteor.java:170)
at org.atmosphere.cpr.Meteor.build(Meteor.java:151)
at org.atmosphere.cpr.Meteor.build(Meteor.java:137)
at org.atmosphere.cpr.Meteor.build(Meteor.java:124)
at
org.apache.wicket.atmosphere.AtmosphereBehavior.onResourceRequested(AtmosphereBehavior.java:80)
... 38 more

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Can-t-deal-with-wicket-atmosphere-tp4649792p4649840.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: call to Wicket.Ajax.get gives object is undefined

2012-06-10 Thread Martin Grigorov
Can you reproduce this on
http://www.wicket-library.com/wicket-examples-6.0.x/ajax ?

On Mon, Jun 11, 2012 at 8:24 AM, vineet semwal vineetsemwa...@gmail.com wrote:
 Hi,

 in wicket 6.x, call to  Wicket.Ajax.get method gives me undefined
 object inn firefox and in chrome it gives  Ajax request:TypeError:
 Cannot read property 'length' of undefined.

 --
 thanks,

 Vineet Semwal

 -
 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: Can't deal with wicket atmosphere

2012-06-10 Thread Martin Grigorov
Hi,

It is something about your way to setup the app. You do it programatically.
Try with web.xml and if it still doesn't work you may check what is
different than wicket-examples/atmpsphere demo app.
Finally you can ask at atmosphere users mailing list.

On Mon, Jun 11, 2012 at 8:29 AM, coincoinfou olivierandr...@gmail.com wrote:
 he didn't find org.atmosphere.cpr.AtmosphereResource

 Caused by: java.lang.IllegalStateException: MeteorServlet not defined in
 web.xml
        at org.atmosphere.cpr.Meteor.build(Meteor.java:170)
        at org.atmosphere.cpr.Meteor.build(Meteor.java:151)
        at org.atmosphere.cpr.Meteor.build(Meteor.java:137)
        at org.atmosphere.cpr.Meteor.build(Meteor.java:124)
        at
 org.apache.wicket.atmosphere.AtmosphereBehavior.onResourceRequested(AtmosphereBehavior.java:80)
        ... 38 more

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Can-t-deal-with-wicket-atmosphere-tp4649792p4649840.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