On Fri, Jul 5, 2013 at 1:41 PM, Patrick Davids <[email protected]>wrote:
> Hi Sebastien, Hi Martin, > the dialog was just an example. > > My question was more focused on a feature similar to the javascript or > css resource "wicket feature". > Putting a resource only once into the page header no matter how many > components "requested" to do that. > What do you mean by requested component ? To show a component you need a markup for it (an HTML element with wicket:id attribute). Without markup you won't be able to add it in the page. So, this component must be in the page. It could be invisible if no one "requested" it. > > But on component level. > > (I am in a case with a repeating view.) > > Patrick > > Am 05.07.2013 11:55, schrieb Sebastien: > > Hi Patrick, > > > > I am using the same approach as Martin. > > > > Just a little additional note: if you want to have only one dialog > > placeholder for different dialogs/purposes and as I am thinking you are > > using jQuery UI's dialog, I would suggest you to have a look at this > issue > > for the dialog to open correctly (it is a common problem while using > jQuery > > UI's dialog) > > > > https://github.com/sebfz1/wicket-jquery-ui/issues/44 > > > > Explanations here: > > http://blog.nemikor.com/2009/04/08/basic-usage-of-the-jquery-ui-dialog/ > > > > Best regards, > > Sebastien. > > > > > > On Fri, Jul 5, 2013 at 11:39 AM, Martin Grigorov <[email protected] > >wrote: > > > >> Hi, > >> > >> We use something similar for showing dialog/flyout. > >> The component is always in the page, but it renders itself only when it > has > >> contents. > >> You can put your component anywhere in the page hierarchy and use Wicket > >> events to update it. > >> > >> > >> On Fri, Jul 5, 2013 at 12:15 PM, Patrick Davids < > [email protected] > >>> wrote: > >> > >>> Hi all, > >>> does anyone have a best practice putting a component on a page (as > >>> singleton) independendly how many other components on that page "needs" > >> it? > >>> > >>> e.g. a global dialog, which can be used from different components. > >>> Not to have 20 invisible dialogs aleady rendered and opened on request. > >>> > >>> In out special to achieve this we do not want use page inheritence. > >>> This component shouldn't be on page, if no other component needs it. > >>> > >>> thanx for help... > >>> kind regards > >>> Patrick > >>> --------------------------------------------------------------------- > >>> To unsubscribe, e-mail: [email protected] > >>> For additional commands, e-mail: [email protected] > >>> > >>> > >> > > > > -- > Mit freundlichen Grüßen, > > Patrick Davids > > NuboIT GmbH & Co. KG > Kieler Str. 103-107 • 25474 Bönningstedt > > Email: [email protected] > > Handelsregister: HRA6819 Pi | Amtsgericht Pinneberg > > Geschäftsführung der Verwaltungsgesellschaft > Daniel Fraga Zander > > HRB10145Pi | Amtsgericht Pinneberg
