Re: IndicatingAjaxLink with BaseTree appends after /td

2008-08-19 Thread Matej Knopp
Hi,

This is caused by the fact that component border is rendered
after/before behaviors. We can't really change this for 1.3 because it
could break existing applications. I have changed the rendering order
in trunk (1.4) though.

-Matej

On Mon, Aug 18, 2008 at 3:36 PM, Kaspar Fischer [EMAIL PROTECTED] wrote:
 I override BaseTree's newLink() to return an IndicatingAjaxLink:

@Override
public MarkupContainer newLink(String id, final ILinkCallback callback)
{
  return new IndicatingAjaxLink(id)
  {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target)
{
  callback.onClick(target);
}
  };
}

 Strangely, this produces markup like this:

 div id=tree1c7
  table style=display:none id=tree1c7_0
  /table
  table class=wicket-tree-content id=tree1c7_1
   tr
td class=half-line
 a class=junction-open href=# id=junctionLink1c8
 onclick=wicketShow('junctionLink1c8--ajax-indicator');var
 wcall=wicketAjaxGet('../?wicket:interface=html:14:left-column:1:item:tree:i:1:junctionLink::IBehaviorListener:0:1',function(){;wicketHide('junctionLink1c8--ajax-indicator');}.bind(this),function()
 { ;wicketHide('junctionLink1c8--ajax-indicator');}.bind(this), function()
 {return Wicket.$('junctionLink1c8') != null;}.bind(this));return
 !wcall;/a
/td
span style=display:none; class=wicket-ajax-indicator
 id=junctionLink1c8--ajax-indicatorimg
 src=../resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator.gif
 alt=//span
td
...

 Notice that the indicater span output by IndicatingAjaxLink's
 WicketAjaxIndicatorAppender
 comes after the /td and not after the /a as I would have expected.

 Is this a bug?

 Thanks,
 Kaspar

 -
 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: IndicatingAjaxLink with BaseTree appends after /td

2008-08-19 Thread Kaspar Fischer


On 19.08.2008, at 12:03, Matej Knopp wrote:


Hi,

This is caused by the fact that component border is rendered
after/before behaviors. We can't really change this for 1.3 because it
could break existing applications. I have changed the rendering order
in trunk (1.4) though.

-Matej


Great! Thanks a lot for looking into this.

Kaspar

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



IndicatingAjaxLink with BaseTree appends after /td

2008-08-18 Thread Kaspar Fischer

I override BaseTree's newLink() to return an IndicatingAjaxLink:

@Override
public MarkupContainer newLink(String id, final ILinkCallback  
callback)

{
  return new IndicatingAjaxLink(id)
  {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target)
{
  callback.onClick(target);
}
  };
}

Strangely, this produces markup like this:

div id=tree1c7
 table style=display:none id=tree1c7_0
 /table
 table class=wicket-tree-content id=tree1c7_1
   tr
td class=half-line
 a class=junction-open href=# id=junctionLink1c8  
onclick=wicketShow('junctionLink1c8--ajax-indicator');var  
wcall=wicketAjaxGet('../?wicket:interface=html:14:left-column: 
1:item:tree:i:1:junctionLink::IBehaviorListener:0:1',function() 
{;wicketHide('junctionLink1c8--ajax- 
indicator');}.bind(this),function() { ;wicketHide('junctionLink1c8-- 
ajax-indicator');}.bind(this), function() {return Wicket.$ 
('junctionLink1c8') != null;}.bind(this));return !wcall;/a

/td
span style=display:none; class=wicket-ajax-indicator  
id=junctionLink1c8--ajax-indicatorimg src=../resources/ 
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator.gif  
alt=//span

td
...

Notice that the indicater span output by IndicatingAjaxLink's  
WicketAjaxIndicatorAppender

comes after the /td and not after the /a as I would have expected.

Is this a bug?

Thanks,
Kaspar

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]