You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by K <ko...@gmail.com> on 2014/12/30 16:56:15 UTC

Re: How do I get the current page?

Hi i am working on the same thing and i have not been able to achieve the
desired outcome. 

i would appericiate any suggestions. i have posted complete details here

http://apache-wicket.1842946.n4.nabble.com/current-page-highlighting-td4668902.html
<http://apache-wicket.1842946.n4.nabble.com/current-page-highlighting-td4668902.html>  

Thanks.

-----
K
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-do-I-get-the-current-page-tp1851661p4668903.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: How do I get the current page?

Posted by Martijn Dashorst <ma...@gmail.com>.
if(item.getModelObject().getDestPage().equals(getPage().getClass())) {
    item.add(AttributeModifier.append("class", "active"));
}

Martijn


On Tue, Dec 30, 2014 at 7:48 PM, K <ko...@gmail.com> wrote:
> Hi Aksarben
>
> i have a web application in which there are six links in main menu. i want
> my app to highlight the link that is selected.
>
> <http://apache-wicket.1842946.n4.nabble.com/file/n4668907/Capture.png>
>
> My code:
>
>
> List<HeaderListItems>  is list of pojo item. my pojo has two fields
> label(String) and destPage(Class)
>
> My Mark-up:
>
>
>
>
> -----
> K
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-do-I-get-the-current-page-tp1851661p4668907.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: How do I get the current page?

Posted by K <ko...@gmail.com>.
Hi Aksarben

i have a web application in which there are six links in main menu. i want
my app to highlight the link that is selected.

<http://apache-wicket.1842946.n4.nabble.com/file/n4668907/Capture.png> 

My code:


List<HeaderListItems>  is list of pojo item. my pojo has two fields
label(String) and destPage(Class) 

My Mark-up: 

   


-----
K
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-do-I-get-the-current-page-tp1851661p4668907.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: How do I get the current page?

Posted by "Richard W. Adams" <RW...@UP.COM>.
Not inclined to click on untrusted links, for security reasons. When you 
say "get the current page", where do you want to get it FROM? If you're in 
the page code itself, it's just "this." If you want it from somewhere 
else, describe what you're trying to achieve.




From:   K <ko...@gmail.com>
To:     users@wicket.apache.org
Date:   12/30/2014 09:58 AM
Subject:        Re: How do I get the current page?



Hi i am working on the same thing and i have not been able to achieve the
desired outcome. 

i would appericiate any suggestions. i have posted complete details here

http://apache-wicket.1842946.n4.nabble.com/current-page-highlighting-td4668902.html

<
http://apache-wicket.1842946.n4.nabble.com/current-page-highlighting-td4668902.html
> 

Thanks.

-----
K
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-do-I-get-the-current-page-tp1851661p4668903.html

Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org




**

This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient.  Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law.  If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies.
**