Re: Continue navigating while on submit button process stuff on the background

2011-05-07 Thread lucast
@jcgarciam, 
Thanks for your post. Sorry it took me so long to reply.
Yes, I am using component instantiation listener on my wicket app. 

I think I might have not explained things properly in my last post. For the
sake of clarity, I'm posting my web.xml and applicationContext set up:

On my WicketApplication class I have the following, also based on the wicket
in action book:
public class WicketApplication extends WebApplication {

   @Autowired
private ObjectService objects_service;

@Override
protected void init() {
addComponentInstantiationListener(new 
SpringComponentInjector(this));
}

My spring/hibernate set-up is also similar to the wicket in Action book :

My web.xml file has the following hibernate session filter (wicket in action
book, section 12.3.2):
filter
filter-nameopensessioninview/filter-name
filter-class

org.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class
/filter
filter-mapping
filter-nameopensessioninview/filter-name
url-pattern/*/url-pattern
/filter-mapping


context-param
param-namecontextConfigLocation/param-name
param-value/WEB-INF/applicationContext.xml/param-value
/context-param
listener

listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
/listener


On the applicationContext.xml file I have the following:
tx:annotation-driven /
bean id=wicketApplication class=com.myApp.WicketApplication
/bean
 ...

I think the whole set up is pretty much standard but if you think I am
missing something, then I'd be most grateful if you point it out.
Cheers,
Lucas

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Continue-navigating-while-on-submit-button-process-stuff-on-the-background-tp3473026p3505262.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: Continue navigating while on submit button process stuff on the background

2011-05-07 Thread jcgarciam
Hi, putting configuration aside of your first question (since i just made a
comment, for the sake of best practice). Back to your original question and
since you are using Spring, you can just use Spring facilities to Schedule
the jobs an pass the appropriate parameters (list of objects) to
the appropriate async service

http://static.springsource.org/spring/docs/2.5.x/reference/scheduling.html

http://static.springsource.org/spring/docs/2.5.x/reference/scheduling.htmlBut
keep in mind the following, from a Thread you shouldn't access any wicket
component since those are bound the Http Thread, which at the point when the
jobs runs the request would be gone.



On Sat, May 7, 2011 at 6:26 AM, lucast [via Apache Wicket] 
ml-node+3505262-1989378023-65...@n4.nabble.com wrote:

 @jcgarciam,
 Thanks for your post. Sorry it took me so long to reply.
 Yes, I am using component instantiation listener on my wicket app.

 I think I might have not explained things properly in my last post. For the
 sake of clarity, I'm posting my web.xml and applicationContext set up:

 On my WicketApplication class I have the following, also based on the
 wicket in action book:
 public class WicketApplication extends WebApplication {

@Autowired
 private ObjectService objects_service;

 @Override
 protected void init() {
 addComponentInstantiationListener(new
 SpringComponentInjector(this));
 }

 My spring/hibernate set-up is also similar to the wicket in Action book :

 My web.xml file has the following hibernate session filter (wicket in
 action book, section 12.3.2):
 filter
 filter-nameopensessioninview/filter-name
 filter-class

 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class
 /filter
 filter-mapping
 filter-nameopensessioninview/filter-name
 url-pattern/*/url-pattern
 /filter-mapping


 context-param
 param-namecontextConfigLocation/param-name
 param-value/WEB-INF/applicationContext.xml/param-value
 /context-param
 listener

 listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
 /listener


 On the applicationContext.xml file I have the following:
 tx:annotation-driven /
 bean id=wicketApplication class=com.myApp.WicketApplication
 /bean
  ...

 I think the whole set up is pretty much standard but if you think I am
 missing something, then I'd be most grateful if you point it out.
 Cheers,
 Lucas

 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://apache-wicket.1842946.n4.nabble.com/Continue-navigating-while-on-submit-button-process-stuff-on-the-background-tp3473026p3505262.html
  To start a new topic under Apache Wicket, email
 ml-node+1842946-398011874-65...@n4.nabble.com
 To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=.





-- 

JC


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Continue-navigating-while-on-submit-button-process-stuff-on-the-background-tp3473026p3505480.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: 1.5 RC3 Ajax random timeouts

2011-05-07 Thread Igor Vaynberg
the page should always be stored. i think we made a bad optimization
if it is not. just because the page is not dirty doesnt actually mean
it is not changed. eg, ajax requests are unversioned because we do
not rewrite urls outside the ajax repainted regions. but, just because
an ajax url did not mark the page as dirty doesnt mean it should not
be stored. it should also always be put into the session attribute so
it triggers replication if necessary.

-igor


On Fri, May 6, 2011 at 12:00 PM, Martin Grigorov mgrigo...@apache.org wrote:
 It seems I'll have to revert the improvement for your ticket (WICKET-3667).
 https://issues.apache.org/jira/browse/WICKET-3676 is broken because of
 this change.

