Re: Refresh component 'ajax'

2012-05-30 Thread David Hosier
How about something like AjaxSelfUpdatingTimerBehavior? Also, this page has some ajaxy examples that might help. http://www.wicket-library.com/wicket-examples/ajax/ On Wednesday, May 16, 2012 at 7:28 AM, Brown, Berlin [GCG-PFS] wrote: I normally use 'target.addComponent(someOtherComponent)'

handling user agent

2012-05-30 Thread wicket user
Hi all, I wondering what will be the difference if i use *((WebRequest)RequestCycle.get().getRequest()).getHeader(User-Agent);* or *WebSession.get().getClientInfo().getUserAgent();* As the client info per session would be same . and If I need to control this on the WebApplication level ,

Apache wicket: how to end target's lifecycle explicitly?

2012-05-30 Thread borja
Hello, i'm experiencing some issues with ending of target's lifecycle. On my page I have few Panels, where user is entering data. One of them has ListView, with TextField below and Add button. I've implemented, that TextField stuff goes to ListView even Add button is not pressed (with onBlur

Re: handling user agent

2012-05-30 Thread Martin Grigorov
On Wed, May 30, 2012 at 1:41 AM, wicket user samd...@live.com wrote: Hi all, I wondering what will be the difference if i use *((WebRequest)RequestCycle.get().getRequest()).getHeader(User-Agent);* or *WebSession.get().getClientInfo().getUserAgent();* As  the client info per session would

changing the page in inmethod grid

2012-05-30 Thread elvis.ciocoiu
Hello, I'm trying set the current page number in a DataGrid to the last one but don't know how to clear the cachedPageCount in AbstractPageableView. In my scenario after creating a new entity I want to select it and change the page of the grid to the page where this element exists. It works the

Re: handling user agent

2012-05-30 Thread wicket user
Question was how to handle user agent on the application level , i dont wanna write same code on each page to check the user agent then render the appropriate page -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/handling-user-agent-tp4649565p4649584.html Sent from

wicket ajax push

2012-05-30 Thread Douglas Ferguson
Anybody doing any ajax push stuff using wicket? Douglas - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org

Access to Page from LoadableDetachableModel

2012-05-30 Thread gmparker2000
I have a situation where I need to access the page from the load method of a loadableDetachableModel. The loadableDetachableModel is used deep down on a panel that needs access to the page in order to access the model object. To complicate things this page is abstract and can be extended to

Re: wicket ajax push

2012-05-30 Thread Richard W. Adams
What do you mean by push stuff? From: Douglas Ferguson the...@gmail.com To: Wicket Mailing List List users@wicket.apache.org Date: 05/30/2012 03:19 PM Subject:wicket ajax push Anybody doing any ajax push stuff using wicket? Douglas

Re: Access to Page from LoadableDetachableModel

2012-05-30 Thread Sven Meier
public MyPanel(String id, MyModel model) { That looks suspicious, why should MyPanel require a specific model implementation? What's so special about your MyModel? Is it a Wicket model, i.e. implements IModel? If yes, then the constructor should look like this: public MyPanel(String id,

Re: Access to Page from LoadableDetachableModel

2012-05-30 Thread Sebastien
Hi, I aggree with Sven. Another option is to pass the panel to the LDM's contructor so you can do a panel.getPage() to get the page. Just cast to the appropriate page type and do yourpage.getMyModel(). Best regards, Sebastien. On Wed, May 30, 2012 at 10:32 PM, Sven Meier s...@meiers.net wrote:

Re: Access to Page from LoadableDetachableModel

2012-05-30 Thread gmparker2000
My quick example isn't real and perhaps a bit misleading. Actually there is nothing special about MyModel, its just a POJO that I am wrapping up in a detachable model. Maybe I misunderstood what you were trying to tell me. /** Specialization of MyPage that gets the POJO from a database. */

Re: Access to Page from LoadableDetachableModel

2012-05-30 Thread gmparker2000
But if I do that won't the panel get serialized with the loadable detachable model? I would have to store a reference on the detachable model in order to use it in the load method. I could mark it transient and it would be there when the page is initially rendered but not on subsequent requests.

Re: Access to Page from LoadableDetachableModel

2012-05-30 Thread Sebastien
Well, I don't think so, even it needs to be tested. My guess is that the panel is added to the page (then, serialized). To the LDM's contructor, you will pass 'this' (means, the panel). In the LDM, you will store the reference of that 'this' into a variable. In all case, we always have the

Re: Access to Page from LoadableDetachableModel

2012-05-30 Thread Sven Meier
Ok, MyPOJO makes more sense. But then again, why don't you just use a model: public abstract class MyPage extends WebPage { public abstract MyPOJO getMyPOJO(); public onInitialize() { this.add(new MyPanel(myPanel, new AbstractReadOnlyModelMyPOJO() {

Re: Access to Page from LoadableDetachableModel

2012-05-30 Thread Sven Meier
A model can have a reference to a component, that's no problem for serialization. Sven On 05/30/2012 11:17 PM, Sebastien wrote: Well, I don't think so, even it needs to be tested. My guess is that the panel is added to the page (then, serialized). To the LDM's contructor, you will pass

Re: Access to Page from LoadableDetachableModel

2012-05-30 Thread gmparker2000
The reason for the detachable stuff is that when the page gets serialized it is going to serialize all the components in the page hierarchy and the models bound to them. When that happens MyPOJO is going also get serialized which I'm trying to avoid. In my application these objects can be very

Re: Access to Page from LoadableDetachableModel

2012-05-30 Thread gmparker2000
Well I gave this approach a try but unfortunately the first time the load method gets called the getPage method throws an illegal state exception java.lang.IllegalStateException: No Page found for component So I guess this means that during the construction of the panel the load is getting

Loop.populateItem() while migrating from Wicket 1.4 to 1.5

2012-05-30 Thread paulstar
in Wicket 1.4, this works fine: this.form.add(new Loop(ccformfields, ccformfields.size()) { @Override protected void populateItem(LoopItem item) { int index =

Re: Access to Page from LoadableDetachableModel

2012-05-30 Thread Sebastien
Hello again, I tested in a quickstart and it works. (I just noticed you did not called super.onInitialize()) The code I used: class MyPOJO { public Boolean isSelected() { return true; } } public class HomePage extends WebPage { private static final long serialVersionUID

Re: Access to Page from LoadableDetachableModel

2012-05-30 Thread gmparker2000
Thank you so much Sebastien and Sven! Sebastien I altered my actual code to put the panel on the LDM and it didn't work on the initial try. The problem with the illegal state exception I was having seems to happen if you construct your components in the panel constructor instead of the

Re: Access to Page from LoadableDetachableModel

2012-05-30 Thread gmparker2000
Update - Access the page with MyPanel.this.getPage() seems to work fine. More testing is required but looks like I have a solution. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Access-to-Page-from-LoadableDetachableModel-tp4649586p4649602.html Sent from the Users

Re: Access to Page from LoadableDetachableModel

2012-05-30 Thread gmparker2000
Update - I forgot to mention that my LDM is a class nested in the panel class. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Access-to-Page-from-LoadableDetachableModel-tp4649586p4649603.html Sent from the Users forum mailing list archive at Nabble.com.