Label component is used in addition to t5 Field component, so for parameter is required and Field with defined identifier should exist. In case if you need just an html label element you can use html tag <label>. As I understand in your code snippet you need something like <span> with some styling:
<span class="label"> to </span> To make your code work you should also replace expressions with properties from java class: <td colspan="0"> <div style="font-weight:bold; text-align: center;"> <t:outputRaw value="${fromValue}"/> <span class="label"> to </span> <t:outputRaw value="${toValue}"/> <span class="label"> of </span> <span class="label">${count}</span> </div> </td> public class MyComponent { //... public int getFromValue() { return cursor + 1; } public int getToValue() { return Math.min(cursor + itemsPerPage, collection.size()); } public int getCount() { return collection.size(); } } As you use just a numbers in your OutputRaw components you can replace them with simple expression: <td colspan="0"> <div style="font-weight:bold; text-align: center;"> ${fromValue}" <span class="label"> to </span> ${toValue} <span class="label"> of </span> <span class="label">${count}</span> </div> </td> And in the end of all this, you can introduce message in your component message catalog: MyComponent.properties: pager-format=%s <span class="label"> to </span> %s <span class="label"> of </span> <span class="label">%s</span> MyComponent.java: public class MyComponent { //... @Inject private Messages messages; public int getFromValue() { return cursor + 1; } public int getToValue() { return Math.min(cursor + itemsPerPage, collection.size()); } public int getCount() { return collection.size(); } public String getPagerMarkup() { messages.format("pager-format", getFromValue(), getToValue(), getCount()); } } MyCompoent.tml: <td colspan="0"> <div style="font-weight:bold; text-align: center;"> <t:outputRaw value="${pagerMarkup}"/> </div> </td> In this case we use OutputRaw as we have html markup in the rendered value. On Mon, Oct 1, 2012 at 8:00 AM, Ken in Nashua <kcola...@live.com> wrote: > > If I specify autoPagingContent as the for value... it gives same error > asking for embedded component. > > whats the definition of an embedded component? > > Any ideas how to get around this? > > Should I just get rid of using the Labels ? > > kcola...@live.com > > > > > From: kcola...@live.com > To: users@tapestry.apache.org > Subject: Label component usage > Date: Mon, 1 Oct 2012 00:55:52 -0400 > > > > > > Folks, > > I am using the Label component to model some space maintainers in between > the postions of components. kinda like filling up empty table columns ? > > <td colspan="0"> > <div style="font-weight:bold; text-align: center;"> > <t:Label for=""/> > > <t:outputRaw value="${cursor} + 1"/> > > <t:Label for=""> to </t:Label> > > <t:if test="cursor"> > <t:outputRaw value="${cursor} + > min(collection.size,itemsPerPage) "/> > <p:else> > <t:outputRaw value="${cursor} + > min(collection.size,itemsPerPage) "/> > </p:else> > </t:if> > > <t:Label for=""> of </t:Label> > <t:Label for="">collection.size</t:Label> > <t:Label for=""/> > </div> > </td> > > But the Label component is being annoying. Why do I have to anchor it to > an id with the for parameter. Is there some animation I am unexpectedly > getting that it wants to do under the hood ? > > All I want to do is animate some empty NOP label spots and use a few > labels to render some text. > > What do i do in the case where I dont have an ID? > > Thanks in advance... > > kcola...@live.com > > > > > -- BR Ivan