Re: CompoundPropertyModel - white space

2021-06-08 Thread Mihir Chhaya
Thank you, Sven. This is working. As always, The Apache Wicket team ROCKS !! -Mihir. On Tue, Jun 8, 2021 at 3:54 PM Sven Meier wrote: > Hi, > > by default textfields trim their input, so I'd expect the total count > characters to be correct to the processed input: > >"f " + "m" + "l" -> "f

Re: CompoundPropertyModel - white space

2021-06-08 Thread Sven Meier
Hi, by default textfields trim their input, so I'd expect the total count characters to be correct to the processed input:   "f " + "m" + "l" -> "fml" = 3 characters (also a space was entered after the *f* You might want to override #shouldTrimInput if you want to keep the whitespace. Ha

Re: CompoundPropertyModel: override method or catch exception

2015-06-17 Thread Martin Grigorov
Hi, Then you need to roll your own IModel and use it instead of CompountPropertyModel. **PropertyModel classes use reflection to find and call the setter and getter methods. Martin Grigorov Freelancer. Available for hire! Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Jun

Re: CompoundPropertyModel binding direction

2013-03-19 Thread Sven Meier
However I'm curious to know if a possible solution would be to create the DetailPage instance inside the onClick method of the Link, so that it becomes a local variable that gets collected asap. Sure, that's perfectly fine. Sven On 03/19/2013 11:39 AM, Lucio Crusca wrote: In data Tuesday 19

Re: CompoundPropertyModel binding direction

2013-03-19 Thread Lucio Crusca
In data Tuesday 19 March 2013 09:42:54, Sven Meier ha scritto: > Hi Lucio, > FormComponentPanels are an advanced concept and I'd recommend you extend > org.apache.wicket.markup.html.panel.Panel until you really need the > features of a FormComponentPanel. Thanks that solved the problem. > BTW yo

Re: CompoundPropertyModel binding direction

2013-03-19 Thread Sven Meier
Hi Lucio, your LabelAndField and DetailFormComponentPanel both extend FormComponentPanel. Thus they will take part in form processing and try to push a value into their model. Since there are no properties "singlePanelForCurrentRow" and "detailEditorPanel" the model update will fail. FormCom

Re: CompoundPropertyModel not working... Warning message

2012-10-13 Thread delta458
Ah great. It works now. I enabled the validation and somehow it works now... I tested it x times before with no results.. well thanks.. :) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/CompoundPropertyModel-not-working-Warning-message-tp4652942p4652946.html Sent

Re: CompoundPropertyModel not working... Warning message

2012-10-13 Thread Dan Retzlaff
If you don't add any of the standard validators, doesn't that accomplish your goal? I think you still want "form processing" which includes population of model objects from the raw submitted strings. If you're using another post-submit validation framework, you probably want to override Form#onVal

Re: CompoundPropertyModel not working... Warning message

2012-10-13 Thread delta458
I disabled default form processing because I need to, for my project. I will use another validation framework for validating. Also when it is enabled, my object was not populated... I will try again though... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Compoun

Re: CompoundPropertyModel not working... Warning message

2012-10-13 Thread Dan Retzlaff
Hi! It's not clear what you mean by "not working" but I'll assume you expect your Invoice object to be populated when the submit button is clicked. It won't work with your code because you have disabled default form processing with your submit button. You actually don't even need a Wicket componen

Re: CompoundPropertyModel problem.. the values are not refreshing

2012-06-14 Thread ramlael
Wicket 1.5 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/CompoundPropertyModel-problem-the-values-are-not-refreshing-tp4649987p464.html Sent from the Users forum mailing list archive at Nabble.com.

Re: CompoundPropertyModel problem.. the values are not refreshing

2012-06-14 Thread Sven Meier
What Wicket version? BTW a quickstart would enable us to help you. Sven On 06/14/2012 05:45 PM, ramlael wrote: Below are my files HTML Bean Customer.java - getters/setters for firstName and lastname Component.java - On URL getting the firstname and lastNames as page parameters Custome

Re: CompoundPropertyModel problem.. the values are not refreshing

