Re: Component parent null after replace

2009-10-23 Thread Pedro Santos
findParent( > >> Panel.class)); > >> panel.replaceWith( panelLink.getPanel( > >> panel.getId() ) ); > >> } > >> }; > >> } > >> > >> /** &g

Re: Component parent null after replace

2009-10-22 Thread wicketnewuser
* >> */ >> public static SecurePanelLink createSecurePanelLink( String id, >> Class newPanel, final IModel model ) { >> return new SecurePanelLink( id, newPanel ) { >> /** >> * >> */ >>

Re: Wasp/Swarm Questions was Re: Component parent null after replace

2007-09-12 Thread Maurice Marrink
I realize i did not give any directions about how to use this class but i was hoping the javadoc would speak for itself. Anyway the getReplacementFor is a factory method for creating the panel that will replace the current panel. Looking at your original class i think it should do something like p

Re: Wasp/Swarm Questions was Re: Component parent null after replace

2007-09-12 Thread Anthony Schexnaildre
Sitting down with the SecureContainerLink now. I may be slow but I am a little confused by it's intended use. I am not sure what the implementation of getReplacementFor(.) is meant to look like. -Anthony On Sep 11, 2007, at 11:24 PM, Maurice Marrink wrote: Ok, i just finished a SecureC

Re: Wasp/Swarm Questions was Re: Component parent null after replace

2007-09-11 Thread Anthony Schexnaildre
At first glance this looks more impressive than my first attempt. I am just reorganizing my application by storing the User in the RequestCycle as was suggested earlier and storing the User id in the session. After that I will give this code a spin and let you know my thoughts. -Anthony

Re: Wasp/Swarm Questions was Re: Component parent null after replace

2007-09-11 Thread Maurice Marrink
Ok, i just finished a SecureContainerLink that should do what your SecurePanelLink does, but it is a bit less complex. I haven't checked it in yet or tested it for that matter but hope to hear from you if this is what you meant. If so i will make it a part of wasp. Maurice /* * Licensed to the A

Re: Wasp/Swarm Questions was Re: Component parent null after replace

2007-09-11 Thread Martijn Dashorst
Create your custom request cycle, and add a getter that uses the session's username/id to retrieve the user from the database, and cache it locally. Martijn On 9/11/07, Anthony Schexnaildre <[EMAIL PROTECTED]> wrote: > This makes sense. Where would you stick the user on the requestcycle? > It's n

Re: Wasp/Swarm Questions was Re: Component parent null after replace

2007-09-11 Thread Anthony Schexnaildre
This makes sense. Where would you stick the user on the requestcycle? It's not obvious from the javadocs. Is there a "wicket way"? -Anthony On Sep 11, 2007, at 10:05 AM, Maurice Marrink wrote: Martijn, you are absolutely right, i forgot we moved the user from the session to the requestcycle.

Re: Wasp/Swarm Questions was Re: Component parent null after replace

2007-09-11 Thread Maurice Marrink
Martijn, you are absolutely right, i forgot we moved the user from the session to the requestcycle. Just keep the id for your user in the session and keep the actual user for this request in the requestcycle. This way each thread will have its own instance of the user. Maurice On 9/11/07, Martijn

Re: Wasp/Swarm Questions was Re: Component parent null after replace

2007-09-11 Thread Martijn Dashorst
Just a quick note: storing objects that are not thread safe in your session is asking for trouble. While Wicket does limit page processing to one request at a time, other requests like resources can run in parallel. What does this mean? One thing that comes to mind is that when two requests for th

Re: Wasp/Swarm Questions was Re: Component parent null after replace

2007-09-11 Thread Maurice Marrink
On 9/11/07, Anthony Schexnaildre <[EMAIL PROTECTED]> wrote: > Please hijack away. > > I have been quite happy with Wasp and Swarm. It's simple and painless > but quite flexible. The examples are the life saver though. To be > honest, the security framework is why I chose to use Wicket for this > pr

Wasp/Swarm Questions was Re: Component parent null after replace

2007-09-10 Thread Anthony Schexnaildre
Please hijack away. I have been quite happy with Wasp and Swarm. It's simple and painless but quite flexible. The examples are the life saver though. To be honest, the security framework is why I chose to use Wicket for this project instead of Tapestry. I am however having a few issues fi

Re: Component parent null after replace

2007-09-10 Thread Anthony Schexnaildre
Igor, Thank you for your reply. I did see another message from you recently on this same topic but the key the problem was having the "private Panel panel;" field to store the reference. -Anthony On Sep 9, 2007, at 5:09 PM, Igor Vaynberg wrote: heh, seems a lot of people run into it. the

Re: Component parent null after replace

2007-09-09 Thread Maurice Marrink
Allow me to hijack this topic because my eye sees the magic word ISecureComponent :D Glad to come across another user of Wasp and Swarm. Any comments / questions about them? Maurice On 9/9/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > heh, seems a lot of people run into it. the short is that yo

Re: Component parent null after replace

2007-09-09 Thread Igor Vaynberg
heh, seems a lot of people run into it. the short is that you have to do this: lets say you have a ref to the panel: private Panel panel; what you do is this: panel.replaceWith(new Panel()); and then later again panel.replaceWith(new Panel()); ^ the second time will fail beause you have removed

Component parent null after replace

2007-09-09 Thread Anthony Schexnaildre
I am trying to create a link that will replace one panel with another on the page. This seems as though it should be an easy task but after many attempts and searching the net for examples I have yet to get it working so the replacement can happen more than one without the component becomin