On Wed, Sep 3, 2014 at 11:15 PM, Jason Novotny <jason.novo...@gmail.com>

> Hi,
> My designer gave me code where HTML is created in javascript as part of a
> jquery dataTable:
> <script>
>         $(document).ready(function() {
>             $('#datatable').dataTable( {
> ....
> $('.clientinvoices .dropholder').html('<div class="opener"></div>*<button
> class="btn" type="reset">Cancel Order</button>*');
> ..
> </script>
> And I need that button to be a wicket button, is there a way to pass it a
> generated link, etc? What would be the best way to deal with this?

One way is to generate this code with Wicket and make it invisible
(display: none). Then the JS code should just make it visible

Another way is, as Pierre explained, to use Ajax behavior. In some
#renderHead() method do:
response.render(OnDomReadyHeaderItem.forScript("window.resetUrl =

Later in the JS code you can use jQuery#ajax() or Wicket.Ajax.get() and
make use of window.resetUrl as an endpoint.

> Thanks, Jason

Reply via email to