Re: Wicket widget for deployment to third party site

2012-12-12 Thread Martin Grigorov
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 m...@panomark.com 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: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: Wicket widget for deployment to third party site

2012-12-12 Thread Mike Comb
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 mgrigo...@apache.org 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 m...@panomark.com 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: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -- 
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/




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



Wicket widget for deployment to third party site

2012-12-11 Thread Mike Comb
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: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket Widget

2011-05-19 Thread LePirlouit
I have the same question :

Is there a way to force wicket to generate absolute urls 
for the page being rendered?

for javascript, onclick events and A urls

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Widget-tp1867919p3535951.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket Widget

2011-05-19 Thread Bruno Borges
Reminds me of a problem I had playing with jQuery Mobile.

jqM plays with hash links and with Wicket 1.4.17, it does not work properly.
I had to disable all Ajax links jQuery Mobile handles.

How to avoid that?


*Bruno Borges*
www.brunoborges.com.br
+55 21 76727099



On Thu, May 19, 2011 at 11:50 AM, LePirlouit lepirlo...@hotmail.com wrote:

 I have the same question :

 Is there a way to force wicket to generate absolute urls
 for the page being rendered?

 for javascript, onclick events and A urls

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Wicket-Widget-tp1867919p3535951.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




Re: Wicket Widget

2008-07-10 Thread Carlos Pita
Hi,

 you are working with html. seems like a resonable approach from our end of 
 things.

I agree.

Well, I've postprocessed the output through a couple of regexps
because the task was too simple to be done by xslt or dom machinery.
But now I've hit another problem: links are generated relative to
current page, which is not desired when finally embedding the gadget
in its host. Is there a way to force wicket to generate absolute urls
for the page being rendered? I mean for ajax events, js and css
references, image srcs... everywhere.

Thanks again.
Best regards
-Carlos


 i would say just run it through xslt to transform it to whatever you need.

 -igor

 On Tue, Jul 8, 2008 at 8:53 AM, Carlos Pita [EMAIL PROTECTED] wrote:
 Hi all,

 I'm looking for a fine and dandy (or just fine) way to create widgets
 for igoogle, facebook and others. I would like to reuse our wicket
 components and pages because the widgets are not that different from
 our site but a shrunk version of it. The main problem I'm facing is
 that wicket output seems to unavoidably consist of html (with
 corresponding head and body tags) while widgets are required to
 conform to different syntaxes by their respective hosts in order to be
 embedded. Is there a way to generate xml so that stylesheets and
 javascript appear inside the main tag, this being an arbitrarily
 chosen one, other than postprocessing the html output? Another more
 general way to put the question is if there is a way to produce a more
 or less arbitrary xml from the markup templates. But I guess the
 answer is no because of how wicket components handle header tags (js,
 css contributions). In that case, what would you recommend? A
 postprocessing behavior?

 Thank you in advance
 Best regards
 -Carlos

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Wicket Widget

2008-07-08 Thread Carlos Pita
Hi all,

I'm looking for a fine and dandy (or just fine) way to create widgets
for igoogle, facebook and others. I would like to reuse our wicket
components and pages because the widgets are not that different from
our site but a shrunk version of it. The main problem I'm facing is
that wicket output seems to unavoidably consist of html (with
corresponding head and body tags) while widgets are required to
conform to different syntaxes by their respective hosts in order to be
embedded. Is there a way to generate xml so that stylesheets and
javascript appear inside the main tag, this being an arbitrarily
chosen one, other than postprocessing the html output? Another more
general way to put the question is if there is a way to produce a more
or less arbitrary xml from the markup templates. But I guess the
answer is no because of how wicket components handle header tags (js,
css contributions). In that case, what would you recommend? A
postprocessing behavior?

Thank you in advance
Best regards
-Carlos

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket Widget

2008-07-08 Thread Igor Vaynberg
wicket doesnt care about the markup type in general, it works on xml.

however, header contributions are special because they are
html-specific so it is assumed that if you use header contributions
you are working with html. seems like a resonable approach from our
end of things.

i would say just run it through xslt to transform it to whatever you need.

-igor

On Tue, Jul 8, 2008 at 8:53 AM, Carlos Pita [EMAIL PROTECTED] wrote:
 Hi all,

 I'm looking for a fine and dandy (or just fine) way to create widgets
 for igoogle, facebook and others. I would like to reuse our wicket
 components and pages because the widgets are not that different from
 our site but a shrunk version of it. The main problem I'm facing is
 that wicket output seems to unavoidably consist of html (with
 corresponding head and body tags) while widgets are required to
 conform to different syntaxes by their respective hosts in order to be
 embedded. Is there a way to generate xml so that stylesheets and
 javascript appear inside the main tag, this being an arbitrarily
 chosen one, other than postprocessing the html output? Another more
 general way to put the question is if there is a way to produce a more
 or less arbitrary xml from the markup templates. But I guess the
 answer is no because of how wicket components handle header tags (js,
 css contributions). In that case, what would you recommend? A
 postprocessing behavior?

 Thank you in advance
 Best regards
 -Carlos

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]