You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by K <ko...@gmail.com> on 2015/02/03 14:48:00 UTC

Removing table coloumn headers in wicket pageablelistview when list is empty

Hi all

I am using Wicket PageableListView to display a list data. If the data list
that is to be displayed inside the table is empty then the table gets
rendered with all the column headers and a label in the first.

is there a way to remove those column headers and labels.

I would also like to know how to add "now records found" in a column under
column headers and labels (similar to DataTable).

Thanks 

-----
K
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Removing-table-coloumn-headers-in-wicket-pageablelistview-when-list-is-empty-tp4669246.html
Sent from the Users forum 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: Removing table coloumn headers in wicket pageablelistview when list is empty

Posted by K <ko...@gmail.com>.
Hi lucast

Thanks for the response. i have tried the exact same thing and had success
with it.

Cheers

On Fri, Feb 6, 2015 at 3:13 PM, lucast [via Apache Wicket] <
ml-node+s1842946n4669328h28@n4.nabble.com> wrote:

> Hi K,
>
> If you want to hide the headers when the table is empty, you could use
> <wicket:enclosure> as suggested on the wicket guide
> <https://wicket.apache.org/guide/guide/single.html#keepControl_9>.
>
> I have used the PagingPage from Wicket Examples (you can download it from
> Apache Wicket page) to illustrate this.
>
> I don't know how you check if the table is empty. I just went for
> dataView.getItemCount().
>
> If you want the table with headers hidden, just call
> dataView.setVisible(false);
> And on HTML, use <wicket:enclosure>.
>
> Example:
>
> <wicket:enclosure child='pageable'>
> 		<table cellspacing="0" class="dataview">
> 			<tr>
> 				<th>Actions</th>
> 				<th>ID</th>
> 				<th>First Name</th>
> 				<th>Last Name</th>
> 				<th>Home Phone</th>
> 				<th>Cell Phone</th>
> 			</tr>
> 			<tr wicket:id="pageable">
> 				<td><span wicket:id="actions">[actions]</span></td>
> 				<td><span wicket:id="contactid">[contactid]</span></td>
> 				<td><span wicket:id="firstname">[firstname]</span></td>
> 				<td><span wicket:id="lastname">[lastname]</span></td>
> 				<td><span wicket:id="homephone">[homephone]</span></td>
> 				<td><span wicket:id="cellphone">[cellphone]</span></td>
> 			</tr>
> 		</table>
> 	</wicket:enclosure>
>
>
> Note that on wicket:enclosure tag, I had to name the child it was
> referring to: pageable. Otherwise, it will throw an exception because
> wicket will not know which element you are referring to, in this case.
>
> Let me know if that works,
>
> Kind regards,
> Lucas
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/Removing-table-coloumn-headers-in-wicket-pageablelistview-when-list-is-empty-tp4669246p4669328.html
>  To unsubscribe from Removing table coloumn headers in wicket
> pageablelistview when list is empty, click here
> <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4669246&code=a29uZGV0aXVkYXlraXJhbkBnbWFpbC5jb218NDY2OTI0NnwxMDIzNzI0OTQ1>
> .
> NAML
> <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


-----
K
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Removing-table-coloumn-headers-in-wicket-pageablelistview-when-list-is-empty-tp4669246p4669330.html
Sent from the Users forum 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: Removing table coloumn headers in wicket pageablelistview when list is empty

Posted by lucast <lu...@hotmail.com>.
Hi K,

If you want to hide the headers when the table is empty, you could use
<wicket:enclosure> as suggested on the  wicket guide
<https://wicket.apache.org/guide/guide/single.html#keepControl_9>  .

I have used the PagingPage from Wicket Examples (you can download it from
Apache Wicket page) to illustrate this.

I don't know how you check if the table is empty. I just went for
dataView.getItemCount().

If you want the table with headers hidden, just call
dataView.setVisible(false);
And on HTML, use <wicket:enclosure>.

Example:


Note that on wicket:enclosure tag, I had to name the child it was referring
to: pageable. Otherwise, it will throw an exception because wicket will not
know which element you are referring to, in this case.

Let me know if that works,

Kind regards,
Lucas


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Removing-table-coloumn-headers-in-wicket-pageablelistview-when-list-is-empty-tp4669246p4669328.html
Sent from the Users forum 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