2012-06-14 Thread ramlael
1) In form have 2 text fields, 1) First Name and 2) Last Name. On page load populating the values with request parameters like https:localhost:8080/addcard?firstName=ram&lastName=babu. after loading the page with first name and last name field, modified the first name text field with "raj" , click

Re: CompoundPropertyModel problem.. the values are not refreshing

2012-06-14 Thread Thomas Götz
Could you please provide a Quickstart that describes your problem? This will make it much easier for us to help you. -Tom - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h

RE: CompoundPropertyModel and FormComponent

2012-01-18 Thread Schlärmann , Bob
Thanks for your response. After some more debugging I've found the cause and also found a solution. The cause is that models of intermediate components, such as the Panel in my case, are never initialized if they do not already have a model. The parent's model is looked up in Component.initMod

Re: CompoundPropertyModel and FormComponent

2012-01-18 Thread Andrea Del Bene
At this point I would override/debug method updateModel() inside AddressPanel to see if model's object is modified by this method . Just my 2 cents... Yes, I think you are doing it "the Wicket way", but your snippet and mine should work. Do you modify components' model somewhere else? No, I don

RE: CompoundPropertyModel and FormComponent

2012-01-16 Thread Schlärmann , Bob
> Yes, I think you are doing it "the Wicket way", but your snippet and > mine should work. Do you modify components' model somewhere else? No, I don't think so. The page to which the component is added is constructed as follows: CompoundPropertyModel model = new CompoundPropertyModel(this); For

Re: CompoundPropertyModel and FormComponent

2012-01-16 Thread Andrea Del Bene
Yes, I think you are doing it "the Wicket way", but your snippet and mine should work. Do you modify components' model somewhere else? Which model do you get if you call getDefaultModel() inside oninitialize? Thanks for your reply. I've tried it but it still gave the same error. However I also

RE: CompoundPropertyModel and FormComponent

2012-01-16 Thread Schlärmann , Bob
Thanks for your reply. I've tried it but it still gave the same error. However I also tried the following modified version of your idea: In AddressPanel.java: @Override protected void onInitialize() { super.onInitialize(); Object o = getDefaultModelObject(); setDe

Re: CompoundPropertyModel and FormComponent

