Hi Josh, CheckGroup is set to render body only by default. As it correspond
to your table tag, it will be skipped. You can
call frmUserList.setRenderBodyOnly(false) or bind the CheckGroup component
to another tag in the markup, that can be skipped.

On Tue, Mar 1, 2011 at 4:10 PM, Josh Kamau <[email protected]> wrote:

> Hi there,
>
> I havent gotten a solution for this yet. The problem is , when i display a
> table inside a modal dialog, the table tags disappear completly. Attached
> please find a quickstart demonstrating the same
>
> Kind regards.
> Josh.
>
>
> On Tue, Mar 1, 2011 at 8:15 PM, Josh Kamau <[email protected]> wrote:
>
>> Thanks Zoltan,
>>
>> How did you resolve the issue? In my case ,  the entire <table></table>
>> tag is removed. If i put a test label just outside the <table> tag, it is
>> displayed.
>>
>> Josh.
>>
>>
>> On Tue, Mar 1, 2011 at 5:22 PM, Zoltán Nagy <[email protected]> wrote:
>>
>>> Hi!
>>>
>>> Yes, i've also run into this problem.
>>> See the sources of the generated page, something will be between the
>>> table and th/tr/tbody/thead tags. The browser simply drops your
>>> generated list content or  takes it outside of your table tags.
>>>
>>> 2011/2/28 Josh Kamau <[email protected]>:
>>> > Has anyone else experienced this problem?
>>> >
>>> > Or do i need to create a quickstart?
>>> >
>>> > Josh.
>>> >
>>> > On Mon, Feb 28, 2011 at 8:19 PM, Josh Kamau <[email protected]>
>>> wrote:
>>> >
>>> >> Hi there,
>>> >>
>>> >> I am
>>> >>  trying to use a list view in a modal dialog. But all the time the
>>> modal
>>> >> dialog shows everything else except what is inside the <table></table>
>>> tags
>>> >>
>>> >> Here is the panel that am setting as the modal dialog content.
>>> >>
>>> >> Panel.html
>>> >>
>>> >>     <wicket:panel>
>>> >>         <form wicket:id="frmProject">
>>> >>             <div id="content">
>>> >>                 <div style="margin: 2px 0pt 10px;">
>>> >>                     <div style="float: right;">1 selected of 13</div>
>>> >>
>>> >>                     <input type="checkbox" wicket:id="selector"/>
>>> >> Select/Deselect All
>>> >>
>>> >>                 </div>
>>> >>
>>> >>                 <div wicket:id="projectUsers">
>>> >>                     <span wicket:id="lbTest"></span>
>>> >>                 <table class="grid_list_table">
>>> >>                     <thead>
>>> >>                         <tr>
>>> >>                             <th style="width: 10px;"><input
>>> >> type="checkbox"></th>
>>> >>                             <th>First Name<img src="img/desc.png"
>>> >> class="sort"></th>
>>> >>                             <th>Last Name</th>
>>> >>                             <th style="width: 50%;"></th>
>>> >>                         </tr>
>>> >>                     </thead>
>>> >>                     <tbody>
>>> >>                         <tr class="odd" wicket:id="checkList">
>>> >>                             <td><input type="checkbox"
>>> checked="checked"
>>> >> wicket:id="checkbox"></td>
>>> >>                             <td wicket:id="lbFirstName">Bob</td>
>>> >>                             <td wicket:id="lbLastName">Smith</td>
>>> >>                             <td></td>
>>> >>                         </tr>
>>> >>                     </tbody>
>>> >>                 </table>
>>> >>                 </div>
>>> >>             </div>
>>> >>         </form>
>>> >>     </wicket:panel>
>>> >>
>>> >> Here is the Java class
>>> >>
>>> >> package com.printgate.webportal.panels;
>>> >>
>>> >> import java.util.List;
>>> >>
>>> >> import org.apache.wicket.ajax.AjaxRequestTarget;
>>> >> import
>>> org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior;
>>> >> import org.apache.wicket.markup.html.basic.Label;
>>> >> import org.apache.wicket.markup.html.form.Check;
>>> >> import org.apache.wicket.markup.html.form.CheckGroup;
>>> >> import org.apache.wicket.markup.html.form.CheckGroupSelector;
>>> >> import org.apache.wicket.markup.html.form.Form;
>>> >> import org.apache.wicket.markup.html.list.ListItem;
>>> >> import org.apache.wicket.markup.html.list.ListView;
>>> >> import org.apache.wicket.markup.html.panel.Panel;
>>> >> import org.apache.wicket.model.CompoundPropertyModel;
>>> >> import org.apache.wicket.model.LoadableDetachableModel;
>>> >>
>>> >> import com.google.inject.Inject;
>>> >> import com.printgate.webportal.dao.ProjectDao;
>>> >> import com.printgate.webportal.dao.UserDao;
>>> >> import com.printgate.webportal.entities.Project;
>>> >> import com.printgate.webportal.entities.User;
>>> >> import java.util.ArrayList;
>>> >>
>>> >> public class ModifyUsersPanel extends Panel {
>>> >>
>>> >>     /**
>>> >>      *
>>> >>      */
>>> >>     private static final long serialVersionUID = 1L;
>>> >>     private Form<ModifyUsersPanel> frmProject;
>>> >>     private ListView<User> lstUsers;
>>> >>     private CheckGroup<User> chbUsers;
>>> >>     @Inject
>>> >>     private ProjectDao projectDao;
>>> >>     @Inject
>>> >>     private UserDao userDao;
>>> >>     private List<User> projectUsers = new ArrayList<User>();
>>> >>
>>> >>     public ModifyUsersPanel(String id, final Project project) {
>>> >>         super(id);
>>> >>
>>> >>         projectUsers = userDao.getAllUsers();
>>> >>
>>> >>         frmProject = new Form<ModifyUsersPanel>("frmProject", new
>>> >> CompoundPropertyModel<ModifyUsersPanel>(ModifyUsersPanel.this));
>>> >>         frmProject.setOutputMarkupId(true);
>>> >>
>>> >>         chbUsers = new CheckGroup<User>("projectUsers");
>>> >>         chbUsers.add(new AjaxFormChoiceComponentUpdatingBehavior() {
>>> >>
>>> >>             private static final long serialVersionUID = 1L;
>>> >>
>>> >>             @Override
>>> >>             protected void onUpdate(AjaxRequestTarget target) {
>>> >>                 projectDao.updateProject(project);
>>> >>             }
>>> >>         });
>>> >>
>>> >>         lstUsers = new ListView<User>("checkList", new
>>> >> LoadableDetachableModel<List<User>>() {
>>> >>
>>> >>             private static final long serialVersionUID = 1L;
>>> >>
>>> >>             @Override
>>> >>             protected List<User> load() {
>>> >>                 return userDao.getAllUsers();
>>> >>             }
>>> >>         }) {
>>> >>
>>> >>             /**
>>> >>              *
>>> >>              */
>>> >>             private static final long serialVersionUID = 1L;
>>> >>
>>> >>             @Override
>>> >>             protected void populateItem(ListItem<User> item) {
>>> >>
>>> >>                 item.add(new Check<User>("checkbox",
>>> item.getModel()));
>>> >>                 item.add(new Label("lbFirstName",
>>> >> item.getModelObject().getFirstname()));
>>> >>                 item.add(new Label("lbLastName",
>>> >> item.getModelObject().getLastname()));
>>> >>             }
>>> >>         };
>>> >>         lstUsers.setReuseItems(true);
>>> >>         chbUsers.add(lstUsers);
>>> >>         frmProject.add(chbUsers);
>>> >>         frmProject.add(new CheckGroupSelector("selector", chbUsers));
>>> >>
>>> >>         chbUsers.add(new Label("lbTest", "This tests the presence of
>>> the
>>> >> form after the table"));
>>> >>
>>> >>         add(frmProject);
>>> >>     }
>>> >>
>>> >>     public List<User> getProjectUsers() {
>>> >>         return projectUsers;
>>> >>     }
>>> >>
>>> >>     public void setProjectUsers(List<User> projectUsers) {
>>> >>         this.projectUsers = projectUsers;
>>> >>     }
>>> >> }
>>> >>
>>> >>
>>> >> Any help will be appreciated.
>>> >>
>>> >> Josh.
>>> >>
>>> >
>>>
>>>
>>>
>>> --
>>> Zoltán Nagy
>>>
>>> ---------------------------------------------------------------------
>>> 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]
>



-- 
Pedro Henrique Oliveira dos Santos

Reply via email to