Re: Session lost when redeploying

2008-09-26 Thread Johan Compagner
For wicket you shouldnt have to do anything except making your stuff thats in your session/pages all serializable. The container should take care of the rest On 9/26/08, Adriano dos Santos Fernandes [EMAIL PROTECTED] wrote: Hi! On a non Wicket application running on OC4J, I had the problem of

Re: @SpringBean and serialization

2008-09-26 Thread Ari M
Yes, of course, but I'm in the same position as the one who posed the question: looking for the answer. I inferred from what was written that de-/serialization was handled by @SpringBean, but since I haven't had time to do a full code review, I don't know the details of how it all works, and

Re: Session lost when redeploying

2008-09-26 Thread Martijn Dashorst
and shut down your app server in a normal way :). Kill -9 doesn't give the server a chance to write things to disk (as does the little red button in eclipse) Martijn On Fri, Sep 26, 2008 at 8:42 AM, Johan Compagner [EMAIL PROTECTED] wrote: For wicket you shouldnt have to do anything except

Re: [Announce] The Wicket Reflex Game:)

2008-09-26 Thread Nino Saturnino Martinez Vazquez Wael
You can only get one point per box... And theres a small time slip from when the heartbeat is activated until the reponse comes back in that time it's possible to click the boxes and not get points.. I can see that this simple game really shows that you need to be carefull if you have more

Re: session.setStyle and resources?