2012-01-16 Thread Andrea Del Bene
Hi, I think you need to build a CompoundPropertyModel inside the component itself. Override onInitialize method of AddressPanel and try with something like this: @Override protected void onInitialize() { super.onInitialize(); setDefaultModel(new CompoundPropertyModel(getDe

Re: CompoundPropertyModel for label?

2011-06-12 Thread Clint Checketts
You need to set the CompoundPropertyModel on the parent object. In your example the page. Try the following code: customer = new Customer(); customer.setFirstName("Jimmy"); customer.setLastName("Dean"); customer.getAddress().setStreet("123 Easy Street");

Re: CompoundPropertyModel and Image

2011-04-23 Thread andrea del bene
Hi, I've checked Image's source class and it seems that it doesn't support compound models (see comments in method initModel()). Hi there, I have a rather simple problem, but could find a solution yet. I wanna combine text and an image in ONE model. The image is defined by a ContextRelativeRes

Re: CompoundPropertyModel deprecated in 1.5 - what is the replacement?

2011-03-09 Thread Maarten Billemont
On 09 Mar 2011, at 22:36, Brown, Berlin [GCG-PFS] wrote: >> On 09 Mar 2011, at 22:01, Chris Colman wrote: >>> >>> Sorry, CompoundPropertyModel is not deprecated in 1.5, it's >>> BoundCompoundPropertyModel that is. >> >> Too bad :-) >> >> Really, you use normal models and LDMs, or BindGen >> (h

RE: CompoundPropertyModel deprecated in 1.5 - what is the replacement?

2011-03-09 Thread Brown, Berlin [GCG-PFS]
What is wrong with compoundpropertymodel (pre 1.5)? -Original Message- From: Maarten Billemont [mailto:lhun...@gmail.com] Sent: Wednesday, March 09, 2011 4:30 PM To: users@wicket.apache.org Subject: Re: CompoundPropertyModel deprecated in 1.5 - what is the replacement? On 09 Mar 2011

Re: CompoundPropertyModel deprecated in 1.5 - what is the replacement?

2011-03-09 Thread Maarten Billemont
On 09 Mar 2011, at 22:01, Chris Colman wrote: > > Sorry, CompoundPropertyModel is not deprecated in 1.5, it's > BoundCompoundPropertyModel that is. Too bad :-) Really, you use normal models and LDMs, or BindGen (http://code.google.com/p/bindgen-wicket/) and make your code type-safe. ---

RE: CompoundPropertyModel deprecated in 1.5 - what is the replacement?

2011-03-09 Thread Chris Colman
My bad! I was had done s search on CompoundPropertyModel and BoundCompoundPropertyModel showed up in the deprecated list but I just saw the highlighted "CompountPropertyModel" part... =] Sorry, CompoundPropertyModel is not deprecated in 1.5, it's BoundCompoundPropertyModel that is. --

Re: CompoundPropertyModel deprecated in 1.5 - what is the replacement?

2011-03-09 Thread Martin Grigorov
On Wed, Mar 9, 2011 at 9:56 AM, Coleman, Chris < chris.cole...@thalesgroup.com.au> wrote: > I noticed that CompoundPropertyModel is deprecated in 1.5 but I can't find > anything relating to this on the "Migration to Wicket 1.5" page. > > What is meant to be used instead of this class? > It is not

Re: CompoundPropertymodel loses object after form submit

2010-06-09 Thread Manfred Bergmann
Hi. Certainly I can. Here is the main Panel for the case where the CompoundPropertyModel loses the object. The WebPage classes basically only contain one of those main panels depending of the PageParameters which are passed into the panel as converted to a Scala immutable Map instance. Parameter

Re: CompoundPropertymodel loses object after form submit

2010-06-08 Thread yaniv kessler
Can you show some code? On Wed, Jun 9, 2010 at 1:01 AM, Bergmann Manfred wrote: > Hi. > > I experience a strange behaviour where I'm not exactly sure what I'm doing > wrong. > On my pages which are wrapped around some database model classes I have > forms with CompoundPropertyModels. > On one of

Re: CompoundPropertyModel issue

2010-03-03 Thread chinedu efoagui
you are absolutely correct. It worked perfectly thank you. On Wed, Mar 3, 2010 at 12:07 PM, Xavier López wrote: > Strange. I thought the component only searches parents for a CPM if and only > if its model is null. > > Have you tried doing approvalofficers.setModel(new Model()); ? > Maybe Employe

Re: CompoundPropertyModel issue

2010-03-03 Thread Xavier López
Strange. I thought the component only searches parents for a CPM if and only if its model is null. Have you tried doing approvalofficers.setModel(new Model()); ? Maybe EmployeeDropDownChoice is nulling the model somewhere in the constructor (calling proper super() ? ). Cheers Xavier 2010/3/3 chi

Re: CompoundPropertyModel issue

2010-03-03 Thread chinedu efoagui
I tried that.still did not work? Any other ideas rg.apache.wicket.WicketRuntimeException: No get method defined for class: class com.mw.hr.entity.leaveappempleave.LeaveappEmpleave expression: approvaloficer at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.ja

Re: CompoundPropertyModel issue

2010-03-02 Thread Xavier López
I think the Model you are passing to the constructor refers to the choices Model. Try using EmployeeDropDownChoice("approvaloficer",new Model(), new Model("")); Cheers, Xavier 2010/3/2 chinedu efoagui > hello, > > i am added a dropdownchoice to a form. The form's model is set to a > CompoundPro

Re: CompoundPropertyModel

2009-11-29 Thread Николай Кучумов
cket that it knows nothing about, so it blows up >>>> with >>>> pageexpired. >>>> >>>> The fact that you don't get serialization errors in the log (if it >>>> wasn't >>>> serialized) is b/c it didn't get that far yet

Re: CompoundPropertyModel

2009-11-29 Thread Николай Кучумов
if you keep same browser open between deployments, you are >>> sending data back to wicket that it knows nothing about, so it blows up >>> with >>> pageexpired. >>> >>> The fact that you don't get serialization errors in the log (if it wasn't >&

Re: CompoundPropertyModel

2009-11-28 Thread Николай Кучумов
with >> pageexpired. >> >> The fact that you don't get serialization errors in the log (if it wasn't >> serialized) is b/c it didn't get that far yet, so problems are elsewhere. >> >> Hope this helps, >> - Alex. >> >> -Ori

