Re: Re: Page load without version redirect for Bootstrap Modal

2013-02-08 Thread Tom Eicher

Thanks Igor, that worked.

As a hint to future bootstrapping wicketeers:

remove the all data-toggle, href, data-target etc attributes
and the $('#myModal').modal(); call.
put the modal's body in a container div.

then render the dialog content using AJAX like

new AjaxLink("EditAjax") {
  @Override
  public void onClick(AjaxRequestTarget target) {
... newEditPanel = new 
 editPanel.replaceWith(newEditPanel);
editPanel=newEditPanel;
target.add(editPanel);
target.appendJavaScript("$('#myModal').modal();");
}
}

Cheers, Tom.

Igor Vaynberg wrote:

instead of doing it that way have the ajax operation that opens the
dialog render the content into some div in the markup and call the
dialog on that div.

-igor

On Thu, Feb 7, 2013 at 4:38 PM, Tom Eicher  wrote:

Hello,

with Bootstrap's modal functionality, I can make very cool modal
popups.

http://twitter.github.com/bootstrap/javascript.html#modals

The problems start when I want to provide the popup's content
dynamically via Wicket, because I need to provide a href that will be
loaded by JQuerys "load" method, which apparently does not respect
redirects.
In other words, I need to provide a PageLink (Bookmarkable or other...)
that will load the page directly, without redirecting to include the
page version. But I do not want ONE_PASS_RENDER for the whole of
the application.

Previous questions about such things pointed to the "restart
exception", but I guess that's a different use case...

Maybe if I already included a page version in the link, would the
page still redirect ? Can I switch off redirecting for one
page only ? Or even better, for one page constructor only ?

Anybody successfully doing Bootstrap modals with "remote content"
(using "href" or data-remote") ?

Cheers, 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



Re: Page load without version redirect for Bootstrap Modal

2013-02-07 Thread Igor Vaynberg
instead of doing it that way have the ajax operation that opens the
dialog render the content into some div in the markup and call the
dialog on that div.

-igor

On Thu, Feb 7, 2013 at 4:38 PM, Tom Eicher  wrote:
> Hello,
>
> with Bootstrap's modal functionality, I can make very cool modal
> popups.
>
> http://twitter.github.com/bootstrap/javascript.html#modals
>
> The problems start when I want to provide the popup's content
> dynamically via Wicket, because I need to provide a href that will be
> loaded by JQuerys "load" method, which apparently does not respect
> redirects.
> In other words, I need to provide a PageLink (Bookmarkable or other...)
> that will load the page directly, without redirecting to include the
> page version. But I do not want ONE_PASS_RENDER for the whole of
> the application.
>
> Previous questions about such things pointed to the "restart
> exception", but I guess that's a different use case...
>
> Maybe if I already included a page version in the link, would the
> page still redirect ? Can I switch off redirecting for one
> page only ? Or even better, for one page constructor only ?
>
> Anybody successfully doing Bootstrap modals with "remote content"
> (using "href" or data-remote") ?
>
> Cheers, 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



Page load without version redirect for Bootstrap Modal

2013-02-07 Thread Tom Eicher

Hello,

with Bootstrap's modal functionality, I can make very cool modal
popups.

http://twitter.github.com/bootstrap/javascript.html#modals

The problems start when I want to provide the popup's content
dynamically via Wicket, because I need to provide a href that will be
loaded by JQuerys "load" method, which apparently does not respect
redirects.
In other words, I need to provide a PageLink (Bookmarkable or other...)
that will load the page directly, without redirecting to include the
page version. But I do not want ONE_PASS_RENDER for the whole of
the application.

Previous questions about such things pointed to the "restart
exception", but I guess that's a different use case...

Maybe if I already included a page version in the link, would the
page still redirect ? Can I switch off redirecting for one
page only ? Or even better, for one page constructor only ?

Anybody successfully doing Bootstrap modals with "remote content"
(using "href" or data-remote") ?

Cheers, Tom.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org