You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ivoneta <ie...@gmail.com> on 2010/07/21 16:29:37 UTC

AjaxPagingNavigation change style

Hello everyone.

I need to change the wicket navigator style. I read in previous posts the
solution to this so  I created my own subclass AjaxPagingNavigatorModified:

public class AjaxPagingNavigatorModified extends AjaxPagingNavigator{

    public AjaxPagingNavigatorModified(String id, DataView<?> dataView){
        super(id,dataView);
    }
}

And then I created my own markup AjaxPagingNavigatorModified.html

<html xmlns:wicket>
<body>

  <wicket:panel>
	 <wicket:message key="First"/> &nbsp; <wicket:message key="Previous" /> 
    
		   # 5 
    
     <wicket:message key="next"/> &nbsp; <wicket:message key="LastPage"/>  
  </wicket:panel>
</body>
</html>

I placed both of them in the same directory, but it doesn't work. The wicket
navigator has the default style. 

What I missing? What's wrong?

Can anyone help me?
Pleaseeeeee
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxPagingNavigation-change-style-tp2297188p2297188.html
Sent from the Wicket - User 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: AjaxPagingNavigation change style

Posted by blauerberg <bl...@gmail.com>.
Ivoneta,

> MyAjaxPagingNavigator extends from my own PagingNavigator subclass. 
> But I have a problem my own class doesn't work...If I clicked to next
> page, the entire page is refresh,

because AjaxPagingNavigationBehavior call onAjaxEvent() only if Navigator
class is AjaxPagingNavigator.class.
I add 'onclick' behavior as below, it seems work fine.

--------
@Override
protected Link<?> newPagingNavigationIncrementLink(String id, IPageable
pageable, int increment) {
    AjaxPagingNavigationIncrementLink link = new
AjaxPagingNavigationIncrementLink(id, pageable, increment);
    link.add(new MyAjaxBehavior(link, pageable, "onclick") {
        @Override
        protected void onEvent(AjaxRequestTarget target) {
            ....
            navigator.onAjaxEvent(target);
        }
    });
    return link;
}

-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxPagingNavigation-change-style-tp2297188p3086566.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: AjaxPagingNavigation change style

Posted by Fernando Wermus <fe...@gmail.com>.
Ivonetta,
    If you wanna change the styles, you can also add an id attribute to
AjaxPaginavigator and use style css in the way:

#myPageN

{
   your style
}

in this way you would not have to overwrite the markup. It is easier.


On Wed, Jul 21, 2010 at 5:50 PM, Ivoneta <ie...@gmail.com> wrote:

>
> ohh I see the problem. I used a markup for AjaxPagingNavigator, but it
> doesn't have one. The markup is for PagingNavigator.
> I need to use AjaxPagingNavigator, so I implemented my own class
> MyAjaxPagingNavigator - copying exactly the same AjaxPagingNavigator code -
> and then I create a subclass from PagingNavigator, and create the markup.
> MyAjaxPagingNavigator extends from my own PagingNavigator subclass. But I
> have a problem my own class doesn't work...If I clicked to next page, the
> entire page is refresh,   I don't understand why?
>
> Is there another solution to change the AjaxPagingNavigation Style?
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/AjaxPagingNavigation-change-style-tp2297188p2297746.html
> Sent from the Wicket - User 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
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus

Re: AjaxPagingNavigation change style

Posted by Ivoneta <ie...@gmail.com>.
ohh I see the problem. I used a markup for AjaxPagingNavigator, but it
doesn't have one. The markup is for PagingNavigator.
I need to use AjaxPagingNavigator, so I implemented my own class
MyAjaxPagingNavigator - copying exactly the same AjaxPagingNavigator code -
and then I create a subclass from PagingNavigator, and create the markup. 
MyAjaxPagingNavigator extends from my own PagingNavigator subclass. But I
have a problem my own class doesn't work...If I clicked to next page, the
entire page is refresh,   I don't understand why?

Is there another solution to change the AjaxPagingNavigation Style?
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxPagingNavigation-change-style-tp2297188p2297746.html
Sent from the Wicket - User 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