Re: setEnabled based on Model

2010-10-20 Thread Andrei Razin
Sorry for the Type: I meant: My problem is: setEnabled does not take iModel as argumet. I'd like to do something like setEnabled(new PropertyModel(doc, canDelete) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/setEnabled-based-on-Model-tp3004230p3004245.html Sent

Re: setEnabled based on Model

2010-10-20 Thread Andrei Razin
Thanks a lot -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/setEnabled-based-on-Model-tp3004230p3004356.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe,

Re: setEnabled based on Model

2010-10-20 Thread Andrei Razin
Thanks a lot for the advice. I just implemented it - works. I am still on version 1.4.7, so, couldn't use onConfigure. anyway, here is the code: @Override public boolean isEnabled(){ Object obj = model.getObject(); return

Re: setEnabled based on Model

2010-10-20 Thread Andrei Razin
Sorry, I didn't clarify the reason for Reflection. I created the generic LinkDataColumn, and the link inside does not know about the tipe of class passed into. The page (or form) supplied the Model for the column and the Name like the isEditEnabled property. So, inside the LinkColumn i cannot

Re: setEnabled based on Model

2010-10-20 Thread Andrei Razin
Jeremy. Thanks a lot. It is nice to have a hand when you need it. Appreciate, Andrei. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/setEnabled-based-on-Model-tp3004230p3004897.html Sent from the Users forum mailing list archive at Nabble.com.

Dependent Models

2010-06-27 Thread Andrei Razin
Hello. I have a problem: 1.There are 3 forms on the Page: GroupsForm, UsersForm, DocumentsForm. Each of them reflects a Dcorrespoding Domain object and supposed to have a Model. 2.Functionality: Selecting a Group in GroupsForm should force other 2 forms to show a list of corresponding

Re: Dependent Models

2010-06-27 Thread Andrei Razin
Martin. Thanks for reply. 1. Yes, I think I do use Hollywood principle. The children do not call Parent. So, I do not call Form method from the other Form (through Parent hierarchy) 2. I also do not have references to the Parent (Page, Panel) inside the Form. 3. I try to synchronize forms

Re: Dependent Models

2010-06-27 Thread Andrei Razin
Martin. Thanks for clarification. This will solve the problem for sure and I'll continue this way. The only problem I can envision is - it will make the children not reusable. They will have the references to the parent (Page or/and Panel) and to use them on another page I have to modify the

Re: Dependent Models

2010-06-27 Thread Andrei Razin
One more thing. Just forgot to mention: If I implement the proper interfaces in Parent objects, that will help to make children component reusable. Thanks again for the idea. Andrei. -- View this message in context:

Re: Passing Parameter between Multiple Forms on Page.

2010-06-22 Thread Andrei Razin
Martin. Thanks for your reply. Can you provide some more details about Model Sharing? Where the Model variable should be created – in the Page? And then I can pass it to both forms? Thanks, Andrei. -- View this message in context:

Passing Parameter between Multiple Forms on Page.

2010-06-21 Thread Andrei Razin
Hello. Here is the example of the task I try to accomplish: 1.I have 2 reusable forms on one page: UserGroupsForm and UserListForm 2.The UserGroupsForm is the list of Groups 3.When the user clicks on any Group on UserGroupsForm I want to pass the Group variable to the other form –