Re: CompoundPropertyModel

2009-11-20 Thread Николай Кучумов
> serialized) is b/c it didn't get that far yet, so problems are elsewhere. > > Hope this helps, > - Alex. > > -Original Message- > From: Николай Кучумов [mailto:kuchum...@gmail.com] > Sent: Saturday, November 14, 2009 9:33 AM > To: users@wicket.apache.org

RE: CompoundPropertyModel

2009-11-14 Thread Alex Rass
nt: Saturday, November 14, 2009 9:33 AM To: users@wicket.apache.org Subject: Re: CompoundPropertyModel Hi, Jeremy. No, the log contained only this error... But to be honest, although it didn't fix the error, your advice is still valuable, because not all of the classes were Serializable. A

Re: CompoundPropertyModel

2009-11-14 Thread Jeremy Thomerson
Try running your project in Jetty for development (you can use the Maven quickstart to help you get started). It's usually much easier to get running and see what's going on. It also allows for very easy on-the-fly changes and reloading. -- Jeremy Thomerson http://www.wickettraining.com On Sa

Re: CompoundPropertyModel

2009-11-14 Thread Николай Кучумов
Hi, Jeremy. No, the log contained only this error... But to be honest, although it didn't fix the error, your advice is still valuable, because not all of the classes were Serializable. And you know what? I think I'll reinstall my application server. I used Glassfish 2 before, and this time I tried

Re: CompoundPropertyModel

2009-11-14 Thread Jeremy Thomerson
Do both Person and Credentials (and everything else Person holds on to) implement Serializable? Watch the logs to see if there are serialization errors. It's a problem of the page not being in the session - which means it either didn't make it there or the session is somehow gone. -- Jeremy Thom

Re: CompoundPropertyModel and nested DataView

2009-06-25 Thread Jeremy Thomerson
r >> CompoundPropertyModel? :) Can you point me to some documentation that might >> help me understand it better? >> >> -Original Message- >> From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] >> Sent: Thursday, June 25, 2009 11:22 AM >> To: user

Re: CompoundPropertyModel and nested DataView

2009-06-25 Thread Jeremy Thomerson
ited for > CompoundPropertyModel? :) Can you point me to some documentation that might > help me understand it better? > > -Original Message- > From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] > Sent: Thursday, June 25, 2009 11:22 AM > To: users@wicket.apache.org > Subject: Re:

RE: CompoundPropertyModel and nested DataView

2009-06-25 Thread Hubbard, Bobby
@wicket.apache.org Subject: Re: CompoundPropertyModel and nested DataView if you are a newbie do not use CPM it is a shortcut model more suited for users who know and understand models well. -igor On Wed, Jun 24, 2009 at 5:35 PM, Hubbard, Bobby wrote: > I am a Wicket newbie and am curren

Re: CompoundPropertyModel and nested DataView

2009-06-25 Thread Igor Vaynberg
if you are a newbie do not use CPM it is a shortcut model more suited for users who know and understand models well. -igor On Wed, Jun 24, 2009 at 5:35 PM, Hubbard, Bobby wrote: > I am a Wicket newbie and am currently struggling with > CompoundPropertyModel. I have found a lot on the list about >

Re: CompoundPropertyModel and Combobox

2009-05-28 Thread Marco Santos
Thanx for the tip. It work on some cases. I found a pattern. For instance, if a component (be it a textfield or a DropDownChoice) has it self a Model, for instance a PropertyModel, the instance variables of the class that is used on the form model (CompoundPropertyModel) are not filled. EXAMPLE

Re: CompoundPropertyModel and Combobox

2009-05-27 Thread Marcin Palka
The code below works just fine for me. Instead of using complex type as a model object for a drop down I use an instance of IChoiceRenderer to control what's used for an id and what's displayed as a value. User user = ; setModel(new CompoundPropertyModel(user));

Re: Compoundpropertymodel with shadow map?