 AFAIK Wicket should not store the page for Ajax requests (this is what
 I know from the other devs) but apparently this is not quite true.

 I tried the app in 3676 in latest 1.4.x and it works fine. So I
 debugged it and it seems Wicket 1.4.x actually stores the page after
 Ajax request.
 So now I'm a confused what to do.

 @Other devs: any advises ?

 On Wed, May 4, 2011 at 5:09 PM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 ahh saw that you continued the commentary on the issue.. Thanks

 2011/5/4 nino martinez wael nino.martinez.w...@gmail.com:
 Any time frame on when you will be able to test it?

 2011/5/4 nino martinez wael nino.martinez.w...@gmail.com:
 Done and reproduced..

 https://issues.apache.org/jira/browse/WICKET-3667

 2011/5/4 nino martinez wael nino.martinez.w...@gmail.com:
 Hmm I startet wondering if it could be something with pageversioning
 if we have 12 windows opened AFAIK pageversioning are set to 15 by
 default per session? So all these windows keep refreshing every 2
 seconds, some of them are bound to go over the limit...

 I'll look into doing the quickstart and see if I can reproduce it..

 regards Nino

 2011/5/4 Martin Grigorov mgrigo...@apache.org:
 create a quickstart and describe the exact steps to reproduce it
 all this in a ticket

 On Wed, May 4, 2011 at 1:05 PM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 It did not seem to do a difference...

 2011/5/4 nino martinez wael nino.martinez.w...@gmail.com:
 Ok overriden the defaultpageprovider and set everything to 10x of the
 original implementation that should make a change correct if this is
 the problem?



 2011/5/4 Martin Grigorov mgrigo...@apache.org:
 The session is not timed out.
 You see PageExpirationException. *Page*!
 That means the page instance is not in the page store.
 Reasons:
 - it storing failed so the page never been in the store
 - it has been removed from the store because of other reasons - like
 the size for the session related data reached the maximum allowed and
 the new page instances overwrote the old ones
 see org.apache.wicket.DefaultPageManagerProvider

 On Wed, May 4, 2011 at 11:46 AM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 Ok now we are getting something..

 I can see that the session are being created (one session for the 12
 browser instances). But I never get the session destroyed log info.
 However wicket still claims that the session are timedout.. How can
 that be?

 regards Nino

 2011/5/4 Martin Grigorov mgrigo...@apache.org:
 Servlet API - HttpSessionBindingListener

 On Wed, May 4, 2011 at 10:33 AM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 hmm I did see something about the request logger being enabled.. 
 could
 be a version mismatch.. Can I get information about when sessions 
 are
 created/deleted?

 2011/5/4 nino martinez wael nino.martinez.w...@gmail.com:
 but what about the dummyrequestlogger information?

 2011/5/4 Martin Grigorov mgrigo...@apache.org:
 See 
 org.apache.wicket.settings.IRequestLoggerSettings.isRequestLoggerEnabled()

 On Wed, May 4, 2011 at 10:18 AM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 We are seeing a lot of these on the customers server

