Im replying inline.
On Sat, Jun 14, 2008 at 5:54 PM, renaud.houver <[EMAIL PROTECTED]> wrote:
>
> Hi Nino,
>
> What have you tested exactly ?
Well, that the examples (wicket stuff input contrib examples / the stuff at
polfoto worked)
>
> What I am doing is binding an InputBehavior with the increment links of a
> PagingNavigator
>
> public class PolFotoPagingNavigator extends PagingNavigator {
>
>
> public PolFotoPagingNavigator(String id, IPageable pageable, boolean
> eventListener) {
> super(id, pageable);
>
> if (eventListener) {
> visitChildren(PagingNavigationIncrementLink.class,
> new IVisitor() {
>
> public Object component(Component component)
> {
> PagingNavigationIncrementLink link =
> (PagingNavigationIncrementLink)
> component;
> if (link.getId().equals("next")) {
> link.add(new
> InputBehavior(new KeyType[] { KeyType.Right
> },EventType.click));
> }
> if (link.getId().equals("prev") ) {
> link.add(new
> InputBehavior(new KeyType[] { KeyType.Left
> },EventType.click));
> }
> return null;
> }
> });
> }
> }
>
> Using EventType.click generates some javascript like
> .... shortcut.add("Left",function() {
>
> document.getElementById('prev1').click();
> },{ ....
> which works fine in IE, also when reaching the paginating boundary but
> function click does not exists in FF.
I think it's because anchors are special, now I didnt throw any checking in
to check if it were ancors. So probably the solution are whats done below.
>
>
> Not using EventType generates some javascript like
> .....shortcut.add("Right",function() {
>
>
> window.location=document.getElementById('next40').href;
>
> },{....
> Which works fine both in FF and IE until you reach the paginating boundary,
> where the next or prev link are not on the page.
Did you see the documentation/javadoc/source about the autohooking? This is
what I call this. But again this should actually work if you set the
behaviors visibility to false when the links arent present and the key
should not work. Or just dont add it. If it's something you need fixed fast,
I can come by later this week and sort it out. Otherwise we can just
continue here..
>
>
> Renaud
>
> Nino.Martinez wrote:
> >
> > Hi Renaud
> >
> > That sounds wierd, I tested it with both IE, safari and FF at the
> > creation time.. Havent used it with PagingNavigationIcnrementLink
> > though.. Is it because the id's of the links change so that they are no
> > longer valid when you click them?
> >
> > Could you provide an code snipplet of what youre doing?
> >
> >
> > renaud.houver wrote:
> >> Hi,
> >>
> >> I am using InputBehavior() from wicket-contrib-input-event with
> >> EventType.click to bind a shortcut to a PagingNavigationIncrementLink.
> >> EventType.click is using a javascript function click() which only exists
> >> in
> >> IE and does not work in FF.
> >> FF would say click is not a function.
> >> Not using any eventtype would work but when reaching the end of the
> >> pagination, the "next" link is invisible
> >> and the shortcut will fail.
> >>
> >> Does anyone knows a good way to do that ? ?
> >>
> >> Thanks,
> >> Renaud
> >>
> >
> > --
> > -Wicket for love
> >
> > Nino Martinez Wael
> > Java Specialist @ Jayway DK
> > http://www.jayway.dk
> > +45 2936 7684
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/InputBehavior-EventType.click-only-works-in-IE-tp17794918p17840983.html
> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>
>