RE: Enabling compoents based on Wicket URI path?
Not to come across snide but of course I know how to set a component to invisible. I need to know how to get the current page URL/URI as the page loads - remember that the navigator is only a panel and can be inside of many pages. Is this more clear? Thanks for trying to help. Michael -Original Message- From: David Leangen [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2008 6:14 PM To: users@wicket.apache.org Subject: RE: Enabling compoents based on Wicket URI path? A little bit confused... perhaps I or you misunderstood. I'm using a textfield in the 'navigator' section of my site. So, if a particular URL is being accessed (.../foo or .../bar) then I want to hide the textfield. Otherwise the navigator shows the textfield. Does that make more sense? In any case, the way you would show/hide any component is by overriding the isVisible method: @Override public boolean isVisible() { // do your test here } So you need some way of testing this. The way to do that is using PageParameters with one of the IndexedCodingStrategies. Make more sense? Or do you need more info? Cheers, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Enabling compoents based on Wicket URI path?
((webrequest)getrequest()).gethttpservletrequest().getrequesturi() -igor On Thu, Jul 3, 2008 at 7:13 AM, Michael Mehrle [EMAIL PROTECTED] wrote: Not to come across snide but of course I know how to set a component to invisible. I need to know how to get the current page URL/URI as the page loads - remember that the navigator is only a panel and can be inside of many pages. Is this more clear? Thanks for trying to help. Michael -Original Message- From: David Leangen [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2008 6:14 PM To: users@wicket.apache.org Subject: RE: Enabling compoents based on Wicket URI path? A little bit confused... perhaps I or you misunderstood. I'm using a textfield in the 'navigator' section of my site. So, if a particular URL is being accessed (.../foo or .../bar) then I want to hide the textfield. Otherwise the navigator shows the textfield. Does that make more sense? In any case, the way you would show/hide any component is by overriding the isVisible method: @Override public boolean isVisible() { // do your test here } So you need some way of testing this. The way to do that is using PageParameters with one of the IndexedCodingStrategies. Make more sense? Or do you need more info? Cheers, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Enabling compoents based on Wicket URI path?
Last night I figured this out: final WebRequestCycle cycle = (WebRequestCycle)RequestCycle.get(); final IRequestTarget target = cycle.getRequestTarget(); String path = urlFor(target).toString(); Your way is better. Igor saves the day again - thanks a lot mate. Michael -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, July 03, 2008 7:32 AM To: users@wicket.apache.org Cc: [EMAIL PROTECTED] Subject: Re: Enabling compoents based on Wicket URI path? ((webrequest)getrequest()).gethttpservletrequest().getrequesturi() -igor On Thu, Jul 3, 2008 at 7:13 AM, Michael Mehrle [EMAIL PROTECTED] wrote: Not to come across snide but of course I know how to set a component to invisible. I need to know how to get the current page URL/URI as the page loads - remember that the navigator is only a panel and can be inside of many pages. Is this more clear? Thanks for trying to help. Michael -Original Message- From: David Leangen [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2008 6:14 PM To: users@wicket.apache.org Subject: RE: Enabling compoents based on Wicket URI path? A little bit confused... perhaps I or you misunderstood. I'm using a textfield in the 'navigator' section of my site. So, if a particular URL is being accessed (.../foo or .../bar) then I want to hide the textfield. Otherwise the navigator shows the textfield. Does that make more sense? In any case, the way you would show/hide any component is by overriding the isVisible method: @Override public boolean isVisible() { // do your test here } So you need some way of testing this. The way to do that is using PageParameters with one of the IndexedCodingStrategies. Make more sense? Or do you need more info? Cheers, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Enabling compoents based on Wicket URI path?
Anybody? I couldn't find anything digging around in the archives... -Original Message- From: Michael Mehrle [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2008 11:13 AM To: users@wicket.apache.org Subject: Enabling compoents based on Wicket URI path? I need to hide a textfield based on the URI path of the page that's being visited. For instance: http://www.mysite.com/app/foo (hide the field) http://www.mysite.com/app/bar (hide the field) http://www.mysite.com/app/* (any other path, show the field). I don't want to use the HTTP URI var since I would have to change that everytime I change wicket URI paths. What approach would you guys suggest? Thanks, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Enabling compoents based on Wicket URI path?
So essentially, you need some variable to hold state and based on the value of that variable, you show or hide a component, right? Just use an IndexedParamCodingStrategy. Does that make sense, or do you need more details? On Wed, 2008-07-02 at 11:12 -0700, Michael Mehrle wrote: I need to hide a textfield based on the URI path of the page that's being visited. For instance: http://www.mysite.com/app/foo (hide the field) http://www.mysite.com/app/bar (hide the field) http://www.mysite.com/app/* (any other path, show the field). I don't want to use the HTTP URI var since I would have to change that everytime I change wicket URI paths. What approach would you guys suggest? Thanks, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Enabling compoents based on Wicket URI path?
A little bit confused... perhaps I or you misunderstood. I'm using a textfield in the 'navigator' section of my site. So, if a particular URL is being accessed (.../foo or .../bar) then I want to hide the textfield. Otherwise the navigator shows the textfield. Does that make more sense? Michael -Original Message- From: David Leangen [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2008 5:41 PM To: users@wicket.apache.org Subject: Re: Enabling compoents based on Wicket URI path? So essentially, you need some variable to hold state and based on the value of that variable, you show or hide a component, right? Just use an IndexedParamCodingStrategy. Does that make sense, or do you need more details? On Wed, 2008-07-02 at 11:12 -0700, Michael Mehrle wrote: I need to hide a textfield based on the URI path of the page that's being visited. For instance: http://www.mysite.com/app/foo (hide the field) http://www.mysite.com/app/bar (hide the field) http://www.mysite.com/app/* (any other path, show the field). I don't want to use the HTTP URI var since I would have to change that everytime I change wicket URI paths. What approach would you guys suggest? Thanks, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Enabling compoents based on Wicket URI path?
A little bit confused... perhaps I or you misunderstood. I'm using a textfield in the 'navigator' section of my site. So, if a particular URL is being accessed (.../foo or .../bar) then I want to hide the textfield. Otherwise the navigator shows the textfield. Does that make more sense? In any case, the way you would show/hide any component is by overriding the isVisible method: @Override public boolean isVisible() { // do your test here } So you need some way of testing this. The way to do that is using PageParameters with one of the IndexedCodingStrategies. Make more sense? Or do you need more info? Cheers, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]