Hi Lorin,

Quoting Igor :

"you cannot update tr/tbody/etc tags via outerhtml "

(see 
http://www.nabble.com/Ajax-Submit-default-to-Non-Ajax-Submit---tf2081101.html#a5751334)

I had a similar problem with TBODY. Although it was supposed not to 
work, it worked in Firefox, but not in IE6 (which was quite confusing). 
For me, the solution was to use the whole table as a target or wrap it 
in another container and use that lat one as teh target. Perhaps you 
could wrap the row content in a container. (I do not know if this would 
cause problem in HTML) Alternatively, you could wrap each TD content in 
a SPAN or DIV and add each one to the target.

I am working myself on such an example (a table where you can for 
example select a row, drag it between others to reorder and drag it on a 
dustbin icon to delete it, and so on, but I have not yet reach that point !)

Pierre-Yves

Lorin Metzger a écrit :
> Hi,
> 
> 
> I was trying to create a DataTable that allowed row selection, by adding 
> a AjaxEventBehavior to the Item of a DataTable.    This works fine with 
> Firefox 1.5, but I'm having problems with IE6.   The onEvent() method 
> gets called when the user clicks a row in the table, but calling 
> AjaxRequestTarget.addComponent(item); does not cause the table item to 
> be updated to indicate that it has been selected in IE6.   Similarly as 
> a test calling AjaxRequestTarget.addJavascript("alert(\"This is a 
> javascript Alert\")"); Does not get executed in IE6.
> 
> 
> This only seems to apply to the table Item or <TR> element, in IE6.  I 
> can add a AjaxEventBehavior to the table itself, and the table gets 
> updated when addComponent() is called, and the addJavascript("") gets 
> executed as expected even in IE6.
> 
> 
> Does anybody know if this is a limitation with IE6?
> 
> 
> A crude example of what I'm trying do is shown below.
> 
> 
> Thanks for any help you can provide.
> 
> 
> int selected_row = -1;
> DataTable table = new DataTable(..., ..., ..., ...)
> {
>     protected Item newRowItem(String id, final int index, IModel model)
>     {
>          final Item item = super.newRowItem(id, index, model);
>          item.add(new AjaxEventBehavior("onclick")
>          {
>               protected void onEvent(AjaxRequestTarget target)
>               {
>                    selected_row = index;
>                    target.addComponent(item);
>                }
>          };
>          item.add(new SimpleAttributeModifier("class", "selected")
>          {
>             public boolean isEnabled()
>             {
>                  return index == selected_index;
>             }
>          };
>      }
> };
> 
> 
> 
> 
> -Lorin
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 
> 


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to