Nevermind, solved it! Thanks Wayland! :)

Nima Boustanian wrote:

I'm using Tapestry 4.

What is weird is that I can output the data using a @contrib:Table element like this:
<table jwcid="@contrib:Table" id="groupsPlaceHolder" source="ognl:groups"
                               columns="listOfGroups:Name:name"

But I cannot go like this:
//Home.java
public List getPublicGroups() {
       return getGroupManager().getGroups();
}

//Home.html
..
<tr jwcid="@For" source="ognl:publicGroups" value="ognl:group" element="tr">
   <td><span jwcid="@Insert" value="ognl:group.name"/></td>
 </table>
..

Because then I get a "failed to lazily initialize a collection of role" error.

Is there something I have forgotten to take into consideration maybe??


Wayland Chan wrote:

What version of Tapestry are you using?

<input type ="checkbox" jwcid="@Checkbox" selected="ognl:groups.name" />

Shouldn't that 'selected' attribute be given a boolean value? It looks like
you're
assigning a String to it.


On 3/9/06, Nima Boustanian <[EMAIL PROTECTED]> wrote:
Hey all

I'm trying to generate a couple of checkboxes dynamically via the
pagebeginrender listener... But it doesn't output anything!
I don't get any errors, the page just stays blank, any ideas on what
might be wrong?

//Method for grabbing groups - Home.java
public List getGroups() {
      return getGroupManager().getGroups();
  }

public void pageBeginRender(PageEvent event) {
      getGroups();
  }

//Home.html
<span jwcid="loop">
               <p>
              <input type ="checkbox" jwcid="@Checkbox"
selected="ognl:groups.name" /> <!--Checkbox-->
              <br/>
              <span jwcid="@Insert" value="ognl:groups.name"/>
<!--Checkbox label -->
              </p>
</span>

/Home.page
<!-- Dynamic group list -->
      <property name="group"/>
      <component id="loop" type="Foreach">
      <binding name="source" value="group"/>
      <binding name="value" value="group"/>
</component>





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to