You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Piotr Jakubowski <pi...@gmail.com> on 2009/01/08 13:15:49 UTC
Empty List
Hello,
As I recently discovered XHTML specification does not allow empty lists. So
the markup like <ul> </ul> is invalid. So there appears a problem with
ListViews, because when the list passed to the ListView constructor happen
to be empty we end up with invalid markup.
Of course there is workaround like (let's say that we have the ListView with
wicket:id="myList")
<ul>
<li class="invisible" style="display: none"/>
<li wicket:id="myList"/>
</ul>
But it is neither very elegant nor convenient. It is not very appealing to
me to seek for every list in the project and add this line.
Do you have any other suggestion of doing this?
--
View this message in context: http://www.nabble.com/Empty-List-tp21350751p21350751.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: Empty List
Posted by Piotr Jakubowski <pi...@gmail.com>.
I was thinking about, but I have to manually override the isVisible method of
every ListView I create (or create my own class that extends the ListView).
Maybe ListView should by default have the isVisibility method defined so it
returns true if the list is empty? :) Just a humble suggestions for wicket
enhancement :)
Martijn Dashorst wrote:
>
> see wicket:enclosure [1]
>
> Martijn
>
> [1] http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html
>
> On Thu, Jan 8, 2009 at 1:15 PM, Piotr Jakubowski <pi...@gmail.com> wrote:
>>
>> Hello,
>> As I recently discovered XHTML specification does not allow empty lists.
>> So
>> the markup like <ul> </ul> is invalid. So there appears a problem with
>> ListViews, because when the list passed to the ListView constructor
>> happen
>> to be empty we end up with invalid markup.
>>
>> Of course there is workaround like (let's say that we have the ListView
>> with
>> wicket:id="myList")
>> <ul>
>> <li class="invisible" style="display: none"/>
>> <li wicket:id="myList"/>
>> </ul>
>> But it is neither very elegant nor convenient. It is not very appealing
>> to
>> me to seek for every list in the project and add this line.
>>
>> Do you have any other suggestion of doing this?
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Empty-List-tp21350751p21350751.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
>>
>>
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.3.4 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Empty-List-tp21350751p21351128.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: Empty List
Posted by Martijn Dashorst <ma...@gmail.com>.
see wicket:enclosure [1]
Martijn
[1] http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html
On Thu, Jan 8, 2009 at 1:15 PM, Piotr Jakubowski <pi...@gmail.com> wrote:
>
> Hello,
> As I recently discovered XHTML specification does not allow empty lists. So
> the markup like <ul> </ul> is invalid. So there appears a problem with
> ListViews, because when the list passed to the ListView constructor happen
> to be empty we end up with invalid markup.
>
> Of course there is workaround like (let's say that we have the ListView with
> wicket:id="myList")
> <ul>
> <li class="invisible" style="display: none"/>
> <li wicket:id="myList"/>
> </ul>
> But it is neither very elegant nor convenient. It is not very appealing to
> me to seek for every list in the project and add this line.
>
> Do you have any other suggestion of doing this?
>
>
> --
> View this message in context: http://www.nabble.com/Empty-List-tp21350751p21350751.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
>
>
--
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org