2008-09-26 Thread Srikanth.NT
Hi What we do in our project is to add public AbstractShopWebPage() { super(); add(HeaderContributor.forCss(ResourceHelper.getBrandOverrideCss(site.getBrandName(; } in the abstract web page. So that it gets attached to all the pages. And have a static helper method

Re: Javascript in wicket:head via Ajax

2008-09-26 Thread Matej Knopp
That's not a bug in Wicket. If you place javascript in head you have to either enclose the content in cdata block or escale and with lt; and gt; Otherwise it's not valid xml. -Matej On Fri, Sep 26, 2008 at 2:40 AM, Dreamage [EMAIL PROTECTED] wrote: Hi, Is the content of wicket:head tags is

Re: Re: Nice urls in markup

2008-09-26 Thread Liz Huber
First of all: Thanks a lot for trying to help me, Erik! The href-Element of my Ajax-Fallbacklinks show a pretty URLs now, but the fallback links don't work anymore, if JavaScript is disabled. ul    lia href=home id=navMail__itema onclick=var

London Wicket Event - @Google on Wednesday

2008-09-26 Thread jWeekend
We have 40-45 people registered so far for our next London Wicket Event, at 18:30 on October 1st, where we have more professional, instructive and often quite interactive presentations lined up for our guests, invariably comprising of an interesting collection of skills and friendly

Re: session.setStyle and resources?

2008-09-26 Thread Nino Saturnino Martinez Vazquez Wael
Thanks for the suggestion. But I wanted it to be transparent for me in this case, so I did not have to change my Headercontributor... Problem are that I use markup inheritance and in my basepage I include a base css.. Writing this it's actually pretty simple to see the solution, it can just

Individual session timeout

2008-09-26 Thread Stefan Lindner
The global session timeout for all sessions can be set in the web.xml file. Is it possible to set an individual session timeout for each session? E.g. depending on the user's role? Stefan - To unsubscribe, e-mail: [EMAIL

Loadable-detachable collections?

2008-09-26 Thread Neil McT
I'm using LoadableDetachableModels to minimise the serialized session state of my app. However, there is one place where I am still seeing WicketNotSerializableException and that is where I use a hibernate collection as a components model. I have a SystemUser class which contains a List of

Re: Individual session timeout

2008-09-26 Thread Nino Saturnino Martinez Vazquez Wael
session.settimeout() ? Stefan Lindner wrote: The global session timeout for all sessions can be set in the web.xml file. Is it possible to set an individual session timeout for each session? E.g. depending on the user's role? Stefan

Re: @SpringBean and serialization

2008-09-26 Thread James Carman
Serialization/deserialization is handled for you automatically. On Thu, Sep 25, 2008 at 9:33 PM, Ari M [EMAIL PROTECTED] wrote: I see nothing on the wiki page under Annotation-based Approach concerning serialization. The other approaches discuss serialization issues, but not this one. Am I

RE: Individual session timeout

2008-09-26 Thread Stefan Lindner
I forgut to tell you that I use Wicket 1.4 M3. I can't see any settimeout-Method in Session. Stefan -Ursprüngliche Nachricht- Von: Nino Saturnino Martinez Vazquez Wael [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 26. September 2008 12:59 An: users@wicket.apache.org Betreff: Re:

Re: Loadable-detachable collections?

2008-09-26 Thread James Carman
I usually use a LDM for the main object (which has the collection property) and have the model for the collection based upon that (perhaps a PropertyModel?). On Fri, Sep 26, 2008 at 6:34 AM, Neil McT [EMAIL PROTECTED] wrote: I'm using LoadableDetachableModels to minimise the serialized session

Usage of Application class and why set to ThreadLocal

2008-09-26 Thread Takeshi Matsuba
Hi all. I understand that there is one Application class instance per WicketFilter. So, I can use Application class like on memory database. (Wicket In Action too. ) I read source. I notice that Application class instance set ThreadLocal. I understand that value of threadLocal is Singleton per

Re: Individual session timeout

2008-09-26 Thread Bert
Hi, From the documentation, setMaxInactiveInterval() should do the trick. But i have not used it myself.. http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/http/HttpSession.html#setMaxInactiveInterval(int) Bert On Fri, Sep 26, 2008 at 13:10, Stefan Lindner [EMAIL PROTECTED]

Re: Usage of Application class and why set to ThreadLocal

2008-09-26 Thread James Carman
On Fri, Sep 26, 2008 at 7:28 AM, Takeshi Matsuba [EMAIL PROTECTED] wrote: Hi all. I understand that there is one Application class instance per WicketFilter. So, I can use Application class like on memory database. (Wicket In Action too. ) I read source. I notice that Application class

Re: Individual session timeout

2008-09-26 Thread Nino Saturnino Martinez Vazquez Wael
I mean the method on the ordinary java session http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSession.html You can get that from the wicket session... Or request cycle... I cant remember.. Stefan Lindner wrote: I forgut to tell you that I use Wicket 1.4 M3. I can't see

Re: Individual session timeout

2008-09-26 Thread Daniel Frisk
Code example: private static void setSessionTimeout(int seconds) { HttpSession session = getHttpSession(); if (session != null) { session.setMaxInactiveInterval(seconds); } } private static HttpSession getHttpSession() { WebRequest request

RE: Individual session timeout

2008-09-26 Thread Stefan Lindner
Thank you all! This is exactly what I'm looking for! -Ursprüngliche Nachricht- Von: Daniel Frisk [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 26. September 2008 14:50 An: users@wicket.apache.org Betreff: Re: Individual session timeout Code example: private static void

Re: Nice urls in markup

2008-09-26 Thread Erik van Oosten
Liz, The href-Element of my Ajax-Fallbacklinks show a pretty URLs now, but the fallback links don't work anymore, if JavaScript is disabled. That is the intention, the fallback links only work when havascript is enabled. I think you should mount your pages like this: mount(new

Re: Model object not geeting updated inside a RefreshingView

2008-09-26 Thread krisnv
can any of you please respond. krisnv wrote: pI have RefreshingView similar to Contact Editor in Wicket Examples.BR I added a Panel and TextFields to this RefreshingView. BRI populate these TextFields from a list from Database and have assigned Model objects to each TextField component.

Re: Images not displaying

2008-09-26 Thread James Carman
Try surrounding your img tag with wicket:link tags. On Fri, Sep 26, 2008 at 11:04 AM, Yazeed Isaacs [EMAIL PROTECTED] wrote: Hi I am trying to display a logo but nothing is displayed. Eg: img src=logo.jpg/ Files are: Index.html Index.java logo.jpg To make matters worst, I tried this

Re: Model object not geeting updated inside a RefreshingView

2008-09-26 Thread Matej Knopp
That's probably because refreshing view is creating new components on every request. Try using listView nad don't forget to call setReuseItems(true) on it. -Matej On Fri, Sep 26, 2008 at 4:49 PM, krisnv [EMAIL PROTECTED] wrote: can any of you please respond. krisnv wrote: pI have

Re: Model object not geeting updated inside a RefreshingView

2008-09-26 Thread krisnv
pThanks for you reply and pointing to the right component to use. Just curious, is there any way to fix this to make it work using this approach?/p pkrishna/p Matej Knopp-2 wrote: That's probably because refreshing view is creating new components on every request. Try using listView nad

Re: Model object not geeting updated inside a RefreshingView

2008-09-26 Thread Igor Vaynberg
see IItemReuseStrategy -igor On Fri, Sep 26, 2008 at 8:41 AM, krisnv [EMAIL PROTECTED] wrote: pThanks for you reply and pointing to the right component to use. Just curious, is there any way to fix this to make it work using this approach?/p pkrishna/p Matej Knopp-2 wrote: That's

Re: Model object not geeting updated inside a RefreshingView

2008-09-26 Thread Igor Vaynberg
does your model properly implement equals and hashcode? and i mean your actual IModel you are using, not the object inside it... -igor On Fri, Sep 26, 2008 at 8:55 AM, krisnv [EMAIL PROTECTED] wrote: igor, I am already setting it . Do i have to provide any custom implementation?

Re: Loadable-detachable collections?

2008-09-26 Thread Neil McT
Yeah, I originally had that - a LDM as the main model and the ListView model based on that. I've also tried a couple of variations of this but I still get the Serialization errors. I think maybe I'm not following you exactly. As far as I can see the ListView needs a collection as a model (the

Re: Model object not geeting updated inside a RefreshingView

2008-09-26 Thread krisnv
Yes I think so. Below is my code : public boolean equals(final Object obj) { if (obj == this) { return true; } else if (obj == null) { return false;

Re: Model object not geeting updated inside a RefreshingView

2008-09-26 Thread Igor Vaynberg
equals seems ok, although your hashcode is broken you do realize you are adding read only models to your textfields...those models never update model objects. in fact you shouldve gotten a stack trace in your log indicating that you cannot call setobject on a readonlymodel. if you do not

Re: Loadable-detachable collections?

2008-09-26 Thread Martijn Dashorst
James suggested 'model chaining', where you nest the LDM inside property models. In your case I'd suggest using a DataView instead, as it is easier to work with when using LDM's and data coming from databases. If you still want to use ListView, you'll have to override newListItemModel (iirc) and

Re: Loadable-detachable collections?

2008-09-26 Thread James Carman
The main LDM shouldn't get you serialization errors, because you're not serializing the entity (just the key perhaps and a proxied reference to your dao/repository). On Fri, Sep 26, 2008 at 12:11 PM, Neil McT [EMAIL PROTECTED] wrote: Yeah, I originally had that - a LDM as the main model and the

Re: Empty PageParametyers when using HybridUrlCodingStrategy

2008-09-26 Thread itayh
Thx for the quick response. I cahnged the url mount in my application to mount(new IndexedHybridUrlCodingStrategy(/iframe/MyFrame, MyFrame.class)) ... My problem is that still when i try to create iframe like: PageParameters params = new PageParameters(); params.add(url, url) or params.add(0,

Re: Wizard in Modalwindow getting alert message upon using the Wizard buttons

2008-09-26 Thread Martijn Dashorst
When we ask for a JIRA issue, we want you to create a bug report in our JIRA instance [1] and attach the quickstart (mvn clean before you zip) to that issue. We don't mean that you try the JIRA support forums [2], because though Atlassian has a track record of using and supporting Apache projects,

Re: Loadable-detachable collections?

2008-09-26 Thread James Carman
Yes, perhaps I wasn't clear enough. But, Martijn is correct. A DataView (which uses a DataProvider) might be a better choice in your situation (unless you have to load the entity to display other parts of your page anyway). Are you always showing all members of the nested collection? On Fri,

Re: Model object not geeting updated inside a RefreshingView

2008-09-26 Thread Igor Vaynberg
that is because your form never submits, otherwise you woudlve gotten a stacktrace because you were using a readonlymodel previously -igor On Fri, Sep 26, 2008 at 9:43 AM, krisnv [EMAIL PROTECTED] wrote: I tried using the PropertyModel , add(new textfield(name, new

Re: Loadable-detachable collections?

2008-09-26 Thread Neil McT
I wasn't getting the error from the main LDM but from the underlying collection (and its reference back to 'owner'). I need to display all collections elements in this instance but maybe on other pages, only a subset. Thanks both for your replies. I'm probably going to have a look at DataView.

Re: Loadable-detachable collections?

2008-09-26 Thread James Carman
How about sharing some code with us as to how you're setting up your models? On Fri, Sep 26, 2008 at 12:48 PM, Neil McT [EMAIL PROTECTED] wrote: I wasn't getting the error from the main LDM but from the underlying collection (and its reference back to 'owner'). I need to display all

Re: Model object not geeting updated inside a RefreshingView

2008-09-26 Thread krisnv
Ok. Should i need to call submitForm() on the event onClick() for the link? add(new Link(edit) { public void onClick() { int resultCode=0; User usr = (User)getParent().getModelObject(); System.out.println(firstname==+usr.getFirstName()); } }); } -krishna igor.vaynberg

Re: Model object not geeting updated inside a RefreshingView

2008-09-26 Thread krisnv
Never mind. I used SubmitLink instead of Link and that fixed it. Thanks a lot Igor and others for your time and replies. - krishna krisnv wrote: Ok. Should i need to call submitForm() on the event onClick() for the link? add(new Link(edit) { public void onClick() { int

Re: Loadable-detachable collections?

2008-09-26 Thread Neil McT
Sure. Originally I had it set up like (note that userModel is a LDM which wraps a SystemUser. SystemUser contains a collection of Contact objects). final WebMarkupContainer listContainer = new WebMarkupContainer(listContainer); ListView displayList = new ListView(contactsList,

Re: Loadable-detachable collections?

2008-09-26 Thread Nino Saturnino Martinez Vazquez Wael
And checkout the AjaxFallbackDefaultDataTable while your at it.. It's really nice too. Neil McT wrote: I wasn't getting the error from the main LDM but from the underlying collection (and its reference back to 'owner'). I need to display all collections elements in this instance but maybe on

Re: Loadable-detachable collections?

2008-09-26 Thread Nino Saturnino Martinez Vazquez Wael
You are not chaining... This is how: new PropertyModel(userModel,contacts) Neil McT wrote: Sure. Originally I had it set up like (note that userModel is a LDM which wraps a SystemUser. SystemUser contains a collection of Contact objects). final WebMarkupContainer listContainer =

illegal relative path element?

2008-09-26 Thread francisco treacy
hi, i just noticed that a panel that remained untouched for weeks (and that worked ok) is now failing - sometimes! the panel simply contains a search form. depending on which checkbox i check, it behaves fine, or sometimes it doesn't, if i play with the back button it will eventually work. i'm

Re: Ajax calls loads my server

2008-09-26 Thread Timo Rantalaiho
On Thu, 25 Sep 2008, Benny Weingarten wrote: I want to have a functionality that if a user types something in field2, the checkbox becomes disabled. currently I use an onChangeAjaxBehavior on the textfield, and that is AJAX, making a call to the server. I don't really want that sort of

Re: Loadable-detachable collections?

2008-09-26 Thread Neil McT
That worked a charm Nino, thanks. I can see now that I was previously setting a raw SystemUser object as the ListView model as opposed to the wrapped LDM object. I'll still check out the DataView as well. Thanks all for your replies. Nino.Martinez wrote: You are not chaining... This is

Re: Checkbox and enum value

2008-09-26 Thread Cédric Thiébault
Thanks Igor, it was exactly what i needed :-) To complete this post, here is the solution I found : http://surunairdejava.blogspot.com/2008/09/wicket-checkbox-abstractcheckboxmodel.html Sorry it's in french but the code is easy to understand... Cedric On Wed, Sep 24, 2008 at 2:46 PM, Igor

Re: FormTester.getTextComponentValue not equals with textfield

2008-09-26 Thread Timo Rantalaiho
On Tue, 23 Sep 2008, Emanuele Gesuato wrote: I'm writing a testcase in which i try to compare the value of a textfield in a form with the value of a pojo. This value is a BigDecimal. This is the code: FormTester ft = tester.newFormTester(GestisciListino.tags.pizzaForm.toString());

Re: Checkbox and enum value

2008-09-26 Thread francisco treacy
i'm sorry i didn't see this post before-- i came up with a solution a couple of weeks ago. i called it EnumCheckGroup (that is, i went for CheckGroup rather than CheckBox). usage: for a given enum: public static enum Niveau { etage, mezzanine, sous_sol; }

Breadcrumb + previous button

2008-09-26 Thread Kmus
Hi, I'm working in an application that is using the Breadcrumb component and everything works as expected. Currently I'm trying to add a previous/return button in some of my modules to give the user a friendlier environment, but I don't know how to send the user to the previous panel and remove

The Wicket Reflex Game Post thoughts?

2008-09-26 Thread Nino Saturnino Martinez Vazquez Wael
Hi Guys One of the major problems with the game are that if you click a box(AjaxEventBehavior) while the heartbeat(AbstractAjaxTimerBehavior) are in process you will get an error, since the box's component has changed and no longer carries that behavior. I've tried to solve this by adding a

Re: Checkbox and enum value

2008-09-26 Thread James Carman
Why not just pass the enum class into the constructor? But, also have one that allows you to provide a subset of enum values (as you already have). On Fri, Sep 26, 2008 at 4:43 PM, francisco treacy [EMAIL PROTECTED] wrote: i'm sorry i didn't see this post before-- i came up with a solution a

Re: Checkbox and enum value

2008-09-26 Thread James Carman
Also, you could have a varargs feature so that users could specify exactly what they want without having to instantiate an array. On Fri, Sep 26, 2008 at 6:15 PM, James Carman [EMAIL PROTECTED] wrote: Why not just pass the enum class into the constructor? But, also have one that allows you to

Re: Checkbox and enum value

2008-09-26 Thread francisco treacy
Also, you could have a varargs feature so that users could specify exactly what they want without having to instantiate an array. yes, of course there is place for improvements... public EnumCheckGroup(String id, T... values) Why not just pass the enum class into the constructor? if i pass

Re: Checkbox and enum value

2008-09-26 Thread francisco treacy
* i meant enum class On Fri, Sep 26, 2008 at 7:51 PM, francisco treacy [EMAIL PROTECTED] wrote: Also, you could have a varargs feature so that users could specify exactly what they want without having to instantiate an array. yes, of course there is place for improvements... public

Re: Checkbox and enum value

2008-09-26 Thread James Carman
Yeah, check out: https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/wicketopia/src/main/java/org/wicketopia/component/choice/EnumDropDownChoice.java On Fri, Sep 26, 2008 at 7:44 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: Class ? extends Enum ? enumClass;

Re: The Wicket Reflex Game Post thoughts?

2008-09-26 Thread Adriano dos Santos Fernandes
Nino Saturnino Martinez Vazquez Wael wrote: Hi Guys One of the major problems with the game are that if you click a box(AjaxEventBehavior) while the heartbeat(AbstractAjaxTimerBehavior) are in process you will get an error, since the box's component has changed and no longer carries that

Get object form Parameters

2008-09-26 Thread fish3934
Hi All, I wanted to pass an object from one page to another page,so I set an object into a parameter: PageParameters para=new PageParameters(); para.put(result,resultList);//resultList is a List contains some pojo. //jump to another page

Re: Get object form Parameters

2008-09-26 Thread Igor Vaynberg
pageparameters is used for passing parameters on the url, so it only supports strings or whatever you can convert to a string. -igor On Fri, Sep 26, 2008 at 9:35 PM, fish3934 [EMAIL PROTECTED] wrote: Hi All, I wanted to pass an object from one page to another page,so I set an object

Re: Get object form Parameters

2008-09-26 Thread 张伟
pass id, and then get that object from that id 2008/9/27 Igor Vaynberg [EMAIL PROTECTED] pageparameters is used for passing parameters on the url, so it only supports strings or whatever you can convert to a string. -igor On Fri, Sep 26, 2008 at 9:35 PM, fish3934 [EMAIL PROTECTED] wrote:

Re:Re: Get object form Parameters

2008-09-26 Thread fish3934
OH.Thinks for the reply. Yes,I can get a string through parameter. How to pass id and got that object from that id? I am sorry,I learned wicket just a few days.Is there any other ways to pass an object form one page to another page? 在2008-09-27,张伟 [EMAIL PROTECTED] 写道: pass id, and then