Re: fragment
la 19. maalisk. 2022 klo 9.16 Martin Terra (martin.te...@koodaripalvelut.com) kirjoitti: > la 19. maalisk. 2022 klo 9.09 vahid ghasemi (vahidghasemi...@gmail.com) > kirjoitti: > >> Can you lunch my code and see that, please? >> > > Can you maybe capture it as plain html+css/js and post it online? You can > get it from the inspect functionality of the browser. > Also, does it behave the same on all browsers? Mobile and desktop, safari, firefox, ie, chrome, opera? ** Martin > > ** > Martin > > >> On Thu, Mar 17, 2022 at 2:29 PM Martin Terra < >> martin.te...@koodaripalvelut.com> wrote: >> >> > to 17. maalisk. 2022 klo 12.42 vahid ghasemi (vahidghasemi...@gmail.com >> ) >> > kirjoitti: >> > >> > > Its not css/js issue. >> > > Because when I load only HTML haven't any problem and works well. >> > > >> > >> > If zoom affects it, it is a css/js issue. >> > >> > ** >> > Martin >> > >> > > >> > > On Thu, Mar 17, 2022 at 11:00 AM Martin Terra < >> > > martin.te...@koodaripalvelut.com> wrote: >> > > >> > > > If it's a css/js issue, stackoveflow.com might lead to faster >> > solution. >> > > > >> > > > to 17. maalisk. 2022 klo 8.49 vahid ghasemi ( >> vahidghasemi...@gmail.com >> > ) >> > > > kirjoitti: >> > > > >> > > > > Hello, >> > > > > I'm using wicket-fragment in my page, my page has a primitive >> form, >> > and >> > > > > after submit decide to create and show one of the fragments below >> of >> > my >> > > > > primitive form. >> > > > > I'm using the bootstrap panel. >> > > > > After creating the fragment the height of the panel-heading in my >> > > > fragment >> > > > > contains my primitive form and the height is too large. >> > > > > I created a sample to show you: (also you can see >> imageSample1.png & >> > > > > imageSample2.png) >> > > > > >> > > > > >> > > > >> > > >> > >> https://github.com/vahida1157/wicket-test/tree/master/src/main/java/com/mycompany/problems/fragmentpanelheading >> > > > > . >> > > > > . >> > > > > . >> > > > > When I decide to zoom in and send a better image, I realized after >> > > > getting >> > > > > zoom above 175% the problem was fixed. (you can see >> imageSample3.png) >> > > in >> > > > > Github. >> > > > > >> > > > > So why and what is the problem? >> > > > > >> > > > >> > > >> > >> >
Re: fragment
la 19. maalisk. 2022 klo 9.09 vahid ghasemi (vahidghasemi...@gmail.com) kirjoitti: > Can you lunch my code and see that, please? > Can you maybe capture it as plain html+css/js and post it online? You can get it from the inspect functionality of the browser. ** Martin > On Thu, Mar 17, 2022 at 2:29 PM Martin Terra < > martin.te...@koodaripalvelut.com> wrote: > > > to 17. maalisk. 2022 klo 12.42 vahid ghasemi (vahidghasemi...@gmail.com) > > kirjoitti: > > > > > Its not css/js issue. > > > Because when I load only HTML haven't any problem and works well. > > > > > > > If zoom affects it, it is a css/js issue. > > > > ** > > Martin > > > > > > > > On Thu, Mar 17, 2022 at 11:00 AM Martin Terra < > > > martin.te...@koodaripalvelut.com> wrote: > > > > > > > If it's a css/js issue, stackoveflow.com might lead to faster > > solution. > > > > > > > > to 17. maalisk. 2022 klo 8.49 vahid ghasemi ( > vahidghasemi...@gmail.com > > ) > > > > kirjoitti: > > > > > > > > > Hello, > > > > > I'm using wicket-fragment in my page, my page has a primitive form, > > and > > > > > after submit decide to create and show one of the fragments below > of > > my > > > > > primitive form. > > > > > I'm using the bootstrap panel. > > > > > After creating the fragment the height of the panel-heading in my > > > > fragment > > > > > contains my primitive form and the height is too large. > > > > > I created a sample to show you: (also you can see imageSample1.png > & > > > > > imageSample2.png) > > > > > > > > > > > > > > > > > > > > https://github.com/vahida1157/wicket-test/tree/master/src/main/java/com/mycompany/problems/fragmentpanelheading > > > > > . > > > > > . > > > > > . > > > > > When I decide to zoom in and send a better image, I realized after > > > > getting > > > > > zoom above 175% the problem was fixed. (you can see > imageSample3.png) > > > in > > > > > Github. > > > > > > > > > > So why and what is the problem? > > > > > > > > > > > > > > >
Re: fragment
Can you lunch my code and see that, please? On Thu, Mar 17, 2022 at 2:29 PM Martin Terra < martin.te...@koodaripalvelut.com> wrote: > to 17. maalisk. 2022 klo 12.42 vahid ghasemi (vahidghasemi...@gmail.com) > kirjoitti: > > > Its not css/js issue. > > Because when I load only HTML haven't any problem and works well. > > > > If zoom affects it, it is a css/js issue. > > ** > Martin > > > > > On Thu, Mar 17, 2022 at 11:00 AM Martin Terra < > > martin.te...@koodaripalvelut.com> wrote: > > > > > If it's a css/js issue, stackoveflow.com might lead to faster > solution. > > > > > > to 17. maalisk. 2022 klo 8.49 vahid ghasemi (vahidghasemi...@gmail.com > ) > > > kirjoitti: > > > > > > > Hello, > > > > I'm using wicket-fragment in my page, my page has a primitive form, > and > > > > after submit decide to create and show one of the fragments below of > my > > > > primitive form. > > > > I'm using the bootstrap panel. > > > > After creating the fragment the height of the panel-heading in my > > > fragment > > > > contains my primitive form and the height is too large. > > > > I created a sample to show you: (also you can see imageSample1.png & > > > > imageSample2.png) > > > > > > > > > > > > > > https://github.com/vahida1157/wicket-test/tree/master/src/main/java/com/mycompany/problems/fragmentpanelheading > > > > . > > > > . > > > > . > > > > When I decide to zoom in and send a better image, I realized after > > > getting > > > > zoom above 175% the problem was fixed. (you can see imageSample3.png) > > in > > > > Github. > > > > > > > > So why and what is the problem? > > > > > > > > > >
Re: fragment
to 17. maalisk. 2022 klo 12.42 vahid ghasemi (vahidghasemi...@gmail.com) kirjoitti: > Its not css/js issue. > Because when I load only HTML haven't any problem and works well. > If zoom affects it, it is a css/js issue. ** Martin > > On Thu, Mar 17, 2022 at 11:00 AM Martin Terra < > martin.te...@koodaripalvelut.com> wrote: > > > If it's a css/js issue, stackoveflow.com might lead to faster solution. > > > > to 17. maalisk. 2022 klo 8.49 vahid ghasemi (vahidghasemi...@gmail.com) > > kirjoitti: > > > > > Hello, > > > I'm using wicket-fragment in my page, my page has a primitive form, and > > > after submit decide to create and show one of the fragments below of my > > > primitive form. > > > I'm using the bootstrap panel. > > > After creating the fragment the height of the panel-heading in my > > fragment > > > contains my primitive form and the height is too large. > > > I created a sample to show you: (also you can see imageSample1.png & > > > imageSample2.png) > > > > > > > > > https://github.com/vahida1157/wicket-test/tree/master/src/main/java/com/mycompany/problems/fragmentpanelheading > > > . > > > . > > > . > > > When I decide to zoom in and send a better image, I realized after > > getting > > > zoom above 175% the problem was fixed. (you can see imageSample3.png) > in > > > Github. > > > > > > So why and what is the problem? > > > > > >
Re: fragment
Its not css/js issue. Because when I load only HTML haven't any problem and works well. On Thu, Mar 17, 2022 at 11:00 AM Martin Terra < martin.te...@koodaripalvelut.com> wrote: > If it's a css/js issue, stackoveflow.com might lead to faster solution. > > to 17. maalisk. 2022 klo 8.49 vahid ghasemi (vahidghasemi...@gmail.com) > kirjoitti: > > > Hello, > > I'm using wicket-fragment in my page, my page has a primitive form, and > > after submit decide to create and show one of the fragments below of my > > primitive form. > > I'm using the bootstrap panel. > > After creating the fragment the height of the panel-heading in my > fragment > > contains my primitive form and the height is too large. > > I created a sample to show you: (also you can see imageSample1.png & > > imageSample2.png) > > > > > https://github.com/vahida1157/wicket-test/tree/master/src/main/java/com/mycompany/problems/fragmentpanelheading > > . > > . > > . > > When I decide to zoom in and send a better image, I realized after > getting > > zoom above 175% the problem was fixed. (you can see imageSample3.png) in > > Github. > > > > So why and what is the problem? > > >
Re: fragment
If it's a css/js issue, stackoveflow.com might lead to faster solution. to 17. maalisk. 2022 klo 8.49 vahid ghasemi (vahidghasemi...@gmail.com) kirjoitti: > Hello, > I'm using wicket-fragment in my page, my page has a primitive form, and > after submit decide to create and show one of the fragments below of my > primitive form. > I'm using the bootstrap panel. > After creating the fragment the height of the panel-heading in my fragment > contains my primitive form and the height is too large. > I created a sample to show you: (also you can see imageSample1.png & > imageSample2.png) > > https://github.com/vahida1157/wicket-test/tree/master/src/main/java/com/mycompany/problems/fragmentpanelheading > . > . > . > When I decide to zoom in and send a better image, I realized after getting > zoom above 175% the problem was fixed. (you can see imageSample3.png) in > Github. > > So why and what is the problem? >
fragment
Hello, I'm using wicket-fragment in my page, my page has a primitive form, and after submit decide to create and show one of the fragments below of my primitive form. I'm using the bootstrap panel. After creating the fragment the height of the panel-heading in my fragment contains my primitive form and the height is too large. I created a sample to show you: (also you can see imageSample1.png & imageSample2.png) https://github.com/vahida1157/wicket-test/tree/master/src/main/java/com/mycompany/problems/fragmentpanelheading . . . When I decide to zoom in and send a better image, I realized after getting zoom above 175% the problem was fixed. (you can see imageSample3.png) in Github. So why and what is the problem?
Re: Kendo UI - ToolbarButton renders href="#" which removes existing URL fragment
I'll try that. Thanks guys. Have opened issue on GitHub. Manfred -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Kendo-UI-ToolbarButton-renders-href-which-removes-existing-URL-fragment-tp4677304p4677312.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Kendo UI - ToolbarButton renders href="#" which removes existing URL fragment
Hi Manfred, Hi Martin, Unfortunately this part does not rely on the integration but on kendo-ui itself, so I'm afraid we have to hack a bit :( Changing the href attribute should be done when data are loaded, the idea is to identify buttons with a special css class and update the href on databound event. Something like that: private CommandButton btnEdit = new CommandButton("_edit", Model.of("Edit")) { private static final long serialVersionUID = 1L; @Override public String getCSSClass() { return "link-to-change"; } }; class MyDataTable { protected void onInitialize() { super.onInitialize(); this.add(new DataBoundBehavior() { private static final long serialVersionUID = 1L; @Override protected String getDataBoundCallback() { return "function (e) { " + "jQuery('.link-to-change').each(" + "function(index, item) { " + "jQuery(item).attr('href', 'javascript:;'); " + "}" + ")" + "}"; } }); } } There should be a way to have a generic Behavior, like NoHashSymbolOnButtonsDataBoundBehavior (yes, I'm pretty imaginative tonight) Please open en issue on github :) Best regards, Sebastien.
Re: Kendo UI - ToolbarButton renders href="#" which removes existing URL fragment
On Mon, Mar 13, 2017 at 6:21 PM, Manfred Bergmann wrote: > Martin Grigorov-4 wrote > > If Wicket-JQuery-UI adds this "#" then I'd recommend to replace it with > > href="javascript:;". Some prefer "javascript:void(0)" but this is a bit > > longer. > > "#" has such side effects. > > OK, how would I do that. Via AttributeModifier? Because it doesn't seem to > be rendered during the component render phase. > You'll have to find who generates this piece of code - KendoUI or Wicket-JQuery-UI. I've found just https://github.com/sebfz1/wicket-jquery-ui/blob/ab7d16751b728aeb6a6652f7554861bdff743b54/wicket-kendo-ui/src/main/java/com/googlecode/wicket/kendo/ui/widget/menu/Menu.html#L41 in Wicket-JQuery-UI, so it might be KendoUI. > > > Manfred > > -- > View this message in context: http://apache-wicket.1842946. > n4.nabble.com/Kendo-UI-ToolbarButton-renders-href- > which-removes-existing-URL-fragment-tp4677304p4677308.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Kendo UI - ToolbarButton renders href="#" which removes existing URL fragment
Martin Grigorov-4 wrote > If Wicket-JQuery-UI adds this "#" then I'd recommend to replace it with > href="javascript:;". Some prefer "javascript:void(0)" but this is a bit > longer. > "#" has such side effects. OK, how would I do that. Via AttributeModifier? Because it doesn't seem to be rendered during the component render phase. Manfred -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Kendo-UI-ToolbarButton-renders-href-which-removes-existing-URL-fragment-tp4677304p4677308.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Kendo UI - ToolbarButton renders href="#" which removes existing URL fragment
Hi, On Mon, Mar 13, 2017 at 5:37 PM, Manfred Bergmann wrote: > Hi. > > The DataTable component has Toolbar-/CommandButtons which seem to be > rendered (by JavaScript) like this: > Button name <#> > > The href="#" causes a problem because once the button is clicked it deletes > the existing URL fragment which must be kept intact. > > What could be done to remove the href="#", since it seems to be rendered > after onDomReady or so? > If Wicket-JQuery-UI adds this "#" then I'd recommend to replace it with href="javascript:;". Some prefer "javascript:void(0)" but this is a bit longer. "#" has such side effects. > > > Manfred > > -- > View this message in context: http://apache-wicket.1842946. > n4.nabble.com/Kendo-UI-ToolbarButton-renders-href- > which-removes-existing-URL-fragment-tp4677304.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Kendo UI - ToolbarButton renders href="#" which removes existing URL fragment
Hi. The DataTable component has Toolbar-/CommandButtons which seem to be rendered (by JavaScript) like this: Button name <#> The href="#" causes a problem because once the button is clicked it deletes the existing URL fragment which must be kept intact. What could be done to remove the href="#", since it seems to be rendered after onDomReady or so? Manfred -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Kendo-UI-ToolbarButton-renders-href-which-removes-existing-URL-fragment-tp4677304.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: (Customizable) Fragment as String
I was able to find workaround :) In case of following modification: https://github.com/solomax/fragment-as-string/commit/c6d5e8a692242fa2754a39b9cbe964d24c84a97e Everything works as expected The only issue is: fragment is wrapped with DEFAULT_MARKUP: "" Is there any option to remove it? On Mon, Oct 17, 2016 at 1:57 PM, Martin Grigorov wrote: > - org.apache.wicket.markup.IMarkupResourceStreamProvider > - Component#setMarkup() > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Mon, Oct 17, 2016 at 8:33 AM, Maxim Solodovnik > wrote: > > > Is there other option to have additional markup in the same file? > > > > WBR, Maxim > > (from mobile, sorry for the typos) > > > > On Oct 17, 2016 12:44, "Maxim Solodovnik" wrote: > > > > That's a pitty :( > > Thanks for your time > > It would be nice to have this functionality available > > > > WBR, Maxim > > (from mobile, sorry for the typos) > > > > On Oct 16, 2016 04:44, "Martin Grigorov" wrote: > > > > > Sorry, but I don't find a way to make it work. > > > It will need more thinking and debugging and I have no that much time > > right > > > now. > > > Just use Panel instead of Fragment. > > > I'll add a comment to ComponentRenderer's javadoc that Fragments are > not > > > supported. > > > > > > Martin Grigorov > > > Wicket Training and Consulting > > > https://twitter.com/mtgrigorov > > > > > > On Fri, Oct 14, 2016 at 9:14 AM, Maxim Solodovnik < > solomax...@gmail.com> > > > wrote: > > > > > > > Many thanks :) > > > > > > > > On Fri, Oct 14, 2016 at 2:12 PM, Martin Grigorov < > mgrigo...@apache.org > > > > > > > wrote: > > > > > > > > > I'll take a look at the weekend. > > > > > > > > > > Martin Grigorov > > > > > Wicket Training and Consulting > > > > > https://twitter.com/mtgrigorov > > > > > > > > > > On Fri, Oct 14, 2016 at 5:26 AM, Maxim Solodovnik < > > > solomax...@gmail.com> > > > > > wrote: > > > > > > > > > > > Yes, the changes were local :( > > > > > > Here is the quickstart: https://github.com/solomax/fra > > > gment-as-string > > > > > > > > > > > > In case following line is uncommented > > > > > > https://github.com/solomax/fragment-as-string/blob/ > > > > > > master/src/main/java/org/apache/solomax/HomePage.java#L16 > > > > > > (next one should be commented) > > > > > > Tests are fails with markup not found exception > > > > > > > > > > > > Is it possible to create something like "wicket:visible" (or > > > > > "om:visible") > > > > > > tag+attribute so it can act as I call setVisible in Java? > > > > > > > > > > > > On Fri, Oct 14, 2016 at 1:14 AM, Martin Grigorov < > > > mgrigo...@apache.org > > > > > > > > > > > wrote: > > > > > > > > > > > > > On Thu, Oct 13, 2016 at 6:49 PM, Maxim Solodovnik < > > > > > solomax...@gmail.com> > > > > > > > wrote: > > > > > > > > > > > > > > > Hello Martin, > > > > > > > > > > > > > > > > Thanks for the quick response! > > > > > > > > > > > > > > > > On Thu, Oct 13, 2016 at 11:39 PM, Martin Grigorov < > > > > > > mgrigo...@apache.org> > > > > > > > > wrote: > > > > > > > > > > > > > > > > > Hi Maxim, > > > > > > > > > > > > > > > > > > On Thu, Oct 13, 2016 at 6:10 PM, Maxim Solodovnik < > > > > > > > solomax...@gmail.com> > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > Hello All, > > > > > > > > > > > > > > > > > > > > I'm successfully using following code [1] to get Panel as > > > > String > > > > > > > > > > Unfortunately It is not possible to get Fragment as > String > > > this > > > > &
Re: (Customizable) Fragment as String
- org.apache.wicket.markup.IMarkupResourceStreamProvider - Component#setMarkup() Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Oct 17, 2016 at 8:33 AM, Maxim Solodovnik wrote: > Is there other option to have additional markup in the same file? > > WBR, Maxim > (from mobile, sorry for the typos) > > On Oct 17, 2016 12:44, "Maxim Solodovnik" wrote: > > That's a pitty :( > Thanks for your time > It would be nice to have this functionality available > > WBR, Maxim > (from mobile, sorry for the typos) > > On Oct 16, 2016 04:44, "Martin Grigorov" wrote: > > > Sorry, but I don't find a way to make it work. > > It will need more thinking and debugging and I have no that much time > right > > now. > > Just use Panel instead of Fragment. > > I'll add a comment to ComponentRenderer's javadoc that Fragments are not > > supported. > > > > Martin Grigorov > > Wicket Training and Consulting > > https://twitter.com/mtgrigorov > > > > On Fri, Oct 14, 2016 at 9:14 AM, Maxim Solodovnik > > wrote: > > > > > Many thanks :) > > > > > > On Fri, Oct 14, 2016 at 2:12 PM, Martin Grigorov > > > > wrote: > > > > > > > I'll take a look at the weekend. > > > > > > > > Martin Grigorov > > > > Wicket Training and Consulting > > > > https://twitter.com/mtgrigorov > > > > > > > > On Fri, Oct 14, 2016 at 5:26 AM, Maxim Solodovnik < > > solomax...@gmail.com> > > > > wrote: > > > > > > > > > Yes, the changes were local :( > > > > > Here is the quickstart: https://github.com/solomax/fra > > gment-as-string > > > > > > > > > > In case following line is uncommented > > > > > https://github.com/solomax/fragment-as-string/blob/ > > > > > master/src/main/java/org/apache/solomax/HomePage.java#L16 > > > > > (next one should be commented) > > > > > Tests are fails with markup not found exception > > > > > > > > > > Is it possible to create something like "wicket:visible" (or > > > > "om:visible") > > > > > tag+attribute so it can act as I call setVisible in Java? > > > > > > > > > > On Fri, Oct 14, 2016 at 1:14 AM, Martin Grigorov < > > mgrigo...@apache.org > > > > > > > > > wrote: > > > > > > > > > > > On Thu, Oct 13, 2016 at 6:49 PM, Maxim Solodovnik < > > > > solomax...@gmail.com> > > > > > > wrote: > > > > > > > > > > > > > Hello Martin, > > > > > > > > > > > > > > Thanks for the quick response! > > > > > > > > > > > > > > On Thu, Oct 13, 2016 at 11:39 PM, Martin Grigorov < > > > > > mgrigo...@apache.org> > > > > > > > wrote: > > > > > > > > > > > > > > > Hi Maxim, > > > > > > > > > > > > > > > > On Thu, Oct 13, 2016 at 6:10 PM, Maxim Solodovnik < > > > > > > solomax...@gmail.com> > > > > > > > > wrote: > > > > > > > > > > > > > > > > > Hello All, > > > > > > > > > > > > > > > > > > I'm successfully using following code [1] to get Panel as > > > String > > > > > > > > > Unfortunately It is not possible to get Fragment as String > > this > > > > way > > > > > > :( > > > > > > > > > > > > > > > > > > > > > > > > > You can replace your util with ComponentRenderer# > > > renderComponent() > > > > > > > > https://github.com/apache/wicket/blob/ > > > > 70606d73e9165d37c1d8b7c7820279 > > > > > > > > fb4be18770/wicket-core/src/main/java/org/apache/wicket/ > > > > > > core/util/string/ > > > > > > > > ComponentRenderer.java#L86 > > > > > > > > The problem here is that your helper page doesn't provide the > > > > > > Fragment's > > > > > > > > markup. Someone has to provide it. > > > > > > > > > > > > > > > > > > > > >
Re: (Customizable) Fragment as String
Is there other option to have additional markup in the same file? WBR, Maxim (from mobile, sorry for the typos) On Oct 17, 2016 12:44, "Maxim Solodovnik" wrote: That's a pitty :( Thanks for your time It would be nice to have this functionality available WBR, Maxim (from mobile, sorry for the typos) On Oct 16, 2016 04:44, "Martin Grigorov" wrote: > Sorry, but I don't find a way to make it work. > It will need more thinking and debugging and I have no that much time right > now. > Just use Panel instead of Fragment. > I'll add a comment to ComponentRenderer's javadoc that Fragments are not > supported. > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Fri, Oct 14, 2016 at 9:14 AM, Maxim Solodovnik > wrote: > > > Many thanks :) > > > > On Fri, Oct 14, 2016 at 2:12 PM, Martin Grigorov > > wrote: > > > > > I'll take a look at the weekend. > > > > > > Martin Grigorov > > > Wicket Training and Consulting > > > https://twitter.com/mtgrigorov > > > > > > On Fri, Oct 14, 2016 at 5:26 AM, Maxim Solodovnik < > solomax...@gmail.com> > > > wrote: > > > > > > > Yes, the changes were local :( > > > > Here is the quickstart: https://github.com/solomax/fra > gment-as-string > > > > > > > > In case following line is uncommented > > > > https://github.com/solomax/fragment-as-string/blob/ > > > > master/src/main/java/org/apache/solomax/HomePage.java#L16 > > > > (next one should be commented) > > > > Tests are fails with markup not found exception > > > > > > > > Is it possible to create something like "wicket:visible" (or > > > "om:visible") > > > > tag+attribute so it can act as I call setVisible in Java? > > > > > > > > On Fri, Oct 14, 2016 at 1:14 AM, Martin Grigorov < > mgrigo...@apache.org > > > > > > > wrote: > > > > > > > > > On Thu, Oct 13, 2016 at 6:49 PM, Maxim Solodovnik < > > > solomax...@gmail.com> > > > > > wrote: > > > > > > > > > > > Hello Martin, > > > > > > > > > > > > Thanks for the quick response! > > > > > > > > > > > > On Thu, Oct 13, 2016 at 11:39 PM, Martin Grigorov < > > > > mgrigo...@apache.org> > > > > > > wrote: > > > > > > > > > > > > > Hi Maxim, > > > > > > > > > > > > > > On Thu, Oct 13, 2016 at 6:10 PM, Maxim Solodovnik < > > > > > solomax...@gmail.com> > > > > > > > wrote: > > > > > > > > > > > > > > > Hello All, > > > > > > > > > > > > > > > > I'm successfully using following code [1] to get Panel as > > String > > > > > > > > Unfortunately It is not possible to get Fragment as String > this > > > way > > > > > :( > > > > > > > > > > > > > > > > > > > > > > You can replace your util with ComponentRenderer# > > renderComponent() > > > > > > > https://github.com/apache/wicket/blob/ > > > 70606d73e9165d37c1d8b7c7820279 > > > > > > > fb4be18770/wicket-core/src/main/java/org/apache/wicket/ > > > > > core/util/string/ > > > > > > > ComponentRenderer.java#L86 > > > > > > > The problem here is that your helper page doesn't provide the > > > > > Fragment's > > > > > > > markup. Someone has to provide it. > > > > > > > > > > > > > > > > > > > > I have added following block to [2] > > > > > > > > > > > > > > > > No, you have not! > > > > > There is no 'fragment' in [2] and [3] > > > > > Or you did it locally ? Better create a branch and point us to it. > > > > > > > > > > > > > > > > > wicket:id="prefix"> > > > > > > > > > > wicket:id="title"> > > > > > wicket:id="start"> - > > > > > wicket:fragment> > > > > > > > > > > > > then I have added following code to [3] > > > > > > > > > >
Re: (Customizable) Fragment as String
That's a pitty :( Thanks for your time It would be nice to have this functionality available WBR, Maxim (from mobile, sorry for the typos) On Oct 16, 2016 04:44, "Martin Grigorov" wrote: > Sorry, but I don't find a way to make it work. > It will need more thinking and debugging and I have no that much time right > now. > Just use Panel instead of Fragment. > I'll add a comment to ComponentRenderer's javadoc that Fragments are not > supported. > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Fri, Oct 14, 2016 at 9:14 AM, Maxim Solodovnik > wrote: > > > Many thanks :) > > > > On Fri, Oct 14, 2016 at 2:12 PM, Martin Grigorov > > wrote: > > > > > I'll take a look at the weekend. > > > > > > Martin Grigorov > > > Wicket Training and Consulting > > > https://twitter.com/mtgrigorov > > > > > > On Fri, Oct 14, 2016 at 5:26 AM, Maxim Solodovnik < > solomax...@gmail.com> > > > wrote: > > > > > > > Yes, the changes were local :( > > > > Here is the quickstart: https://github.com/solomax/ > fragment-as-string > > > > > > > > In case following line is uncommented > > > > https://github.com/solomax/fragment-as-string/blob/ > > > > master/src/main/java/org/apache/solomax/HomePage.java#L16 > > > > (next one should be commented) > > > > Tests are fails with markup not found exception > > > > > > > > Is it possible to create something like "wicket:visible" (or > > > "om:visible") > > > > tag+attribute so it can act as I call setVisible in Java? > > > > > > > > On Fri, Oct 14, 2016 at 1:14 AM, Martin Grigorov < > mgrigo...@apache.org > > > > > > > wrote: > > > > > > > > > On Thu, Oct 13, 2016 at 6:49 PM, Maxim Solodovnik < > > > solomax...@gmail.com> > > > > > wrote: > > > > > > > > > > > Hello Martin, > > > > > > > > > > > > Thanks for the quick response! > > > > > > > > > > > > On Thu, Oct 13, 2016 at 11:39 PM, Martin Grigorov < > > > > mgrigo...@apache.org> > > > > > > wrote: > > > > > > > > > > > > > Hi Maxim, > > > > > > > > > > > > > > On Thu, Oct 13, 2016 at 6:10 PM, Maxim Solodovnik < > > > > > solomax...@gmail.com> > > > > > > > wrote: > > > > > > > > > > > > > > > Hello All, > > > > > > > > > > > > > > > > I'm successfully using following code [1] to get Panel as > > String > > > > > > > > Unfortunately It is not possible to get Fragment as String > this > > > way > > > > > :( > > > > > > > > > > > > > > > > > > > > > > You can replace your util with ComponentRenderer# > > renderComponent() > > > > > > > https://github.com/apache/wicket/blob/ > > > 70606d73e9165d37c1d8b7c7820279 > > > > > > > fb4be18770/wicket-core/src/main/java/org/apache/wicket/ > > > > > core/util/string/ > > > > > > > ComponentRenderer.java#L86 > > > > > > > The problem here is that your helper page doesn't provide the > > > > > Fragment's > > > > > > > markup. Someone has to provide it. > > > > > > > > > > > > > > > > > > > > I have added following block to [2] > > > > > > > > > > > > > > > > No, you have not! > > > > > There is no 'fragment' in [2] and [3] > > > > > Or you did it locally ? Better create a branch and point us to it. > > > > > > > > > > > > > > > > > wicket:id="prefix"> > > > > > > > > > > wicket:id="title"> > > > > > wicket:id="start"> - > > > > > wicket:fragment> > > > > > > > > > > > > then I have added following code to [3] > > > > > > > > > > > > Fragment f = new Fragment(TemplatePage.COMP_ID, "subject", this); > > > > > > f.add(new OmTextLabel("prefix", 1151L, langId) >
Re: (Customizable) Fragment as String
Sorry, but I don't find a way to make it work. It will need more thinking and debugging and I have no that much time right now. Just use Panel instead of Fragment. I'll add a comment to ComponentRenderer's javadoc that Fragments are not supported. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Oct 14, 2016 at 9:14 AM, Maxim Solodovnik wrote: > Many thanks :) > > On Fri, Oct 14, 2016 at 2:12 PM, Martin Grigorov > wrote: > > > I'll take a look at the weekend. > > > > Martin Grigorov > > Wicket Training and Consulting > > https://twitter.com/mtgrigorov > > > > On Fri, Oct 14, 2016 at 5:26 AM, Maxim Solodovnik > > wrote: > > > > > Yes, the changes were local :( > > > Here is the quickstart: https://github.com/solomax/fragment-as-string > > > > > > In case following line is uncommented > > > https://github.com/solomax/fragment-as-string/blob/ > > > master/src/main/java/org/apache/solomax/HomePage.java#L16 > > > (next one should be commented) > > > Tests are fails with markup not found exception > > > > > > Is it possible to create something like "wicket:visible" (or > > "om:visible") > > > tag+attribute so it can act as I call setVisible in Java? > > > > > > On Fri, Oct 14, 2016 at 1:14 AM, Martin Grigorov > > > > wrote: > > > > > > > On Thu, Oct 13, 2016 at 6:49 PM, Maxim Solodovnik < > > solomax...@gmail.com> > > > > wrote: > > > > > > > > > Hello Martin, > > > > > > > > > > Thanks for the quick response! > > > > > > > > > > On Thu, Oct 13, 2016 at 11:39 PM, Martin Grigorov < > > > mgrigo...@apache.org> > > > > > wrote: > > > > > > > > > > > Hi Maxim, > > > > > > > > > > > > On Thu, Oct 13, 2016 at 6:10 PM, Maxim Solodovnik < > > > > solomax...@gmail.com> > > > > > > wrote: > > > > > > > > > > > > > Hello All, > > > > > > > > > > > > > > I'm successfully using following code [1] to get Panel as > String > > > > > > > Unfortunately It is not possible to get Fragment as String this > > way > > > > :( > > > > > > > > > > > > > > > > > > > You can replace your util with ComponentRenderer# > renderComponent() > > > > > > https://github.com/apache/wicket/blob/ > > 70606d73e9165d37c1d8b7c7820279 > > > > > > fb4be18770/wicket-core/src/main/java/org/apache/wicket/ > > > > core/util/string/ > > > > > > ComponentRenderer.java#L86 > > > > > > The problem here is that your helper page doesn't provide the > > > > Fragment's > > > > > > markup. Someone has to provide it. > > > > > > > > > > > > > > > > > I have added following block to [2] > > > > > > > > > > > > > No, you have not! > > > > There is no 'fragment' in [2] and [3] > > > > Or you did it locally ? Better create a branch and point us to it. > > > > > > > > > > > > > wicket:id="prefix"> > > > > > > > > wicket:id="title"> > > > > wicket:id="start"> - > > > > wicket:fragment> > > > > > > > > > > then I have added following code to [3] > > > > > > > > > > Fragment f = new Fragment(TemplatePage.COMP_ID, "subject", this); > > > > > f.add(new OmTextLabel("prefix", 1151L, langId) > > > > > , new OmTextLabel("title", a.getTitle()) > > > > > , new OmTextLabel("start", > > > > > CalendarPatterns.getDateWithTimeByMiliSecondsAn > > dTimeZone(a.getStart(), > > > > > tz)) > > > > > , new OmTextLabel("end", > > > > > CalendarPatterns.getDateWithTimeByMiliSecondsAn > dTimeZone(a.getEnd(), > > > > tz)) > > > > > ); > > > > > > > > > > so I I was hoping markup should be available but it's not :( > > > > > > > > > > [3] > > > > > https://github.com/apache/openmeetings/blob/3.1.x/ > > > > > openmeeting
Re: (Customizable) Fragment as String
Many thanks :) On Fri, Oct 14, 2016 at 2:12 PM, Martin Grigorov wrote: > I'll take a look at the weekend. > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Fri, Oct 14, 2016 at 5:26 AM, Maxim Solodovnik > wrote: > > > Yes, the changes were local :( > > Here is the quickstart: https://github.com/solomax/fragment-as-string > > > > In case following line is uncommented > > https://github.com/solomax/fragment-as-string/blob/ > > master/src/main/java/org/apache/solomax/HomePage.java#L16 > > (next one should be commented) > > Tests are fails with markup not found exception > > > > Is it possible to create something like "wicket:visible" (or > "om:visible") > > tag+attribute so it can act as I call setVisible in Java? > > > > On Fri, Oct 14, 2016 at 1:14 AM, Martin Grigorov > > wrote: > > > > > On Thu, Oct 13, 2016 at 6:49 PM, Maxim Solodovnik < > solomax...@gmail.com> > > > wrote: > > > > > > > Hello Martin, > > > > > > > > Thanks for the quick response! > > > > > > > > On Thu, Oct 13, 2016 at 11:39 PM, Martin Grigorov < > > mgrigo...@apache.org> > > > > wrote: > > > > > > > > > Hi Maxim, > > > > > > > > > > On Thu, Oct 13, 2016 at 6:10 PM, Maxim Solodovnik < > > > solomax...@gmail.com> > > > > > wrote: > > > > > > > > > > > Hello All, > > > > > > > > > > > > I'm successfully using following code [1] to get Panel as String > > > > > > Unfortunately It is not possible to get Fragment as String this > way > > > :( > > > > > > > > > > > > > > > > You can replace your util with ComponentRenderer#renderComponent() > > > > > https://github.com/apache/wicket/blob/ > 70606d73e9165d37c1d8b7c7820279 > > > > > fb4be18770/wicket-core/src/main/java/org/apache/wicket/ > > > core/util/string/ > > > > > ComponentRenderer.java#L86 > > > > > The problem here is that your helper page doesn't provide the > > > Fragment's > > > > > markup. Someone has to provide it. > > > > > > > > > > > > > > I have added following block to [2] > > > > > > > > > > No, you have not! > > > There is no 'fragment' in [2] and [3] > > > Or you did it locally ? Better create a branch and point us to it. > > > > > > > > > > > > > > > > wicket:id="title"> > > > wicket:id="start"> - > > > wicket:fragment> > > > > > > > > then I have added following code to [3] > > > > > > > > Fragment f = new Fragment(TemplatePage.COMP_ID, "subject", this); > > > > f.add(new OmTextLabel("prefix", 1151L, langId) > > > > , new OmTextLabel("title", a.getTitle()) > > > > , new OmTextLabel("start", > > > > CalendarPatterns.getDateWithTimeByMiliSecondsAn > dTimeZone(a.getStart(), > > > > tz)) > > > > , new OmTextLabel("end", > > > > CalendarPatterns.getDateWithTimeByMiliSecondsAndTimeZone(a.getEnd(), > > > tz)) > > > > ); > > > > > > > > so I I was hoping markup should be available but it's not :( > > > > > > > > [3] > > > > https://github.com/apache/openmeetings/blob/3.1.x/ > > > > openmeetings-service/src/main/java/org/apache/openmeetings/ > > > > service/mail/template/CreatedAppointmentTemplate.java > > > > > > > > [2] > > > > https://github.com/apache/openmeetings/blob/3.1.x/ > > > > openmeetings-service/src/main/java/org/apache/openmeetings/ > > > > service/mail/template/CreatedAppointmentTemplate.html#L33 > > > > > > > > > > > > > > > > > > > > > > > > > The goal I'm trying to achieve is: store email subject as > > > > wicket:fragment > > > > > > > > > > > > Another question is: is it possible to edit markup like this > > > > > > - > > > > > > wicket:id="aa3"> > > > > > > > > > > > > to be able to remove some blocks without breaking the rendering > > > > &g
Re: (Customizable) Fragment as String
I'll take a look at the weekend. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Oct 14, 2016 at 5:26 AM, Maxim Solodovnik wrote: > Yes, the changes were local :( > Here is the quickstart: https://github.com/solomax/fragment-as-string > > In case following line is uncommented > https://github.com/solomax/fragment-as-string/blob/ > master/src/main/java/org/apache/solomax/HomePage.java#L16 > (next one should be commented) > Tests are fails with markup not found exception > > Is it possible to create something like "wicket:visible" (or "om:visible") > tag+attribute so it can act as I call setVisible in Java? > > On Fri, Oct 14, 2016 at 1:14 AM, Martin Grigorov > wrote: > > > On Thu, Oct 13, 2016 at 6:49 PM, Maxim Solodovnik > > wrote: > > > > > Hello Martin, > > > > > > Thanks for the quick response! > > > > > > On Thu, Oct 13, 2016 at 11:39 PM, Martin Grigorov < > mgrigo...@apache.org> > > > wrote: > > > > > > > Hi Maxim, > > > > > > > > On Thu, Oct 13, 2016 at 6:10 PM, Maxim Solodovnik < > > solomax...@gmail.com> > > > > wrote: > > > > > > > > > Hello All, > > > > > > > > > > I'm successfully using following code [1] to get Panel as String > > > > > Unfortunately It is not possible to get Fragment as String this way > > :( > > > > > > > > > > > > > You can replace your util with ComponentRenderer#renderComponent() > > > > https://github.com/apache/wicket/blob/70606d73e9165d37c1d8b7c7820279 > > > > fb4be18770/wicket-core/src/main/java/org/apache/wicket/ > > core/util/string/ > > > > ComponentRenderer.java#L86 > > > > The problem here is that your helper page doesn't provide the > > Fragment's > > > > markup. Someone has to provide it. > > > > > > > > > > > I have added following block to [2] > > > > > > > No, you have not! > > There is no 'fragment' in [2] and [3] > > Or you did it locally ? Better create a branch and point us to it. > > > > > > > > > > > wicket:id="title"> > > wicket:id="start"> - > > wicket:fragment> > > > > > > then I have added following code to [3] > > > > > > Fragment f = new Fragment(TemplatePage.COMP_ID, "subject", this); > > > f.add(new OmTextLabel("prefix", 1151L, langId) > > > , new OmTextLabel("title", a.getTitle()) > > > , new OmTextLabel("start", > > > CalendarPatterns.getDateWithTimeByMiliSecondsAndTimeZone(a.getStart(), > > > tz)) > > > , new OmTextLabel("end", > > > CalendarPatterns.getDateWithTimeByMiliSecondsAndTimeZone(a.getEnd(), > > tz)) > > > ); > > > > > > so I I was hoping markup should be available but it's not :( > > > > > > [3] > > > https://github.com/apache/openmeetings/blob/3.1.x/ > > > openmeetings-service/src/main/java/org/apache/openmeetings/ > > > service/mail/template/CreatedAppointmentTemplate.java > > > > > > [2] > > > https://github.com/apache/openmeetings/blob/3.1.x/ > > > openmeetings-service/src/main/java/org/apache/openmeetings/ > > > service/mail/template/CreatedAppointmentTemplate.html#L33 > > > > > > > > > > > > > > > > > > > > The goal I'm trying to achieve is: store email subject as > > > wicket:fragment > > > > > > > > > > Another question is: is it possible to edit markup like this > > > > > - > > > > wicket:id="aa3"> > > > > > > > > > > to be able to remove some blocks without breaking the rendering > > > > > > > > > > so I can modify the markup something like this > > > > > - > > > > wicket:id="aa2"> > wicket:remove> > > > > > > > > > > The java code will remain the same: > > > > > comp.add(new Label("aa1", "AA1"), new Label("aa2", "AA2"), new > > > > Label("aa3", > > > > > "AA3")) > > > > > > > > > > > > > Just make aa2 and aa3 inviible (e.g. aa2.setVisible(false)) > > > > > > > > > > > Actually we have markup files unpacked, so end users can add some > > > modifications to it > > > So I need to let users to modify fragments without recompiling or java > > > programming > > > re-arraging blocks is OK, but removing > > > > > > > I'm afraid you will need to use auto-components for such requirement. > > E.g. in the markup and IComponentResolver in Java that > knows > > what to do with such elements in the markup. E.g. it will instantiate a > > Label and set its model by reading some special attribute. > > > > > > > > > > > > > > > > > > > > > > > And I'll get > > > > > AA1 > > > > > as a result without any errors/warnings > > > > > > > > > > Thanks in advance! > > > > > > > > > > [1] > > > > > https://github.com/apache/openmeetings/blob/3.1.x/ > > > > > openmeetings-service/src/main/java/org/apache/openmeetings/ > > > > > service/mail/template/AbstractTemplatePanel.java#L70 > > > > > > > > > > -- > > > > > WBR > > > > > Maxim aka solomax > > > > > > > > > > > > > > > > > > > > > -- > > > WBR > > > Maxim aka solomax > > > > > > > > > -- > WBR > Maxim aka solomax >
Re: (Customizable) Fragment as String
Yes, the changes were local :( Here is the quickstart: https://github.com/solomax/fragment-as-string In case following line is uncommented https://github.com/solomax/fragment-as-string/blob/master/src/main/java/org/apache/solomax/HomePage.java#L16 (next one should be commented) Tests are fails with markup not found exception Is it possible to create something like "wicket:visible" (or "om:visible") tag+attribute so it can act as I call setVisible in Java? On Fri, Oct 14, 2016 at 1:14 AM, Martin Grigorov wrote: > On Thu, Oct 13, 2016 at 6:49 PM, Maxim Solodovnik > wrote: > > > Hello Martin, > > > > Thanks for the quick response! > > > > On Thu, Oct 13, 2016 at 11:39 PM, Martin Grigorov > > wrote: > > > > > Hi Maxim, > > > > > > On Thu, Oct 13, 2016 at 6:10 PM, Maxim Solodovnik < > solomax...@gmail.com> > > > wrote: > > > > > > > Hello All, > > > > > > > > I'm successfully using following code [1] to get Panel as String > > > > Unfortunately It is not possible to get Fragment as String this way > :( > > > > > > > > > > You can replace your util with ComponentRenderer#renderComponent() > > > https://github.com/apache/wicket/blob/70606d73e9165d37c1d8b7c7820279 > > > fb4be18770/wicket-core/src/main/java/org/apache/wicket/ > core/util/string/ > > > ComponentRenderer.java#L86 > > > The problem here is that your helper page doesn't provide the > Fragment's > > > markup. Someone has to provide it. > > > > > > > > I have added following block to [2] > > > > No, you have not! > There is no 'fragment' in [2] and [3] > Or you did it locally ? Better create a branch and point us to it. > > > > > > wicket:id="title"> > wicket:id="start"> - > wicket:fragment> > > > > then I have added following code to [3] > > > > Fragment f = new Fragment(TemplatePage.COMP_ID, "subject", this); > > f.add(new OmTextLabel("prefix", 1151L, langId) > > , new OmTextLabel("title", a.getTitle()) > > , new OmTextLabel("start", > > CalendarPatterns.getDateWithTimeByMiliSecondsAndTimeZone(a.getStart(), > > tz)) > > , new OmTextLabel("end", > > CalendarPatterns.getDateWithTimeByMiliSecondsAndTimeZone(a.getEnd(), > tz)) > > ); > > > > so I I was hoping markup should be available but it's not :( > > > > [3] > > https://github.com/apache/openmeetings/blob/3.1.x/ > > openmeetings-service/src/main/java/org/apache/openmeetings/ > > service/mail/template/CreatedAppointmentTemplate.java > > > > [2] > > https://github.com/apache/openmeetings/blob/3.1.x/ > > openmeetings-service/src/main/java/org/apache/openmeetings/ > > service/mail/template/CreatedAppointmentTemplate.html#L33 > > > > > > > > > > > > > > > The goal I'm trying to achieve is: store email subject as > > wicket:fragment > > > > > > > > Another question is: is it possible to edit markup like this > > > > - > > > wicket:id="aa3"> > > > > > > > > to be able to remove some blocks without breaking the rendering > > > > > > > > so I can modify the markup something like this > > > > - > > > wicket:id="aa2"> wicket:remove> > > > > > > > > The java code will remain the same: > > > > comp.add(new Label("aa1", "AA1"), new Label("aa2", "AA2"), new > > > Label("aa3", > > > > "AA3")) > > > > > > > > > > Just make aa2 and aa3 inviible (e.g. aa2.setVisible(false)) > > > > > > > > Actually we have markup files unpacked, so end users can add some > > modifications to it > > So I need to let users to modify fragments without recompiling or java > > programming > > re-arraging blocks is OK, but removing > > > > I'm afraid you will need to use auto-components for such requirement. > E.g. in the markup and IComponentResolver in Java that knows > what to do with such elements in the markup. E.g. it will instantiate a > Label and set its model by reading some special attribute. > > > > > > > > > > > > > > > > And I'll get > > > > AA1 > > > > as a result without any errors/warnings > > > > > > > > Thanks in advance! > > > > > > > > [1] > > > > https://github.com/apache/openmeetings/blob/3.1.x/ > > > > openmeetings-service/src/main/java/org/apache/openmeetings/ > > > > service/mail/template/AbstractTemplatePanel.java#L70 > > > > > > > > -- > > > > WBR > > > > Maxim aka solomax > > > > > > > > > > > > > > > -- > > WBR > > Maxim aka solomax > > > -- WBR Maxim aka solomax
Re: (Customizable) Fragment as String
On Thu, Oct 13, 2016 at 6:49 PM, Maxim Solodovnik wrote: > Hello Martin, > > Thanks for the quick response! > > On Thu, Oct 13, 2016 at 11:39 PM, Martin Grigorov > wrote: > > > Hi Maxim, > > > > On Thu, Oct 13, 2016 at 6:10 PM, Maxim Solodovnik > > wrote: > > > > > Hello All, > > > > > > I'm successfully using following code [1] to get Panel as String > > > Unfortunately It is not possible to get Fragment as String this way :( > > > > > > > You can replace your util with ComponentRenderer#renderComponent() > > https://github.com/apache/wicket/blob/70606d73e9165d37c1d8b7c7820279 > > fb4be18770/wicket-core/src/main/java/org/apache/wicket/core/util/string/ > > ComponentRenderer.java#L86 > > The problem here is that your helper page doesn't provide the Fragment's > > markup. Someone has to provide it. > > > > > I have added following block to [2] > No, you have not! There is no 'fragment' in [2] and [3] Or you did it locally ? Better create a branch and point us to it. > wicket:id="title"> wicket:id="start"> - wicket:fragment> > > then I have added following code to [3] > > Fragment f = new Fragment(TemplatePage.COMP_ID, "subject", this); > f.add(new OmTextLabel("prefix", 1151L, langId) > , new OmTextLabel("title", a.getTitle()) > , new OmTextLabel("start", > CalendarPatterns.getDateWithTimeByMiliSecondsAndTimeZone(a.getStart(), > tz)) > , new OmTextLabel("end", > CalendarPatterns.getDateWithTimeByMiliSecondsAndTimeZone(a.getEnd(), tz)) > ); > > so I I was hoping markup should be available but it's not :( > > [3] > https://github.com/apache/openmeetings/blob/3.1.x/ > openmeetings-service/src/main/java/org/apache/openmeetings/ > service/mail/template/CreatedAppointmentTemplate.java > > [2] > https://github.com/apache/openmeetings/blob/3.1.x/ > openmeetings-service/src/main/java/org/apache/openmeetings/ > service/mail/template/CreatedAppointmentTemplate.html#L33 > > > > > > > > > > The goal I'm trying to achieve is: store email subject as > wicket:fragment > > > > > > Another question is: is it possible to edit markup like this > > > - > > wicket:id="aa3"> > > > > > > to be able to remove some blocks without breaking the rendering > > > > > > so I can modify the markup something like this > > > - > > wicket:id="aa2"> > > > > > > The java code will remain the same: > > > comp.add(new Label("aa1", "AA1"), new Label("aa2", "AA2"), new > > Label("aa3", > > > "AA3")) > > > > > > > Just make aa2 and aa3 inviible (e.g. aa2.setVisible(false)) > > > > > Actually we have markup files unpacked, so end users can add some > modifications to it > So I need to let users to modify fragments without recompiling or java > programming > re-arraging blocks is OK, but removing > I'm afraid you will need to use auto-components for such requirement. E.g. in the markup and IComponentResolver in Java that knows what to do with such elements in the markup. E.g. it will instantiate a Label and set its model by reading some special attribute. > > > > > > > > > And I'll get > > > AA1 > > > as a result without any errors/warnings > > > > > > Thanks in advance! > > > > > > [1] > > > https://github.com/apache/openmeetings/blob/3.1.x/ > > > openmeetings-service/src/main/java/org/apache/openmeetings/ > > > service/mail/template/AbstractTemplatePanel.java#L70 > > > > > > -- > > > WBR > > > Maxim aka solomax > > > > > > > > > -- > WBR > Maxim aka solomax >
Re: (Customizable) Fragment as String
Hello Martin, Thanks for the quick response! On Thu, Oct 13, 2016 at 11:39 PM, Martin Grigorov wrote: > Hi Maxim, > > On Thu, Oct 13, 2016 at 6:10 PM, Maxim Solodovnik > wrote: > > > Hello All, > > > > I'm successfully using following code [1] to get Panel as String > > Unfortunately It is not possible to get Fragment as String this way :( > > > > You can replace your util with ComponentRenderer#renderComponent() > https://github.com/apache/wicket/blob/70606d73e9165d37c1d8b7c7820279 > fb4be18770/wicket-core/src/main/java/org/apache/wicket/core/util/string/ > ComponentRenderer.java#L86 > The problem here is that your helper page doesn't provide the Fragment's > markup. Someone has to provide it. > > I have added following block to [2] - then I have added following code to [3] Fragment f = new Fragment(TemplatePage.COMP_ID, "subject", this); f.add(new OmTextLabel("prefix", 1151L, langId) , new OmTextLabel("title", a.getTitle()) , new OmTextLabel("start", CalendarPatterns.getDateWithTimeByMiliSecondsAndTimeZone(a.getStart(), tz)) , new OmTextLabel("end", CalendarPatterns.getDateWithTimeByMiliSecondsAndTimeZone(a.getEnd(), tz)) ); so I I was hoping markup should be available but it's not :( [3] https://github.com/apache/openmeetings/blob/3.1.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/CreatedAppointmentTemplate.java [2] https://github.com/apache/openmeetings/blob/3.1.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/CreatedAppointmentTemplate.html#L33 > > > > > The goal I'm trying to achieve is: store email subject as wicket:fragment > > > > Another question is: is it possible to edit markup like this > > - > wicket:id="aa3"> > > > > to be able to remove some blocks without breaking the rendering > > > > so I can modify the markup something like this > > - > wicket:id="aa2"> > > > > The java code will remain the same: > > comp.add(new Label("aa1", "AA1"), new Label("aa2", "AA2"), new > Label("aa3", > > "AA3")) > > > > Just make aa2 and aa3 inviible (e.g. aa2.setVisible(false)) > > Actually we have markup files unpacked, so end users can add some modifications to it So I need to let users to modify fragments without recompiling or java programming re-arraging blocks is OK, but removing > > > > And I'll get > > AA1 > > as a result without any errors/warnings > > > > Thanks in advance! > > > > [1] > > https://github.com/apache/openmeetings/blob/3.1.x/ > > openmeetings-service/src/main/java/org/apache/openmeetings/ > > service/mail/template/AbstractTemplatePanel.java#L70 > > > > -- > > WBR > > Maxim aka solomax > > > -- WBR Maxim aka solomax
Re: (Customizable) Fragment as String
Hi Maxim, On Thu, Oct 13, 2016 at 6:10 PM, Maxim Solodovnik wrote: > Hello All, > > I'm successfully using following code [1] to get Panel as String > Unfortunately It is not possible to get Fragment as String this way :( > You can replace your util with ComponentRenderer#renderComponent() https://github.com/apache/wicket/blob/70606d73e9165d37c1d8b7c7820279fb4be18770/wicket-core/src/main/java/org/apache/wicket/core/util/string/ComponentRenderer.java#L86 The problem here is that your helper page doesn't provide the Fragment's markup. Someone has to provide it. > > The goal I'm trying to achieve is: store email subject as wicket:fragment > > Another question is: is it possible to edit markup like this > - wicket:id="aa3"> > > to be able to remove some blocks without breaking the rendering > > so I can modify the markup something like this > - wicket:id="aa2"> > > The java code will remain the same: > comp.add(new Label("aa1", "AA1"), new Label("aa2", "AA2"), new Label("aa3", > "AA3")) > Just make aa2 and aa3 inviible (e.g. aa2.setVisible(false)) > > And I'll get > AA1 > as a result without any errors/warnings > > Thanks in advance! > > [1] > https://github.com/apache/openmeetings/blob/3.1.x/ > openmeetings-service/src/main/java/org/apache/openmeetings/ > service/mail/template/AbstractTemplatePanel.java#L70 > > -- > WBR > Maxim aka solomax >
(Customizable) Fragment as String
Hello All, I'm successfully using following code [1] to get Panel as String Unfortunately It is not possible to get Fragment as String this way :( The goal I'm trying to achieve is: store email subject as wicket:fragment Another question is: is it possible to edit markup like this - to be able to remove some blocks without breaking the rendering so I can modify the markup something like this - The java code will remain the same: comp.add(new Label("aa1", "AA1"), new Label("aa2", "AA2"), new Label("aa3", "AA3")) And I'll get AA1 as a result without any errors/warnings Thanks in advance! [1] https://github.com/apache/openmeetings/blob/3.1.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/AbstractTemplatePanel.java#L70 -- WBR Maxim aka solomax
Re: Cannot place a fragment inside a form element
Thank Martin. it works fine now :) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Cannot-place-a-fragment-inside-a-form-element-tp4664841p4664847.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Cannot place a fragment inside a form element
Hi, Thanks! This is much better now! On Fri, Mar 7, 2014 at 10:20 AM, chathuraka.waas wrote: > Hi Martin, > > Thanks for your guidance on how to post a question. > > My scenario is like this. > > i'm having a webpage where i have a panel inside it and then inside the > panel i have a form where i'm placing a fragment conditionally. > > This the code for adding the panel to the page. > > > > This is the code for adding the fragment. > > > > > > The fragment is a child of a component with wicket:id "MenuPanel". > > > sample test > > test message: 244326. > > Your name is: > > > > > this is how i add the fragment in my corresponding panel.java class. > > Fragment testFrag = new Fragment("MenuPanel","testFragment", this); > The problem is that the fragment markup container is 'this' (the third argument), where 'this' is MenuFirstPanel.java It must be the enclosing parent of the , i.e. the form. Fragment testFrag = new Fragment("MenuPanel","testFragment", form); > testFrag.add(new Label("shortcode", "1"); > add(testFrag); > > > when i do this the following exception is thrown: > > org.apache.wicket.markup.MarkupNotFoundException: No Markup found for > Fragment 'testFragment' in providing markup container [MenuFirstPanel > [Component id = MenuFirstPanel]] > at > > org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.getMarkup(FragmentMarkupSourcingStrategy.java:145) > at > org.apache.wicket.MarkupContainer.getMarkup(MarkupContainer.java:451) > at org.apache.wicket.Component.getMarkup(Component.java:743) > at org.apache.wicket.Component.getMarkupTag(Component.java:1389) > at > org.apache.wicket.Component.getMarkupIdFromMarkup(Component.java:752) > at org.apache.wicket.Component.getMarkupIdImpl(Component.java:1446) > at org.apache.wicket.Component.getMarkupId(Component.java:1474) > > > I tried moving the fragment code outside the form element and it works fine > without an issue. can any one shed some light on this issue. Thanks in > advance. > > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Cannot-place-a-fragment-inside-a-form-element-tp4664841p4664843.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Cannot place a fragment inside a form element
Hi Martin, Thanks for your guidance on how to post a question. My scenario is like this. i'm having a webpage where i have a panel inside it and then inside the panel i have a form where i'm placing a fragment conditionally. This the code for adding the panel to the page. This is the code for adding the fragment. sample test test message: 244326. Your name is: this is how i add the fragment in my corresponding panel.java class. Fragment testFrag = new Fragment("MenuPanel","testFragment", this); testFrag.add(new Label("shortcode", "1"); add(testFrag); when i do this the following exception is thrown: org.apache.wicket.markup.MarkupNotFoundException: No Markup found for Fragment 'testFragment' in providing markup container [MenuFirstPanel [Component id = MenuFirstPanel]] at org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.getMarkup(FragmentMarkupSourcingStrategy.java:145) at org.apache.wicket.MarkupContainer.getMarkup(MarkupContainer.java:451) at org.apache.wicket.Component.getMarkup(Component.java:743) at org.apache.wicket.Component.getMarkupTag(Component.java:1389) at org.apache.wicket.Component.getMarkupIdFromMarkup(Component.java:752) at org.apache.wicket.Component.getMarkupIdImpl(Component.java:1446) at org.apache.wicket.Component.getMarkupId(Component.java:1474) I tried moving the fragment code outside the form element and it works fine without an issue. can any one shed some light on this issue. Thanks in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Cannot-place-a-fragment-inside-a-form-element-tp4664841p4664843.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Cannot place a fragment inside a form element
Hi, You need to improve a bit the way you ask your questions if you want someone to help you. Your messages are too short/vague to be able to help you. Usually sharing the code snippet that causes the problem, the exception stacktrace and information like "it worked this way" but "doesn't work that way" help us get the picture. Recently you asked about something else ( http://markmail.org/message/ywgeughzov5zwv2e) that left without answer just because you try to explain the problem in one short sentense. Good luck! Martin Grigorov Wicket Training and Consulting On Fri, Mar 7, 2014 at 9:00 AM, chathuraka.waas wrote: > Hi, > > i'm trying to migrate from wicket 1.4 to 6.13 and it seems i cannot place > fragments inside the form elements. i get an markupIdNotFound Exception. > can > anyone help me out with this issue. > > thanks in advance. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Cannot-place-a-fragment-inside-a-form-element-tp4664841.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Cannot place a fragment inside a form element
Hi, i'm trying to migrate from wicket 1.4 to 6.13 and it seems i cannot place fragments inside the form elements. i get an markupIdNotFound Exception. can anyone help me out with this issue. thanks in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Cannot-place-a-fragment-inside-a-form-element-tp4664841.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: markup not found exception for fragment which is part of wicket:extend
Hi, Thanks for the information , the 'markup provider' info - gave me some insights and after debugging with this info, I was able to solve my issue by adding a wrapper [WebMarkupContainer] in one of the classes in my class hierarchy. Thanks, Rakesh.A -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/markup-not-found-exception-for-fragment-which-is-part-of-wicket-extend-tp4660037p4660052.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: markup not found exception for fragment which is part of wicket:extend
Should be. Sven On 07/04/2013 12:10 PM, Rakesh A wrote: Hi, Will it be the same [dialog instance as markup provider instead of page instance] if the fragment is part of wicket modal dialog? Regards, Rakesh.A -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/markup-not-found-exception-for-fragment-which-is-part-of-wicket-extend-tp4660037p4660049.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: markup not found exception for fragment which is part of wicket:extend
Hi, Will it be the same [dialog instance as markup provider instead of page instance] if the fragment is part of wicket modal dialog? Regards, Rakesh.A -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/markup-not-found-exception-for-fragment-which-is-part-of-wicket-extend-tp4660037p4660049.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: markup not found exception for fragment which is part of wicket:extend
Hi, I don't know why it did work in 1.4.x, but the following doesn't make sense: final Fragment fragmentTwo = new Fragment(myList.newChildId(), "fragmentTwo", myList); "myList" is not the provider of the fragment's markup, the ListView doesn't contain it. It's the page which contains it: final Fragment fragmentTwo = new Fragment(myList.newChildId(), "fragmentTwo", this); This does work in 6.x Sven On 07/04/2013 07:50 AM, Rakesh A wrote: Hi, I am using Wicket v6.5.0, I've code where wicket fragments are part of '' tag and I get exception that Markup is not found for the fragment, same piece of code works in Wicket v1.4.21. I created & attached a quick start with code similar to my case. fragmentTest.zip <http://apache-wicket.1842946.n4.nabble.com/file/n4660037/fragmentTest.zip> Regards, Rakesh.A -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/markup-not-found-exception-for-fragment-which-is-part-of-wicket-extend-tp4660037.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
markup not found exception for fragment which is part of wicket:extend
Hi, I am using Wicket v6.5.0, I've code where wicket fragments are part of '' tag and I get exception that Markup is not found for the fragment, same piece of code works in Wicket v1.4.21. I created & attached a quick start with code similar to my case. fragmentTest.zip <http://apache-wicket.1842946.n4.nabble.com/file/n4660037/fragmentTest.zip> Regards, Rakesh.A -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/markup-not-found-exception-for-fragment-which-is-part-of-wicket-extend-tp4660037.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: URL fragment parsing
Hi, The browser doesn't send this information to the server. You need to read it with JS and send it manually (Ajax). Earlier today another user shared his project in GitHub about the same. Read the mail archives. On Tue, Feb 26, 2013 at 7:02 PM, Maxim Solodovnik wrote: > AFAIK it is impossible to read URL hash on the server side > Hopefully somebody can write component for that :) I use JS (with the hack > to pass authorization) > > > On Tue, Feb 26, 2013 at 11:40 PM, Michael Chandler < > michael.chand...@onassignment.com> wrote: > > > Is it possible to read and parse values in the URL fragment within the > > Wicket API or am I restricted to using JavaScript for that? For example, > > if I have a URI of http://mydomain.com/my/path#token=&key= is > > there a Wicket solution for reading those values or am I stuck with > > JavaScript? > > > > Mike Chandler > > > > > > > -- > WBR > Maxim aka solomax > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com <http://jweekend.com/>
Re: URL fragment parsing
AFAIK it is impossible to read URL hash on the server side Hopefully somebody can write component for that :) I use JS (with the hack to pass authorization) On Tue, Feb 26, 2013 at 11:40 PM, Michael Chandler < michael.chand...@onassignment.com> wrote: > Is it possible to read and parse values in the URL fragment within the > Wicket API or am I restricted to using JavaScript for that? For example, > if I have a URI of http://mydomain.com/my/path#token=&key= is > there a Wicket solution for reading those values or am I stuck with > JavaScript? > > Mike Chandler > > -- WBR Maxim aka solomax
Re: update webmarkupcontainer from fragment , container onBeforeRender() method is not being called
found the issue , its becasue of not using onConfigure or callOnBeforeRenderIfNotVisible -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/update-webmarkupcontainer-from-fragment-container-onBeforeRender-method-is-not-being-called-tp4653960p4654030.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
update webmarkupcontainer from fragment , container onBeforeRender() method is not being called
I have a fragment with a link inside, onclick of this link I want to update a webmarkupcontainer in my page for which I add this container to the target. surprisingly its not calling onBeforeRender() method of this container, in ajaxdebug window I see the container mark in the response ? I am still using wicket 1.4.12, Please advice. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/update-webmarkupcontainer-from-fragment-container-onBeforeRender-method-is-not-being-called-tp4653960.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket fragment is not working inside wicket extend in wicket 1.5.3
hi, Can u give me the exact solution whether the fragments inside wicket:extend are working in wicket 1.5.3 or not. On Mon, Aug 20, 2012 at 3:41 PM, Thomas Matthijs wrote: > On Mon, Aug 20, 2012 at 11:57 AM, bala ji wrote: > > I've added a scenario where i need to use wicket:fragments. > > > > ... > > Example input (will be removed) > > ... > > panel 1 > > panel 2 > > > > > > The above situation is working fine in case of wicket 1.4, but now in > > wicket 1.5.3 its giving me an error of No Markup found. > > > > I attached the sample project, please give me the solution for the > problems > > > > If you remove the TransparentWebMarkupContainer from the BasePage it > works, so fragments are fine in wicket:extends, but the transparent > container somehow seems to mess it up (i have never used TWMC before, > so not sure how its supposed to work) > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Balaji.N
Re: Wicket fragment is not working inside wicket extend in wicket 1.5.3
On Mon, Aug 20, 2012 at 11:57 AM, bala ji wrote: > I've added a scenario where i need to use wicket:fragments. > > ... > Example input (will be removed) > ... > panel 1 > panel 2 > > > The above situation is working fine in case of wicket 1.4, but now in > wicket 1.5.3 its giving me an error of No Markup found. > > I attached the sample project, please give me the solution for the problems > If you remove the TransparentWebMarkupContainer from the BasePage it works, so fragments are fine in wicket:extends, but the transparent container somehow seems to mess it up (i have never used TWMC before, so not sure how its supposed to work) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ComponentNotFoundException when replace a fragment
Filed WICKET-4689. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ComponentNotFoundException when replace a fragment
Yes. Wicket sends a message on topic '/dom/node/removed' for each removed element. Using its id we can stop the timer. Please file the ticket :-) On Wed, Aug 1, 2012 at 6:20 PM, Bertrand Guay-Paquet wrote: > Would this work if done on the client? > > New code when ajax response is received : > replacedDOMElement = ...; > $replacedDOMElement = $(replacedDOMElement); > for each js timers: > $component = $(timer.component); > if( $replacedDOMElement.is($component) || > $replacedDOMElement.find($component ).length ) { > > cancelTimer(timer); > > } > > On 01/08/2012 10:37 AM, Martin Grigorov wrote: >> >> I see. >> I'm not sure how Wicket can detect this situation ... >> >> A workaround would require some coding from the developer - when he >> replaces the component he has to call additionally: >> timerBehavior.stop(target). >> This will clear the scheduled timeout in the browser. >> >> On Wed, Aug 1, 2012 at 5:31 PM, Bertrand Guay-Paquet >> wrote: >>> >>> Yes I was using -beta3 since this is what Alex used. I just tried it with >>> -SNAPSHOT (commit b89909c1fa99ae6973c3fb0738a966eb23c27e73) and I get the >>> same exception. >>> >>> You say that: >>> >>> >>> The precondition checks that the component (html element) on which is >>> attached the timer behavior is still in the DOM document. >>> >>> >>> In this case, the component id is still in the DOM (it was replaced by >>> another one by the same id). The problem is that on the java side, the >>> component is different and does not have a timer behavior attached, hence >>> the callback fails. >>> >>> >>> On 01/08/2012 10:14 AM, Martin Grigorov wrote: Do you use -beta3 ? There was a bug which is fixed in -SNAPSHOT. That's why I know how it works ;-) On Wed, Aug 1, 2012 at 5:12 PM, Bertrand Guay-Paquet wrote: > > On 01/08/2012 9:58 AM, Martin Grigorov wrote: >> >> >> No. >> The timer is fired but the precondition prevents the Ajax call. >> The precondition checks that the component (html element) on which is >> attached the timer behavior is still in the DOM document. > > Hmm... I don't quite know what to say! In my tests, the timer is still > fired > event after its attached component is replaced. > > Here is the sequence of requests captured in Firebug: > > Ajax Request 1 (timer callback): > > http://localhost:8080/?2-1.IBehaviorListener.0-fragments&_=1343829988777 > > Wicket.timerHandle_fragments3 = > > > setTimeout('Wicket.Ajax.ajax({\"u\":\"./.?2-1.IBehaviorListener.0-fragments\",\"c\":\"fragments3\"});', > 2000) > > > Ajax Request 2 (click ajax link to replace the component "fragments"): > http://localhost:8080/?2-1.IBehaviorListener.0-remove&_=1343829990235 > > id="fragments3">WMC > > > Ajax Request 3 (timer callback): > > http://localhost:8080/?2-1.IBehaviorListener.0-fragments&_=1343829990803 > Throws exception: > org.apache.wicket.behavior.InvalidBehaviorIdException: Cannot find > behavior > with id '0' on component > 'org.apache.wicket.markup.html.WebMarkupContainer:fragments' in page > '[Page > class = com.mycompany.HomePage, id = 2, render count = 1]'. Perhaps the > behavior did not properly implement getStatelessHint() and returned > 'true' > to indicate that it is stateless instead of returning 'false' to > indicate > that it is stateful. > > (this is a different exception than reported by Alex, but it looks like > the > same symptom) > > IMHO, the AjaxTimerBehavior should have been removed during the request > #2 > since the replacement component does not have it attached. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >> >> > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ComponentNotFoundException when replace a fragment
Would this work if done on the client? New code when ajax response is received : replacedDOMElement = ...; $replacedDOMElement = $(replacedDOMElement); for each js timers: $component = $(timer.component); if( $replacedDOMElement.is($component) || $replacedDOMElement.find($component ).length ) { cancelTimer(timer); } On 01/08/2012 10:37 AM, Martin Grigorov wrote: I see. I'm not sure how Wicket can detect this situation ... A workaround would require some coding from the developer - when he replaces the component he has to call additionally: timerBehavior.stop(target). This will clear the scheduled timeout in the browser. On Wed, Aug 1, 2012 at 5:31 PM, Bertrand Guay-Paquet wrote: Yes I was using -beta3 since this is what Alex used. I just tried it with -SNAPSHOT (commit b89909c1fa99ae6973c3fb0738a966eb23c27e73) and I get the same exception. You say that: The precondition checks that the component (html element) on which is attached the timer behavior is still in the DOM document. In this case, the component id is still in the DOM (it was replaced by another one by the same id). The problem is that on the java side, the component is different and does not have a timer behavior attached, hence the callback fails. On 01/08/2012 10:14 AM, Martin Grigorov wrote: Do you use -beta3 ? There was a bug which is fixed in -SNAPSHOT. That's why I know how it works ;-) On Wed, Aug 1, 2012 at 5:12 PM, Bertrand Guay-Paquet wrote: On 01/08/2012 9:58 AM, Martin Grigorov wrote: No. The timer is fired but the precondition prevents the Ajax call. The precondition checks that the component (html element) on which is attached the timer behavior is still in the DOM document. Hmm... I don't quite know what to say! In my tests, the timer is still fired event after its attached component is replaced. Here is the sequence of requests captured in Firebug: Ajax Request 1 (timer callback): http://localhost:8080/?2-1.IBehaviorListener.0-fragments&_=1343829988777 Wicket.timerHandle_fragments3 = setTimeout('Wicket.Ajax.ajax({\"u\":\"./.?2-1.IBehaviorListener.0-fragments\",\"c\":\"fragments3\"});', 2000) Ajax Request 2 (click ajax link to replace the component "fragments"): http://localhost:8080/?2-1.IBehaviorListener.0-remove&_=1343829990235 WMC Ajax Request 3 (timer callback): http://localhost:8080/?2-1.IBehaviorListener.0-fragments&_=1343829990803 Throws exception: org.apache.wicket.behavior.InvalidBehaviorIdException: Cannot find behavior with id '0' on component 'org.apache.wicket.markup.html.WebMarkupContainer:fragments' in page '[Page class = com.mycompany.HomePage, id = 2, render count = 1]'. Perhaps the behavior did not properly implement getStatelessHint() and returned 'true' to indicate that it is stateless instead of returning 'false' to indicate that it is stateful. (this is a different exception than reported by Alex, but it looks like the same symptom) IMHO, the AjaxTimerBehavior should have been removed during the request #2 since the replacement component does not have it attached. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ComponentNotFoundException when replace a fragment
I see. I'm not sure how Wicket can detect this situation ... A workaround would require some coding from the developer - when he replaces the component he has to call additionally: timerBehavior.stop(target). This will clear the scheduled timeout in the browser. On Wed, Aug 1, 2012 at 5:31 PM, Bertrand Guay-Paquet wrote: > Yes I was using -beta3 since this is what Alex used. I just tried it with > -SNAPSHOT (commit b89909c1fa99ae6973c3fb0738a966eb23c27e73) and I get the > same exception. > > You say that: > > > The precondition checks that the component (html element) on which is > attached the timer behavior is still in the DOM document. > > > In this case, the component id is still in the DOM (it was replaced by > another one by the same id). The problem is that on the java side, the > component is different and does not have a timer behavior attached, hence > the callback fails. > > > On 01/08/2012 10:14 AM, Martin Grigorov wrote: >> >> Do you use -beta3 ? >> There was a bug which is fixed in -SNAPSHOT. That's why I know how it >> works ;-) >> >> On Wed, Aug 1, 2012 at 5:12 PM, Bertrand Guay-Paquet >> wrote: >>> >>> On 01/08/2012 9:58 AM, Martin Grigorov wrote: No. The timer is fired but the precondition prevents the Ajax call. The precondition checks that the component (html element) on which is attached the timer behavior is still in the DOM document. >>> >>> Hmm... I don't quite know what to say! In my tests, the timer is still >>> fired >>> event after its attached component is replaced. >>> >>> Here is the sequence of requests captured in Firebug: >>> >>> Ajax Request 1 (timer callback): >>> http://localhost:8080/?2-1.IBehaviorListener.0-fragments&_=1343829988777 >>> >>> Wicket.timerHandle_fragments3 = >>> >>> setTimeout('Wicket.Ajax.ajax({\"u\":\"./.?2-1.IBehaviorListener.0-fragments\",\"c\":\"fragments3\"});', >>> 2000) >>> >>> >>> Ajax Request 2 (click ajax link to replace the component "fragments"): >>> http://localhost:8080/?2-1.IBehaviorListener.0-remove&_=1343829990235 >>> >>> >> id="fragments3">WMC >>> >>> >>> Ajax Request 3 (timer callback): >>> http://localhost:8080/?2-1.IBehaviorListener.0-fragments&_=1343829990803 >>> Throws exception: >>> org.apache.wicket.behavior.InvalidBehaviorIdException: Cannot find >>> behavior >>> with id '0' on component >>> 'org.apache.wicket.markup.html.WebMarkupContainer:fragments' in page >>> '[Page >>> class = com.mycompany.HomePage, id = 2, render count = 1]'. Perhaps the >>> behavior did not properly implement getStatelessHint() and returned >>> 'true' >>> to indicate that it is stateless instead of returning 'false' to indicate >>> that it is stateful. >>> >>> (this is a different exception than reported by Alex, but it looks like >>> the >>> same symptom) >>> >>> IMHO, the AjaxTimerBehavior should have been removed during the request >>> #2 >>> since the replacement component does not have it attached. >>> >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >> >> > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ComponentNotFoundException when replace a fragment
Yes I was using -beta3 since this is what Alex used. I just tried it with -SNAPSHOT (commit b89909c1fa99ae6973c3fb0738a966eb23c27e73) and I get the same exception. You say that: The precondition checks that the component (html element) on which is attached the timer behavior is still in the DOM document. In this case, the component id is still in the DOM (it was replaced by another one by the same id). The problem is that on the java side, the component is different and does not have a timer behavior attached, hence the callback fails. On 01/08/2012 10:14 AM, Martin Grigorov wrote: Do you use -beta3 ? There was a bug which is fixed in -SNAPSHOT. That's why I know how it works ;-) On Wed, Aug 1, 2012 at 5:12 PM, Bertrand Guay-Paquet wrote: On 01/08/2012 9:58 AM, Martin Grigorov wrote: No. The timer is fired but the precondition prevents the Ajax call. The precondition checks that the component (html element) on which is attached the timer behavior is still in the DOM document. Hmm... I don't quite know what to say! In my tests, the timer is still fired event after its attached component is replaced. Here is the sequence of requests captured in Firebug: Ajax Request 1 (timer callback): http://localhost:8080/?2-1.IBehaviorListener.0-fragments&_=1343829988777 Wicket.timerHandle_fragments3 = setTimeout('Wicket.Ajax.ajax({\"u\":\"./.?2-1.IBehaviorListener.0-fragments\",\"c\":\"fragments3\"});', 2000) Ajax Request 2 (click ajax link to replace the component "fragments"): http://localhost:8080/?2-1.IBehaviorListener.0-remove&_=1343829990235 WMC Ajax Request 3 (timer callback): http://localhost:8080/?2-1.IBehaviorListener.0-fragments&_=1343829990803 Throws exception: org.apache.wicket.behavior.InvalidBehaviorIdException: Cannot find behavior with id '0' on component 'org.apache.wicket.markup.html.WebMarkupContainer:fragments' in page '[Page class = com.mycompany.HomePage, id = 2, render count = 1]'. Perhaps the behavior did not properly implement getStatelessHint() and returned 'true' to indicate that it is stateless instead of returning 'false' to indicate that it is stateful. (this is a different exception than reported by Alex, but it looks like the same symptom) IMHO, the AjaxTimerBehavior should have been removed during the request #2 since the replacement component does not have it attached. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ComponentNotFoundException when replace a fragment
Do you use -beta3 ? There was a bug which is fixed in -SNAPSHOT. That's why I know how it works ;-) On Wed, Aug 1, 2012 at 5:12 PM, Bertrand Guay-Paquet wrote: > On 01/08/2012 9:58 AM, Martin Grigorov wrote: >> >> >> No. >> The timer is fired but the precondition prevents the Ajax call. >> The precondition checks that the component (html element) on which is >> attached the timer behavior is still in the DOM document. > > Hmm... I don't quite know what to say! In my tests, the timer is still fired > event after its attached component is replaced. > > Here is the sequence of requests captured in Firebug: > > Ajax Request 1 (timer callback): > http://localhost:8080/?2-1.IBehaviorListener.0-fragments&_=1343829988777 > > Wicket.timerHandle_fragments3 = > setTimeout('Wicket.Ajax.ajax({\"u\":\"./.?2-1.IBehaviorListener.0-fragments\",\"c\":\"fragments3\"});', > 2000) > > > Ajax Request 2 (click ajax link to replace the component "fragments"): > http://localhost:8080/?2-1.IBehaviorListener.0-remove&_=1343829990235 > > id="fragments3">WMC > > > Ajax Request 3 (timer callback): > http://localhost:8080/?2-1.IBehaviorListener.0-fragments&_=1343829990803 > Throws exception: > org.apache.wicket.behavior.InvalidBehaviorIdException: Cannot find behavior > with id '0' on component > 'org.apache.wicket.markup.html.WebMarkupContainer:fragments' in page '[Page > class = com.mycompany.HomePage, id = 2, render count = 1]'. Perhaps the > behavior did not properly implement getStatelessHint() and returned 'true' > to indicate that it is stateless instead of returning 'false' to indicate > that it is stateful. > > (this is a different exception than reported by Alex, but it looks like the > same symptom) > > IMHO, the AjaxTimerBehavior should have been removed during the request #2 > since the replacement component does not have it attached. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ComponentNotFoundException when replace a fragment
On 01/08/2012 9:58 AM, Martin Grigorov wrote: No. The timer is fired but the precondition prevents the Ajax call. The precondition checks that the component (html element) on which is attached the timer behavior is still in the DOM document. Hmm... I don't quite know what to say! In my tests, the timer is still fired event after its attached component is replaced. Here is the sequence of requests captured in Firebug: Ajax Request 1 (timer callback): http://localhost:8080/?2-1.IBehaviorListener.0-fragments&_=1343829988777 Wicket.timerHandle_fragments3 = setTimeout('Wicket.Ajax.ajax({\"u\":\"./.?2-1.IBehaviorListener.0-fragments\",\"c\":\"fragments3\"});', 2000) Ajax Request 2 (click ajax link to replace the component "fragments"): http://localhost:8080/?2-1.IBehaviorListener.0-remove&_=1343829990235 id="fragments3">WMC Ajax Request 3 (timer callback): http://localhost:8080/?2-1.IBehaviorListener.0-fragments&_=1343829990803 Throws exception: org.apache.wicket.behavior.InvalidBehaviorIdException: Cannot find behavior with id '0' on component 'org.apache.wicket.markup.html.WebMarkupContainer:fragments' in page '[Page class = com.mycompany.HomePage, id = 2, render count = 1]'. Perhaps the behavior did not properly implement getStatelessHint() and returned 'true' to indicate that it is stateless instead of returning 'false' to indicate that it is stateful. (this is a different exception than reported by Alex, but it looks like the same symptom) IMHO, the AjaxTimerBehavior should have been removed during the request #2 since the replacement component does not have it attached. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ComponentNotFoundException when replace a fragment
On Wed, Aug 1, 2012 at 4:55 PM, Bertrand Guay-Paquet wrote: > Hi Alex, > > I tried your code and stripped it down as much as possible and couldn't find > anything wrong with it. My guess is that Wicket ajax does not remove timers > from replaced components in ajax responses. Therefore, the javascript > timeout function is still executed on the client even if its related > component is removed from the page. No. The timer is fired but the precondition prevents the Ajax call. The precondition checks that the component (html element) on which is attached the timer behavior is still in the DOM document. > > Please file a JIRA issue. I suggest using the simpler version below as a > quickstart: > > HomePage.html > "http://www.w3.org/TR/html4/loose.dtd";> > http://wicket.apache.org";> > > Replace the panel with attached time > behavior > WMC > > > > HomePage.java > import org.apache.log4j.Logger; > import org.apache.wicket.Component; > import org.apache.wicket.util.time.Duration; > import org.apache.wicket.ajax.AbstractAjaxTimerBehavior; > import org.apache.wicket.ajax.AjaxRequestTarget; > import org.apache.wicket.ajax.markup.html.AjaxLink; > import org.apache.wicket.markup.html.WebMarkupContainer; > import org.apache.wicket.markup.html.WebPage; > > public class HomePage extends WebPage { > private static final Logger LOGGER = Logger.getLogger(HomePage.class); > private static final String TIMER_COMPONENT_ID = "fragments"; > > public HomePage() { > Component fragment = new WebMarkupContainer(TIMER_COMPONENT_ID); > fragment.add(new AbstractAjaxTimerBehavior(Duration.seconds(2)) { > @Override > protected void onTimer(AjaxRequestTarget target) { > LOGGER.error("Timeout"); > } > }); > add(fragment.setOutputMarkupId(true)); > > add(new AjaxLink("remove") { > @Override > public void onClick(AjaxRequestTarget target) { > Component fragment = new > WebMarkupContainer(TIMER_COMPONENT_ID); > HomePage.this.replace(fragment); > target.add(fragment); > } > }); > } > } > > Bertrand > > > > On 01/08/2012 3:34 AM, Alex66955 wrote: >> >> TestParent.java >> >> >> TestParent.html >> >> >> TestChild.java >> >> >> TestChild.html >> >> >> Output: >> >> >> >> >> -- >> View this message in context: >> http://apache-wicket.1842946.n4.nabble.com/ComponentNotFoundException-when-replace-a-fragment-with-ajax-tp4650898p4650909.html >> Sent from the Users forum mailing list archive at Nabble.com. >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ComponentNotFoundException when replace a fragment
Hi Alex, I tried your code and stripped it down as much as possible and couldn't find anything wrong with it. My guess is that Wicket ajax does not remove timers from replaced components in ajax responses. Therefore, the javascript timeout function is still executed on the client even if its related component is removed from the page. Please file a JIRA issue. I suggest using the simpler version below as a quickstart: HomePage.html "http://www.w3.org/TR/html4/loose.dtd";> http://wicket.apache.org";> Replace the panel with attached time behavior WMC HomePage.java import org.apache.log4j.Logger; import org.apache.wicket.Component; import org.apache.wicket.util.time.Duration; import org.apache.wicket.ajax.AbstractAjaxTimerBehavior; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.markup.html.AjaxLink; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.WebPage; public class HomePage extends WebPage { private static final Logger LOGGER = Logger.getLogger(HomePage.class); private static final String TIMER_COMPONENT_ID = "fragments"; public HomePage() { Component fragment = new WebMarkupContainer(TIMER_COMPONENT_ID); fragment.add(new AbstractAjaxTimerBehavior(Duration.seconds(2)) { @Override protected void onTimer(AjaxRequestTarget target) { LOGGER.error("Timeout"); } }); add(fragment.setOutputMarkupId(true)); add(new AjaxLink("remove") { @Override public void onClick(AjaxRequestTarget target) { Component fragment = new WebMarkupContainer(TIMER_COMPONENT_ID); HomePage.this.replace(fragment); target.add(fragment); } }); } } Bertrand On 01/08/2012 3:34 AM, Alex66955 wrote: TestParent.java TestParent.html TestChild.java TestChild.html Output: -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ComponentNotFoundException-when-replace-a-fragment-with-ajax-tp4650898p4650909.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ComponentNotFoundException when replace a fragment
TestParent.java TestParent.html TestChild.java TestChild.html Output: -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ComponentNotFoundException-when-replace-a-fragment-with-ajax-tp4650898p4650909.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ComponentNotFoundException when replace a fragment
With the stack trace, I can only see that the listener (the object responsible for handling a request) component"mainContentFragmens:eagrPanel" is not found in the current page. Perhaps someone else can answer with only this but I would need code snippets showing how you manipulate your component tree. On 31/07/2012 12:12 PM, Alex66955 wrote: Sorry. In the wicket user forum the stack trace is shown (perhaps the RAW-TAG). I use wicket 6.0.0-beta3 trace: Last cause: Could not find component 'mainContentFragmens:eagrPanel' on page 'class com.vipco.spracherweiterung.CurrentDisplayPage org.apache.wicket.core.request.handler.ComponentNotFoundException: Could not find component 'mainContentFragmens:eagrPanel' on page 'class com.vipco.spracherweiterung.CurrentDisplayPage at org.apache.wicket.core.request.handler.PageAndComponentProvider.getComponent(PageAndComponentProvider.java:182) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.getComponent(ListenerInterfaceRequestHandler.java:90) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:231) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:814) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:253) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:281) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:245) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1326) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:940) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:874) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110) at org.eclipse.jetty.server.Server.handle(Server.java:349) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441) at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:904) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:565) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:217) at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:50) at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:245) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533) at java.lang.Thread.run(Thread.java:722) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ComponentNotFoundException-when-replace-a-fragment-with-ajax-tp4650898p4650902.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ComponentNotFoundException when replace a fragment
Sorry. In the wicket user forum the stack trace is shown (perhaps the RAW-TAG). I use wicket 6.0.0-beta3 trace: Last cause: Could not find component 'mainContentFragmens:eagrPanel' on page 'class com.vipco.spracherweiterung.CurrentDisplayPage org.apache.wicket.core.request.handler.ComponentNotFoundException: Could not find component 'mainContentFragmens:eagrPanel' on page 'class com.vipco.spracherweiterung.CurrentDisplayPage at org.apache.wicket.core.request.handler.PageAndComponentProvider.getComponent(PageAndComponentProvider.java:182) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.getComponent(ListenerInterfaceRequestHandler.java:90) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:231) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:814) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:253) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:281) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:245) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1326) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:940) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:874) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110) at org.eclipse.jetty.server.Server.handle(Server.java:349) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441) at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:904) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:565) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:217) at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:50) at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:245) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533) at java.lang.Thread.run(Thread.java:722) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ComponentNotFoundException-when-replace-a-fragment-with-ajax-tp4650898p4650902.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ComponentNotFoundException when replace a fragment
Hi Alex, Your stack trace did not show up on the mailing list. Please also show a snippet showing what throws the exception. Bertrand On 31/07/2012 10:44 AM, Alex66955 wrote: Hey, I have some issues when I replace a fragment in an ajax calback function. There is a parent class and a child class. The parent create an AbstractAjaxTimerBehavior and call in it the fragment with the child class. In the child class there is also an AbstractAjaxTimerBehavior to process some data to show. When I replace in the parent class ajax callback function the fragment, I get the follow exception "ComponentNotFoundException". I think the child ajax request search for the right component, but the component is replaced. How can I tell wicket that the component is no more valid or something else. My stack trace: Best regards Alex -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ComponentNotFoundException-when-replace-a-fragment-tp4650898.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ComponentNotFoundException when replace a fragment
Hey, I have some issues when I replace a fragment in an ajax calback function. There is a parent class and a child class. The parent create an AbstractAjaxTimerBehavior and call in it the fragment with the child class. In the child class there is also an AbstractAjaxTimerBehavior to process some data to show. When I replace in the parent class ajax callback function the fragment, I get the follow exception "ComponentNotFoundException". I think the child ajax request search for the right component, but the component is replaced. How can I tell wicket that the component is no more valid or something else. My stack trace: Best regards Alex -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ComponentNotFoundException-when-replace-a-fragment-tp4650898.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.6 - strange behavior with Fragment, ModalWindow and resources
done, WICKET-4669 On Tue, Jul 24, 2012 at 1:38 PM, Martin Grigorov wrote: > Hi, > > File a ticket please. > > On Tue, Jul 24, 2012 at 12:14 PM, Dan Simko wrote: > > Hi, > > > > I am not sure if it's a bug but in version 1.5 this code was working: > > > > > > public class HomePage extends WebPage { > > private static final long serialVersionUID = 1L; > > > > > > public HomePage(final PageParameters parameters) { > > super(parameters); > > > > final ModalWindow window = new ModalWindow("modal"); > > window.setContent(new MyFragment(ModalWindow.CONTENT_ID, this)); > > add(window); > > add(new AjaxLink("link") { > > @Override > > public void onClick(AjaxRequestTarget target) { > > window.show(target); > > } > > }); > > > > } > > // FIXME: If you uncomment this, resources will be added to the page and > > carousel will be created, > > // but only first time when you click on "show modal" link. Second time > > carousel is not created. > > //@Override > > //public void renderHead(IHeaderResponse response) { > > //response.render(JavaScriptHeaderItem.forReference(new > > PackageResourceReference(MyFragment.class, "jquery.jcarousel.js"))); > > //response.render(CssHeaderItem.forReference(new > > PackageResourceReference(MyFragment.class, "skin.css"))); > > //} > > > > private static class MyFragment extends Fragment{ > > > > public MyFragment(String id, MarkupContainer container) { > > super(id, "fragment", container); > > } > > > > //FIXME: resources are not added to the page head > > @Override > > public void renderHead(IHeaderResponse response) { > > response.render(JavaScriptHeaderItem.forReference(new > > PackageResourceReference(MyFragment.class, "jquery.jcarousel.js"))); > > response.render(CssHeaderItem.forReference(new > > PackageResourceReference(MyFragment.class, "skin.css"))); > > } > > > > } > > } > > > > > > Should I create a Jira? Quickstart is attached. > > > > Thanks in advance! > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > -- > Martin Grigorov > jWeekend > Training, Consulting, Development > http://jWeekend.com > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Wicket 1.6 - strange behavior with Fragment, ModalWindow and resources
Hi, File a ticket please. On Tue, Jul 24, 2012 at 12:14 PM, Dan Simko wrote: > Hi, > > I am not sure if it's a bug but in version 1.5 this code was working: > > > public class HomePage extends WebPage { > private static final long serialVersionUID = 1L; > > > public HomePage(final PageParameters parameters) { > super(parameters); > > final ModalWindow window = new ModalWindow("modal"); > window.setContent(new MyFragment(ModalWindow.CONTENT_ID, this)); > add(window); > add(new AjaxLink("link") { > @Override > public void onClick(AjaxRequestTarget target) { > window.show(target); > } > }); > > } > // FIXME: If you uncomment this, resources will be added to the page and > carousel will be created, > // but only first time when you click on "show modal" link. Second time > carousel is not created. > //@Override > //public void renderHead(IHeaderResponse response) { > //response.render(JavaScriptHeaderItem.forReference(new > PackageResourceReference(MyFragment.class, "jquery.jcarousel.js"))); > //response.render(CssHeaderItem.forReference(new > PackageResourceReference(MyFragment.class, "skin.css"))); > // } > > private static class MyFragment extends Fragment{ > > public MyFragment(String id, MarkupContainer container) { > super(id, "fragment", container); > } > > //FIXME: resources are not added to the page head > @Override > public void renderHead(IHeaderResponse response) { > response.render(JavaScriptHeaderItem.forReference(new > PackageResourceReference(MyFragment.class, "jquery.jcarousel.js"))); > response.render(CssHeaderItem.forReference(new > PackageResourceReference(MyFragment.class, "skin.css"))); > } > > } > } > > > Should I create a Jira? Quickstart is attached. > > Thanks in advance! > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Prevent a fragment from rendering the outer tag
Hi, fragment.setRenderBodyOnly(true) I have following markup: ... ... ... Foo Bar ... ... When adding "fragment-1" (instance of Fragment) to "page", it renders using Wicket 1.4.* as: ... ... ... Bar ... Foo ... How can I make the Fragment not to render the div-tag around Bar...: ... ... ... Bar ... Foo ... Thanks in advance. Tom - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Prevent a fragment from rendering the outer tag
I have following markup: ... ... ... Foo Bar ... ... When adding "fragment-1" (instance of Fragment) to "page", it renders using Wicket 1.4.* as: ... ... ... Bar ... Foo ... How can I make the Fragment not to render the div-tag around Bar...: ... ... ... Bar ... Foo ... Thanks in advance. Tom - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: MarkupNotFoundException for Fragment and TransparentWebMarkupContainer
JIRA Issue https://issues.apache.org/jira/browse/WICKET-4545 with quickstart created. Thanks for the "awkward" hint and for the quick hack. I'll use a Panel instead. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/MarkupNotFoundException-for-Fragment-and-TransparentWebMarkupContainer-tp4619968p4620173.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: MarkupNotFoundException for Fragment and TransparentWebMarkupContainer
I had the same problem. I solved it by using the transparent container as markup provider for the fragment: add(new MyFragment("fragmentId", getTransparentBodyContainer())) It works, but is kind of awkward, as subclasses shouldn't really know about transparent containers in the base class. Thomas On Wed, May 9, 2012 at 12:52 PM, Martin Grigorov wrote: > Hi, > > Create a ticket with a quickstart please. > As a workaround you can put the fragment in the base page's html. > > On Wed, May 9, 2012 at 1:18 PM, Dirk Forchel > wrote: > > Hello, > > I've a question regarding Fragements inside a > TransparentWebMarkupContainer. > > I've a base WebPage with a TransparentWebMarkupContainer to allow > subclasses > > register CSS classes on the body tag. If I add a Fragment to one of these > > subsclasses, the markup of the Fragment is not found. > > > > BasePage.java > > > > Markup of BasePage.html > > > > My subclass looks like: > > > > Markup of FragmentTestPage.html > > > > > > Why is it not possible to do this!? And why doesn't find the > > FragmentMarkupSourcingStrategy the markup for Fragment "testFragment" in > the > > providong markup container (Page class FragmentTestPage)? > > > > > > -- > > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/MarkupNotFoundException-for-Fragment-and-TransparentWebMarkupContainer-tp4619968.html > > Sent from the Users forum mailing list archive at Nabble.com. > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > -- > Martin Grigorov > jWeekend > Training, Consulting, Development > http://jWeekend.com > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: MarkupNotFoundException for Fragment and TransparentWebMarkupContainer
Hi, Create a ticket with a quickstart please. As a workaround you can put the fragment in the base page's html. On Wed, May 9, 2012 at 1:18 PM, Dirk Forchel wrote: > Hello, > I've a question regarding Fragements inside a TransparentWebMarkupContainer. > I've a base WebPage with a TransparentWebMarkupContainer to allow subclasses > register CSS classes on the body tag. If I add a Fragment to one of these > subsclasses, the markup of the Fragment is not found. > > BasePage.java > > Markup of BasePage.html > > My subclass looks like: > > Markup of FragmentTestPage.html > > > Why is it not possible to do this!? And why doesn't find the > FragmentMarkupSourcingStrategy the markup for Fragment "testFragment" in the > providong markup container (Page class FragmentTestPage)? > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/MarkupNotFoundException-for-Fragment-and-TransparentWebMarkupContainer-tp4619968.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
MarkupNotFoundException for Fragment and TransparentWebMarkupContainer
Hello, I've a question regarding Fragements inside a TransparentWebMarkupContainer. I've a base WebPage with a TransparentWebMarkupContainer to allow subclasses register CSS classes on the body tag. If I add a Fragment to one of these subsclasses, the markup of the Fragment is not found. BasePage.java Markup of BasePage.html My subclass looks like: Markup of FragmentTestPage.html Why is it not possible to do this!? And why doesn't find the FragmentMarkupSourcingStrategy the markup for Fragment "testFragment" in the providong markup container (Page class FragmentTestPage)? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/MarkupNotFoundException-for-Fragment-and-TransparentWebMarkupContainer-tp4619968.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Fragment caching???
https://cwiki.apache.org/WICKET/rendering-panel-to-a-string.html 2011/8/7 Joe Fawzy : > Hi > is there something equivelant to fragment caching in wicket? > I mean , is there any way to cache the generated markup of a component, and > on subsequent requests it just render this markup string? > if so, how one can store these fragments in external store? how that can be > configured or plugged in? to use some central caching like redis or > memcached > > thanks > > Joe > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Fragment caching???
I'm just curious about this: are you having performance issues? *Bruno Borges* www.brunoborges.com.br +55 21 76727099 On Sat, Aug 6, 2011 at 9:01 PM, Joe Fawzy wrote: > Hi > is there something equivelant to fragment caching in wicket? > I mean , is there any way to cache the generated markup of a component, > and > on subsequent requests it just render this markup string? > if so, how one can store these fragments in external store? how that can be > configured or plugged in? to use some central caching like redis or > memcached > > thanks > > Joe >
Fragment caching???
Hi is there something equivelant to fragment caching in wicket? I mean , is there any way to cache the generated markup of a component, and on subsequent requests it just render this markup string? if so, how one can store these fragments in external store? how that can be configured or plugged in? to use some central caching like redis or memcached thanks Joe
Re: Can i "include" an external html fragment?
Also see org.apache.wicket.markup.html.include.Include On Thu, Jul 14, 2011 at 6:51 PM, Andrea Del Bene wrote: > Hi Mike, > > take a look at interfaces IMarkupResourceStreamProvider and > IMarkupCacheKeyProvider. Using the first one you can implement method > getMarkupResourceStream which returns an IResourceStream with your custom > HTML. The second interface has a method called getCacheKey. You must > override it returning a simple null value. You have to do this in order to > avoid HTML caching for your component and to be sure that it always loads > updated content from server. > >> Hi, >> >> i would like to provide a way for our designer to change the homepage >> layout outside of the web-app. >> But i'm not sure how to do it. >> >> Usecase: >> Wicket homepage contains a "div-placeholder" for the main-content. >> Designer uploads a html fragment with bla to a file-server. >> In the HomePage class i add a component loading the file content from >> the server by a constant url. >> >> Is this possible? >> >> Thanks >> Mike >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Can i "include" an external html fragment?
Hi Mike, take a look at interfaces IMarkupResourceStreamProvider and IMarkupCacheKeyProvider. Using the first one you can implement method getMarkupResourceStream which returns an IResourceStream with your custom HTML. The second interface has a method called getCacheKey. You must override it returning a simple null value. You have to do this in order to avoid HTML caching for your component and to be sure that it always loads updated content from server. Hi, i would like to provide a way for our designer to change the homepage layout outside of the web-app. But i'm not sure how to do it. Usecase: Wicket homepage contains a "div-placeholder" for the main-content. Designer uploads a html fragment with bla to a file-server. In the HomePage class i add a component loading the file content from the server by a constant url. Is this possible? Thanks Mike - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Can i "include" an external html fragment?
Hi, i would like to provide a way for our designer to change the homepage layout outside of the web-app. But i'm not sure how to do it. Usecase: Wicket homepage contains a "div-placeholder" for the main-content. Designer uploads a html fragment with bla to a file-server. In the HomePage class i add a component loading the file content from the server by a constant url. Is this possible? Thanks Mike - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Replacement of a markup container with nested components by a panel / fragment
wicket traverses the hierarchy and renders all the tags. if you have a tag with wicket:id in markup you must have it in java. -igor On Mon, Jun 20, 2011 at 8:10 AM, pasto wrote: > Thank you, for your replay. I understand your point, but is it really > necessary to have it rendered? What I was doing, was a component > replace. I just had the feeling, that the important part, is to have a > strict binding between components and markup files and not to restrict > the developer to manipulate which component is displayed where. But I > might be wrong, of course... it might be more important, f.e. to know, > that there is some markup, that hasn't been rendered... > > Peter. > > > On Mon, Jun 20, 2011 at 4:29 PM, Igor Vaynberg-2 [via Apache Wicket] > wrote: >> if you have >> >> and you attach a panel to "foo" who is going to render "bar"? >> >> -igor >> >> >> On Sun, Jun 19, 2011 at 6:42 AM, pasto <[hidden email]> wrote: >>> Hi, >>> >>> I guess, this is the same question as the 'WICKET-1190' issue. >>> >>> Extending AjaxLazyLoadPanel and overriding the xhtml markup file and the >>> getLoadingComponent method causes, as soon as there is a child component >>> in >>> the 'content' component, "Close tag not found for tag" exception. >>> >>> >> "http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd";> >>> >>> /static/img/small-ajax-loader.gif >>> >>> >>> >>> The reason is a check in the >>> 'AbstractMarkupSourcingStrategy.onComponentTagBody' method: >>> >>> if (markupStream.getPreviousTag().isOpen()) >>> { >>> markupStream.skipRawMarkup(); >>> if (markupStream.get().closes(openTag) == false) >>> { >>> throw new MarkupException(markupStream, "Close tag not >>> found for tag: " + >>> openTag.toString() + ". Component: " + >>> component.toString()); >>> } >>> } >>> >>> Changing it to: >>> >>> if (markupStream.getPreviousTag().isOpen()) >>> { >>> markupStream.skipToMatchingCloseTag(markupStream.getPreviousTag()); >>> } >>> >>> seems to work fine. >>> >>> Is there a reason to not allow replacement of a markup container with >>> nested >>> components by a panel / fragment? I think, that the definition of >>> alternative panels (e.g. lazy load panels) would be easier. >>> >>> Just being curious... >>> >>> Peter. >>> >>> -- >>> View this message in context: >>> http://apache-wicket.1842946.n4.nabble.com/Replacement-of-a-markup-container-with-nested-components-by-a-panel-fragment-tp3609276p3609276.html >>> Sent from the Users forum mailing list archive at Nabble.com. >>> >>> - >>> To unsubscribe, e-mail: [hidden email] >>> For additional commands, e-mail: [hidden email] >>> >>> >> - >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> >> >> >> >> If you reply to this email, your message will be added to the discussion >> below: >> http://apache-wicket.1842946.n4.nabble.com/Replacement-of-a-markup-container-with-nested-components-by-a-panel-fragment-tp3609276p3611541.html >> To unsubscribe from Replacement of a markup container with nested components >> by a panel / fragment, click here. > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Replacement-of-a-markup-container-with-nested-components-by-a-panel-fragment-tp3609276p3611639.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Replacement of a markup container with nested components by a panel / fragment
Thank you, for your replay. I understand your point, but is it really necessary to have it rendered? What I was doing, was a component replace. I just had the feeling, that the important part, is to have a strict binding between components and markup files and not to restrict the developer to manipulate which component is displayed where. But I might be wrong, of course... it might be more important, f.e. to know, that there is some markup, that hasn't been rendered... Peter. On Mon, Jun 20, 2011 at 4:29 PM, Igor Vaynberg-2 [via Apache Wicket] wrote: > if you have > > and you attach a panel to "foo" who is going to render "bar"? > > -igor > > > On Sun, Jun 19, 2011 at 6:42 AM, pasto <[hidden email]> wrote: >> Hi, >> >> I guess, this is the same question as the 'WICKET-1190' issue. >> >> Extending AjaxLazyLoadPanel and overriding the xhtml markup file and the >> getLoadingComponent method causes, as soon as there is a child component >> in >> the 'content' component, "Close tag not found for tag" exception. >> >> > "http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd";> >> >> /static/img/small-ajax-loader.gif >> >> >> >> The reason is a check in the >> 'AbstractMarkupSourcingStrategy.onComponentTagBody' method: >> >> if (markupStream.getPreviousTag().isOpen()) >> { >> markupStream.skipRawMarkup(); >> if (markupStream.get().closes(openTag) == false) >> { >> throw new MarkupException(markupStream, "Close tag not >> found for tag: " + >> openTag.toString() + ". Component: " + >> component.toString()); >> } >> } >> >> Changing it to: >> >> if (markupStream.getPreviousTag().isOpen()) >> { >> markupStream.skipToMatchingCloseTag(markupStream.getPreviousTag()); >> } >> >> seems to work fine. >> >> Is there a reason to not allow replacement of a markup container with >> nested >> components by a panel / fragment? I think, that the definition of >> alternative panels (e.g. lazy load panels) would be easier. >> >> Just being curious... >> >> Peter. >> >> -- >> View this message in context: >> http://apache-wicket.1842946.n4.nabble.com/Replacement-of-a-markup-container-with-nested-components-by-a-panel-fragment-tp3609276p3609276.html >> Sent from the Users forum mailing list archive at Nabble.com. >> >> - >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> >> > ----- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > > > ____ > If you reply to this email, your message will be added to the discussion > below: > http://apache-wicket.1842946.n4.nabble.com/Replacement-of-a-markup-container-with-nested-components-by-a-panel-fragment-tp3609276p3611541.html > To unsubscribe from Replacement of a markup container with nested components > by a panel / fragment, click here. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Replacement-of-a-markup-container-with-nested-components-by-a-panel-fragment-tp3609276p3611639.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Replacement of a markup container with nested components by a panel / fragment
if you have and you attach a panel to "foo" who is going to render "bar"? -igor On Sun, Jun 19, 2011 at 6:42 AM, pasto wrote: > Hi, > > I guess, this is the same question as the 'WICKET-1190' issue. > > Extending AjaxLazyLoadPanel and overriding the xhtml markup file and the > getLoadingComponent method causes, as soon as there is a child component in > the 'content' component, "Close tag not found for tag" exception. > > "http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd";> > > /static/img/small-ajax-loader.gif > > > > The reason is a check in the > 'AbstractMarkupSourcingStrategy.onComponentTagBody' method: > > if (markupStream.getPreviousTag().isOpen()) > { > markupStream.skipRawMarkup(); > if (markupStream.get().closes(openTag) == false) > { > throw new MarkupException(markupStream, "Close tag not found > for tag: " + > openTag.toString() + ". Component: " + > component.toString()); > } > } > > Changing it to: > > if (markupStream.getPreviousTag().isOpen()) > { > markupStream.skipToMatchingCloseTag(markupStream.getPreviousTag()); > } > > seems to work fine. > > Is there a reason to not allow replacement of a markup container with nested > components by a panel / fragment? I think, that the definition of > alternative panels (e.g. lazy load panels) would be easier. > > Just being curious... > > Peter. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Replacement-of-a-markup-container-with-nested-components-by-a-panel-fragment-tp3609276p3609276.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Replacement of a markup container with nested components by a panel / fragment
Hi, I guess, this is the same question as the 'WICKET-1190' issue. Extending AjaxLazyLoadPanel and overriding the xhtml markup file and the getLoadingComponent method causes, as soon as there is a child component in the 'content' component, "Close tag not found for tag" exception. http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd";> /static/img/small-ajax-loader.gif The reason is a check in the 'AbstractMarkupSourcingStrategy.onComponentTagBody' method: if (markupStream.getPreviousTag().isOpen()) { markupStream.skipRawMarkup(); if (markupStream.get().closes(openTag) == false) { throw new MarkupException(markupStream, "Close tag not found for tag: " + openTag.toString() + ". Component: " + component.toString()); } } Changing it to: if (markupStream.getPreviousTag().isOpen()) { markupStream.skipToMatchingCloseTag(markupStream.getPreviousTag()); } seems to work fine. Is there a reason to not allow replacement of a markup container with nested components by a panel / fragment? I think, that the definition of alternative panels (e.g. lazy load panels) would be easier. Just being curious... Peter. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Replacement-of-a-markup-container-with-nested-components-by-a-panel-fragment-tp3609276p3609276.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: repaint a fragment
item.replaceWith(new Fragment()) will replace the *item* with the *fragment*, which is definitely not what you want. On Tue, Oct 12, 2010 at 6:57 AM, fachhoch wrote: > > I am confused , > > I have an Item with a fragment . > > to repaint this fragment I should just add this item to target and no need > of calling item.replaceWith(new Freagment()) ? > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/repaint-a-fragment-tp2990937p2991715.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Jeremy Thomerson http://www.wickettraining.com
Re: repaint a fragment
I am confused , I have an Item with a fragment . to repaint this fragment I should just add this item to target and no need of calling item.replaceWith(new Freagment()) ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/repaint-a-fragment-tp2990937p2991715.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: repaint a fragment
On Mon, Oct 11, 2010 at 10:59 PM, fachhoch wrote: > > my fragment is inside a listitem ,on click I added this listitem to taget > nothing happened but if I call listitem.replace with new fragment it was > adding an additional div is ths the right way to repaint fragment ? You can call item.setOutputMarkupId(true) and add that item to the AjaxRequestTarget to repaint it (and the frag inside it). Jeremy Thomerson http://www.wickettraining.com
Re: repaint a fragment
my fragment is inside a listitem ,on click I added this listitem to taget nothing happened but if I call listitem.replace with new fragment it was adding an additional div is ths the right way to repaint fragment ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/repaint-a-fragment-tp2990937p2991093.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: repaint a fragment
Exactly. On Mon, Oct 11, 2010 at 7:24 PM, fachhoch wrote: > > you mean If I put this fragment inside a webmarkupcontainer and add this > webmarkupcontainer to target this will repaint my fragmnet ? > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/repaint-a-fragment-tp2990937p2991045.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: repaint a fragment
you mean If I put this fragment inside a webmarkupcontainer and add this webmarkupcontainer to target this will repaint my fragmnet ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/repaint-a-fragment-tp2990937p2991045.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: repaint a fragment
No html is rendered to represent a fragment. You will have to wrap it with a div and then refresh the div. Scott On Mon, Oct 11, 2010 at 5:06 PM, fachhoch wrote: > > I have a fragment I want to repaint when user click on ajax link > > here is my fragment > > private class ProgramFragment extends Fragment { > Long sysAuditProgId; > public ProgramFragment( final ProgramStatusDTO > programStatusDTO) { > super("program", > "programFragment",ProgramStatusPanel.this); > > this.sysAuditProgId=programStatusDTO.eaAuditProgram.getSysAuditProgId(); > setOutputMarkupId(true); > > add(new Label("programAcronym", > programStatusDTO.eaAuditProgram.getInfGrantProgram().getProgAcronym())); > EaAuditProgramAmednment amendment= > programStatusDTO.eaAuditProgram.getAmednment(); > add(new Label("modifier",amendment==null ? "" > :"(Amend)")); > add(new Label("status",programStatusDTO.getName())); > add(new > Label("daysPassed",programStatusDTO.getDaysPassed()==0?"-":String.valueOf(programStatusDTO.getDaysPassed(; > } > } > > > in onClick I am calling > > > target.addComponent(getPage().get("program"))); > > > > when I click on the link nothing happens, a refreshing view or ListView > onPopulate method is called for repaint, for a Fragment or > WebMarkupContainer what method is called ? > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/repaint-a-fragment-tp2990937p2990937.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
repaint a fragment
I have a fragment I want to repaint when user click on ajax link here is my fragment private class ProgramFragment extends Fragment { Long sysAuditProgId; public ProgramFragment( final ProgramStatusDTO programStatusDTO) { super("program", "programFragment",ProgramStatusPanel.this); this.sysAuditProgId=programStatusDTO.eaAuditProgram.getSysAuditProgId(); setOutputMarkupId(true); add(new Label("programAcronym", programStatusDTO.eaAuditProgram.getInfGrantProgram().getProgAcronym())); EaAuditProgramAmednment amendment= programStatusDTO.eaAuditProgram.getAmednment(); add(new Label("modifier",amendment==null ? "" :"(Amend)")); add(new Label("status",programStatusDTO.getName())); add(new Label("daysPassed",programStatusDTO.getDaysPassed()==0?"-":String.valueOf(programStatusDTO.getDaysPassed(; } } in onClick I am calling target.addComponent(getPage().get("program"))); when I click on the link nothing happens, a refreshing view or ListView onPopulate method is called for repaint, for a Fragment or WebMarkupContainer what method is called ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/repaint-a-fragment-tp2990937p2990937.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: refreshing fragment
I have filed https://issues.apache.org/jira/browse/WICKET-2973 with a patch, which fixes the issue for me. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/refreshing-fragment-tp2286189p2315477.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: refreshing fragment
jsinai wrote: > > I have the same problem with refreshing fragments via ajax. The problem > does not exist in 1.4.0 and earlier. It started in 1.4.1+, I believe. > I have downloaded the source for 1.4.9 and made the change below in AjaxRequestTarget.java, which fixed the problem for me. The change is commenting out the check "if (!containsAncestorFor(component))". I verified that this change was made between 1.4.0 and 1.4.1, although the release notes make no mention of it. We make heavy use of fragments, so this is a big problem for us. private void respondComponents(WebResponse response) { // TODO: We might need to call prepareRender on all components upfront // process component markup Iterator> it = markupIdToComponent.entrySet().iterator(); while (it.hasNext()) { final Map.Entry entry = it.next(); final Component component = entry.getValue(); final String markupId = entry.getKey(); // if (!containsAncestorFor(component)) // { respondComponent(response, markupId, component); // } } } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/refreshing-fragment-tp2286189p2315451.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: refreshing fragment
I have the same problem with refreshing fragments via ajax. The problem does not exist in 1.4.0 and earlier. It started in 1.4.1+, I believe. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/refreshing-fragment-tp2286189p2315381.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: refreshing fragment
Send me quickstart of your code so I can have a look martin.makundi / koodaripalvelut.com It's quite tiresome to try to figure it out from a post that doesn't even compile ;] Make it a junit test that fails at your bug. ** Martin 2010/7/12 Anna Simbirtsev : > No, I don't think so.:( > > On Mon, Jul 12, 2010 at 11:15 AM, Martin Makundi < > martin.maku...@koodaripalvelut.com> wrote: > >> No validation error? >> >> ** >> Martin >> >> 2010/7/12 Anna Simbirtsev : >> > I took out the wicket enclosure, still does not work. The value in the >> > textfield still stays the same, instead of being empty. Printing out >> > loans.getComment(), prints an empty value. >> > >> > On Mon, Jul 12, 2010 at 11:01 AM, Martin Makundi < >> > martin.maku...@koodaripalvelut.com> wrote: >> > >> >> Is your component visible in browser source when your refresh it ?? >> >> >> >> Ajax cannot referesh invisible components >> >> >> >> ** >> >> Martin >> >> >> >> 2010/7/12 Anna Simbirtsev : >> >> > fragments contents >> come >> >> > here >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > Loan ID >> >> > Comment >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > > >> > type="text" onfocus="this.className='';"/> >> >> > >> >> > >> >> > > wicket:id="rsubmit" >> >> > href="#" class="button">SUBMIT >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > On Mon, Jul 12, 2010 at 10:47 AM, Martin Makundi < >> >> > martin.maku...@koodaripalvelut.com> wrote: >> >> > >> >> >> what is your fragment about ? does it have >> markupid? >> >> >> >> >> >> 2010/7/12 Anna Simbirtsev : >> >> >> > Hi, >> >> >> > >> >> >> > I have a listview inside a fragment. Listview has a text field >> >> comment. >> >> >> > >> >> >> > >> >> >> > Fragment f = new Fragment("fragment", "fragmentid", form2); >> >> >> > f.setOutputMarkupId(true); >> >> >> > form.add(f); >> >> >> > >> >> >> > final ListView lv = new ListView("loans", data >> >> >> > .getLoans()) { >> >> >> > >> >> >> > private static final long serialVersionUID = 1L; >> >> >> > >> >> >> > �...@override >> >> >> > protected void populateItem(ListItem item) >> >> >> > { >> >> >> > finalLoan loan = (Loan) item.getModelObject(); >> >> >> > >> >> >> > item.add(new Label("id", loan.getId())); >> >> >> > >> >> >> > final TextField comment = new TextField( >> >> >> > "comment", new PropertyModel(loan, >> >> >> "comment") >> >> >> > ); >> >> >> > >> >> >> > item.add(comment); >> >> >> > >> >> >> > item >> >> >> > .add(addLoanSubmitButton(loan)); >> >> >> > } >> >> >> > }; >> >> >> > >> >> >> > f.add(lv); >> >> >> > >> >> >> > In onSubmit, I refresh data.getLoans() and try to refresh fragment >> >> using >> >> >> > target.addComponent(f);. >> >> >> > But it does not get refreshed. >> >> >> > >> >> >> > Any ideas? >> >> >> > >> >> >> > Thanks >> >> >> > >> >> >> >> >> >> - >> >> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> >> >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> >> >> >> >> >> > >> >> > >> >> > -- >> >> > Anna Simbirtsev >> >> > (416) 729-7331 >> >> > >> >> >> >> - >> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> >> >> > >> > >> > -- >> > Anna Simbirtsev >> > (416) 729-7331 >> > >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > > -- > Anna Simbirtsev > (416) 729-7331 > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: refreshing fragment
No, I don't think so.:( On Mon, Jul 12, 2010 at 11:15 AM, Martin Makundi < martin.maku...@koodaripalvelut.com> wrote: > No validation error? > > ** > Martin > > 2010/7/12 Anna Simbirtsev : > > I took out the wicket enclosure, still does not work. The value in the > > textfield still stays the same, instead of being empty. Printing out > > loans.getComment(), prints an empty value. > > > > On Mon, Jul 12, 2010 at 11:01 AM, Martin Makundi < > > martin.maku...@koodaripalvelut.com> wrote: > > > >> Is your component visible in browser source when your refresh it ?? > >> > >> Ajax cannot referesh invisible components > >> > >> ** > >> Martin > >> > >> 2010/7/12 Anna Simbirtsev : > >> > fragments contents > come > >> > here > >> > > >> > > >> > > >> > > >> > > >> >Loan ID > >> >Comment > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > >> > type="text" onfocus="this.className='';"/> > >> > > >> > > >> > wicket:id="rsubmit" > >> > href="#" class="button">SUBMIT > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > On Mon, Jul 12, 2010 at 10:47 AM, Martin Makundi < > >> > martin.maku...@koodaripalvelut.com> wrote: > >> > > >> >> what is your fragment about ? does it have > markupid? > >> >> > >> >> 2010/7/12 Anna Simbirtsev : > >> >> > Hi, > >> >> > > >> >> > I have a listview inside a fragment. Listview has a text field > >> comment. > >> >> > > >> >> > > >> >> > Fragment f = new Fragment("fragment", "fragmentid", form2); > >> >> >f.setOutputMarkupId(true); > >> >> >form.add(f); > >> >> > > >> >> > final ListView lv = new ListView("loans", data > >> >> >.getLoans()) { > >> >> > > >> >> >private static final long serialVersionUID = 1L; > >> >> > > >> >> >@Override > >> >> >protected void populateItem(ListItem item) > >> >> >{ > >> >> >finalLoan loan = (Loan) item.getModelObject(); > >> >> > > >> >> >item.add(new Label("id", loan.getId())); > >> >> > > >> >> >final TextField comment = new TextField( > >> >> >"comment", new PropertyModel(loan, > >> >> "comment") > >> >> > ); > >> >> > > >> >> >item.add(comment); > >> >> > > >> >> >item > >> >> >.add(addLoanSubmitButton(loan)); > >> >> >} > >> >> >}; > >> >> > > >> >> >f.add(lv); > >> >> > > >> >> > In onSubmit, I refresh data.getLoans() and try to refresh fragment > >> using > >> >> > target.addComponent(f);. > >> >> > But it does not get refreshed. > >> >> > > >> >> > Any ideas? > >> >> > > >> >> > Thanks > >> >> > > >> >> > >> >> - > >> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> >> For additional commands, e-mail: users-h...@wicket.apache.org > >> >> > >> >> > >> > > >> > > >> > -- > >> > Anna Simbirtsev > >> > (416) 729-7331 > >> > > >> > >> - > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> For additional commands, e-mail: users-h...@wicket.apache.org > >> > >> > > > > > > -- > > Anna Simbirtsev > > (416) 729-7331 > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Anna Simbirtsev (416) 729-7331
Re: refreshing fragment
No validation error? ** Martin 2010/7/12 Anna Simbirtsev : > I took out the wicket enclosure, still does not work. The value in the > textfield still stays the same, instead of being empty. Printing out > loans.getComment(), prints an empty value. > > On Mon, Jul 12, 2010 at 11:01 AM, Martin Makundi < > martin.maku...@koodaripalvelut.com> wrote: > >> Is your component visible in browser source when your refresh it ?? >> >> Ajax cannot referesh invisible components >> >> ** >> Martin >> >> 2010/7/12 Anna Simbirtsev : >> > fragments contents come >> > here >> > >> > >> > >> > >> > >> > Loan ID >> > Comment >> > >> > >> > >> > >> > >> > >> > >> > > > type="text" onfocus="this.className='';"/> >> > >> > >> > > > href="#" class="button">SUBMIT >> > >> > >> > >> > >> > >> > >> > >> > >> > On Mon, Jul 12, 2010 at 10:47 AM, Martin Makundi < >> > martin.maku...@koodaripalvelut.com> wrote: >> > >> >> what is your fragment about ? does it have markupid? >> >> >> >> 2010/7/12 Anna Simbirtsev : >> >> > Hi, >> >> > >> >> > I have a listview inside a fragment. Listview has a text field >> comment. >> >> > >> >> > >> >> > Fragment f = new Fragment("fragment", "fragmentid", form2); >> >> > f.setOutputMarkupId(true); >> >> > form.add(f); >> >> > >> >> > final ListView lv = new ListView("loans", data >> >> > .getLoans()) { >> >> > >> >> > private static final long serialVersionUID = 1L; >> >> > >> >> > �...@override >> >> > protected void populateItem(ListItem item) >> >> > { >> >> > finalLoan loan = (Loan) item.getModelObject(); >> >> > >> >> > item.add(new Label("id", loan.getId())); >> >> > >> >> > final TextField comment = new TextField( >> >> > "comment", new PropertyModel(loan, >> >> "comment") >> >> > ); >> >> > >> >> > item.add(comment); >> >> > >> >> > item >> >> > .add(addLoanSubmitButton(loan)); >> >> > } >> >> > }; >> >> > >> >> > f.add(lv); >> >> > >> >> > In onSubmit, I refresh data.getLoans() and try to refresh fragment >> using >> >> > target.addComponent(f);. >> >> > But it does not get refreshed. >> >> > >> >> > Any ideas? >> >> > >> >> > Thanks >> >> > >> >> >> >> - >> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> >> >> > >> > >> > -- >> > Anna Simbirtsev >> > (416) 729-7331 >> > >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > > -- > Anna Simbirtsev > (416) 729-7331 > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: refreshing fragment
I took out the wicket enclosure, still does not work. The value in the textfield still stays the same, instead of being empty. Printing out loans.getComment(), prints an empty value. On Mon, Jul 12, 2010 at 11:01 AM, Martin Makundi < martin.maku...@koodaripalvelut.com> wrote: > Is your component visible in browser source when your refresh it ?? > > Ajax cannot referesh invisible components > > ** > Martin > > 2010/7/12 Anna Simbirtsev : > > fragments contents come > > here > > > > > > > > > > > >Loan ID > >Comment > > > > > > > > > > > > > > > > > type="text" onfocus="this.className='';"/> > > > > > > > href="#" class="button">SUBMIT > > > > > > > > > > > > > > > > > > On Mon, Jul 12, 2010 at 10:47 AM, Martin Makundi < > > martin.maku...@koodaripalvelut.com> wrote: > > > >> what is your fragment about ? does it have markupid? > >> > >> 2010/7/12 Anna Simbirtsev : > >> > Hi, > >> > > >> > I have a listview inside a fragment. Listview has a text field > comment. > >> > > >> > > >> > Fragment f = new Fragment("fragment", "fragmentid", form2); > >> >f.setOutputMarkupId(true); > >> >form.add(f); > >> > > >> > final ListView lv = new ListView("loans", data > >> >.getLoans()) { > >> > > >> >private static final long serialVersionUID = 1L; > >> > > >> >@Override > >> >protected void populateItem(ListItem item) > >> >{ > >> >finalLoan loan = (Loan) item.getModelObject(); > >> > > >> >item.add(new Label("id", loan.getId())); > >> > > >> >final TextField comment = new TextField( > >> >"comment", new PropertyModel(loan, > >> "comment") > >> > ); > >> > > >> >item.add(comment); > >> > > >> >item > >> >.add(addLoanSubmitButton(loan)); > >> >} > >> >}; > >> > > >> >f.add(lv); > >> > > >> > In onSubmit, I refresh data.getLoans() and try to refresh fragment > using > >> > target.addComponent(f);. > >> > But it does not get refreshed. > >> > > >> > Any ideas? > >> > > >> > Thanks > >> > > >> > >> - > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> For additional commands, e-mail: users-h...@wicket.apache.org > >> > >> > > > > > > -- > > Anna Simbirtsev > > (416) 729-7331 > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Anna Simbirtsev (416) 729-7331
Re: refreshing fragment
Is your component visible in browser source when your refresh it ?? Ajax cannot referesh invisible components ** Martin 2010/7/12 Anna Simbirtsev : > fragments contents come > here > > > > > > Loan ID > Comment > > > > > > > > type="text" onfocus="this.className='';"/> > > > href="#" class="button">SUBMIT > > > > > > > > > On Mon, Jul 12, 2010 at 10:47 AM, Martin Makundi < > martin.maku...@koodaripalvelut.com> wrote: > >> what is your fragment about ? does it have markupid? >> >> 2010/7/12 Anna Simbirtsev : >> > Hi, >> > >> > I have a listview inside a fragment. Listview has a text field comment. >> > >> > >> > Fragment f = new Fragment("fragment", "fragmentid", form2); >> > f.setOutputMarkupId(true); >> > form.add(f); >> > >> > final ListView lv = new ListView("loans", data >> > .getLoans()) { >> > >> > private static final long serialVersionUID = 1L; >> > >> > �...@override >> > protected void populateItem(ListItem item) >> > { >> > finalLoan loan = (Loan) item.getModelObject(); >> > >> > item.add(new Label("id", loan.getId())); >> > >> > final TextField comment = new TextField( >> > "comment", new PropertyModel(loan, >> "comment") >> > ); >> > >> > item.add(comment); >> > >> > item >> > .add(addLoanSubmitButton(loan)); >> > } >> > }; >> > >> > f.add(lv); >> > >> > In onSubmit, I refresh data.getLoans() and try to refresh fragment using >> > target.addComponent(f);. >> > But it does not get refreshed. >> > >> > Any ideas? >> > >> > Thanks >> > >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > > -- > Anna Simbirtsev > (416) 729-7331 > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: refreshing fragment
fragments contents come here Loan ID Comment SUBMIT On Mon, Jul 12, 2010 at 10:47 AM, Martin Makundi < martin.maku...@koodaripalvelut.com> wrote: > what is your fragment about ? does it have markupid? > > 2010/7/12 Anna Simbirtsev : > > Hi, > > > > I have a listview inside a fragment. Listview has a text field comment. > > > > > > Fragment f = new Fragment("fragment", "fragmentid", form2); > >f.setOutputMarkupId(true); > >form.add(f); > > > > final ListView lv = new ListView("loans", data > >.getLoans()) { > > > >private static final long serialVersionUID = 1L; > > > >@Override > >protected void populateItem(ListItem item) > >{ > >finalLoan loan = (Loan) item.getModelObject(); > > > >item.add(new Label("id", loan.getId())); > > > >final TextField comment = new TextField( > >"comment", new PropertyModel(loan, > "comment") > > ); > > > >item.add(comment); > > > >item > >.add(addLoanSubmitButton(loan)); > >} > >}; > > > >f.add(lv); > > > > In onSubmit, I refresh data.getLoans() and try to refresh fragment using > > target.addComponent(f);. > > But it does not get refreshed. > > > > Any ideas? > > > > Thanks > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Anna Simbirtsev (416) 729-7331
Re: refreshing fragment
what is your fragment about ? does it have markupid? 2010/7/12 Anna Simbirtsev : > Hi, > > I have a listview inside a fragment. Listview has a text field comment. > > > Fragment f = new Fragment("fragment", "fragmentid", form2); > f.setOutputMarkupId(true); > form.add(f); > > final ListView lv = new ListView("loans", data > .getLoans()) { > > private static final long serialVersionUID = 1L; > > �...@override > protected void populateItem(ListItem item) > { > finalLoan loan = (Loan) item.getModelObject(); > > item.add(new Label("id", loan.getId())); > > final TextField comment = new TextField( > "comment", new PropertyModel(loan, "comment") > ); > > item.add(comment); > > item > .add(addLoanSubmitButton(loan)); > } > }; > > f.add(lv); > > In onSubmit, I refresh data.getLoans() and try to refresh fragment using > target.addComponent(f);. > But it does not get refreshed. > > Any ideas? > > Thanks > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
refreshing fragment
Hi, I have a listview inside a fragment. Listview has a text field comment. Fragment f = new Fragment("fragment", "fragmentid", form2); f.setOutputMarkupId(true); form.add(f); final ListView lv = new ListView("loans", data .getLoans()) { private static final long serialVersionUID = 1L; @Override protected void populateItem(ListItem item) { finalLoan loan = (Loan) item.getModelObject(); item.add(new Label("id", loan.getId())); final TextField comment = new TextField( "comment", new PropertyModel(loan, "comment") ); item.add(comment); item .add(addLoanSubmitButton(loan)); } }; f.add(lv); In onSubmit, I refresh data.getLoans() and try to refresh fragment using target.addComponent(f);. But it does not get refreshed. Any ideas? Thanks
Re: Can't use form inside fragment
Man, I changed way too much code far too late last night. I missed assigning my model as the form in my test fields. TextField userIdField = new TextField("email", new PropertyModel(this, "email")); On 2 June 2010 06:33, Igor Vaynberg wrote: > headerPanel:session:session:loginForm:email > > this textfield? has a null model, so wicket cannot push the submitted > value. > > -igor > > On Tue, Jun 1, 2010 at 11:04 AM, Todd Nine > wrote: > > Ok, I solved the initial problem. I didn't specify a container for the > > fragment, I missed that in the examples. I changes my template to > contain > > this extra div. > > > > > > > > > > Then I specify my panels with > > > > if(session.isSignedIn()){ > > add(new LogoutFragment("session", "logout", this)); > > }else{ > > add(new LoginFragment("session", "login", this)); > > } > > > > Everything is rendering, but if I try to submit my form, I receive this > > error > > > > WicketMessage: Method onFormSubmitted of interface > > org.apache.wicket.markup.html.form.IFormSubmitListener targeted at > component > > [MarkupContainer [Component id = loginForm]] threw an exception > > > > Root cause: > > > > java.lang.IllegalStateException: Attempt to set model object on null > model > > of component: headerPanel:session:session:loginForm:email > > at > > org.apache.wicket.Component.setDefaultModelObject(Component.java:3033) > > at > > > org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1168) > > at > > > org.apache.wicket.markup.html.form.Form$FormModelUpdateVisitor.component(Form.java:227) > > at > > > org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:514) > > at > > > org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:493) > > at > > > org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrder(FormComponent.java:465) > > at > > > org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:2081) > > at > > > org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:2049) > > at org.apache.wicket.markup.html.form.Form.process(Form.java:1004) > > at org.apache.wicket.markup.html.form.Form.process(Form.java:931) > > at > > org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:896) > > > > If I have my form in it's own panel it seems to work. I've changed it's > > paret class to to be the following > > > > public class LoginForm extends Form > > > > Any ideas? > > > > Thanks, > > Todd > > > > > > > > On 2 June 2010 05:15, Todd Nine wrote: > > > >> Sorry, forgot that. 1.4.9 > >> > >> > >> On 2 June 2010 03:03, Jeremy Thomerson > wrote: > >> > >>> what version of wicket? > >>> > >>> On Tue, Jun 1, 2010 at 3:37 AM, Todd Nine > >>> wrote: > >>> > >>> > Hi all, > >>> > I'm new to Wicket, so if I've done something obviously wrong, please > >>> point > >>> > it out. I have 2 ways the user could log in to our site. One if via > >>> the > >>> > full page login form, the other is via quick login in the header. > >>> Since > >>> > I'll need to gather the same form data in multiple places, I've > created > >>> a > >>> > reusable form object below. > >>> > > >>> > http://pastie.org/private/7v1vnmyb4kefamu8q1tnfw > >>> > > >>> > Now, I'm working on my "SessionPanel". This is the panel at the top > >>> right > >>> > of my header. If the user is logged in, it shows a logout link. If > >>> > they're > >>> > an anonymous user, it shows the login form. I have this for my panel > >>> code. > >>> > > >>> > http://www.pastie.org/private/bw5vvzddtrcruemnobjg > >>> > > >>> > And here is my html > >>> > > >>> > http://www.pastie.org/private/o9gzhxeqfcbu8vpohr1uvw > >>> > > >>> > Whenever I try to render the page, I always receive this error. > >>> > > >>> > > >>> > Roo
Re: Can't use form inside fragment
headerPanel:session:session:loginForm:email this textfield? has a null model, so wicket cannot push the submitted value. -igor On Tue, Jun 1, 2010 at 11:04 AM, Todd Nine wrote: > Ok, I solved the initial problem. I didn't specify a container for the > fragment, I missed that in the examples. I changes my template to contain > this extra div. > > > > > Then I specify my panels with > > if(session.isSignedIn()){ > add(new LogoutFragment("session", "logout", this)); > }else{ > add(new LoginFragment("session", "login", this)); > } > > Everything is rendering, but if I try to submit my form, I receive this > error > > WicketMessage: Method onFormSubmitted of interface > org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component > [MarkupContainer [Component id = loginForm]] threw an exception > > Root cause: > > java.lang.IllegalStateException: Attempt to set model object on null model > of component: headerPanel:session:session:loginForm:email > at > org.apache.wicket.Component.setDefaultModelObject(Component.java:3033) > at > org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1168) > at > org.apache.wicket.markup.html.form.Form$FormModelUpdateVisitor.component(Form.java:227) > at > org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:514) > at > org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:493) > at > org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrder(FormComponent.java:465) > at > org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:2081) > at > org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:2049) > at org.apache.wicket.markup.html.form.Form.process(Form.java:1004) > at org.apache.wicket.markup.html.form.Form.process(Form.java:931) > at > org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:896) > > If I have my form in it's own panel it seems to work. I've changed it's > paret class to to be the following > > public class LoginForm extends Form > > Any ideas? > > Thanks, > Todd > > > > On 2 June 2010 05:15, Todd Nine wrote: > >> Sorry, forgot that. 1.4.9 >> >> >> On 2 June 2010 03:03, Jeremy Thomerson wrote: >> >>> what version of wicket? >>> >>> On Tue, Jun 1, 2010 at 3:37 AM, Todd Nine >>> wrote: >>> >>> > Hi all, >>> > I'm new to Wicket, so if I've done something obviously wrong, please >>> point >>> > it out. I have 2 ways the user could log in to our site. One if via >>> the >>> > full page login form, the other is via quick login in the header. >>> Since >>> > I'll need to gather the same form data in multiple places, I've created >>> a >>> > reusable form object below. >>> > >>> > http://pastie.org/private/7v1vnmyb4kefamu8q1tnfw >>> > >>> > Now, I'm working on my "SessionPanel". This is the panel at the top >>> right >>> > of my header. If the user is logged in, it shows a logout link. If >>> > they're >>> > an anonymous user, it shows the login form. I have this for my panel >>> code. >>> > >>> > http://www.pastie.org/private/bw5vvzddtrcruemnobjg >>> > >>> > And here is my html >>> > >>> > http://www.pastie.org/private/o9gzhxeqfcbu8vpohr1uvw >>> > >>> > Whenever I try to render the page, I always receive this error. >>> > >>> > >>> > Root cause: >>> > >>> > org.apache.wicket.markup.MarkupException: Expected close tag for >>> > >>> > [markup = >>> > >>> > >>> file:/Users/toddnine/development/aviator-services/logbook/target/classes/com/spidertracks/aviator/logbook/panel/SessionPanel.html >>> > >> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> >>> > >>> > http://www.w3.org/1999/xhtml"; >>> > xmlns:wicket="http://wicket.sourceforge.net/"; xml:lang="en" lang="en"> >>> > >>> > >>> > >>> > >>> > keep me logged in: >>> > >>> > >>> > email: >>> > password: >>> &g
Re: Can't use form inside fragment
Ok, I solved the initial problem. I didn't specify a container for the fragment, I missed that in the examples. I changes my template to contain this extra div. Then I specify my panels with if(session.isSignedIn()){ add(new LogoutFragment("session", "logout", this)); }else{ add(new LoginFragment("session", "login", this)); } Everything is rendering, but if I try to submit my form, I receive this error WicketMessage: Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component [MarkupContainer [Component id = loginForm]] threw an exception Root cause: java.lang.IllegalStateException: Attempt to set model object on null model of component: headerPanel:session:session:loginForm:email at org.apache.wicket.Component.setDefaultModelObject(Component.java:3033) at org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1168) at org.apache.wicket.markup.html.form.Form$FormModelUpdateVisitor.component(Form.java:227) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:514) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:493) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrder(FormComponent.java:465) at org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:2081) at org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:2049) at org.apache.wicket.markup.html.form.Form.process(Form.java:1004) at org.apache.wicket.markup.html.form.Form.process(Form.java:931) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:896) If I have my form in it's own panel it seems to work. I've changed it's paret class to to be the following public class LoginForm extends Form Any ideas? Thanks, Todd On 2 June 2010 05:15, Todd Nine wrote: > Sorry, forgot that. 1.4.9 > > > On 2 June 2010 03:03, Jeremy Thomerson wrote: > >> what version of wicket? >> >> On Tue, Jun 1, 2010 at 3:37 AM, Todd Nine >> wrote: >> >> > Hi all, >> > I'm new to Wicket, so if I've done something obviously wrong, please >> point >> > it out. I have 2 ways the user could log in to our site. One if via >> the >> > full page login form, the other is via quick login in the header. >> Since >> > I'll need to gather the same form data in multiple places, I've created >> a >> > reusable form object below. >> > >> > http://pastie.org/private/7v1vnmyb4kefamu8q1tnfw >> > >> > Now, I'm working on my "SessionPanel". This is the panel at the top >> right >> > of my header. If the user is logged in, it shows a logout link. If >> > they're >> > an anonymous user, it shows the login form. I have this for my panel >> code. >> > >> > http://www.pastie.org/private/bw5vvzddtrcruemnobjg >> > >> > And here is my html >> > >> > http://www.pastie.org/private/o9gzhxeqfcbu8vpohr1uvw >> > >> > Whenever I try to render the page, I always receive this error. >> > >> > >> > Root cause: >> > >> > org.apache.wicket.markup.MarkupException: Expected close tag for >> > >> > [markup = >> > >> > >> file:/Users/toddnine/development/aviator-services/logbook/target/classes/com/spidertracks/aviator/logbook/panel/SessionPanel.html >> > > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> >> > >> > http://www.w3.org/1999/xhtml"; >> > xmlns:wicket="http://wicket.sourceforge.net/"; xml:lang="en" lang="en"> >> > >> > >> > >> > >> > keep me logged in: >> > >> > >> > email: >> > password: >> > >> > >> > >> > >> > >> > >> > >> > logout >> > >> > >> > >> > , index = 5, current = '' (line 9, >> > column >> > 3)] >> >at >> > >> > >> org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:474) >> >at >> > >> org.apache.wicket.Component.renderClosingComponentTag(Component.java:4318) >> >at org.apache.wicket.Component.renderComponent(Component.java:2627) >> >at >> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) >> >at org.apache.wicket.Component.render(Component.java:2450) >> >at >> > org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414) >> >at >> > >> > >> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1577) >> >at >> > >> > >> org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:675) >> >at >> > >> > >> org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:114) >> >at org.apache.wicket.Component.renderComponent(Component.java:2619) >> > >> > My XHtml seems well formed, what am I doing wrong? >> > >> > Thanks, >> > Todd >> > >> >> >> >> -- >> Jeremy Thomerson >> http://www.wickettraining.com >> > >
Re: Can't use form inside fragment
Sorry, forgot that. 1.4.9 On 2 June 2010 03:03, Jeremy Thomerson wrote: > what version of wicket? > > On Tue, Jun 1, 2010 at 3:37 AM, Todd Nine wrote: > > > Hi all, > > I'm new to Wicket, so if I've done something obviously wrong, please > point > > it out. I have 2 ways the user could log in to our site. One if via the > > full page login form, the other is via quick login in the header. Since > > I'll need to gather the same form data in multiple places, I've created a > > reusable form object below. > > > > http://pastie.org/private/7v1vnmyb4kefamu8q1tnfw > > > > Now, I'm working on my "SessionPanel". This is the panel at the top > right > > of my header. If the user is logged in, it shows a logout link. If > > they're > > an anonymous user, it shows the login form. I have this for my panel > code. > > > > http://www.pastie.org/private/bw5vvzddtrcruemnobjg > > > > And here is my html > > > > http://www.pastie.org/private/o9gzhxeqfcbu8vpohr1uvw > > > > Whenever I try to render the page, I always receive this error. > > > > > > Root cause: > > > > org.apache.wicket.markup.MarkupException: Expected close tag for > > > > [markup = > > > > > file:/Users/toddnine/development/aviator-services/logbook/target/classes/com/spidertracks/aviator/logbook/panel/SessionPanel.html > > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> > > > > http://www.w3.org/1999/xhtml"; > > xmlns:wicket="http://wicket.sourceforge.net/"; xml:lang="en" lang="en"> > > > > > > > > > > keep me logged in: > > > > > > email: > > password: > > > > > > > > > > > > > > > > logout > > > > > > > > , index = 5, current = '' (line 9, > > column > > 3)] > >at > > > > > org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:474) > >at > > > org.apache.wicket.Component.renderClosingComponentTag(Component.java:4318) > >at org.apache.wicket.Component.renderComponent(Component.java:2627) > >at > org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) > >at org.apache.wicket.Component.render(Component.java:2450) > >at > > org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414) > >at > > > > > org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1577) > >at > > > > > org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:675) > >at > > > > > org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:114) > >at org.apache.wicket.Component.renderComponent(Component.java:2619) > > > > My XHtml seems well formed, what am I doing wrong? > > > > Thanks, > > Todd > > > > > > -- > Jeremy Thomerson > http://www.wickettraining.com >
Re: Can't use form inside fragment
what version of wicket? On Tue, Jun 1, 2010 at 3:37 AM, Todd Nine wrote: > Hi all, > I'm new to Wicket, so if I've done something obviously wrong, please point > it out. I have 2 ways the user could log in to our site. One if via the > full page login form, the other is via quick login in the header. Since > I'll need to gather the same form data in multiple places, I've created a > reusable form object below. > > http://pastie.org/private/7v1vnmyb4kefamu8q1tnfw > > Now, I'm working on my "SessionPanel". This is the panel at the top right > of my header. If the user is logged in, it shows a logout link. If > they're > an anonymous user, it shows the login form. I have this for my panel code. > > http://www.pastie.org/private/bw5vvzddtrcruemnobjg > > And here is my html > > http://www.pastie.org/private/o9gzhxeqfcbu8vpohr1uvw > > Whenever I try to render the page, I always receive this error. > > > Root cause: > > org.apache.wicket.markup.MarkupException: Expected close tag for > > [markup = > > file:/Users/toddnine/development/aviator-services/logbook/target/classes/com/spidertracks/aviator/logbook/panel/SessionPanel.html >"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> > > http://www.w3.org/1999/xhtml"; > xmlns:wicket="http://wicket.sourceforge.net/"; xml:lang="en" lang="en"> > > > > > keep me logged in: > > > email: > password: > > > > > > > > logout > > > > , index = 5, current = '' (line 9, > column > 3)] >at > > org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:474) >at > org.apache.wicket.Component.renderClosingComponentTag(Component.java:4318) >at org.apache.wicket.Component.renderComponent(Component.java:2627) >at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) >at org.apache.wicket.Component.render(Component.java:2450) >at > org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414) >at > > org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1577) >at > > org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:675) >at > > org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:114) >at org.apache.wicket.Component.renderComponent(Component.java:2619) > > My XHtml seems well formed, what am I doing wrong? > > Thanks, > Todd > -- Jeremy Thomerson http://www.wickettraining.com
Can't use form inside fragment
Hi all, I'm new to Wicket, so if I've done something obviously wrong, please point it out. I have 2 ways the user could log in to our site. One if via the full page login form, the other is via quick login in the header. Since I'll need to gather the same form data in multiple places, I've created a reusable form object below. http://pastie.org/private/7v1vnmyb4kefamu8q1tnfw Now, I'm working on my "SessionPanel". This is the panel at the top right of my header. If the user is logged in, it shows a logout link. If they're an anonymous user, it shows the login form. I have this for my panel code. http://www.pastie.org/private/bw5vvzddtrcruemnobjg And here is my html http://www.pastie.org/private/o9gzhxeqfcbu8vpohr1uvw Whenever I try to render the page, I always receive this error. Root cause: org.apache.wicket.markup.MarkupException: Expected close tag for [markup = file:/Users/toddnine/development/aviator-services/logbook/target/classes/com/spidertracks/aviator/logbook/panel/SessionPanel.html http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml"; xmlns:wicket="http://wicket.sourceforge.net/"; xml:lang="en" lang="en"> keep me logged in: email: password: logout , index = 5, current = '' (line 9, column 3)] at org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:474) at org.apache.wicket.Component.renderClosingComponentTag(Component.java:4318) at org.apache.wicket.Component.renderComponent(Component.java:2627) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) at org.apache.wicket.Component.render(Component.java:2450) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1577) at org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:675) at org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:114) at org.apache.wicket.Component.renderComponent(Component.java:2619) My XHtml seems well formed, what am I doing wrong? Thanks, Todd
Re: Ajax Repeater Fragment Update
That's a ton of code - which is really hard to debug on a mailing list post. If you'd like someone to look at your specific issue, it'd be helpful to create a quickstart. Alternatively, explain your question a little more and post a snippet of the resulting HTML. PS - have you tried making your additional data a panel that is setVisible(false).setOutputMarkupPlaceholder(true) by default, and then making your link simply setVisible(true) on the panel and add it to the ajax request target? It may be easier than a fragment. I've used that pattern quite a few times. -- Jeremy Thomerson http://www.wickettraining.com On Tue, May 18, 2010 at 1:52 AM, Dr. Wolf Blecher < wolf.blec...@itk-engineering.de> wrote: > Thanks for the response. Attached is the markup and the java classes for > the > panel. It's slightly modified since normally a DataView is used, but the > behaviour is the same with the ListView. This is only the panel class and > not > a complete quickstart. > > Here is the markup > > > > >TreeDataViewPanel > > > > > > > >Name >Vorname > > > > >USer Data here > > > > > > > > > > > >Arrow > > > > Name > > > AgainStrasse > > > >Vorname > > > > and the corresponding Java > > public class TreeDataViewPanel extends Panel { > > private List userList = Arrays.asList("User 1","User 2","User 3"); > > public TreeDataViewPanel(String id) { >super (id); >ListView userTable = new ListView("overview", userList) > { > @Override > protected void populateItem(ListItem item) { >String user = item.getModelObject(); > >DetailFragment dataView = > new DetailFragment("extendingRow","rowView",user); >dataView.setOutputMarkupId(true); >item.add(dataView); > } >}; >add(userTable); > } > } > > class DetailFragment extends Fragment { > > private boolean compressed = true; > > public boolean isCompressed() { >return compressed; > } > > public void setCompressed(boolean compressed) { >this.compressed = compressed; > } > > public DetailFragment(String id, String markupId, String user) { >super(id, markupId); > >WebMarkupContainer detailContainer = new WebMarkupContainer("details") { > @Override > public boolean isVisible() { >return !isCompressed(); > } >}; > >add(new DropDownLink("extendLink", this)); >add(new Label("name", user)); >add(new Label("vorname", user)); > >detailContainer.add(new Label("strasse", user)); >add(detailContainer); > } > } > > > class DropDownLink extends AjaxLink { > > DetailFragment parent; > Label compressedSymbol = new Label("extendSymbol","\u25B6"); // 9654 > Label expandSymbol = new Label("extendSymbol","\u25BC"); // 9660 > Label linkSymbol; > > @Override > public void onClick(AjaxRequestTarget target) { >if (parent.isCompressed()) { > linkSymbol.replaceWith(expandSymbol); > linkSymbol = expandSymbol; > parent.setCompressed(false); >} else { > linkSymbol.replaceWith(compressedSymbol); > linkSymbol = compressedSymbol; > parent.setCompressed(true); >} >target.addComponent(linkSymbol); >target.addComponent(parent); > } > > public DropDownLink(String id, DetailFragment parent) { >super(id); >linkSymbol = compressedSymbol; >linkSymbol.setOutputMarkupId(true); >expandSymbol.setOutputMarkupId(true); >compressedSymbol.setOutputMarkupId(true); >this.parent = parent; >add(linkSymbol); > } > } > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Ajax Repeater Fragment Update
Thanks for the response. Attached is the markup and the java classes for the panel. It's slightly modified since normally a DataView is used, but the behaviour is the same with the ListView. This is only the panel class and not a complete quickstart. Here is the markup TreeDataViewPanel Name Vorname USer Data here Arrow Name AgainStrasse Vorname and the corresponding Java public class TreeDataViewPanel extends Panel { private List userList = Arrays.asList("User 1","User 2","User 3"); public TreeDataViewPanel(String id) { super (id); ListView userTable = new ListView("overview", userList) { @Override protected void populateItem(ListItem item) { String user = item.getModelObject(); DetailFragment dataView = new DetailFragment("extendingRow","rowView",user); dataView.setOutputMarkupId(true); item.add(dataView); } }; add(userTable); } } class DetailFragment extends Fragment { private boolean compressed = true; public boolean isCompressed() { return compressed; } public void setCompressed(boolean compressed) { this.compressed = compressed; } public DetailFragment(String id, String markupId, String user) { super(id, markupId); WebMarkupContainer detailContainer = new WebMarkupContainer("details") { @Override public boolean isVisible() { return !isCompressed(); } }; add(new DropDownLink("extendLink", this)); add(new Label("name", user)); add(new Label("vorname", user)); detailContainer.add(new Label("strasse", user)); add(detailContainer); } } class DropDownLink extends AjaxLink { DetailFragment parent; Label compressedSymbol = new Label("extendSymbol","\u25B6"); // 9654 Label expandSymbol = new Label("extendSymbol","\u25BC"); // 9660 Label linkSymbol; @Override public void onClick(AjaxRequestTarget target) { if (parent.isCompressed()) { linkSymbol.replaceWith(expandSymbol); linkSymbol = expandSymbol; parent.setCompressed(false); } else { linkSymbol.replaceWith(compressedSymbol); linkSymbol = compressedSymbol; parent.setCompressed(true); } target.addComponent(linkSymbol); target.addComponent(parent); } public DropDownLink(String id, DetailFragment parent) { super(id); linkSymbol = compressedSymbol; linkSymbol.setOutputMarkupId(true); expandSymbol.setOutputMarkupId(true); compressedSymbol.setOutputMarkupId(true); this.parent = parent; add(linkSymbol); } } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org