2008-11-21 Thread Nino Saturnino Martinez Vazquez Wael
Ok great.. Seems like SerializationHelper.clone and just a normal compound model could work.. Francisco Diaz Trepat - gmail wrote: Don't know, but LOL. This might be an instancing issue in which special handling is good for this scenario but seems to be fine for most cases. And in a lazy TDD pr

Re: Compoundpropertymodel with shadow map?

2008-11-21 Thread Nino Saturnino Martinez Vazquez Wael
True, this is also what I am thinking about doing... Johan Compagner wrote: If you dont want to use an original object why not just clone/create a copy of the original end use that and then copy the values over again? (i think beanutils or something van do that for you) On 11/18/08, Nino Saturn

Re: Compoundpropertymodel with shadow map?

2008-11-21 Thread Johan Compagner
If you dont want to use an original object why not just clone/create a copy of the original end use that and then copy the values over again? (i think beanutils or something van do that for you) On 11/18/08, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]> wrote: > Hi > > Im trying todo a

Re: Compoundpropertymodel with shadow map?

2008-11-20 Thread Francisco Diaz Trepat - gmail
Don't know, but LOL. This might be an instancing issue in which special handling is good for this scenario but seems to be fine for most cases. And in a lazy TDD programming way it might be good enough. Although I know from blog and other threads that you look for greatness :-) and not just code t

Re: Compoundpropertymodel with shadow map?

2008-11-20 Thread Nino Saturnino Martinez Vazquez Wael
I love simple and simple is good. But this approach has issues with hibernate if your hibernate sessions are per request and your shadowmodel lives in multiple requests and your entities has references to other entities for example 1..* etc ... In "simple" use cases, and possibly also when not

Re: Compoundpropertymodel with shadow map?

2008-11-20 Thread Francisco Diaz Trepat - gmail
why? simple is good. doesn't need to be complex. what part you dislike the most? f(t) On Thu, Nov 20, 2008 at 2:29 AM, Nino Saturnino Martinez Vazquez Wael < [EMAIL PROTECTED]> wrote: > BTW this is a flawed approch.. We need something a little more > intelligent.. I'll return on the subject.. >

Re: Compoundpropertymodel with shadow map?

2008-11-19 Thread Nino Saturnino Martinez Vazquez Wael
BTW this is a flawed approch.. We need something a little more intelligent.. I'll return on the subject.. Nino Saturnino Martinez Vazquez Wael wrote: heres the raw and completely untested version of it. probably with a whole bunch of issues...: package zeuzgroup.web.model; import java

Re: Compoundpropertymodel with shadow map?

2008-11-18 Thread Francisco Diaz Trepat - gmail
[+] on proposition shadow On Tue, Nov 18, 2008 at 4:16 PM, Nino Saturnino Martinez Vazquez Wael < [EMAIL PROTECTED]> wrote: > And heres the result in all its glory, should I create jira issue and > attach the code?.. : > > package zeuzgroup.web.model; > > import java.lang.reflect.Field; > import

Re: Compoundpropertymodel with shadow map?

2008-11-18 Thread Nino Saturnino Martinez Vazquez Wael
And heres the result in all its glory, should I create jira issue and attach the code?.. : package zeuzgroup.web.model; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import org.apache.wicket.Applicat

Re: Compoundpropertymodel with shadow map?

2008-11-18 Thread Francisco Diaz Trepat - gmail
Shadows sounds good... :-)f(t) On Tue, Nov 18, 2008 at 11:37 AM, James Carman <[EMAIL PROTECTED]>wrote: > You could adapt the proxy model thing (I kind of like the name > "shadow" and I might change mine) to do what you want. You'd need to > keep a flag that tells whether or not you've retrieved

Re: Compoundpropertymodel with shadow map?

2008-11-18 Thread James Carman
You could adapt the proxy model thing (I kind of like the name "shadow" and I might change mine) to do what you want. You'd need to keep a flag that tells whether or not you've retrieved the value from the "destination" model. On Tue, Nov 18, 2008 at 9:33 AM, Nino Saturnino Martinez Vazquez Wael

Re: Compoundpropertymodel with shadow map?