 2011-05-04 10:13:25,843  INFO [http-bio-8080-exec-3]
 (DummyRequestLogger.java:367) -
 time=31,event=null,response=null,sessionid=034801D1024C79B62FD60ACE7C0B2110,sessionsize=1456,sessionstart=Wed
 May 04 10:12:08 CEST
 2011,requests=131,totaltime=5190,activerequests=0,maxmem=259M,total=19M,used=11M
 2011-05-04 10:13:26,484  INFO [http-bio-8080-exec-10]
 (DummyRequestLogger.java:367) -
 time=16,event=null,response=null,sessionid=034801D1024C79B62FD60ACE7C0B2110,sessionsize=1456,sessionstart=Wed
 May 04 10:12:08 CEST
 2011,requests=132,totaltime=5206,activerequests=0,maxmem=259M,total=19M,used=13M
 2011-05-04 10:13:26,703  INFO [http-bio-8080-exec-9]
 (DummyRequestLogger.java:367) -
 time=47,event=null,response=null,sessionid=034801D1024C79B62FD60ACE7C0B2110,sessionsize=1456,sessionstart=Wed
 May 04 10:12:08 CEST
 2011,requests=133,totaltime=5253,activerequests=1,maxmem=259M,total=19M,used=15M
 2011-05-04 10:13:26,703  INFO [http-bio-8080-exec-3]
 (DummyRequestLogger.java:367) -
 

Re: 1.5 RC3 Ajax random timeouts

2011-05-07 Thread Martin Grigorov
Thanks Igor!

I reverted the change and now it behaves as you described below.

On Sat, May 7, 2011 at 6:19 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 the page should always be stored. i think we made a bad optimization
 if it is not. just because the page is not dirty doesnt actually mean
 it is not changed. eg, ajax requests are unversioned because we do
 not rewrite urls outside the ajax repainted regions. but, just because
 an ajax url did not mark the page as dirty doesnt mean it should not
 be stored. it should also always be put into the session attribute so
 it triggers replication if necessary.

 -igor


 On Fri, May 6, 2011 at 12:00 PM, Martin Grigorov mgrigo...@apache.org wrote:
 It seems I'll have to revert the improvement for your ticket (WICKET-3667).
 https://issues.apache.org/jira/browse/WICKET-3676 is broken because of
 this change.

 AFAIK Wicket should not store the page for Ajax requests (this is what
 I know from the other devs) but apparently this is not quite true.

 I tried the app in 3676 in latest 1.4.x and it works fine. So I
 debugged it and it seems Wicket 1.4.x actually stores the page after
 Ajax request.
 So now I'm a confused what to do.

 @Other devs: any advises ?

 On Wed, May 4, 2011 at 5:09 PM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 ahh saw that you continued the commentary on the issue.. Thanks

 2011/5/4 nino martinez wael nino.martinez.w...@gmail.com:
 Any time frame on when you will be able to test it?

 2011/5/4 nino martinez wael nino.martinez.w...@gmail.com:
 Done and reproduced..

 https://issues.apache.org/jira/browse/WICKET-3667

 2011/5/4 nino martinez wael nino.martinez.w...@gmail.com:
 Hmm I startet wondering if it could be something with pageversioning
 if we have 12 windows opened AFAIK pageversioning are set to 15 by
 default per session? So all these windows keep refreshing every 2
 seconds, some of them are bound to go over the limit...

 I'll look into doing the quickstart and see if I can reproduce it..

 regards Nino

 2011/5/4 Martin Grigorov mgrigo...@apache.org:
 create a quickstart and describe the exact steps to reproduce it
 all this in a ticket

 On Wed, May 4, 2011 at 1:05 PM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 It did not seem to do a difference...

 2011/5/4 nino martinez wael nino.martinez.w...@gmail.com:
 Ok overriden the defaultpageprovider and set everything to 10x of the
 original implementation that should make a change correct if this is
 the problem?



 2011/5/4 Martin Grigorov mgrigo...@apache.org:
 The session is not timed out.
 You see PageExpirationException. *Page*!
 That means the page instance is not in the page store.
 Reasons:
 - it storing failed so the page never been in the store
 - it has been removed from the store because of other reasons - like
 the size for the session related data reached the maximum allowed and
 the new page instances overwrote the old ones
 see org.apache.wicket.DefaultPageManagerProvider

 On Wed, May 4, 2011 at 11:46 AM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 Ok now we are getting something..

 I can see that the session are being created (one session for the 12
 browser instances). But I never get the session destroyed log info.
 However wicket still claims that the session are timedout.. How can
 that be?

 regards Nino

 2011/5/4 Martin Grigorov mgrigo...@apache.org:
 Servlet API - HttpSessionBindingListener

 On Wed, May 4, 2011 at 10:33 AM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 hmm I did see something about the request logger being enabled.. 
 could
 be a version mismatch.. Can I get information about when sessions 
 are
 created/deleted?

 2011/5/4 nino martinez wael nino.martinez.w...@gmail.com:
 but what about the dummyrequestlogger information?

 2011/5/4 Martin Grigorov mgrigo...@apache.org:
 See 
 org.apache.wicket.settings.IRequestLoggerSettings.isRequestLoggerEnabled()

 On Wed, May 4, 2011 at 10:18 AM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 We are seeing a lot of these on the customers server

