Re: Add components inside the footer and header of a Modal
On Thu, Aug 27, 2015 at 12:02 PM, Marco Di Sabatino Di Diodoro < marco.disabat...@tirasa.net> wrote: > Hi Martin, > > > Il 24/08/2015 22:06, Martin Grigorov ha scritto: > >> Hi, >> >> On Mon, Aug 24, 2015 at 4:05 PM, Marco Di Sabatino Di Diodoro < >> marco.disabat...@tirasa.net> wrote: >> >> Hi Martin, >>> >>> Il 24/08/2015 12:16, Martin Grigorov ha scritto: >>> >>> Hi, 1. File an issue so that becomes more user friendly. I opened the issue on git >>> >>> 2. You can roll MyModal that extends from Modal and has MyModal.html with >>> the extra components in header and footer. In MyModal#onInitialize() you can use get("header").add(anExtraHeaderComponent) I followed your suggestion and I added a new button in the footer. At >>> first time I can see my Modal. If I close and reopen I have this >>> exception: >>> org.apache.wicket.markup.MarkupNotFoundException: Failed to find markup >>> file associated >>> >>> If I remove my button, I can open and close without problems. >>> >> Without giving us more information (e.g. code and/or stacktrace) we cannot >> tell you what is wrong. >> > here is my source code. > > public class BaseModal extends Modal { > ... > ... > public BaseModal(final String id) { > super(id); > container = new WebMarkupContainer("container"); > container.add(new EmptyPanel(CONTENT)); > container.setOutputMarkupId(true); > add(container); > } > > @Override > public MarkupContainer addOrReplace(final Component... component) { > return container.addOrReplace(component); > } > > public static String getModalContentId() { > return CONTENT; > } > } > > BaseModal.html > > http://www.w3.org/1999/xhtml"; xmlns:wicket=" > http://wicket.apache.org";> > > > > >aria-hidden="true">× > Modal > header > > > > [modalContent] > > > > > > > > > > > > > > > If I close and reopen I have this exception: > > > org.apache.wicket.markup.MarkupNotFoundException: Failed to find markup > file associated. RealmModalPanel: [RealmModalPanel [Component id = > modalContent]] > The error message says "RealmModalPanel.html" cannot be found. >at > org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.getMarkup(AssociatedMarkupSourcingStrategy.java:98) > ~[wicket-core-7.0.0.jar:7.0.0] >at > org.apache.wicket.MarkupContainer.getMarkup(MarkupContainer.java:453) > ~[wicket-core-7.0.0.jar:7.0.0] >at org.apache.wicket.Component.getMarkup(Component.java:755) > ~[wicket-core-7.0.0.jar:7.0.0] >at org.apache.wicket.Component.getMarkupTag(Component.java:1438) > ~[wicket-core-7.0.0.jar:7.0.0] >at > org.apache.wicket.Component.getMarkupAttributes(Component.java:1467) > ~[wicket-core-7.0.0.jar:7.0.0] >at > org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.updateAjaxAttributes(AjaxFormSubmitBehavior.java:148) > ~[wicket-core-7.0.0.jar:7.0.0] >at > org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.updateAjaxAttributes(AjaxSubmitLink.java:103) > ~[wicket-core-7.0.0.jar:7.0.0] >at > org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.getAttributes(AbstractDefaultAjaxBehavior.java:146) > ~[wicket-core-7.0.0.jar:7.0.0] >at > org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.renderExtraHeaderContributors(AbstractDefaultAjaxBehavior.java:119) > ~[wicket-core-7.0.0.jar:7.0.0] >at > org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.renderHead(AbstractDefaultAjaxBehavior.java:104) > ~[wicket-core-7.0.0.jar:7.0.0] >at > org.apache.wicket.ajax.AjaxEventBehavior.renderHead(AjaxEventBehavior.java:90) > ~[wicket-core-7.0.0.jar:7.0.0] >at > org.apache.wicket.Component.internalRenderHead(Component.java:2726) > ~[wicket-core-7.0.0.jar:7.0.0] >at > org.apache.wicket.markup.renderStrategy.ChildFirstHeaderRenderStrategy$1.component(ChildFirstHeaderRenderStrategy.java:85) > ~[wicket-core-7.0.0.jar:7.0.0] >at > org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:96) > ~[wicket-core-7.0.0.jar:7.0.0] >at > org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:87) > ~[wicket-core-7.0.0.jar:7.0.0] >at > org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:87) > ~[wicket-core-7.0.0.jar:7.0.0] >at > org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:87) > ~[wicket-core-7.0.0.jar:7.0.0] >at > org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:87) > ~[wicket-core-7.0.0.jar:7.0.0] >at > org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFir
Re: Add components inside the footer and header of a Modal
Hi Martin, Il 24/08/2015 22:06, Martin Grigorov ha scritto: Hi, On Mon, Aug 24, 2015 at 4:05 PM, Marco Di Sabatino Di Diodoro < marco.disabat...@tirasa.net> wrote: Hi Martin, Il 24/08/2015 12:16, Martin Grigorov ha scritto: Hi, 1. File an issue so that becomes more user friendly. I opened the issue on git 2. You can roll MyModal that extends from Modal and has MyModal.html with the extra components in header and footer. In MyModal#onInitialize() you can use get("header").add(anExtraHeaderComponent) I followed your suggestion and I added a new button in the footer. At first time I can see my Modal. If I close and reopen I have this exception: org.apache.wicket.markup.MarkupNotFoundException: Failed to find markup file associated If I remove my button, I can open and close without problems. Without giving us more information (e.g. code and/or stacktrace) we cannot tell you what is wrong. here is my source code. public class BaseModal extends Modal { ... ... public BaseModal(final String id) { super(id); container = new WebMarkupContainer("container"); container.add(new EmptyPanel(CONTENT)); container.setOutputMarkupId(true); add(container); } @Override public MarkupContainer addOrReplace(final Component... component) { return container.addOrReplace(component); } public static String getModalContentId() { return CONTENT; } } BaseModal.html http://www.w3.org/1999/xhtml"; xmlns:wicket="http://wicket.apache.org";> aria-hidden="true">× Modal header [modalContent] If I close and reopen I have this exception: org.apache.wicket.markup.MarkupNotFoundException: Failed to find markup file associated. RealmModalPanel: [RealmModalPanel [Component id = modalContent]] at org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.getMarkup(AssociatedMarkupSourcingStrategy.java:98) ~[wicket-core-7.0.0.jar:7.0.0] at org.apache.wicket.MarkupContainer.getMarkup(MarkupContainer.java:453) ~[wicket-core-7.0.0.jar:7.0.0] at org.apache.wicket.Component.getMarkup(Component.java:755) ~[wicket-core-7.0.0.jar:7.0.0] at org.apache.wicket.Component.getMarkupTag(Component.java:1438) ~[wicket-core-7.0.0.jar:7.0.0] at org.apache.wicket.Component.getMarkupAttributes(Component.java:1467) ~[wicket-core-7.0.0.jar:7.0.0] at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.updateAjaxAttributes(AjaxFormSubmitBehavior.java:148) ~[wicket-core-7.0.0.jar:7.0.0] at org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.updateAjaxAttributes(AjaxSubmitLink.java:103) ~[wicket-core-7.0.0.jar:7.0.0] at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.getAttributes(AbstractDefaultAjaxBehavior.java:146) ~[wicket-core-7.0.0.jar:7.0.0] at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.renderExtraHeaderContributors(AbstractDefaultAjaxBehavior.java:119) ~[wicket-core-7.0.0.jar:7.0.0] at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.renderHead(AbstractDefaultAjaxBehavior.java:104) ~[wicket-core-7.0.0.jar:7.0.0] at org.apache.wicket.ajax.AjaxEventBehavior.renderHead(AjaxEventBehavior.java:90) ~[wicket-core-7.0.0.jar:7.0.0] at org.apache.wicket.Component.internalRenderHead(Component.java:2726) ~[wicket-core-7.0.0.jar:7.0.0] at org.apache.wicket.markup.renderStrategy.ChildFirstHeaderRenderStrategy$1.component(ChildFirstHeaderRenderStrategy.java:85) ~[wicket-core-7.0.0.jar:7.0.0] at org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:96) ~[wicket-core-7.0.0.jar:7.0.0] at org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:87) ~[wicket-core-7.0.0.jar:7.0.0] at org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:87) ~[wicket-core-7.0.0.jar:7.0.0] at org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:87) ~[wicket-core-7.0.0.jar:7.0.0] at org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:87) ~[wicket-core-7.0.0.jar:7.0.0] at org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:87) ~[wicket-core-7.0.0.jar:7.0.0] at org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:87) ~[wicket-core-7.0.0.jar:7.0.0] at org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:51) ~[wicket-core-7.0.0.jar:7.0.0] at org.apache.wicket.markup.renderStrategy.ChildFirstHeaderRenderStrategy.renderChildHeaders(ChildFirstHeaderRenderStra
Re: Add components inside the footer and header of a Modal
Hi, On Mon, Aug 24, 2015 at 4:05 PM, Marco Di Sabatino Di Diodoro < marco.disabat...@tirasa.net> wrote: > Hi Martin, > > Il 24/08/2015 12:16, Martin Grigorov ha scritto: > >> Hi, >> >> 1. File an issue so that becomes more user friendly. >> > I opened the issue on git > > 2. You can roll MyModal that extends from Modal and has MyModal.html with >> the extra components in header and footer. In MyModal#onInitialize() you >> can use get("header").add(anExtraHeaderComponent) >> > I followed your suggestion and I added a new button in the footer. At > first time I can see my Modal. If I close and reopen I have this exception: > org.apache.wicket.markup.MarkupNotFoundException: Failed to find markup > file associated > > If I remove my button, I can open and close without problems. Without giving us more information (e.g. code and/or stacktrace) we cannot tell you what is wrong. > > > Marco > > Martin Grigorov >> Wicket Training and Consulting >> https://twitter.com/mtgrigorov >> >> On Mon, Aug 24, 2015 at 11:46 AM, Marco Di Sabatino Di Diodoro < >> marco.disabat...@tirasa.net> wrote: >> >> Hi all, >>> >>> I'm using wicket-bootstrap to implement a new console. >>> In this moment, I'm implementing my Modal with >>> de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal component. >>> >>> I would like to add some components in the header or footer, but all >>> fields are declared private and the aren't getter and setter methods. >>> What can I do? Any suggestions? >>> >>> Regards >>> Marco >>> >>> -- >>> Dott. Marco Di Sabatino Di Diodoro >>> Tel. +39 3939065570 >>> >>> Tirasa S.r.l. >>> Viale D'Annunzio 267 - 65127 Pescara >>> Tel +39 0859116307 / FAX +39 085973 >>> http://www.tirasa.net >>> >>> Apache Syncope PMC Member >>> http://people.apache.org/~mdisabatino/ >>> >>> >>> > -- > Dott. Marco Di Sabatino Di Diodoro > Tel. +39 3939065570 > > Tirasa S.r.l. > Viale D'Annunzio 267 - 65127 Pescara > Tel +39 0859116307 / FAX +39 085973 > http://www.tirasa.net > > Apache Syncope PMC Member > http://people.apache.org/~mdisabatino/ > >
Re: Add components inside the footer and header of a Modal
Hi Martin, Il 24/08/2015 12:16, Martin Grigorov ha scritto: Hi, 1. File an issue so that becomes more user friendly. I opened the issue on git 2. You can roll MyModal that extends from Modal and has MyModal.html with the extra components in header and footer. In MyModal#onInitialize() you can use get("header").add(anExtraHeaderComponent) I followed your suggestion and I added a new button in the footer. At first time I can see my Modal. If I close and reopen I have this exception: org.apache.wicket.markup.MarkupNotFoundException: Failed to find markup file associated If I remove my button, I can open and close without problems. Marco Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Aug 24, 2015 at 11:46 AM, Marco Di Sabatino Di Diodoro < marco.disabat...@tirasa.net> wrote: Hi all, I'm using wicket-bootstrap to implement a new console. In this moment, I'm implementing my Modal with de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal component. I would like to add some components in the header or footer, but all fields are declared private and the aren't getter and setter methods. What can I do? Any suggestions? Regards Marco -- Dott. Marco Di Sabatino Di Diodoro Tel. +39 3939065570 Tirasa S.r.l. Viale D'Annunzio 267 - 65127 Pescara Tel +39 0859116307 / FAX +39 085973 http://www.tirasa.net Apache Syncope PMC Member http://people.apache.org/~mdisabatino/ -- Dott. Marco Di Sabatino Di Diodoro Tel. +39 3939065570 Tirasa S.r.l. Viale D'Annunzio 267 - 65127 Pescara Tel +39 0859116307 / FAX +39 085973 http://www.tirasa.net Apache Syncope PMC Member http://people.apache.org/~mdisabatino/
Re: Add components inside the footer and header of a Modal
Hi, 1. File an issue so that becomes more user friendly. 2. You can roll MyModal that extends from Modal and has MyModal.html with the extra components in header and footer. In MyModal#onInitialize() you can use get("header").add(anExtraHeaderComponent) Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Aug 24, 2015 at 11:46 AM, Marco Di Sabatino Di Diodoro < marco.disabat...@tirasa.net> wrote: > Hi all, > > I'm using wicket-bootstrap to implement a new console. > In this moment, I'm implementing my Modal with > de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal component. > > I would like to add some components in the header or footer, but all > fields are declared private and the aren't getter and setter methods. > What can I do? Any suggestions? > > Regards > Marco > > -- > Dott. Marco Di Sabatino Di Diodoro > Tel. +39 3939065570 > > Tirasa S.r.l. > Viale D'Annunzio 267 - 65127 Pescara > Tel +39 0859116307 / FAX +39 085973 > http://www.tirasa.net > > Apache Syncope PMC Member > http://people.apache.org/~mdisabatino/ > >
Add components inside the footer and header of a Modal
Hi all, I'm using wicket-bootstrap to implement a new console. In this moment, I'm implementing my Modal with de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal component. I would like to add some components in the header or footer, but all fields are declared private and the aren't getter and setter methods. What can I do? Any suggestions? Regards Marco -- Dott. Marco Di Sabatino Di Diodoro Tel. +39 3939065570 Tirasa S.r.l. Viale D'Annunzio 267 - 65127 Pescara Tel +39 0859116307 / FAX +39 085973 http://www.tirasa.net Apache Syncope PMC Member http://people.apache.org/~mdisabatino/