well, i mentioned "so we can additionally have IFormValidationAware { void onValidate(); }" that works just like the IFormSubmitAware i proposed which is identical to what we are talking about here :)
-IgorOn 8/11/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
is that the same??We are here just tal
is that the same??We are here just talking about IFormValidators that can be in the hierachy of the Formthat will be looked up when a submit happens.. or am i missing something?johan
On 8/11/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
ah, so when i propose it it sucks : http://www.nabble.com/form.
ah, so when i propose it it sucks : http://www.nabble.com/form.onsubmit-vs-button.onsubmit-tf1977859.html#a5426708but when you do it its a please add an rfe? :)
-IgorOn 8/11/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
Please add a RFE if you can.johanOn 8/11/06, Joni Freeman
<[EMAIL PROTECTED]>
Please add a RFE if you can.johanOn 8/11/06, Joni Freeman <[EMAIL PROTECTED]> wrote:
This would be very good too.JoniOn Thu, 2006-08-10 at 23:39 +0200, Johan Compagner wrote:> it does work really differnet then wat we do now.> And with a panel it looks maybe nice. But it is a but more blown up
> co
And probably more elegant that providing automatic cleaning of old
IFormValidators.
Joni
On Fri, 2006-08-11 at 15:13 +0300, Joni Freeman wrote:
> This would be very good too.
>
> Joni
>
> On Thu, 2006-08-10 at 23:39 +0200, Johan Compagner wrote:
> > it does work really differnet then wat we do
This would be very good too.
Joni
On Thu, 2006-08-10 at 23:39 +0200, Johan Compagner wrote:
> it does work really differnet then wat we do now.
> And with a panel it looks maybe nice. But it is a but more blown up
> code.
> Personally i like this then better:
>
> IFormValidator
> {
> validate(
ok, i think I got i now. If using pull models with a "dynamic" ListView
within a form, we have to override getListItemModel() and return a
slightly more sophisticated model. This makes sense. But could it be
possible to consolidate these a bit then. What if ListView would have a
new constructor new
not only that, then you must also make sure the components you will be using in your validate() are valid themselves - an easy thing to forget.-IgorOn 8/10/06,
Johan Compagner <[EMAIL PROTECTED]> wrote:
except that you don't have that extra interface. The component can just be the IFormValidator..
except that you don't have that extra interface. The component can just be the IFormValidator..But i don't think that will solve his first example.. Where he just added 2 textfields in a ListItemand wanted to validate those 2. Which component is then the supplier? One of the textfields?
johanOn 8/1
thats pretty much what joni suggested!-IgorOn 8/10/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
it does work really differnet then wat we do now.And with a panel it looks maybe nice. But it is a but more blown up code.
Personally i like this then better:IFormValidator{ validate(Form)}
MyPanel im
it does work really differnet then wat we do now.And with a panel it looks maybe nice. But it is a but more blown up code.Personally i like this then better:IFormValidator{ validate(Form)}
MyPanel implements IFormValidator{ validate() { validate the panel. }}and the Form search
personally i like the visitor joni proposed - it doesnt need to be part of core but it solves the problem elegantly. i recently factored out form.validateFormValidator(IFormValidator v) that maeks the usecase even simpler to implement.
-IgorOn 8/10/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
and
and besides that the problem still remains if you really throw away a item (in the list of dataview doesn't matter)then the IFormValidator instance is still holdign on the 2 textfields that are invalid now So how to get rid of them?
johanOn 8/10/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
i do
i dont think this is a problem with listview. i think joni misunderstood what setreuseitems() did and that even with pull models it makes sense. in this particular case dataview would suffer the exact same problems as the listview save one - you will not forget to override getlistitemmodel() becaus
> I'm gradually getting to a conclusion that ListView sucks, and should be
> replaced with something more robust.
It does suck that about 25% of the problems people have with Wicket
seems to come from the ListView.
What do you think about the repeater packages? I'm still using
ListViews myself mo
I'm gradually getting to a conclusion that ListView sucks, and should bereplaced with something more robust. A core component should not have
following problems:- you have to remember to call setReuseItems if it is within a formonly if you use form inputs there. If it is in a list but it only shows
On Thu, 2006-08-10 at 01:05 +0200, Johan Compagner wrote:
> This code is extremely ugly!
>
> Everytime you render the page the form gets a new FormValidator
> because everytime the listview is populated..
> Do setReuseItems(boolean reuseItems) to true on the ListView.
setReuseItems does not make
and because the listview might remove items for you as well if they have been deleted from the database by someone else :)-IgorOn 8/9/06, Johan Compagner
<[EMAIL PROTECTED]> wrote:
This code is extremely ugly!Everytime you render the page the form gets a new FormValidator because everytime the lis
This code is extremely ugly!Everytime you render the page the form gets a new FormValidator because everytime the listview is populated..Do setReuseItems(boolean reuseItems) to true on the ListView.And if you remove them yourself you should be able to also delete the validator from the form
because
ivaynberg: any opinions on IFormValidator issue? Currently it is very difficult to work with them if the components in a Form change joni_18912 i think what you suggest works but you do realize that you can implement that yourself by subclassing the form?
we need to discuss this with chillenious
On Tue, 2006-08-08 at 08:36 -0700, Igor Vaynberg wrote:
> this only solves it partially though - added formvalidators are still
> going to be a problem for removed items - not sure about the best
> approach right now - we might have to open more api or make validation
> smarter - lets discuss this
you can pull, you just have to override each item's model. in getListItemModel() return a detachable model that can load the item by pk, otherwise you can run into big problems on the callback.ie: on render you return A,B,C,D
on callback you return A,B,E,F,Dnow if on this callback user clicked on C
Consider following form which uses ListView with pull model.
public MyForm extends Form {
public MyForm(String id, IModel model) {
super(id, model);
add(new ListView("items") {
public IModel getModel() {
return new Model(dao.findAll());
}
23 matches
Mail list logo