Keep css changes after setResponsePage

2012-06-24 Thread sabina_12
Hello!

I have a list with markup
ul
li  Page1  /li
li  Page2  /li
   /ul
and class current highlights the current page in my menu.
Then I add the link for one Page2:
page2Link = new AjaxLink(page2) {

@Override
public void onClick(AjaxRequestTarget target) {
this.add(new AttributeAppender(class, new
Model(current),  )); //adding the current class
page1.add(new CssClassRemover(current)); //removing the
current class from page1 li
target.addComponent(listContainer);   
setResponsePage(Page1.class);
}
};

After I add the setResponsePage(), the css class changes are not visible
anymore. Is there a way to
make the chages to my list remain after calling setResponsePage?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Keep-css-changes-after-setResponsePage-tp4650206.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



Re: Keep css changes after setResponsePage

2012-06-24 Thread sabina_12
At Page1 in list I had class=current and wicket:id=page1, they didn't
show up
in my intitial post

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Keep-css-changes-after-setResponsePage-tp4650206p4650207.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



get PageReference for ModalWinow

2012-06-01 Thread sabina_12
Hello,

I have a ModalWindow which can be opened from two different places in my
application.

modalWindowForUpload.setPageCreator(new ModalWindow.PageCreator() {
@Override
public Page createPage() {
try {
return new
UploadFisierModal(ClassName1.this.getPageReference(),modalWindowForUpload);
} catch (Exception ex) {
System.out.println(ex.getMessage());
return null;
}
}
});
And the constructor of the modal window:
public UploadFisierModal(final PageReference modalWindowPage,  
final ModalWindow window)

My question is how can i know from my ModalWindow which page opened it. Is
there a way to compare the PageReference modalWindowPage with ClassName1?

Thanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/get-PageReference-for-ModalWinow-tp4649648.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