You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Zoltán Nagy <zb...@gmail.com> on 2011/03/01 15:22:35 UTC
Re: Displaying table in a modalDialog
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 <jo...@gmail.com>:
> 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 <jo...@gmail.com> 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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Displaying table in a modalDialog
Posted by Josh Kamau <jo...@gmail.com>.
Hi James,
I use a form in a moda window. i have also put the modal window inside
another form (i have called it modal window holder)
Josh.
On Tue, Mar 1, 2011 at 10:19 PM, James Carman <ja...@carmanconsulting.com>wrote:
> Did you check the javadocs for ModalWindow?
>
> "If you want to use form in modal window component make sure that you
> put the modal window itself in another form (nesting forms is legal in
> Wicket) and that the form on modal window is submitted before the
> window get closed."
>
> I don't know if that will help or not, but you seem to be using a form
> in the modal window. Also, I believe it works better with pages than
> with panels. You might try that.
>
>
> On Tue, Mar 1, 2011 at 2:14 PM, Josh Kamau <jo...@gmail.com> wrote:
> > Thanks Zultan for your feedback. Striping wicket tags didnt help.
> Anything
> > other than a table works. Does it mean it is "Illegal" to use table tags
> > inside inside a modal dialog?
> >
> > Josh.
> >
> > On Tue, Mar 1, 2011 at 10:09 PM, Zoltán Nagy <zb...@gmail.com>
> wrote:
> >
> >> exactly. the problem is on the client side.
> >>
> >> I don't know a really good solution but these workaround could solve it:
> >> - turn off generating "wicket:" tags:
> >> Application.get().getMarkupSettings().setStripWicketTags(true);
> >> - don't use table at all, use divs instead
> >> - use separate templates for development and production environment.
> >> only in production environment (where rendering "wicket:" tags is
> >> disabled) use table tags.
> >>
> >>
> >> 2011/3/1 Josh Kamau <jo...@gmail.com>:
> >> > 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.
> >> >
> >>
> >>
> >> --
> >> Zoltán Nagy
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: Displaying table in a modalDialog
Posted by James Carman <ja...@carmanconsulting.com>.
Did you check the javadocs for ModalWindow?
"If you want to use form in modal window component make sure that you
put the modal window itself in another form (nesting forms is legal in
Wicket) and that the form on modal window is submitted before the
window get closed."
I don't know if that will help or not, but you seem to be using a form
in the modal window. Also, I believe it works better with pages than
with panels. You might try that.
On Tue, Mar 1, 2011 at 2:14 PM, Josh Kamau <jo...@gmail.com> wrote:
> Thanks Zultan for your feedback. Striping wicket tags didnt help. Anything
> other than a table works. Does it mean it is "Illegal" to use table tags
> inside inside a modal dialog?
>
> Josh.
>
> On Tue, Mar 1, 2011 at 10:09 PM, Zoltán Nagy <zb...@gmail.com> wrote:
>
>> exactly. the problem is on the client side.
>>
>> I don't know a really good solution but these workaround could solve it:
>> - turn off generating "wicket:" tags:
>> Application.get().getMarkupSettings().setStripWicketTags(true);
>> - don't use table at all, use divs instead
>> - use separate templates for development and production environment.
>> only in production environment (where rendering "wicket:" tags is
>> disabled) use table tags.
>>
>>
>> 2011/3/1 Josh Kamau <jo...@gmail.com>:
>> > 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.
>> >
>>
>>
>> --
>> Zoltán Nagy
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Displaying table in a modalDialog
Posted by Josh Kamau <jo...@gmail.com>.
Thanks Zultan for your feedback. Striping wicket tags didnt help. Anything
other than a table works. Does it mean it is "Illegal" to use table tags
inside inside a modal dialog?
Josh.
On Tue, Mar 1, 2011 at 10:09 PM, Zoltán Nagy <zb...@gmail.com> wrote:
> exactly. the problem is on the client side.
>
> I don't know a really good solution but these workaround could solve it:
> - turn off generating "wicket:" tags:
> Application.get().getMarkupSettings().setStripWicketTags(true);
> - don't use table at all, use divs instead
> - use separate templates for development and production environment.
> only in production environment (where rendering "wicket:" tags is
> disabled) use table tags.
>
>
> 2011/3/1 Josh Kamau <jo...@gmail.com>:
> > 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.
> >
>
>
> --
> Zoltán Nagy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: Displaying table in a modalDialog
Posted by Zoltán Nagy <zb...@gmail.com>.
exactly. the problem is on the client side.
I don't know a really good solution but these workaround could solve it:
- turn off generating "wicket:" tags:
Application.get().getMarkupSettings().setStripWicketTags(true);
- don't use table at all, use divs instead
- use separate templates for development and production environment.
only in production environment (where rendering "wicket:" tags is
disabled) use table tags.
2011/3/1 Josh Kamau <jo...@gmail.com>:
> 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.
>
--
Zoltán Nagy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Displaying table in a modalDialog
Posted by Zoltán Nagy <zb...@gmail.com>.
That's right. I haven't seen the attached zip.
2011/3/1 Pedro Santos <pe...@gmail.com>:
> 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.
>
--
Zoltán Nagy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Displaying table in a modalDialog
Posted by Sven Meier <sv...@meiers.net>.
Hi Pedro,
good catch.
I've never liked it that CheckGroup is the only component which uses
setRenderBodyOnly(true) by default :(
Not very consistent and thus something to watch out for.
Regards
Sven
Am 01.03.2011 20:29, schrieb Pedro Santos:
> 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<jo...@gmail.com> 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<jo...@gmail.com> 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<zb...@gmail.com> 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<jo...@gmail.com>:
>>>>> 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<jo...@gmail.com>
>>>> 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: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Displaying table in a modalDialog
Posted by Pedro Santos <pe...@gmail.com>.
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 <jo...@gmail.com> 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 <jo...@gmail.com> 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 <zb...@gmail.com> 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 <jo...@gmail.com>:
>>> > 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 <jo...@gmail.com>
>>> 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: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
--
Pedro Henrique Oliveira dos Santos
Re: Displaying table in a modalDialog
Posted by Josh Kamau <jo...@gmail.com>.
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 <jo...@gmail.com> 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 <zb...@gmail.com> 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 <jo...@gmail.com>:
>> > 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 <jo...@gmail.com>
>> 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: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
Re: Displaying table in a modalDialog
Posted by Josh Kamau <jo...@gmail.com>.
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 <zb...@gmail.com> 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 <jo...@gmail.com>:
> > 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 <jo...@gmail.com>
> 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: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>