 2011-05-04 10:13:25,843  INFO [http-bio-8080-exec-3]
 (DummyRequestLogger.java:367) -
 time=31,event=null,response=null,sessionid=034801D1024C79B62FD60ACE7C0B2110,sessionsize=1456,sessionstart=Wed
 May 04 10:12:08 CEST
 2011,requests=131,totaltime=5190,activerequests=0,maxmem=259M,total=19M,used=11M
 2011-05-04 10:13:26,484  INFO [http-bio-8080-exec-10]
 (DummyRequestLogger.java:367) -
 time=16,event=null,response=null,sessionid=034801D1024C79B62FD60ACE7C0B2110,sessionsize=1456,sessionstart=Wed
 May 04 10:12:08 CEST
 2011,requests=132,totaltime=5206,activerequests=0,maxmem=259M,total=19M,used=13M
 2011-05-04 10:13:26,703  INFO [http-bio-8080-exec-9]
 (DummyRequestLogger.java:367) -
 time=47,event=null,response=null,sessionid=034801D1024C79B62FD60ACE7C0B2110,sessionsize=1456,sessionstart=Wed
 May 04 10:12:08 CEST
 

Clean URLs in PagingNavigator

2011-05-07 Thread Henrique Boregio
Hi, I've implemented different coding strategies throughout my site to
have clean/good-looking URLs.

There are some places though, where I'm not able to clean them. For
example, when using a PagingNavigator..when I click on the default
links such as next, prev, etc...I am still getting the
?wicket:interface=:1:1::: attacked to the URL.

Anyone solved this before?

Many thanks.

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



Re: Clean URLs in PagingNavigator

2011-05-07 Thread Igor Vaynberg
you can override the newlink factory methods on the navigator and make
the links stateless.

-igor


On Sat, May 7, 2011 at 12:11 PM, Henrique Boregio hbore...@gmail.com wrote:
 Hi, I've implemented different coding strategies throughout my site to
 have clean/good-looking URLs.

 There are some places though, where I'm not able to clean them. For
 example, when using a PagingNavigator..when I click on the default
 links such as next, prev, etc...I am still getting the
 ?wicket:interface=:1:1::: attacked to the URL.

 Anyone solved this before?

 Many thanks.

 -
 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



Problem with PaginNavigator/DataView and popup link

2011-05-07 Thread jlobato

Hi,

I am fairly new to wicket so if I am missing obvious please forgive me. I am 
displaying a list of items with a DataView (a PageableListView is the same) 
and a PagingNavigator. Everything works fine, I can view all elements in any 
page but the moment I click on the Link to open a pop up the Navigation does 
not seem to work any more, as if the url in the navigator is out of 
sync. below is a the code if anyone could help I would be really 
greatful.


Regards
José

final DataView products = new DataView(products, new 
ListDataProvider(
productlist),15)

{
public void populateItem(final Item item)
{
CProduct prod = (CProduct) item.getModelObject();item.add(new 
Label(name, prod.getName()));


Link detailsLink = new Link(more, 
item.getModel())
{
@Override
public void onClick()
{
CProduct prod = 
(CProduct)getModelObject();
PageParameters pars = new 
PageParameters();
pars.add(productid, 
prod.getID()+);

setResponsePage(ViewProductPage.class, pars);
}
};


detailsLink .setPopupSettings(new PopupSettings(PopupSettings.RESIZABLE 
|


PopupSettings.SCROLLBARS).setHeight(500).setWidth(700));
item.add(detailsLink );

// Image
			final BufferedDynamicImageResource resource = new 
BufferedDynamicImageResource();BufferedImage 
img = getApp().getValidImage(prod.getPicture());		 
   resource.setImage((BufferedImage)img);

item.add(new Image(image, resource)); 
  }
};


add(products);
add(new PagingNavigator(navigator, products));

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



Re: GridView for A-Symmetric tables - issues

2011-05-07 Thread Arjun Dhar
Someone asked me for the HTML code also and I had similar off forum queries
earlier on this post. Fwiw adding HTML sample code to compliment the Java
code for this use case:


table id='grid'
tr wicket:id=gridView
td class='tdShell' wicket:id=cols
div class='tableCell'
center
div

/div

div style='border:0px solid transparent'
wicket:id=mergedCell

/div
/center
/div
/td
/tr
/table


..hope its useful for anyone else looking for the same.

-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/GridView-for-A-Symmetric-tables-issues-tp2953859p3506434.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