2008-11-18 Thread Nino Saturnino Martinez Vazquez Wael
heres the raw and completely untested version of it. probably with a whole bunch of issues...: package zeuzgroup.web.model; import java.lang.reflect.Field; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import org.apache.wicket.Component;

Re: Compoundpropertymodel with shadow map?

2008-11-18 Thread Nino Saturnino Martinez Vazquez Wael
I do.. But if I use it with a detachable model the idea goes a bit away.. Plus I'd like it to be a bit more transparent... Could be me that just not know enough James Carman wrote: You didn't like the ProxyModelManager? https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/wicke

Re: Compoundpropertymodel with shadow map?

2008-11-18 Thread James Carman
You didn't like the ProxyModelManager? https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/wicketopia/src/main/java/org/wicketopia/model/proxy/ProxyModelManager.java On Tue, Nov 18, 2008 at 7:43 AM, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]> wrote: > Hi > > Im trying t

Re: Compoundpropertymodel with shadow map?

2008-11-18 Thread Francisco Diaz Trepat - gmail
Nice, I was up to something similar. On Tue, Nov 18, 2008 at 9:43 AM, Nino Saturnino Martinez Vazquez Wael < [EMAIL PROTECTED]> wrote: > Hi > > Im trying todo a compoundpropertymodel which does not change original > values in the "original" model. I need this since I am updating some stuff > in a

Re: CompoundPropertyModel and collection attributes

