I'm sure one of the core devs can slap me upside the head here and say "why didn't you do it this way, doofus", but again I had a deadline and I just needed to get it working. By no means do I know each and every bit of the framework, so sometimes I come up with something that could have been better done with a built-in framework feature or two. In short, there very well may be a built-in solution to this problem. If there is, I don't know about it. I do know there has been some work done recently to introduce an event facility into the framework.
On Mon, Apr 4, 2011 at 1:24 PM, fernandospr <fernando...@gmail.com> wrote: > I guess this is a common functionality. > It's weird it was not included as part of the framework, right? > > > > On Mon, Apr 4, 2011 at 2:19 PM, James Carman [via Apache Wicket] < > ml-node+3426105-1808787178-210...@n4.nabble.com> wrote: > >> That was a tricky part, getting the selected or created value back to >> the original page. Perhaps it would have been better implemented with >> an event-driven approach, but I just went with what I could get >> working quickly. I'm sure I could come up with something more elegant >> if I had the time to ponder. :) >> >> >> On Mon, Apr 4, 2011 at 1:08 PM, fernandospr <[hidden >> email]<http://user/SendEmail.jtp?type=node&node=3426105&i=0&by-user=t>> >> wrote: >> >> > Thanks James. I think I got it. >> > >> > I think the key part is this: >> > ((FooSelectionListener) page).fooSelected(foo); >> > >> > I guess "page" is the page that starts the loop and is waiting for a >> > selection, that is why it implements fooSelected. >> > >> > I think I'll implement something similar but instead of using a foo >> object >> > for fooSelected, I'll use an id. Then redirect to the original "page" and >> my >> > fooSelected would load it from the database. >> > >> > Though, I'm not sure if the original "page" would be automatically >> refreshed >> > with the selection. >> > >> > I will have to try. >> > >> > Thanks. >> > >> > -- >> > View this message in context: >> http://apache-wicket.1842946.n4.nabble.com/Page-to-select-something-and-use-the-selection-in-another-page-tp3409591p3426075.html<http://apache-wicket.1842946.n4.nabble.com/Page-to-select-something-and-use-the-selection-in-another-page-tp3409591p3426075.html?by-user=t> >> >> > Sent from the Users forum mailing list archive at Nabble.com. >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: [hidden >> > email]<http://user/SendEmail.jtp?type=node&node=3426105&i=1&by-user=t> >> > For additional commands, e-mail: [hidden >> > email]<http://user/SendEmail.jtp?type=node&node=3426105&i=2&by-user=t> >> > >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden >> email]<http://user/SendEmail.jtp?type=node&node=3426105&i=3&by-user=t> >> For additional commands, e-mail: [hidden >> email]<http://user/SendEmail.jtp?type=node&node=3426105&i=4&by-user=t> >> >> >> >> ------------------------------ >> If you reply to this email, your message will be added to the discussion >> below: >> >> http://apache-wicket.1842946.n4.nabble.com/Page-to-select-something-and-use-the-selection-in-another-page-tp3409591p3426105.html >> To unsubscribe from Page to select something and use the selection in >> another page, click >> here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3409591&code=ZmVybmFuZG9zcHJAZ21haWwuY29tfDM0MDk1OTF8LTIwODA5MTEwOTU=>. >> >> > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Page-to-select-something-and-use-the-selection-in-another-page-tp3409591p3426121.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > 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