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" ->
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.
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
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.
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 your
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
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 component
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:
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
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
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:
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=ramlastName=babu. after loading the
page with first name and last name field, modified the first name text field
with raj , clicked
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
input type=text id=firstName name=firstName wicket:id=firstName
value= size=20 maxlength=10 /
input type=text id=lastName name=lastName wicket:id=lastName
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.
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
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
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
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();
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
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:
CompoundPropertyModelHomePage model = new
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);
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
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
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.
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.
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
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
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.
Can you show some code?
On Wed, Jun 9, 2010 at 1:01 AM, Bergmann Manfred
m...@software-by-mabe.comwrote:
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
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
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
you are absolutely correct. It worked perfectly thank you.
On Wed, Mar 3, 2010 at 12:07 PM, Xavier López xavil...@gmail.com 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()); ?
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 chinedub...@gmail.com
hello,
i am added a dropdownchoice to a form. The form's model is set to
,
- Alex.
-Original Message-
From: Николай Кучумов [mailto:kuchum...@gmail.com]
Sent: 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
this helps,
- Alex.
-Original Message-
From: Николай Кучумов [mailto:kuchum...@gmail.com]
Sent: 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
,
- Alex.
-Original Message-
From: Николай Кучумов [mailto:kuchum...@gmail.com]
Sent: 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
.
-Original Message-
From: Николай Кучумов [mailto:kuchum...@gmail.com]
Sent: 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
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
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
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
, 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.
And you know what?
I think I'll
Hi Xavier,
I suppose this error comes from having a ModelObject of type
String and also having a ChoiceRenderer refering to 'id' property
your choice is working on SimpleElementDTOs while your Person class has a
String property - this cannot work.
Ideally you would just set a Department
Hi Sven, he stell can write some specialized render... but I think the best
way is you have your depid property of type Department. Than all this thread
would not have started :)
class YourCustomRender
{
@Override
public String getIdValue(Object object, int index)
{
Hi Pedro,
with your condition inside the renderer you've beaten me by originality ;).
But I doubt that the choice will be able to store the selected DTO in
the entity's String property.
Sven
Pedro Santos wrote:
Hi Sven, he stell can write some specialized render... but I think the best
way
Hi Sven, Pedro,
Thanks both for your quick reply.
Ideally you would just set a Department instance into your Person objects
the best way is you have your depid property of type Department
This was the first approach to take into account, but the idea was discarded
in benefit of
Model crModel = new Model(){
getObject(){
return contextData.getDTO(p.getDeptId());
}
setObject(Object o){
p.setDeptId( ((DTO) o).getId());
}
};
On Wed, Nov 4, 2009 at 2:32 PM, Xavier López xavil...@gmail.com wrote:
Hi Sven, Pedro,
Thanks both for your
Wonderful !
Now I understand better. If only I could set the String deptId in an inner
variable inside the Model and link it to the property with another model !
This comes from the fact that the building of the RadioChoice is made inside
a Helper Class...
Probably this is an atrocity, but I
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, Bobbybobby.hubb...@garmin.com wrote:
I am a Wicket newbie and am currently struggling with
CompoundPropertyModel. I have found a
@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, Bobbybobby.hubb...@garmin.com wrote:
I am a Wicket newbie
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
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: CompoundPropertyModel and nested DataView
if you are a newbie do not use CPM
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
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));
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
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
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
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..
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
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
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
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 wizard
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?
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;
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
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 the
[+] 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
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()));
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
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
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 does
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, 2008 at 1:05 PM, Maurice Marrink
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
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 another choice
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 a
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) Select
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 (see
*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 keeps
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 gets
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]
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
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 construct
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
How do I use datagrid on wicket?
I tried the datagrid sample on wicket 1.2 is sooo confusing.
Any sugestion where to look
83 matches
Mail list logo