2008-10-13 Thread Jeremy Thomerson
In that example, the ID in new TextField("") should be new TextField("number") - sorry On Mon, Oct 13, 2008 at 8:42 PM, Jeremy Thomerson <[EMAIL PROTECTED] > wrote: > Use some sort of repeater over your collection, then add the individual > form components inside that. > > add(new Lis

Re: CompoundPropertyModel and collection attributes

2008-10-13 Thread Jeremy Thomerson
Use some sort of repeater over your collection, then add the individual form components inside that. add(new ListView("phones") { @Override protected void populateItem(ListItem item) { item.setModel(new CompoundPropertyModel(item.getModel()));

RE: CompoundPropertyModel need to track changes

2008-04-14 Thread Karen Schaper
setName was called. Thank you for the clues. > -Original Message- > From: Gerolf Seitz [mailto:[EMAIL PROTECTED] > Sent: Monday, April 14, 2008 7:18 AM > To: users@wicket.apache.org > Subject: Re: CompoundPropertyModel need to track changes > > > On Mon, Apr 14,

Re: CompoundPropertyModel need to track changes

2008-04-14 Thread Gerolf Seitz
On Mon, Apr 14, 2008 at 1:05 PM, Maurice Marrink <[EMAIL PROTECTED]> wrote: > Hmm, it should try to use bean methods before trying the field directly. > you could try changing the wicket id of your formcomponent to the full > method name, e.g. setLastname() if your property is lastname. > If that

Re: CompoundPropertyModel need to track changes

2008-04-14 Thread Maurice Marrink
Hmm, it should try to use bean methods before trying the field directly. you could try changing the wicket id of your formcomponent to the full method name, e.g. setLastname() if your property is lastname. If that does not work, it might indicate a problem with your getters and setters. An alterna

Re: CompoundPropertyModel stops working when form validation fails.

2007-10-08 Thread Fabio Fioretti
On 10/8/07, Kent Tong <[EMAIL PROTECTED]> wrote: > It's a feature. When the selection changes, the user might have entered > something into say a text field. Generally we don't want to lose that > input (because all you want to do may be to show or hide a certain component > depending on the select

Re: CompoundPropertyModel stops working when form validation fails.

2007-10-08 Thread Kent Tong
Fabio Fioretti wrote: > > You were right Kent, thanks a lot! Calling clearInput() in the > updating behavior really fixes the problem. > > What I miss now is why the CompoundPropertyModel breaks if the form is > not manually reset by calling clearInput(). Is it a bug or a feature? > :) > It's

Re: CompoundPropertyModel stops working when form validation fails.

2007-10-08 Thread Fabio Fioretti
On 10/5/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > *BUT*, when the user edits one of the recommendations making errors, > > tries to save it and form validation fails, the panel's > > CompoundPropertyModel seems to detach from the underlying > > AbstractModel and, if the user selects anothe

Re: CompoundPropertyModel stops working when form validation fails.

2007-10-08 Thread Fabio Fioretti
On 10/6/07, Kent Tong <[EMAIL PROTECTED]> wrote: > Even though you're not using wantOnSelectionChangedNotifications(), > what I said applies: you need to call clearInput() like: [CUT] > recommendationForm.clearInput(); //THIS LINE IS WHAT YOU NEED You were right Kent, thanks a lot! Calling clearIn

Re: CompoundPropertyModel stops working when form validation fails.

2007-10-05 Thread Kent Tong
Fabio Fioretti wrote: > > The ListChoice uses the same AbstractModel on which the panel inside > the form builds its CompoundPropertyModel (see my previous posts): > when user's selection changes, the AbstractModel correctly replaces > its object with the newly selected instance and the form get

Re: CompoundPropertyModel stops working when form validation fails.

2007-10-05 Thread Kent Tong
Fabio Fioretti wrote: > > The ListChoice uses the same AbstractModel on which the panel inside > the form builds its CompoundPropertyModel (see my previous posts): > when user's selection changes, the AbstractModel correctly replaces > its object with the newly selected instance and the form get

Re: CompoundPropertyModel stops working when form validation fails.

2007-10-05 Thread Eelco Hillenius
> *BUT*, when the user edits one of the recommendations making errors, > tries to save it and form validation fails, the panel's > CompoundPropertyModel seems to detach from the underlying > AbstractModel and, if the user selects another choice on the > ListChoice, the form is refreshed but it keep

Re: CompoundPropertyModel stops working when form validation fails.

2007-10-05 Thread Fabio Fioretti
On 10/5/07, Kent Tong <[EMAIL PROTECTED]> wrote: Hello, thanks for your reply. > I suppose you're using wantOnSelectionChangedNotifications() to trigger > the refresh? No, I'm not. The ListChoice uses the same AbstractModel on which the panel inside the form builds its CompoundPropertyModel (se

Re: CompoundPropertyModel stops working when form validation fails.

2007-10-05 Thread Kent Tong
Fabio Fioretti wrote: > > This is what I do, basically: > 1) Select a choice from the ListChoice; > 2) The form automatically fills with the data of the selected > recommendation instance; > 3) Modify the data in the form so that validation will fail; > 4) Submit data --> validation fails; > 5)

Re: CompoundPropertyModel stops working when form validation fails.

2007-10-04 Thread Fabio Fioretti
P.S.: I'm using Wicket 1.2.6. Fabio Fioretti - WindoM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: CompoundPropertyModel stops working when form validation fails.

2007-10-04 Thread Fabio Fioretti
On 10/3/07, Martin-2 <[EMAIL PROTECTED]> wrote: [ CUT on useful suggestions: thanks a lot ] > The thing is: it's always better to rely on wicket for state handling and > variable updating. So if two components refer to the same thing, make sure > your model object is the same for both (or a propert

Re: CompoundPropertyModel stops working when form validation fails.

2007-10-03 Thread anita nichols
How do I use datagrid on wicket? I tried the datagrid sample on wicket 1.2 is sooo confusing. Any sugestion where to look

Re: CompoundPropertyModel stops working when form validation fails.

2007-10-03 Thread Martin-2
Ok, now I undestand better. So if the model of your page is complex, just put the complex data in a custom model object and then use page.setModel(new Model(complexObject)). Just move the get/set of your variable into the model object. In the form on submit then do getPage().getModel().getObject

Re: CompoundPropertyModel stops working when form validation fails.

2007-10-03 Thread Fabio Fioretti
On 10/3/07, Martin-2 <[EMAIL PROTECTED]> wrote: > > Hi, Hi, thanks for the quick reply. > if I understand correctly, the page variable and the panel model should > always point to the same thing. Right. > I suggest you give your page a model with > currentRecommendation as model object. Then co

Re: CompoundPropertyModel stops working when form validation fails.

2007-10-03 Thread Martin-2
Hi, if I understand correctly, the page variable and the panel model should always point to the same thing. I suggest you give your page a model with currentRecommendation as model object. Then construct your panel with the same model instance as the page (or wrap it with an IChainingModel) and g