You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by miro <mi...@yahoo.com> on 2008/11/13 06:11:33 UTC
on click on a link in a listview works with td but but not with
div or span
my component hirearchy
batchInfoContainer
batchInfos (listview)
batchInfo(link)
batchStatusImg
name
date
html
<code>
<div style="width:100%;height:556;overflow:auto;"
wicket:id="batchInfoContainer">
<table border="1" width="100%" wicket:id="batchInfos">
<tr wicket:id="batchInfo">
<td width="15">
</td>
<td width="50">
<label wicket:id="name"></label>
</td>
<td width="35">
<label wicket:id="date"></label>
</td>
</tr>
</table>
</div>
</code>
the code above works for onclick but the problem is i open a new table
inside batchInfos so i am creating a new table for each listitem which
creates tables with different sizes for each item, to avoid this i tried
with div and span for batchinfos but onclick is not working , any ideas how
to resolve this i tried in both ie and firefox
here is something what i want but this does not work
<div style="width:100%;height:556;overflow:auto;"
wicket:id="batchInfoContainer">
<table>
<tr wicket:id="batchInfos">
<div wicket:id="batchInfo">
<td width="15">
</td>
<td width="50">
<label wicket:id="name"></label>
</td>
<td width="35">
<label wicket:id="date"></label>
</td>
</div>
</tr>
</table>
</div>
--
View this message in context: http://www.nabble.com/on-click-on-a-link-in-a-listview--works-with-td-but-but-not-with-div-or-span-tp20474916p20474916.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: on click on a link in a listview works with td but but not
with div or span
Posted by Michael Sparer <mi...@gmx.at>.
Ah, alright. batchInfos is the listview, so you get a new table for each
listitem and that's not what you want. Either apply "batchInfos" to the tr
or use wicket:container i.e.
[table]
[wicket:container wicket:id="batchInfos"]
[tr wicket:id="batchInfo"]
....
miro wrote:
>
> the problem with this is
> <div
> style="width:100%;height:556;overflow:auto;"
> wicket:id="batchInfoContainer">
> <table
> border="1" width="100%" wicket:id="batchInfos">
>
> <tr wicket:id="batchInfo">
>
> <td width="15">
>
>
> </td>
>
> <td width="50">
>
> <label wicket:id="name"></label>
>
> </td>
>
> <td width="35">
>
> <label wicket:id="date"></label>
>
> </td>
>
> </tr>
> </table>
> </div>
>
>
> batchInfos is a listview so If i my listitem are 4 all the html for
> batchInfos gets repeated so creating a new table for each list item which
> means different tables sizes for each listitem and i want to avoid that
> and one table and tr for batchinfos which menas each listitem will be in
> a new row and all listitems are in one table , how to have this ?
>
> Michael Sparer wrote:
>>
>>
>> I don't quite get what you're trying to achieve. A table inside a table
>> cell? That shouldn't be a problem if you add/replace your components
>> inside the table cell and not the row. But what I see in your markup is
>> that you're nesting a div inside a tr - and that's not allowed. Maybe
>> your browser gets confused with that one ...
>>
>>
>>
>> miro wrote:
>>>
>>> my component hirearchy
>>> batchInfoContainer
>>> batchInfos (listview)
>>> batchInfo(link)
>>> batchStatusImg
>>> name
>>> date
>>> html
>>> <code>
>>> <div style="width:100%;height:556;overflow:auto;"
>>> wicket:id="batchInfoContainer">
>>> <table border="1" width="100%" wicket:id="batchInfos">
>>> <tr wicket:id="batchInfo">
>>> <td width="15">
>>>
>>> </td>
>>> <td width="50">
>>> <label wicket:id="name"></label>
>>> </td>
>>> <td width="35">
>>> <label wicket:id="date"></label>
>>> </td>
>>> </tr>
>>> </table>
>>> </div>
>>> </code>
>>>
>>> the code above works for onclick but the problem is i open a new table
>>> inside batchInfos so i am creating a new table for each listitem
>>> which creates tables with different sizes for each item, to avoid this
>>> i tried with div and span for batchinfos but onclick is not working ,
>>> any ideas how to resolve this i tried in both ie and firefox
>>>
>>> here is something what i want but this does not work
>>>
>>> <div style="width:100%;height:556;overflow:auto;"
>>> wicket:id="batchInfoContainer">
>>> <table>
>>> <tr wicket:id="batchInfos">
>>> <div wicket:id="batchInfo">
>>> <td width="15">
>>>
>>> </td>
>>> <td width="50">
>>> <label wicket:id="name"></label>
>>> </td>
>>> <td width="35">
>>> <label wicket:id="date"></label>
>>> </td>
>>> </div>
>>> </tr>
>>> </table>
>>> </div>
>>>
>>>
>>
>>
>
>
-----
Michael Sparer
http://talk-on-tech.blogspot.com
--
View this message in context: http://www.nabble.com/on-click-on-a-link-in-a-listview--works-with-td-but-but-not-with-div-or-span-tp20474916p20477492.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: on click on a link in a listview works with td but but not
with div or span
Posted by miro <mi...@yahoo.com>.
the problem with this is
<div
style="width:100%;height:556;overflow:auto;" wicket:id="batchInfoContainer">
<table
border="1" width="100%" wicket:id="batchInfos">
<tr wicket:id="batchInfo">
<td width="15">
</td>
<td width="50">
<label wicket:id="name"></label>
</td>
<td width="35">
<label wicket:id="date"></label>
</td>
</tr>
</table>
</div>
batchInfos is a listview so If i my listitem are 4 all the html for
batchInfos gets repeated so creating a new table for each list item which
means different tables sizes for each listitem and i want to avoid that and
one table and tr for batchinfos which menas each listitem will be in a new
row and all listitems are in one table , how to have this ?
Michael Sparer wrote:
>
>
> I don't quite get what you're trying to achieve. A table inside a table
> cell? That shouldn't be a problem if you add/replace your components
> inside the table cell and not the row. But what I see in your markup is
> that you're nesting a div inside a tr - and that's not allowed. Maybe your
> browser gets confused with that one ...
>
>
>
> miro wrote:
>>
>> my component hirearchy
>> batchInfoContainer
>> batchInfos (listview)
>> batchInfo(link)
>> batchStatusImg
>> name
>> date
>> html
>> <code>
>> <div style="width:100%;height:556;overflow:auto;"
>> wicket:id="batchInfoContainer">
>> <table border="1" width="100%" wicket:id="batchInfos">
>> <tr wicket:id="batchInfo">
>> <td width="15">
>>
>> </td>
>> <td width="50">
>> <label wicket:id="name"></label>
>> </td>
>> <td width="35">
>> <label wicket:id="date"></label>
>> </td>
>> </tr>
>> </table>
>> </div>
>> </code>
>>
>> the code above works for onclick but the problem is i open a new table
>> inside batchInfos so i am creating a new table for each listitem
>> which creates tables with different sizes for each item, to avoid this
>> i tried with div and span for batchinfos but onclick is not working , any
>> ideas how to resolve this i tried in both ie and firefox
>>
>> here is something what i want but this does not work
>>
>> <div style="width:100%;height:556;overflow:auto;"
>> wicket:id="batchInfoContainer">
>> <table>
>> <tr wicket:id="batchInfos">
>> <div wicket:id="batchInfo">
>> <td width="15">
>>
>> </td>
>> <td width="50">
>> <label wicket:id="name"></label>
>> </td>
>> <td width="35">
>> <label wicket:id="date"></label>
>> </td>
>> </div>
>> </tr>
>> </table>
>> </div>
>>
>>
>
>
--
View this message in context: http://www.nabble.com/on-click-on-a-link-in-a-listview--works-with-td-but-but-not-with-div-or-span-tp20474916p20477338.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: on click on a link in a listview works with td but but not
with div or span
Posted by Michael Sparer <mi...@gmx.at>.
I don't quite get what you're trying to achieve. A table inside a table cell?
That shouldn't be a problem if you add/replace your components inside the
table cell and not the row. But what I see in your markup is that you're
nesting a div inside a tr - and that's not allowed. Maybe your browser gets
confused with that one ...
miro wrote:
>
> my component hirearchy
> batchInfoContainer
> batchInfos (listview)
> batchInfo(link)
> batchStatusImg
> name
> date
> html
> <code>
> <div style="width:100%;height:556;overflow:auto;"
> wicket:id="batchInfoContainer">
> <table border="1" width="100%" wicket:id="batchInfos">
> <tr wicket:id="batchInfo">
> <td width="15">
>
> </td>
> <td width="50">
> <label wicket:id="name"></label>
> </td>
> <td width="35">
> <label wicket:id="date"></label>
> </td>
> </tr>
> </table>
> </div>
> </code>
>
> the code above works for onclick but the problem is i open a new table
> inside batchInfos so i am creating a new table for each listitem
> which creates tables with different sizes for each item, to avoid this
> i tried with div and span for batchinfos but onclick is not working , any
> ideas how to resolve this i tried in both ie and firefox
>
> here is something what i want but this does not work
>
> <div style="width:100%;height:556;overflow:auto;"
> wicket:id="batchInfoContainer">
> <table>
> <tr wicket:id="batchInfos">
> <div wicket:id="batchInfo">
> <td width="15">
>
> </td>
> <td width="50">
> <label wicket:id="name"></label>
> </td>
> <td width="35">
> <label wicket:id="date"></label>
> </td>
> </div>
> </tr>
> </table>
> </div>
>
>
-----
Michael Sparer
http://talk-on-tech.blogspot.com
--
View this message in context: http://www.nabble.com/on-click-on-a-link-in-a-listview--works-with-td-but-but-not-with-div-or-span-tp20474916p20476991.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