ListItem and enclosure problem

2017-06-08 Thread Per Newgro
Hello, i would like to enclose markup of a list item in wicket:enclosure. The enclosure is activated based on a child component on list item. So for i could not find any marker that this is not working. So i need to do something wrong. Any work around would be welcome. Thanks for your support P

Re: ListItem and enclosure problem

2017-06-08 Thread Andrea Del Bene
Hi, have a look at the answer here on StackOverflow: https://stackoverflow.com/questions/44270160/how-to-access-html-element-which-doesnt-have-a-wicketid Basically you should move your ListView to tag an remove wicket:id from tag. On Thu, Jun 8, 2017 at 9:54 AM, Per Newgro wrote: > Hello, > >

Re: ListItem and enclosure problem

2017-06-08 Thread Ernesto Reinaldo Barreiro
Why to not put the thing in a panel? On Thu, Jun 8, 2017 at 9:54 AM, Per Newgro wrote: > Hello, > > i would like to enclose markup of a list item in wicket:enclosure. The > enclosure is activated based on a child component on list item. > So for i could not find any marker that this is not work

Aw: Re: ListItem and enclosure problem

2017-06-08 Thread Per Newgro
Thanks for responding. Maybe i should have stated my goal clearly. I would like to remove the space occupied by empty list items. Basically i do it with wicket:enclosures. While not displaying the "empty element" markup the space is not occupied. Do you mean that i need to change it that way?

Aw: Re: ListItem and enclosure problem

2017-06-08 Thread Per Newgro
Sorry Ernesto for my bad english. But i can not see how i shall get this to work with a panel? I use a listview because my item count is configurable. So i can not generate a "template panel" and put all items in that. But i admit that i didn't understand your question completely. Thanks Per >

Re: Re: ListItem and enclosure problem

2017-06-08 Thread Andrea Del Bene
Sorry, in your case this HTML should work better: [Content] Then in your MyListView override onConfigure with something like this: void onConfigure() { super.onConfigure(); setVisible(getModelObject().size() > 0); } On Thu, Jun 8, 201

Re: Re: ListItem and enclosure problem

2017-06-08 Thread Ernesto Reinaldo Barreiro
Why to not replace MyListView with a panel containing the listView? No enclosure is needed then On Thu, Jun 8, 2017 at 11:40 AM, Andrea Del Bene wrote: > Sorry, in your case this HTML should work better: > > > > >[Content] > > > > > Then in

Re: Re: ListItem and enclosure problem

2017-06-08 Thread Andrea Del Bene
Nothing against Panels :-), but in this way you have to create a new class file and a markup file. On Thu, Jun 8, 2017 at 11:48 AM, Ernesto Reinaldo Barreiro < reier...@gmail.com> wrote: > Why to not replace MyListView with a panel containing the listView? No > enclosure is needed then > > > On T

Re: Re: ListItem and enclosure problem

2017-06-08 Thread Ernesto Reinaldo Barreiro
And have reusable bit and avoids enclosures :-) On Thu, Jun 8, 2017 at 12:00 PM, Andrea Del Bene wrote: > Nothing against Panels :-), but in this way you have to create a new class > file and a markup file. > > On Thu, Jun 8, 2017 at 11:48 AM, Ernesto Reinaldo Barreiro < > reier...@gmail.com> wr

Aw: Re: Re: ListItem and enclosure problem

2017-06-08 Thread Per Newgro
But wouldn't this only hide the complete listview when there is no item? I want to remove markup only for an empty item. So something like 1 2 3 should become in case foo:1:bar is invisible 1 3 Thank you Per > Gesendet: Donnerstag, 08. Juni 2017 um 11:40 Uhr > Von: "Andrea Del Be

Re: Re: Re: ListItem and enclosure problem

2017-06-08 Thread Martin Grigorov
Why don't you just use `item.setVisible(false)` ? No need of enclosures. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Jun 8, 2017 at 12:23 PM, Per Newgro wrote: > But wouldn't this only hide the complete listview when there is no item? > I want to remove

Re: Re: Re: ListItem and enclosure problem

2017-06-08 Thread Andrea Del Bene
Just use: item.setVisible(false); instead of: label.setVisible(false); On Thu, Jun 8, 2017 at 12:23 PM, Per Newgro wrote: > But wouldn't this only hide the complete listview when there is no item? > I want to remove markup only for an empty item. > > So something like > > 1 > 2 > 3 >

Re: Re: Re: ListItem and enclosure problem

2017-06-08 Thread Andrea Del Bene
The enclosure is necessary if you want to strip out tag when it's empty. On Thu, Jun 8, 2017 at 12:30 PM, Andrea Del Bene wrote: > Just use: > > item.setVisible(false); > > instead of: > > label.setVisible(false); > > On Thu, Jun 8, 2017 at 12:23 PM, Per Newgro wrote: > >> But wouldn't this on

Aw: Re: Re: Re: ListItem and enclosure problem

2017-06-08 Thread Per Newgro
Thanks a lot Andrea, that did work. Now i get only markup of visible items. My Solution looks now: ListViewEnclosurePage.html http://wicket.apache.org";> [Content] ListViewEnclosurePage$MyListVi

Re: Re: Re: Re: ListItem and enclosure problem

2017-06-08 Thread Andrea Del Bene
you're wellcome! On Thu, Jun 8, 2017 at 12:42 PM, Per Newgro wrote: > Thanks a lot Andrea, > > that did work. Now i get only markup of visible items. > > My Solution looks now: > > > ListViewEnclosurePage.html > > http://wicket.apache.org";> > > > > > > > >

Ajax call failing but only sometimes?

2017-06-08 Thread thewicketguy1992
I have a wicket panel, containing a wicket form all inside a modal. If the form passes validation i have a line of code at the end loo

Wicketstuff for wicket7

2017-06-08 Thread durairaj t
Is the closing parenthesis"()" at the end of the following line of code correct? *AbstractGrid#*getInitializationJavascript() { ... sb.append("})*()*;\n"); } I have a link in the data grid to call a modal window,it is not working with this closing parenthesis, it is good if I removed