The requirements are pretty simple, the widget will contain a form field or two 
that will be submitted back to a server via AJAX and present results back to 
the user on the site hosting the widget.  Think of the ubiquitous Twitter or 
Facebook share widgets as existing similar examples to the functionality I 
need.  Yes, CORS is an issue, but there seems to be a workaround that jQuery 
and other libraries use called JSONP.  This HOWTO documents the jQuery way of 
doing it:

http://alexmarandon.com/articles/web_widget_jquery/

I'm trying to figure out if wicket can simplify this for me, if not I'll 
probably just follow that example and push JSON or HTML to a jQuery widget from 
a ResourceReference or plain servlet.  I'm not sure where I would begin in 
creating a mini-app unless you can point me at existing wicket functionality 
that would at least get me close.  I've found ComponentRenderingRequestHandler 
which might be helpful in combination with a jquery based widget, but I'm not 
sure how I'd handle the wicket javascript includes that would be needed to 
support the component.  Seems like it would get messy and fragile quickly.  
That's when I thought of wicket's existing AJAX component rendering (and 
re-rendering) capability which seems to handle that stuff already if I could 
tie into it (but maybe that's not possible without CORS and absolute URL 
support in wicket).

-Mike

On Dec 12, 2012, at 12:35 AM, Martin Grigorov <[email protected]> wrote:

> Hi,
> 
> What are the requirements for this widgets ?
> Recently another user asked for the same functionality and we realized that
> there are several limitations, the most important one - CORS.
> Please create a mini application that shows the requirements and we can try
> to finish it together. You can put it in GitHUb/BitBucket/... or send the
> archive directly to me.
> 
> 
> On Wed, Dec 12, 2012 at 6:51 AM, Mike Comb <[email protected]> wrote:
> 
>> Hi, I have a need to create some javascript based widgets that will be
>> deployed to a variety of websites that are out of my control.  I was
>> planning on using one of the existing javascript UI frameworks with json
>> for callbacks to my servers (which are running Wicket for normal consumer
>> facing stuff).  It occurred to me that what I will be implementing is very
>> similar to how Wicket deals with Ajax, pushing markup out to the browser to
>> be rendered by a javascript layer with support for javascript callbacks to
>> the server for interactivity.  I'm wondering if there is any way I can
>> leverage that existing functionality so that I can code my widgets as
>> wicket components and not reinvent the wheel?  Has anybody used wicket for
>> creating components that aren't used from within wicket pages (and are
>> deployed purely from javascript, I'd like to avoid iframes)?  Any tips or
>> links to examples would be appreciated.
>> 
>> Thanks,
>> -Mike
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
>> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to