Re: DynamicModel within ListView That Refreshes on ModalWindow Close
You'll have to show us some code (quickstart?), without it it is difficult to understand your problem. Have fun Sven Am 26. September 2019 16:41:47 MESZ schrieb dylanbozeman : >Thank you Ernesto. I will look into this. > >I didn't mean to be rude, I was thankful for the answer. I was just >hopeful >for a followup as the first response didn't address my specific >situation, >so I was trying to be direct. > >-- >Sent from: >http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html > >- >To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >For additional commands, e-mail: users-h...@wicket.apache.org
Re: DynamicModel within ListView That Refreshes on ModalWindow Close
Thank you Ernesto. I will look into this. I didn't mean to be rude, I was thankful for the answer. I was just hopeful for a followup as the first response didn't address my specific situation, so I was trying to be direct. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DynamicModel within ListView That Refreshes on ModalWindow Close
Hi, It is difficult to understand what you are describing. What I guess is you have a panel containing a listview and a label and open some modal to do some operation on listview and after that operation you want the label to show correct number of elements? If so, make the label receive a dynamic model not caching the number of elements (e.g. AbstractReadOnlyModel or LDM). Then I would update the whole panel via AJAX. Side note: no one in this list is getting paid for answering and helping people. Maybe starting you messages with "Thanks for your answer... But unfortunately what you have answered does not help me because ..." might increase the chances you get answered in the future. On Wed, Sep 25, 2019 at 9:00 PM dylanbozeman wrote: > I have a Label within a ListView that is refreshed using Ajax upon the > closing of a ModalWindow that is also part of that ListView. > > Th problem is, the Label isn't refreshing. > > I don't believe I can use a PropertyModel within a ListView and I believe I > need that for the Label to by dynamic. (if I can use a PropertyModel, how > so? because I can't specify - new PropertyModel(this, > "localVariableInsideListView") - because it looks at the class level for > that variable) > > Is there a way around this or something I am not seeing? > > When I do this with a regular Model I am getting: > > [qtp976782276-127] WARN org.apache.wicket.page.PartialPageUpdate - > Component > '[Component id = numberLabel]' not rendered because it was already removed > from page > > > > > -- > Sent from: > http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Regards - Ernesto Reinaldo Barreiro
Re: DynamicModel within ListView That Refreshes on ModalWindow Close
This actually didn't answer my question because what I want to display in the label is not contained within the ModelObject of my ListView items. It's a local list defined within the ListView itself. I want the Label to show a string the represents theList.size() but that list size can change as the user opens a ModalWindow that's available for each item in the ListView. Just using a regular model doesn't work because then it's not dynamic. When I try to use a PropertyModel, that doesn't work because it doesn't let me specify theList.size() as a string. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DynamicModel within ListView That Refreshes on ModalWindow Close
Hi, of course you can use a PropertyModel within a Listview, e.g.: https://github.com/apache/wicket/blob/0a1c33574d08ad9afd2e36a24085d48cdf9efc3f/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java#L213 Or use a CompoundPropertyModel: https://github.com/apache/wicket/blob/0a1c33574d08ad9afd2e36a24085d48cdf9efc3f/wicket-examples/src/main/java/org/apache/wicket/examples/guestbook/GuestBook.java#L58 Or just use a plain model: item.add(new Label("label", () -> item.getModelObject().getVariable())); // Wicket 8 Have fun Sven On 25.09.19 20:00, dylanbozeman wrote: I have a Label within a ListView that is refreshed using Ajax upon the closing of a ModalWindow that is also part of that ListView. Th problem is, the Label isn't refreshing. I don't believe I can use a PropertyModel within a ListView and I believe I need that for the Label to by dynamic. (if I can use a PropertyModel, how so? because I can't specify - new PropertyModel(this, "localVariableInsideListView") - because it looks at the class level for that variable) Is there a way around this or something I am not seeing? When I do this with a regular Model I am getting: [qtp976782276-127] WARN org.apache.wicket.page.PartialPageUpdate - Component '[Component id = numberLabel]' not rendered because it was already removed from page -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org