nice tutorial : "Call Apache Wicket from Javascript / Back Button Behavior"

2017-04-14 Thread Francois Meillet
For all those who are interested by this subject, have a look at this very good 
tutorial

https://twitter.com/apache_wicket/status/852786047746322434


François




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



[wicket 6] javascript confirmation via onPrecondition failed.

2013-05-07 Thread smallufo
I want to add a warning dialog when user clicks an ajax deleteLink
I saw the following solution:

LinkVoid deleteLink = new AjaxFallbackLinkVoid(deleteLink)
{
  @Override
  public void onClick(AjaxRequestTarget target)
  {
commentService.deleteComment(user, comment, ip);
setResponsePage(CommentsPage.class , pps);
  }

  @Override
  protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
  {
super.updateAjaxAttributes(attributes);

AjaxCallListener ajaxCallListener = new AjaxCallListener();
ajaxCallListener.onPrecondition(return confirm('Are you sure?'););
attributes.getAjaxCallListeners().add(ajaxCallListener);
  }
};
add(deleteLink);

It did popup a warning box , display Are you sure?
But no matter user clicks OK or Cancel
The comment get deleted !

What's wrong here ?

Thanks.

(wicket 6.7)


Potential XSS-Vulnerability due to the way Wicket renders JavaScript in CDATA blocks?

2012-12-06 Thread spam2...@meeque.de
Hello List,


I must admit, I don't follow here too closely. But I've searched the
archive and Wicket's Jira, and have not found much discussion regarding
this Issue. So let me elaborate...


A partner pointed me to a XSS vulnerability in one of our websites built
with Wicket. The respective page uses a lot of custom JS code, and some
of it interacts with the backend, too. We use
AbstractDefaultAjaxBehavior.getCallbackUrl() to build the respective
URLs. This apparently includes URL-parameters that were used to access
the original page, no matter if these parameters are needed by the
Wicket application or not. Hence an attacker can manipulate theses URLs,
and render them into the page. 

In Wicket 1.5. that caused injection trouble when such a tampered URL
contains the closing of an XML CDATA block, i.e. the characters ]].
We're currently migrating the website to Wicket 6 (great work on the JS
integration there btw.) where this kind of injection does not work.
Apparently, the URLs that are returned by
AbstractDefaultAjaxBehavior.getCallbackUrl() are already sanitized. So
no more problem for us here. 


However, that all started me thinking. And in the end I could construct
a similar XSS vulnerability, even with Wicket 6.0. Here's an example,
using an IHeaderResponse:

response.render( new OnDomReadyHeaderItem( var foo = 'Injecting CDATA
section end-tag ... ]] /scripth1... in order to break out of script
block/h1' ) );

Of course, the above is just a demo, using a static string. However, it
might aswell contain dynamic data constructed from user input. Point
being, it is a string of perfectly legitimate JavaScript code. So
JS-escaping wouldn't help much. Still it introduces a serious XSS
vulnerability IMHO.

Btw, the documentation of OnDomReadyHeaderItem merely speaks of
JavaScript -- it does not mention anything about encoding it. So as a
caller I assumed, OnDomReadyHeaderItem (or more generally Wicket) would
take care of proper escaping. 

Also, I don't think OnDomReadyHeaderItem is the only way to reproduce
this. I suspect such injection is possible almost anywhere Wicket
renders JavaScript. In particular, Wicket code ads its own
![CDATA[ ... ]] markers around JS code-blocks in HTML. So shouldn't it
also make sure, that these code-blocks don't contain the charactes ]]
themselves? And somehow escape them, if needed?


Sorry, if all of that has already been discussed. I noticed a long time
ago that Wicket uses CDATA blocks for JS code. And I always assumed
Wicket would take appropriate measures to prevent code from breaking out
of these blocks. So I'm a little worried about my discovery. 


Regards,
Michael


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



Wicket and Javascript UI Libraries' components

2012-09-06 Thread gia
Hi,

I am a newbie.
So far I have used PHP with some javascript libraries: Prototype, YUI, Dojo.
I started with Wicket 1.4.x.  As I see Wicket has its own ui componenets.
What is not clear for me how can I use/integrate an external Javascript
libraries.

Any help is appreciated,

Regards

gia



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-Javascript-UI-Libraries-components-tp4651804.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 and Javascript UI Libraries' components

2012-09-06 Thread Martin Grigorov
Hi Gia,

There are few good libraries that integrate Wicket with JavaScript
libraries (mostly jQuery).
See http://code.google.com/p/wiquery/,
http://code.google.com/p/wicket-jquery-ui/,
http://code.google.com/p/jqwicket/, ...

If you don't use jQuery then use there code as inspiration.

On Thu, Sep 6, 2012 at 3:30 PM, gia wicke...@gmail.com wrote:
 Hi,

 I am a newbie.
 So far I have used PHP with some javascript libraries: Prototype, YUI, Dojo.
 I started with Wicket 1.4.x.  As I see Wicket has its own ui componenets.
 What is not clear for me how can I use/integrate an external Javascript
 libraries.

 Any help is appreciated,

 Regards

 gia



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Wicket-and-Javascript-UI-Libraries-components-tp4651804.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




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

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



Re: Wicket and Javascript UI Libraries' components

2012-09-06 Thread gia
Thank you Martin



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-Javascript-UI-Libraries-components-tp4651804p4651828.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



Calling wicket from javascript

2012-05-07 Thread jcf1974
Hello, 
 I'm new in this forum, and i love wicket!!!
My question is: 
What wrong with this code?

   @Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new
AjaxPreprocessingCallDecorator(super.getAjaxCallDecorator()) {
private static final long serialVersionUID = 1L;

@Override
public CharSequence preDecorateScript(CharSequence
script) {
return function callWicket(){ + script + };
$('.search-div').slideDown('slow',callWicket());;
}
};
}


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Calling-wicket-from-javascript-tp4614627.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: Calling wicket from javascript

2012-05-07 Thread Richard W. Adams
Hard to say without details. Are you not getting the behavior you expect 
(and what is that behavior?). Are you getting an error message?

RAM /abr./: Rarely Adequate Memory. 



From:   jcf1974 eslae...@eresmas.com
To: users@wicket.apache.org
Date:   05/07/2012 07:07 AM
Subject:Calling wicket from javascript



Hello, 
 I'm new in this forum, and i love wicket!!!
My question is: 
What wrong with this code?

   @Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new
AjaxPreprocessingCallDecorator(super.getAjaxCallDecorator()) {
private static final long serialVersionUID = 1L;

@Override
public CharSequence preDecorateScript(CharSequence
script) {
return function callWicket(){ + script + };
$('.search-div').slideDown('slow',callWicket());;
}
};
}


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Calling-wicket-from-javascript-tp4614627.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




**

This email and any attachments may contain information that is confidential 
and/or privileged for the sole use of the intended recipient.  Any use, review, 
disclosure, copying, distribution or reliance by others, and any forwarding of 
this email or its contents, without the express permission of the sender is 
strictly prohibited by law.  If you are not the intended recipient, please 
contact the sender immediately, delete the e-mail and destroy all copies.
**


Re: Calling wicket from javascript

2012-05-07 Thread jcf1974
I tried to call wicket from javascript without using a wicket behaviour,
 and the error/warning i get is  wcall is not defined.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Calling-wicket-from-javascript-tp4614627p4614859.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 and javascript

2012-02-09 Thread Martin Grigorov
See 
https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/autocomplete-tagit-parent/autocomplete-tagit/src/main/java/org/wicketstuff/tagit/TagItAjaxBehavior.java#L114

and few lines above how this template is populated

On Thu, Feb 9, 2012 at 7:18 PM, mukesh kumar mukesh.verma1...@gmail.com wrote:
 Hi,
  In my wicket application, for session timeout, i have used .js(javascript)
 file. And i am showing timeout message  from alert tag in .js file. And add
 this file to my all html page; its working fine.
                   But my problem is, for internationalization, i want to
 show that alert message from properties file. i tried, but unable to find
 solutions. My project is going on deadline, so please help me, and give me
 the solutions ASAP.
 Thanks !

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/wicket-and-javascript-tp4373587p4373587.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




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

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



Re: wicket and javascript

2010-03-19 Thread JonnyL

I have a JS file that has a function to return a node value from an XML file.
The JS file is referenced in the head section of the page and the function
is called from the page body. The JS function runs but does not return the
XML node. How do I reference the XML file?

Hope you can help



jthomerson wrote:
 
 If you're rendering JS that shouldn't be executed until the page is
 loaded,
 call this method in your renderHead method:
 
 http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/markup/html/IHeaderResponse.html#renderOnDomReadyJavascript%28java.lang.String%29
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com
 
 
 
 On Tue, Feb 16, 2010 at 8:12 AM, exceptionist bad.ad...@arcor.de wrote:
 



 igor.vaynberg wrote:
 
  allow your component to implement IHeaderContributor and output both
  your base js and string js from the renderhread() method
  -igor
 

 du u have a code-example(link oder something like that) for this way of
 solving my prob?
 i tried several times to do it, but i always got the same result...
 the script, which was generated dynamically was rendered into the head
 before the ressource-implementation, instead of behind that block of
 code.
 --
 View this message in context:
 http://old.nabble.com/wicket-and-javascript-tp27590908p27608918.html
 Sent from the Wicket - User 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


 
 

-- 
View this message in context: 
http://old.nabble.com/wicket-and-javascript-tp27590908p27950990.html
Sent from the Wicket - User 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 and javascript

2010-02-17 Thread exceptionist


jthomerson wrote:
 
 If you're rendering JS that shouldn't be executed until the page is
 loaded,
 call this method in your renderHead method:
 
 http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/markup/html/IHeaderResponse.html#renderOnDomReadyJavascript%28java.lang.String%29
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com
 

GREAT the script is still above the others, but i don´t care as long as
it works :) and the whole js-part is in the page´s head-tag :)

thx 4 your help :)
-- 
View this message in context: 
http://old.nabble.com/wicket-and-javascript-tp27590908p27621035.html
Sent from the Wicket - User 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 and javascript

2010-02-16 Thread exceptionist



igor.vaynberg wrote:
 
 allow your component to implement IHeaderContributor and output both
 your base js and string js from the renderhread() method
 -igor
 

du u have a code-example(link oder something like that) for this way of
solving my prob?
i tried several times to do it, but i always got the same result...
the script, which was generated dynamically was rendered into the head
before the ressource-implementation, instead of behind that block of code.
-- 
View this message in context: 
http://old.nabble.com/wicket-and-javascript-tp27590908p27608918.html
Sent from the Wicket - User 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 and javascript

2010-02-16 Thread Jeremy Thomerson
If you're rendering JS that shouldn't be executed until the page is loaded,
call this method in your renderHead method:

http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/markup/html/IHeaderResponse.html#renderOnDomReadyJavascript%28java.lang.String%29

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, Feb 16, 2010 at 8:12 AM, exceptionist bad.ad...@arcor.de wrote:




 igor.vaynberg wrote:
 
  allow your component to implement IHeaderContributor and output both
  your base js and string js from the renderhread() method
  -igor
 

 du u have a code-example(link oder something like that) for this way of
 solving my prob?
 i tried several times to do it, but i always got the same result...
 the script, which was generated dynamically was rendered into the head
 before the ressource-implementation, instead of behind that block of code.
 --
 View this message in context:
 http://old.nabble.com/wicket-and-javascript-tp27590908p27608918.html
 Sent from the Wicket - User 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




wicket and javascript

2010-02-15 Thread bj�rn liffers
hello,
i tried to generate a.js-file, but i wasn´t able to generate it in the folder 
where i wanted it to be.
so i decided to generate it from a StringModel but it still didn´t work.

i have several scripts that are implemented via resource...
like this one:
 add(JavascriptPackageResource.getHeaderContribution(Start.class, 
js/raphael-min.js));

the StringModel was added after the script-ressource
 add(JavascriptPackageResource.getHeaderContribution(Start.class, 
js/raphael-min.js));
 add(new Label(rScript, Model.of(rScript)).setEscapeModelStrings(false));

but when the page rendered the StringModel was implemented before the 
ressources where added.

i dislike to place the StringModel´s script-tag in the body-tag instead of the 
head-tag of my html-file
is there any possibility to solve that?
if it´s not possible to do it this way, is there anyone who can tell me how to 
get the absolute path to my Start.class dynamically?
would be glad to get answers to both questions :)

in my company there isn´t anyone dealing with wicket, it´s some kind of 
explorative task for me

thank you
*exceptionist*

Immer auf dem Laufenden! Sport, Auto, Reise, Politik und Promis. Von uns für 
Sie: der neue Arcor.de-Newsletter!
Jetzt anmelden und einfach alles wissen: 
http://www.arcor.de/rd/footer.newsletter

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



Re: wicket and javascript

2010-02-15 Thread Igor Vaynberg
allow your component to implement IHeaderContributor and output both
your base js and string js from the renderhread() method

-igor

2010/2/15 björn liffers bad.ad...@arcor.de:
 hello,
 i tried to generate a.js-file, but i wasn´t able to generate it in the folder 
 where i wanted it to be.
 so i decided to generate it from a StringModel but it still didn´t work.

 i have several scripts that are implemented via resource...
 like this one:
     add(JavascriptPackageResource.getHeaderContribution(Start.class, 
 js/raphael-min.js));

 the StringModel was added after the script-ressource
     add(JavascriptPackageResource.getHeaderContribution(Start.class, 
 js/raphael-min.js));
     add(new Label(rScript, Model.of(rScript)).setEscapeModelStrings(false));

 but when the page rendered the StringModel was implemented before the 
 ressources where added.

 i dislike to place the StringModel´s script-tag in the body-tag instead of 
 the head-tag of my html-file
 is there any possibility to solve that?
 if it´s not possible to do it this way, is there anyone who can tell me how 
 to get the absolute path to my Start.class dynamically?
 would be glad to get answers to both questions :)

 in my company there isn´t anyone dealing with wicket, it´s some kind of 
 explorative task for me

 thank you
 *exceptionist*

 Immer auf dem Laufenden! Sport, Auto, Reise, Politik und Promis. Von uns für 
 Sie: der neue Arcor.de-Newsletter!
 Jetzt anmelden und einfach alles wissen: 
 http://www.arcor.de/rd/footer.newsletter

 -
 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



Wrong path to wicket-event.js resulting in 404 after calling wicket from javascript

2009-09-30 Thread rozkovec . wl
Hallo,
I came across strange problem I do not know whether it is mine fault or 
wicket's problem.

On a page, there is a widget, which list news records.
Each record has an edit and delete link. Edit link opens new dialog in jquery's 
thickbox window, which is practically IFrame.

The code for page, which holds form and which is displayed in the thickbox 
window:
http://pastebin.com/m5ca60e78

The code for a link, which shows the thickbox window with a page in it:
http://pastebin.com/m6339b3a

En example usage:
http://pastebin.com/m768350aa
here on line 72 when I do:
target.addComponent(ShopNewsWidgetPanel.this.get(news-container));

after ajax refresh of the component, which contains news records, each record 
containing edit link, there is 404 error found in the Ajax debug window.
From firebug console I can find out that if I add a some component (here it is 
edit link, which is held by news-container), which also contains 
AbstractDefaultAjaxBehavior, then upon rendering head of the response, there 
is wrong path to wicket ajax resources:

Correct path:
http://localhost:8080/cz.madewithlove/app/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js

Wrong path after ajax call:
http://localhost:8080/cz.madewithlove/app/shop/rozkovec/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js

The page is mounted like so:
mount(new IndexedHybridUrlCodingStrategy(shop, ShopModulePage.class));

An ajax function, which is called in the page's ajax button onSubmit() method:

function thickbox_window_close(url)
{
   tb_remove(); //removes thickbox window

   // call url of the behavior, this behavior is attached to the link, which 
opens the page in thickbox window
   var wcall=wicketAjaxGet(url, null, null, function() {return true;});

   return !wcall;
}

I could solve it by visiting all components of the parent container except 
behaviors and add them to the ajax request target, but it would be better to 
not bother about it and just add the parent container. Any pointers?


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



Re: Wrong path to wicket-event.js resulting in 404 after calling wicket from javascript

2009-09-30 Thread Vladimir K

I believe the code that causes the problem is

#
@Override
#
protected CharSequence getURL()
#
{
#
return super.getURL() +
String.format(TB_iframe=trueheight=%dwidth=%dmodal=false, getHeight(),
getWidth());
#
}

IFAIK wicket encodes URL parameters in a special form. And the last part is
the number of ../ required for prepending the resource urls. In your app
it might be zero so wicket do not generate appropriate ../../.. for your
app/shop/rozkovec mount string.


Vit Rozkovec wrote:
 
 Hallo,
 I came across strange problem I do not know whether it is mine fault or
 wicket's problem.
 
 On a page, there is a widget, which list news records.
 Each record has an edit and delete link. Edit link opens new dialog in
 jquery's thickbox window, which is practically IFrame.
 
 The code for page, which holds form and which is displayed in the thickbox
 window:
 http://pastebin.com/m5ca60e78
 
 The code for a link, which shows the thickbox window with a page in it:
 http://pastebin.com/m6339b3a
 
 En example usage:
 http://pastebin.com/m768350aa
 here on line 72 when I do:
 target.addComponent(ShopNewsWidgetPanel.this.get(news-container));
 
 after ajax refresh of the component, which contains news records, each
 record containing edit link, there is 404 error found in the Ajax debug
 window.
 From firebug console I can find out that if I add a some component (here
 it is edit link, which is held by news-container), which also contains
 AbstractDefaultAjaxBehavior, then upon rendering head of the response,
 there is wrong path to wicket ajax resources:
 
 Correct path:
 http://localhost:8080/cz.madewithlove/app/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js
 
 Wrong path after ajax call:
 http://localhost:8080/cz.madewithlove/app/shop/rozkovec/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js
 
 The page is mounted like so:
 mount(new IndexedHybridUrlCodingStrategy(shop, ShopModulePage.class));
 
 An ajax function, which is called in the page's ajax button onSubmit()
 method:
 
 function thickbox_window_close(url)
 {
tb_remove(); //removes thickbox window
 
// call url of the behavior, this behavior is attached to the link,
 which opens the page in thickbox window
var wcall=wicketAjaxGet(url, null, null, function() {return true;});
 
return !wcall;
 }
 
 I could solve it by visiting all components of the parent container except
 behaviors and add them to the ajax request target, but it would be better
 to not bother about it and just add the parent container. Any pointers?
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Wrong-path-to-wicket-event.js-resulting-in-404-after-calling-wicket-from-javascript-tp25678997p25681934.html
Sent from the Wicket - User 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: Wrong path to wicket-event.js resulting in 404 after calling wicket from javascript

2009-09-30 Thread rozkovec . wl
I have tried removing the override completely, but it did not help. I just 
would like to know, whether I am doing something obviously stupid, or if I 
should start debugging deeper or make a quickstart.

Vit

 
 I believe the code that causes the problem is
 
 #
 @Override
 #
 protected CharSequence getURL()
 #
 {
 #
 return super.getURL() +
 String.format(TB_iframe=trueheight=%dwidth=%dmodal=false, getHeight(),
 getWidth());
 #
 }
 
 IFAIK wicket encodes URL parameters in a special form. And the last part is
 the number of ../ required for prepending the resource urls. In your app
 it might be zero so wicket do not generate appropriate ../../.. for your
 app/shop/rozkovec mount string.
 
 
 Vit Rozkovec wrote:
  
  Hallo,
  I came across strange problem I do not know whether it is mine fault or
  wicket's problem.
  
  On a page, there is a widget, which list news records.
  Each record has an edit and delete link. Edit link opens new dialog in
  jquery's thickbox window, which is practically IFrame.
  
  The code for page, which holds form and which is displayed in the thickbox
  window:
  http://pastebin.com/m5ca60e78
  
  The code for a link, which shows the thickbox window with a page in it:
  http://pastebin.com/m6339b3a
  
  En example usage:
  http://pastebin.com/m768350aa
  here on line 72 when I do:
  target.addComponent(ShopNewsWidgetPanel.this.get(news-container));
  
  after ajax refresh of the component, which contains news records, each
  record containing edit link, there is 404 error found in the Ajax debug
  window.
  From firebug console I can find out that if I add a some component (here
  it is edit link, which is held by news-container), which also contains
  AbstractDefaultAjaxBehavior, then upon rendering head of the response,
  there is wrong path to wicket ajax resources:
  
  Correct path:
 
 http://localhost:8080/cz.madewithlove/app/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js
  
  Wrong path after ajax call:
 
 http://localhost:8080/cz.madewithlove/app/shop/rozkovec/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js
  
  The page is mounted like so:
  mount(new IndexedHybridUrlCodingStrategy(shop, ShopModulePage.class));
  
  An ajax function, which is called in the page's ajax button onSubmit()
  method:
  
  function thickbox_window_close(url)
  {
 tb_remove(); //removes thickbox window
  
 // call url of the behavior, this behavior is attached to the link,
  which opens the page in thickbox window
 var wcall=wicketAjaxGet(url, null, null, function() {return true;});
  
 return !wcall;
  }
  
  I could solve it by visiting all components of the parent container except
  behaviors and add them to the ajax request target, but it would be better
  to not bother about it and just add the parent container. Any pointers?
  
  
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
 
 -- 
 View this message in context:
 http://www.nabble.com/Wrong-path-to-wicket-event.js-resulting-in-404-after-calling-wicket-from-javascript-tp25678997p25681934.html
 Sent from the Wicket - User 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
 
 
 
 
 

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



Re: File input using wicket and javascript

2009-08-09 Thread Igor Vaynberg
i dont think you can with pure html. maybe you can find a flash
component that will do what you want.

-igor

On Sun, Aug 9, 2009 at 4:11 PM, Milton Qurandamilton.qura...@gmail.com wrote:
 Hi All,

 I really need some help on this from javascript as well as wicket side.. I
 am not quite experienced with javascript... and just a month in wicket...

 I am creating a page which has an Image link or even an Image button what
 ever works. When i click on the image the file browse window will open as if
 clicked on the browse button of file input field. Once the user has selected
 an image and click on Open button on the browser window, the file will get
 uploaded and replace the image that was clicked.

 Now what i cannot figure out is how to open the browse window when clicked
 on the image and how to catch the Open click event and upload the file. I
 have the file input field hidden.

 Appreciate your reply.

 Thanks,
 Milton

 ImageUploadForm

 td width=112
                form wicket:id=ImageUploadForm
                    input type=file wicket:id=fileUpload/
                    a href=# wicket:id=imageLinkimg
 src=images/picture-blank.gif alt= width=112 height=131/a
                /form
            /td

 ImageUploadPanel.java
 public class ImageUploadPanel extends Panel {

    public ImageUploadPanel(String s) {
        super(s);
        renderPage();
    }

    public ImageUploadPanel(String s, IModel? iModel) {
        super(s, iModel);
        renderPage();
    }

    public void renderPage() {
        Form form = new Form(ImageUploadForm);
        FileUploadField fileUploadField = new FileUploadField(fileUpload);
        fileUploadField.setVisible(false);

        Link fileImageButton = new Link(imageLink){

            public void onClick() {

            }
        };

        form.add(fileImageButton);
        form.add(fileUploadField);
        add(form);
    }
 }


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



Re: Wicket and javascript

2009-07-05 Thread Mathias Nilsson

Sorry for not getting this totally.

If I do something like this

class Comp extends WebComponent implements ILinkListener{

public Comp(String id) {
super(id);

}

public String getCallbackURL(){
return  urlFor( ILinkListener.INTERFACE ).toString();
}
public void onLinkClicked() {
// TODO Auto-generated method stub

}

}

Then how could I update it via AJAX?
-- 
View this message in context: 
http://www.nabble.com/Wicket-and-javascript-tp24336438p24342389.html
Sent from the Wicket - User 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 and javascript

2009-07-05 Thread Martin Funk

you are getting closer...

next step is to get the callbackURL to the browser and than pick it up  
by your javascript.

it could be rendered as an attribute using an AttributeModifier.

given that wicket supplies the javaScript method wicketAjaxGet.
If that gets called with the callbackURL the call will hit right  
through to the onLinkClicked()


so far i did that trick with behaviors, but this is an interesting  
approach too.


mf


Am 05.07.2009 um 13:52 schrieb Mathias Nilsson:



Sorry for not getting this totally.

If I do something like this

class Comp extends WebComponent implements ILinkListener{

public Comp(String id) {
super(id);

}

public String getCallbackURL(){
return  urlFor( ILinkListener.INTERFACE ).toString();
}
public void onLinkClicked() {
// TODO Auto-generated method stub

}

}

Then how could I update it via AJAX?
--
View this message in context: 
http://www.nabble.com/Wicket-and-javascript-tp24336438p24342389.html
Sent from the Wicket - User 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




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



Re: Wicket and javascript

2009-07-05 Thread Mathias Nilsson

Yes but I will have a WebMarkupContainer with a ListView in that needs to be
updated via ajax. If my javascript hits the onLinkClicked I won't have any
AjaxRequestTarget to update the container via ajax.
-- 
View this message in context: 
http://www.nabble.com/Wicket-and-javascript-tp24336438p24342870.html
Sent from the Wicket - User 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 and javascript

2009-07-05 Thread Jeremy Thomerson
Here, I think this should work:

Pastebin link in case the formatting gets messed up in email:
http://pastebin.com/f6ef575c3

public ExamplePage() {
  IModel? extends List? extends String model = getSomeModel();
  final ListViewString lv = new ListViewString(listview, model) {
   @Override
   protected void populateItem(ListItemString item) {
item.add(new Label(name, item.getModel()));
   }
  };
  final IBehavior repaintBehavior = new AbstractDefaultAjaxBehavior() {
   @Override
   protected void respond(AjaxRequestTarget target) {
// this repaints the list view
// this requires your model to always get the most
// up-to-date list
target.addComponent(lv);
   }

   @Override
   public void renderHead(IHeaderResponse response) {
CharSequence callback = getCallbackScript();
response.renderJavascript(function uploadCompleted() { 
+ callback + },
 customUploadCompleted);
   }
  };
}


--
Jeremy Thomerson
http://www.wickettraining.com




On Sun, Jul 5, 2009 at 7:57 AM, Mathias
Nilssonwicket.program...@gmail.com wrote:

 Yes but I will have a WebMarkupContainer with a ListView in that needs to be
 updated via ajax. If my javascript hits the onLinkClicked I won't have any
 AjaxRequestTarget to update the container via ajax.
 --
 View this message in context: 
 http://www.nabble.com/Wicket-and-javascript-tp24336438p24342870.html
 Sent from the Wicket - User 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



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



Re: Wicket and javascript

2009-07-05 Thread Mathias Nilsson

Thanks!

That did the trick. 
-- 
View this message in context: 
http://www.nabble.com/Wicket-and-javascript-tp24336438p24343230.html
Sent from the Wicket - User 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 and javascript

2009-07-05 Thread Mathias Nilsson

Nope I get an javascript error when trying this.


-- 
View this message in context: 
http://www.nabble.com/Wicket-and-javascript-tp24336438p24345368.html
Sent from the Wicket - User 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 and javascript

2009-07-05 Thread Jeremy Thomerson
I didn't check it for 100% functionality - I was showing you how the
pieces fit together.  Now you know how to get the URL for the
callback, how to get the callback to work, etc.  Now, look at it and
see what it renders and see if it's correct.

I can't help anyway without knowing what JS error you got.

--
Jeremy Thomerson
http://www.wickettraining.com




On Sun, Jul 5, 2009 at 12:59 PM, Mathias
Nilssonwicket.program...@gmail.com wrote:

 Nope I get an javascript error when trying this.


 --
 View this message in context: 
 http://www.nabble.com/Wicket-and-javascript-tp24336438p24345368.html
 Sent from the Wicket - User 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



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



Re: Wicket and javascript

2009-07-05 Thread Mathias Nilsson

yes thanks alot. 

Beacuse I didn't have any other wicket ajax the lib was not included. I just
added a 
super.renderHead(response); and it worked.

Thanks
-- 
View this message in context: 
http://www.nabble.com/Wicket-and-javascript-tp24336438p24345756.html
Sent from the Wicket - User 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



Wicket and javascript

2009-07-04 Thread Mathias Nilsson
Hi,

I know there has been some topics on this but I need some pointers on how to
manage this.

I have struggled with the uploadProgressBar for some time but it fails for
all browser. I've decided to create my own upload with progressbar.
It's a html form that post to an IFrame. On post I upload to a servlet. I
can do ajax callbacks to the servlet to see the upload status.

What I want is to when the upload is finished call back to wicket so I can
refresh the file list via ajax. Is this possible? Any pointers?


Re: Wicket and javascript

2009-07-04 Thread Mathias Nilsson

Let me be a bit more specific.

A have a plain form, none wicket that posts to an Iframe. In the onsubmit of
the form I call my ajax function. The action is set to my servlet to receive
the multipart.
In the start I setup my ajax and make GET requests to the same servlet for
updating my progress bar.

When the percentage is 100% I would like to make a call to wicket to update
a listview of files. I could save the filename in the session when in the
servlet. is there any way of doing a callback to wicket like this?
-- 
View this message in context: 
http://www.nabble.com/Wicket-and-javascript-tp24336438p24337495.html
Sent from the Wicket - User 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 and javascript

2009-07-04 Thread Jeremy Thomerson
On the client side you have a JS script that knows when 100% is
reached.  You have it trigger a Wicket AJAX call to the server on a
behavior that repaints your list view.  Then the list view just needs
a proper model that gets an up-to-date list.  Create an abstract
behavior, and there is a method that you can call that gets the JS
callback (IIRC).

--
Jeremy Thomerson
http://www.wickettraining.com




On Sat, Jul 4, 2009 at 2:50 PM, Mathias
Nilssonwicket.program...@gmail.com wrote:

 Let me be a bit more specific.

 A have a plain form, none wicket that posts to an Iframe. In the onsubmit of
 the form I call my ajax function. The action is set to my servlet to receive
 the multipart.
 In the start I setup my ajax and make GET requests to the same servlet for
 updating my progress bar.

 When the percentage is 100% I would like to make a call to wicket to update
 a listview of files. I could save the filename in the session when in the
 servlet. is there any way of doing a callback to wicket like this?
 --
 View this message in context: 
 http://www.nabble.com/Wicket-and-javascript-tp24336438p24337495.html
 Sent from the Wicket - User 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



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



Re: Wicket and javascript

2009-07-04 Thread Mathias Nilsson

Thanks!

I know what to do not just how it could be done

You have it trigger a Wicket AJAX call to the server on a 
behavior

How does this work?
-- 
View this message in context: 
http://www.nabble.com/Wicket-and-javascript-tp24336438p24338948.html
Sent from the Wicket - User 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 and javascript

2009-07-04 Thread Igor Vaynberg
first create a url to a component.

this can be done by letting your component implement something like
ilinklistener and calling urlfor(linklistener.interface) on that
component.

once you have the url (which will trigger onclick() of the component)
pass it into some javascript by writing it out into a variable or what
not. then use any 3rd party ajax lib to make the call, or use wicket's
js - have a look in wicket-ajax.js.

-igor

On Sat, Jul 4, 2009 at 4:32 PM, Mathias
Nilssonwicket.program...@gmail.com wrote:

 Thanks!

 I know what to do not just how it could be done

 You have it trigger a Wicket AJAX call to the server on a
 behavior

 How does this work?
 --
 View this message in context: 
 http://www.nabble.com/Wicket-and-javascript-tp24336438p24338948.html
 Sent from the Wicket - User 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



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



Re: Wicket-like JavaScript Components

2009-06-17 Thread Paolo Di Tommaso
Say your boss to engage more java developers ;)

-- p

On Tue, Jun 16, 2009 at 9:23 PM, Dane Laverty danelave...@gmail.com wrote:

 I'm currently the only Java programmer on staff, and I'm already
 maintaining
 two Wicket applications, so my boss is concerned that if I start a third
 project in Java that no one else will be able to maintain it. It's a
 reasonable concern, but kind of too bad nonetheless. I'm using JQuery as my
 main JS resource for the application. All of the business logic is managed
 through Ajax calls.

 On Tue, Jun 16, 2009 at 12:05 PM, Jeremy Thomerson 
 jer...@wickettraining.com wrote:

  Yeah - but I would guess that it wouldn't fit where I'm limited to
  using only JavaScript
 
  Out of curiosity - what do you mean where I'm limited to using only
  JavaScript?  I mean, can you use HTML?  What does this app do -
  obviously not much if it's only JS.  What does it tie in with to do
  business logic, etc?  Were these requirements written by a PHB?
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
 
 
  On Tue, Jun 16, 2009 at 11:56 AM, Nicolas
  Melendeznmelen...@getsense.com.ar wrote:
   GWT is a good framework.You can code in java and then it is translated
 to
   javascript.
   NM
  
   On Tue, Jun 16, 2009 at 4:05 PM, nino martinez wael 
   nino.martinez.w...@gmail.com wrote:
  
   You can also have a look at wicketstuff and see what integrations
   already exists :)
  
   2009/6/15 Dane Laverty danelave...@gmail.com:
I'm working on a small project where I'm limited to using only
   JavaScript. I
love the Wicket programming model, especially reusable components.
 Is
   anyone
aware of a JavaScript framework or JavaScript techniques that would
  allow
   me
to approximate Wicket components?
   
  
   -
   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: Wicket-like JavaScript Components

2009-06-16 Thread Paolo Di Tommaso
Extjs is a good choice, we have integrated it successfully with Wicket.

Check it out at http://code.google.com/p/wicket-ext/

Paolo


On Mon, Jun 15, 2009 at 6:31 PM, Dane Laverty danelave...@gmail.com wrote:

 I'm working on a small project where I'm limited to using only JavaScript.
 I
 love the Wicket programming model, especially reusable components. Is
 anyone
 aware of a JavaScript framework or JavaScript techniques that would allow
 me
 to approximate Wicket components?



Re: Wicket-like JavaScript Components

2009-06-16 Thread nino martinez wael
You can also have a look at wicketstuff and see what integrations
already exists :)

2009/6/15 Dane Laverty danelave...@gmail.com:
 I'm working on a small project where I'm limited to using only JavaScript. I
 love the Wicket programming model, especially reusable components. Is anyone
 aware of a JavaScript framework or JavaScript techniques that would allow me
 to approximate Wicket components?


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



Re: Wicket-like JavaScript Components

2009-06-16 Thread Nicolas Melendez
GWT is a good framework.You can code in java and then it is translated to
javascript.
NM

On Tue, Jun 16, 2009 at 4:05 PM, nino martinez wael 
nino.martinez.w...@gmail.com wrote:

 You can also have a look at wicketstuff and see what integrations
 already exists :)

 2009/6/15 Dane Laverty danelave...@gmail.com:
  I'm working on a small project where I'm limited to using only
 JavaScript. I
  love the Wicket programming model, especially reusable components. Is
 anyone
  aware of a JavaScript framework or JavaScript techniques that would allow
 me
  to approximate Wicket components?
 

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




Re: Wicket-like JavaScript Components

2009-06-16 Thread Jeremy Thomerson
Yeah - but I would guess that it wouldn't fit where I'm limited to
using only JavaScript

Out of curiosity - what do you mean where I'm limited to using only
JavaScript?  I mean, can you use HTML?  What does this app do -
obviously not much if it's only JS.  What does it tie in with to do
business logic, etc?  Were these requirements written by a PHB?

--
Jeremy Thomerson
http://www.wickettraining.com




On Tue, Jun 16, 2009 at 11:56 AM, Nicolas
Melendeznmelen...@getsense.com.ar wrote:
 GWT is a good framework.You can code in java and then it is translated to
 javascript.
 NM

 On Tue, Jun 16, 2009 at 4:05 PM, nino martinez wael 
 nino.martinez.w...@gmail.com wrote:

 You can also have a look at wicketstuff and see what integrations
 already exists :)

 2009/6/15 Dane Laverty danelave...@gmail.com:
  I'm working on a small project where I'm limited to using only
 JavaScript. I
  love the Wicket programming model, especially reusable components. Is
 anyone
  aware of a JavaScript framework or JavaScript techniques that would allow
 me
  to approximate Wicket components?
 

 -
 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: Wicket-like JavaScript Components

2009-06-16 Thread Dane Laverty
I'm currently the only Java programmer on staff, and I'm already maintaining
two Wicket applications, so my boss is concerned that if I start a third
project in Java that no one else will be able to maintain it. It's a
reasonable concern, but kind of too bad nonetheless. I'm using JQuery as my
main JS resource for the application. All of the business logic is managed
through Ajax calls.

On Tue, Jun 16, 2009 at 12:05 PM, Jeremy Thomerson 
jer...@wickettraining.com wrote:

 Yeah - but I would guess that it wouldn't fit where I'm limited to
 using only JavaScript

 Out of curiosity - what do you mean where I'm limited to using only
 JavaScript?  I mean, can you use HTML?  What does this app do -
 obviously not much if it's only JS.  What does it tie in with to do
 business logic, etc?  Were these requirements written by a PHB?

 --
 Jeremy Thomerson
 http://www.wickettraining.com




 On Tue, Jun 16, 2009 at 11:56 AM, Nicolas
 Melendeznmelen...@getsense.com.ar wrote:
  GWT is a good framework.You can code in java and then it is translated to
  javascript.
  NM
 
  On Tue, Jun 16, 2009 at 4:05 PM, nino martinez wael 
  nino.martinez.w...@gmail.com wrote:
 
  You can also have a look at wicketstuff and see what integrations
  already exists :)
 
  2009/6/15 Dane Laverty danelave...@gmail.com:
   I'm working on a small project where I'm limited to using only
  JavaScript. I
   love the Wicket programming model, especially reusable components. Is
  anyone
   aware of a JavaScript framework or JavaScript techniques that would
 allow
  me
   to approximate Wicket components?
  
 
  -
  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




Wicket-like JavaScript Components

2009-06-15 Thread Dane Laverty
I'm working on a small project where I'm limited to using only JavaScript. I
love the Wicket programming model, especially reusable components. Is anyone
aware of a JavaScript framework or JavaScript techniques that would allow me
to approximate Wicket components?


Re: Wicket-like JavaScript Components

2009-06-15 Thread Juan Carlos Garcia M.

Have you take a look at 
http://extjs.com/ http://extjs.com/ 


insom wrote:
 
 I'm working on a small project where I'm limited to using only JavaScript.
 I
 love the Wicket programming model, especially reusable components. Is
 anyone
 aware of a JavaScript framework or JavaScript techniques that would allow
 me
 to approximate Wicket components?
 
 

-- 
View this message in context: 
http://www.nabble.com/Wicket-like-JavaScript-Components-tp24038056p24038240.html
Sent from the Wicket - User 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-like JavaScript Components

2009-06-15 Thread Marvan Spagnolo
Not wanting to go offtopic on the list or start a flame war I would just say
to have a look to their license before doing any experiment ..
To develop anything not GPL'ed you will need to purchase a commercial
license for ExtJS.
That is why many migrated to other JS frameworks some time ago when that
project changed the licensing model I think.

On Mon, Jun 15, 2009 at 6:41 PM, Juan Carlos Garcia M.
jcgarc...@gmail.comwrote:


 Have you take a look at
 http://extjs.com/ http://extjs.com/


 insom wrote:
 
  I'm working on a small project where I'm limited to using only
 JavaScript.
  I
  love the Wicket programming model, especially reusable components. Is
  anyone
  aware of a JavaScript framework or JavaScript techniques that would allow
  me
  to approximate Wicket components?
 
 

 --
 View this message in context:
 http://www.nabble.com/Wicket-like-JavaScript-Components-tp24038056p24038240.html
 Sent from the Wicket - User 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




-- 
Reza Marvan Spagnolo

SW  Network Engineer - Freelancer
@ :: marv...@gmail.com
m :: + 34 608 641 708
skype :: mrvspg


Re: Wicket-like JavaScript Components

2009-06-15 Thread Jade
Hi,
 Jquery is one more good choice. But, I am sure it does not work in a
similar way wicket does. You could always wrap around stuff to make it work
with a model, but you may have to re-invent the wheel again :-s

/Jade

On Mon, Jun 15, 2009 at 11:00 PM, Marvan Spagnolo marv...@gmail.com wrote:

 Not wanting to go offtopic on the list or start a flame war I would just
 say
 to have a look to their license before doing any experiment ..
 To develop anything not GPL'ed you will need to purchase a commercial
 license for ExtJS.
 That is why many migrated to other JS frameworks some time ago when that
 project changed the licensing model I think.

 On Mon, Jun 15, 2009 at 6:41 PM, Juan Carlos Garcia M.
 jcgarc...@gmail.comwrote:

 
  Have you take a look at
  http://extjs.com/ http://extjs.com/
 
 
  insom wrote:
  
   I'm working on a small project where I'm limited to using only
  JavaScript.
   I
   love the Wicket programming model, especially reusable components. Is
   anyone
   aware of a JavaScript framework or JavaScript techniques that would
 allow
   me
   to approximate Wicket components?
  
  
 
  --
  View this message in context:
 
 http://www.nabble.com/Wicket-like-JavaScript-Components-tp24038056p24038240.html
  Sent from the Wicket - User 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
 
 


 --
 Reza Marvan Spagnolo

 SW  Network Engineer - Freelancer
 @ :: marv...@gmail.com
 m :: + 34 608 641 708
 skype :: mrvspg



Implementing the cwiki's Calling Wicket from Javascript

2009-02-03 Thread insom

I'm trying to apply the concepts found here:
http://cwiki.apache.org/confluence/display/WICKET/Calling+Wicket+from+Javascript
. The code for my very simple test case is below. When I load the page, I
expect to see hi printed to my console. Instead I get a
NullPointerException (also shown below). What am I doing wrong?

public class AjaxTestPage extends WebPage implements IHeaderContributor {

final AbstractDefaultAjaxBehavior behave = new
AbstractDefaultAjaxBehavior() {
@Override
protected void respond(AjaxRequestTarget target) {
System.out.println(hi);   
}
};

public AjaxTestPage() {
add(behave);
}

@Override
public void renderHead(IHeaderResponse response) {
response.renderOnLoadJavascript(
 wicketAjaxGet(' + behave.getCallbackUrl() + 
', function() { },
function() { }); 
);  
}   
}


java.lang.NullPointerException
at com.insom.ErrorPage.init(ErrorPage.java:19)
at
com.insom.MyWebRequestCycle.onRuntimeException(MyWebRequestCycle.java:24)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.onRuntimeException(AbstractRequestCycleProcessor.java:217)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:119)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1302)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:497)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:387)
at
org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:124)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)

-- 
View this message in context: 
http://www.nabble.com/Implementing-the-cwiki%27s-%22Calling-Wicket-from-Javascript%22-tp21815652p21815652.html
Sent from the Wicket - User 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: Implementing the cwiki's Calling Wicket from Javascript

2009-02-03 Thread Michael Sparer

if you fix the NullPointerException in your ErrorPage the original
RuntimeException (which would possibly tell you what you were doing wrong)
might had a chance to get through

regards,
Michael


insom wrote:
 
 I'm trying to apply the concepts found here:
 http://cwiki.apache.org/confluence/display/WICKET/Calling+Wicket+from+Javascript
 . The code for my very simple test case is below. When I load the page, I
 expect to see hi printed to my console. Instead I get a
 NullPointerException (also shown below). What am I doing wrong?
 
 public class AjaxTestPage extends WebPage implements IHeaderContributor {
   
   final AbstractDefaultAjaxBehavior behave = new
 AbstractDefaultAjaxBehavior() {
   @Override
   protected void respond(AjaxRequestTarget target) {
   System.out.println(hi);   
   }
   };
   
   public AjaxTestPage() {
   add(behave);
   }
   
   @Override
   public void renderHead(IHeaderResponse response) {
   response.renderOnLoadJavascript(
wicketAjaxGet(' + behave.getCallbackUrl() + 
 ', function() { },
 function() { }); 
   );  
   }   
 }
 
 
 java.lang.NullPointerException
   at com.insom.ErrorPage.init(ErrorPage.java:19)
   at
 com.insom.MyWebRequestCycle.onRuntimeException(MyWebRequestCycle.java:24)
   at
 org.apache.wicket.request.AbstractRequestCycleProcessor.onRuntimeException(AbstractRequestCycleProcessor.java:217)
   at
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:119)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1302)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:497)
   at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:387)
   at
 org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:124)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
   at
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
   at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
   at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
   at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
   at
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   at java.lang.Thread.run(Thread.java:619)
 
 


-
Michael Sparer
http://techblog.molindo.at
-- 
View this message in context: 
http://www.nabble.com/Implementing-the-cwiki%27s-%22Calling-Wicket-from-Javascript%22-tp21815652p21816483.html
Sent from the Wicket - User 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 and Javascript framework integration

2008-12-24 Thread Dipu
check this

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/jquery-parent

Dipu

On Wed, Dec 24, 2008 at 6:15 AM, T C tc_wic...@yahoo.com wrote:
 I understand all integrations may be different but has anyone posted a 
 recipe for how to create an integration jQuery, i.e., what is required for 
 creating a behavior?

 Thanks,

 /tc




 
 From: Jeremy Thomerson jer...@wickettraining.com
 To: users@wicket.apache.org
 Cc: fredy.wij...@gmail.com
 Sent: Tuesday, December 23, 2008 6:20:18 PM
 Subject: Re: Wicket and Javascript framework integration

 Check out one of the many examples in Wicket Stuff, for instance, the YUI
 integration:
 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/yui-parent/yui/

 You can also see what Nino has just been working on in the past couple of
 days with this:
 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/artwork-parent/artwork/

 Basically, you'll just need to include the JS file (i.e. jQuery, etc) with a
 ResourceReference, and then create a behavior (for example, extend
 AbstractBehavior) that adds the appropriate JS code to the page to add
 jQuery (or other) components / behaviors to your Wicket components.

 --
 Jeremy Thomerson
 http://www.wickettraining.com

 On Tue, Dec 23, 2008 at 8:15 PM, tabiul mahmood tab...@gmail.com wrote:

 Hi,
 I would like to know more about how can I go about integrating wicket with
 one of the popular javascript framework (Dojo or jQuery). We would like to
 use the standard wicket component and flavour the component with the JS. I
 want to avoid writing wicket component extension. I am aware that there is
 Ajax based Wicket component but how can I go about adding my own feature
 which might be lacking with the wicket Ajax component?

 If there is any sample that I can refer to that would be helpful

 Thanks

 --
 Regards,

 Tabiul Mahmood






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



Re: Wicket and Javascript framework integration

2008-12-24 Thread Nino Martinez

I also wrote something on my blog on this :

http://ninomartinez.wordpress.com/2008/09/09/apache-wicket-javascript-integration/

And on the company blog I worked for at a time:

http://blog.jayway.com/2008/09/26/wicket-javascript-internals-dissected/

T C wrote:
I understand all integrations may be different but has anyone posted a recipe for how to create an integration jQuery, i.e., what is required for creating a behavior? 


Thanks,

/tc





From: Jeremy Thomerson jer...@wickettraining.com
To: users@wicket.apache.org
Cc: fredy.wij...@gmail.com
Sent: Tuesday, December 23, 2008 6:20:18 PM
Subject: Re: Wicket and Javascript framework integration

Check out one of the many examples in Wicket Stuff, for instance, the YUI
integration:
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/yui-parent/yui/

You can also see what Nino has just been working on in the past couple of
days with this:
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/artwork-parent/artwork/

Basically, you'll just need to include the JS file (i.e. jQuery, etc) with a
ResourceReference, and then create a behavior (for example, extend
AbstractBehavior) that adds the appropriate JS code to the page to add
jQuery (or other) components / behaviors to your Wicket components.

  



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



Wicket and Javascript framework integration

2008-12-23 Thread tabiul mahmood
Hi,
I would like to know more about how can I go about integrating wicket with
one of the popular javascript framework (Dojo or jQuery). We would like to
use the standard wicket component and flavour the component with the JS. I
want to avoid writing wicket component extension. I am aware that there is
Ajax based Wicket component but how can I go about adding my own feature
which might be lacking with the wicket Ajax component?

If there is any sample that I can refer to that would be helpful

Thanks

-- 
Regards,

Tabiul Mahmood


Re: Wicket and Javascript framework integration

2008-12-23 Thread Jeremy Thomerson
Check out one of the many examples in Wicket Stuff, for instance, the YUI
integration:
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/yui-parent/yui/

You can also see what Nino has just been working on in the past couple of
days with this:
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/artwork-parent/artwork/

Basically, you'll just need to include the JS file (i.e. jQuery, etc) with a
ResourceReference, and then create a behavior (for example, extend
AbstractBehavior) that adds the appropriate JS code to the page to add
jQuery (or other) components / behaviors to your Wicket components.

-- 
Jeremy Thomerson
http://www.wickettraining.com

On Tue, Dec 23, 2008 at 8:15 PM, tabiul mahmood tab...@gmail.com wrote:

 Hi,
 I would like to know more about how can I go about integrating wicket with
 one of the popular javascript framework (Dojo or jQuery). We would like to
 use the standard wicket component and flavour the component with the JS. I
 want to avoid writing wicket component extension. I am aware that there is
 Ajax based Wicket component but how can I go about adding my own feature
 which might be lacking with the wicket Ajax component?

 If there is any sample that I can refer to that would be helpful

 Thanks

 --
 Regards,

 Tabiul Mahmood



Re: Wicket and Javascript framework integration

2008-12-23 Thread T C
I understand all integrations may be different but has anyone posted a recipe 
for how to create an integration jQuery, i.e., what is required for creating a 
behavior? 

Thanks,

/tc





From: Jeremy Thomerson jer...@wickettraining.com
To: users@wicket.apache.org
Cc: fredy.wij...@gmail.com
Sent: Tuesday, December 23, 2008 6:20:18 PM
Subject: Re: Wicket and Javascript framework integration

Check out one of the many examples in Wicket Stuff, for instance, the YUI
integration:
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/yui-parent/yui/

You can also see what Nino has just been working on in the past couple of
days with this:
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/artwork-parent/artwork/

Basically, you'll just need to include the JS file (i.e. jQuery, etc) with a
ResourceReference, and then create a behavior (for example, extend
AbstractBehavior) that adds the appropriate JS code to the page to add
jQuery (or other) components / behaviors to your Wicket components.

-- 
Jeremy Thomerson
http://www.wickettraining.com

On Tue, Dec 23, 2008 at 8:15 PM, tabiul mahmood tab...@gmail.com wrote:

 Hi,
 I would like to know more about how can I go about integrating wicket with
 one of the popular javascript framework (Dojo or jQuery). We would like to
 use the standard wicket component and flavour the component with the JS. I
 want to avoid writing wicket component extension. I am aware that there is
 Ajax based Wicket component but how can I go about adding my own feature
 which might be lacking with the wicket Ajax component?

 If there is any sample that I can refer to that would be helpful

 Thanks

 --
 Regards,

 Tabiul Mahmood




  

Re: Wicket Datepicker javascript not loaded in portlet environment

2008-07-30 Thread prasana
/org.apache.wicket.extensions.yui.calendar.DatePicker/wicket-date.js
   
   });
   wicketYuiLoader.insert();
 }
 
 ;});
 
 
 /*--]]*//script
 
 
 in the
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Wicket-Datepicker-javascript-not-loaded-in-portlet-environment-tp17799015p18746030.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Wicket Datepicker javascript not loaded in portlet environment

2008-06-12 Thread Serkan Camurcuoglu

Hi all,
I'm trying to use an 
org.apache.wicket.datetime.markup.html.form.DateTextField component 
which contains a org.apache.wicket.extensions.yui.calendar.DatePicker in 
my portlet application. The field is contained in a panel with the 
markup like:


wicket:panel
   input type=text wicket:id=dateInput/
/wicket:panel

and the panel is contained in a listview, which is also contained within 
a form. When I access the application directly, the date picker works 
fine. But when I access it as a portlet, the date picker is displayed 
correctly but it does not show the calendar when I click the icon. When 
I check with the javascript debugger, I see that wicket-event.js and 
yuiloader-beta.js files are loaded, but calendar.js and wicket-date.js 
are not loaded. I've included a related excerpt from the generated html 
page below. As far as I understand, these javascript files are 
dynamically included by YUI loader. But in a portlet environment they 
are not loaded, and I cannot use the venkman javascript debugger since 
this happens during page load. I'm using Wicket 1.3.3 and Firefox 2.0. 
Does anybody have any idea why these js files are not loaded? It would 
be great if anybody would tell me what could be wrong and give me some 
pointers on debugging this javascript code.


Best regards,

SerkanC


script type=text/javascript 
src=/subscriber-web/buyOffer/ps:681/resources/org.apache.wicket.extensions.yui.YuiLib/yuiloader-beta.js/script
script type=text/javascript 
src=/subscriber-web/buyOffer/ps:681/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script
script type=text/javascript !--/*--![CDATA[/*!--*/
Wicket.Event.add(window, domready, function() { /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements.  See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the License); you may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
if (typeof wicketCalendarInits == 'undefined') {
wicketCalendarInits = new Array();
wicketCalendarInitFinished = false;
}

initdateInputjs__6818 = function() {
Wicket.DateTime.init( {
widgetId: dateInputjs__6818,
componentId: dateInputjs__6818, 
calendarInit: { 
WEEKDAYS_MEDIUM:[Sun,Mon,Tue,Wed,Thu,Fri,Sat],WEEKDAYS_1CHAR:[S,M,T,W,T,F,S],MONTHS_LONG:[January,February,March,April,May,June,July,August,September,October,November,December],WEEKDAYS_LONG:[Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday],MONTHS_SHORT:[Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec],START_WEEKDAY:0,close:true,WEEKDAYS_SHORT:[Su,Mo,Tu,We,Th,Fr,Sa]
 },
datePattern: M/d/yy,
alignWithIcon: true,
fireChangeEvent: true,
hideOnSelect: true
});

};

if (wicketCalendarInitFinished) {
// when a DatePicker is added via ajax, the loader is already finished, 
so
// we call the init function directly.
initdateInputjs__6818();
} else {
// when page is rendered, all calendar components will be initialized 
after
// the required js libraries have been loaded.
wicketCalendarInits.push(initdateInputjs__6818);
}

if (typeof wicketYuiLoader == 'undefined')  {
wicketYuiLoader = new YAHOO.util.YUILoader({
		base: /subscriber-web/buyOffer/ps:681/resources/org.apache.wicket.extensions.yui.YuiLib/, 
		filter: RAW,

allowRollup: false,
require: [wicket-date], 
onSuccess: function() {
wicketCalendarInitFinished = true;  
while (wicketCalendarInits.length  0) {
wicketCalendarInits.pop()();
}   
}
});

wicketYuiLoader.addModule({
name: wicket-date,
type: js,
requires: [calendar],
		fullpath: /subscriber-web/buyOffer/ps:681/resources/org.apache.wicket.extensions.yui.calendar.DatePicker/wicket-date.js		   
	});

wicketYuiLoader.insert();
}

;});


/*--]]*//script


in the

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



Re: Wicket and JAVASCRIPT variables

2008-01-17 Thread Nino Saturnino Martinez Vazquez Wael
Great. Im looking into this again now, saw the error but was in meetings 
all day.. I'll see how the gmap and gmap2 has evolved since my 
participation...


Martin Funk wrote:

mea culpa,

could you try again please.

mf

Ballist1c schrieb:

I have had a look, the GMap2 contrib is missing source files :(

GOverlayListenerBehavior class is required ... but the SVN I got 
doesnt have

it ... so thats not an option.




igor.vaynberg wrote:
 

have you seen wicketstuff's google maps integration projects?

-igor


On Jan 16, 2008 5:14 PM, Ballist1c [EMAIL PROTECTED] wrote:
   

Hey guys,

Im working with google maps and what I want to accomplish is have
location
data from our DB backend parsed into the google map for display.

At the moment, what I have achieved is having the google map display
multiple locations statically defined within the javascript itself, 
and I

have my dynamic location data accessible from the panel in which the
google
map is loaded in.

Where I am stopped at the moment is figuring out a way to parse 
hundreds

of
location coordinates thru to the Javascript.  I had a look at manually
initializing a JS array var, but the format which Googlemaps uses 
makes

it a
real pain in the arse.

To give you an idea of the javascript for the array variable

var officeLayer = [
  {
zoom: [0, 6],
places: [
  {
name: New York Sales  Engineering Office,
icon: [house, house-shadow],
posn: [40.754606, -73.986794]
  },
  {
name: Atlanta Sales amp; Engineering Office,
icon: [house, house-shadow],
posn: [33.781506, -84.387422]
  },
  {
name: Dallas Sales Office,
icon: [house, house-shadow],
posn: [36.4724385, -101.044637]
  },
  {
name: Cambridge Sales  Engineering Office,
icon: [house, house-shadow],
posn: [42.362331, -71.083661]
  },
  {
name: Chicago Sales Office,
icon: [house, house-shadow],
posn: [41.889232, -87.628767]
  },
  {
name: Denver  Boulder Offices,
icon: [house, house-shadow],
posn: [39.563011, -104.868962]
  },
  {
name: Detroit Sales Office,
icon: [house, house-shadow],
posn: [42.475482, -83.244587]
  },
  {
name: Santa Monica  Irvine Offices,
icon: [house, house-shadow],
posn: [33.715585, -118.177435]
  },
  {
name: Phoenix Sales  Engineering Office,
icon: [house, house-shadow],
posn: [33.411782, -111.926247]
  },
  {
name: Pittsburgh Engineering Office,
icon: [house, house-shadow],
posn: [40.444541, -79.946254]
  },
  {
name: Seattle Engineering  Sales Offices,
icon: [house, house-shadow],
posn: [47.664261, -122.274308]
  },
  {
name: Canada Sales Office,
icon: [house, house-shadow],
posn: [43.645478, -79.378843]
  },
]
  },

anyone got any ideas?
--
View this message in context:
http://www.nabble.com/Wicket-and-JAVASCRIPT-variables-tp14902889p14902889.html 


Sent from the Wicket - User mailing list archive at Nabble.com.


-
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]




--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Wicket and JAVASCRIPT variables

2008-01-16 Thread Ballist1c

Hey guys,

Im working with google maps and what I want to accomplish is have location
data from our DB backend parsed into the google map for display.

At the moment, what I have achieved is having the google map display
multiple locations statically defined within the javascript itself, and I
have my dynamic location data accessible from the panel in which the google
map is loaded in. 

Where I am stopped at the moment is figuring out a way to parse hundreds of
location coordinates thru to the Javascript.  I had a look at manually
initializing a JS array var, but the format which Googlemaps uses makes it a
real pain in the arse.

To give you an idea of the javascript for the array variable

var officeLayer = [
  {
zoom: [0, 6],
places: [
  {
name: New York Sales  Engineering Office,
icon: [house, house-shadow],
posn: [40.754606, -73.986794]
  },
  {
name: Atlanta Sales amp; Engineering Office,
icon: [house, house-shadow],
posn: [33.781506, -84.387422]
  },
  {
name: Dallas Sales Office,
icon: [house, house-shadow],
posn: [36.4724385, -101.044637]
  },
  {
name: Cambridge Sales  Engineering Office,
icon: [house, house-shadow],
posn: [42.362331, -71.083661]
  },
  {
name: Chicago Sales Office,
icon: [house, house-shadow],
posn: [41.889232, -87.628767]
  },
  {
name: Denver  Boulder Offices,
icon: [house, house-shadow],
posn: [39.563011, -104.868962]
  },
  {
name: Detroit Sales Office,
icon: [house, house-shadow],
posn: [42.475482, -83.244587]
  },
  {
name: Santa Monica  Irvine Offices,
icon: [house, house-shadow],
posn: [33.715585, -118.177435]
  },
  {
name: Phoenix Sales  Engineering Office,
icon: [house, house-shadow],
posn: [33.411782, -111.926247]
  },
  {
name: Pittsburgh Engineering Office,
icon: [house, house-shadow],
posn: [40.444541, -79.946254]
  },
  {
name: Seattle Engineering  Sales Offices,
icon: [house, house-shadow],
posn: [47.664261, -122.274308]
  },
  {
name: Canada Sales Office,
icon: [house, house-shadow],
posn: [43.645478, -79.378843]
  },
]
  },

anyone got any ideas?
-- 
View this message in context: 
http://www.nabble.com/Wicket-and-JAVASCRIPT-variables-tp14902889p14902889.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicket and JAVASCRIPT variables

2008-01-16 Thread Igor Vaynberg
have you seen wicketstuff's google maps integration projects?

-igor


On Jan 16, 2008 5:14 PM, Ballist1c [EMAIL PROTECTED] wrote:

 Hey guys,

 Im working with google maps and what I want to accomplish is have location
 data from our DB backend parsed into the google map for display.

 At the moment, what I have achieved is having the google map display
 multiple locations statically defined within the javascript itself, and I
 have my dynamic location data accessible from the panel in which the google
 map is loaded in.

 Where I am stopped at the moment is figuring out a way to parse hundreds of
 location coordinates thru to the Javascript.  I had a look at manually
 initializing a JS array var, but the format which Googlemaps uses makes it a
 real pain in the arse.

 To give you an idea of the javascript for the array variable

 var officeLayer = [
   {
 zoom: [0, 6],
 places: [
   {
 name: New York Sales  Engineering Office,
 icon: [house, house-shadow],
 posn: [40.754606, -73.986794]
   },
   {
 name: Atlanta Sales amp; Engineering Office,
 icon: [house, house-shadow],
 posn: [33.781506, -84.387422]
   },
   {
 name: Dallas Sales Office,
 icon: [house, house-shadow],
 posn: [36.4724385, -101.044637]
   },
   {
 name: Cambridge Sales  Engineering Office,
 icon: [house, house-shadow],
 posn: [42.362331, -71.083661]
   },
   {
 name: Chicago Sales Office,
 icon: [house, house-shadow],
 posn: [41.889232, -87.628767]
   },
   {
 name: Denver  Boulder Offices,
 icon: [house, house-shadow],
 posn: [39.563011, -104.868962]
   },
   {
 name: Detroit Sales Office,
 icon: [house, house-shadow],
 posn: [42.475482, -83.244587]
   },
   {
 name: Santa Monica  Irvine Offices,
 icon: [house, house-shadow],
 posn: [33.715585, -118.177435]
   },
   {
 name: Phoenix Sales  Engineering Office,
 icon: [house, house-shadow],
 posn: [33.411782, -111.926247]
   },
   {
 name: Pittsburgh Engineering Office,
 icon: [house, house-shadow],
 posn: [40.444541, -79.946254]
   },
   {
 name: Seattle Engineering  Sales Offices,
 icon: [house, house-shadow],
 posn: [47.664261, -122.274308]
   },
   {
 name: Canada Sales Office,
 icon: [house, house-shadow],
 posn: [43.645478, -79.378843]
   },
 ]
   },

 anyone got any ideas?
 --
 View this message in context: 
 http://www.nabble.com/Wicket-and-JAVASCRIPT-variables-tp14902889p14902889.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 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]



Re: Wicket and JAVASCRIPT variables

2008-01-16 Thread Ballist1c

I have had a look, the GMap2 contrib is missing source files :(

GOverlayListenerBehavior class is required ... but the SVN I got doesnt have
it ... so thats not an option.




igor.vaynberg wrote:
 
 have you seen wicketstuff's google maps integration projects?
 
 -igor
 
 
 On Jan 16, 2008 5:14 PM, Ballist1c [EMAIL PROTECTED] wrote:

 Hey guys,

 Im working with google maps and what I want to accomplish is have
 location
 data from our DB backend parsed into the google map for display.

 At the moment, what I have achieved is having the google map display
 multiple locations statically defined within the javascript itself, and I
 have my dynamic location data accessible from the panel in which the
 google
 map is loaded in.

 Where I am stopped at the moment is figuring out a way to parse hundreds
 of
 location coordinates thru to the Javascript.  I had a look at manually
 initializing a JS array var, but the format which Googlemaps uses makes
 it a
 real pain in the arse.

 To give you an idea of the javascript for the array variable

 var officeLayer = [
   {
 zoom: [0, 6],
 places: [
   {
 name: New York Sales  Engineering Office,
 icon: [house, house-shadow],
 posn: [40.754606, -73.986794]
   },
   {
 name: Atlanta Sales amp; Engineering Office,
 icon: [house, house-shadow],
 posn: [33.781506, -84.387422]
   },
   {
 name: Dallas Sales Office,
 icon: [house, house-shadow],
 posn: [36.4724385, -101.044637]
   },
   {
 name: Cambridge Sales  Engineering Office,
 icon: [house, house-shadow],
 posn: [42.362331, -71.083661]
   },
   {
 name: Chicago Sales Office,
 icon: [house, house-shadow],
 posn: [41.889232, -87.628767]
   },
   {
 name: Denver  Boulder Offices,
 icon: [house, house-shadow],
 posn: [39.563011, -104.868962]
   },
   {
 name: Detroit Sales Office,
 icon: [house, house-shadow],
 posn: [42.475482, -83.244587]
   },
   {
 name: Santa Monica  Irvine Offices,
 icon: [house, house-shadow],
 posn: [33.715585, -118.177435]
   },
   {
 name: Phoenix Sales  Engineering Office,
 icon: [house, house-shadow],
 posn: [33.411782, -111.926247]
   },
   {
 name: Pittsburgh Engineering Office,
 icon: [house, house-shadow],
 posn: [40.444541, -79.946254]
   },
   {
 name: Seattle Engineering  Sales Offices,
 icon: [house, house-shadow],
 posn: [47.664261, -122.274308]
   },
   {
 name: Canada Sales Office,
 icon: [house, house-shadow],
 posn: [43.645478, -79.378843]
   },
 ]
   },

 anyone got any ideas?
 --
 View this message in context:
 http://www.nabble.com/Wicket-and-JAVASCRIPT-variables-tp14902889p14902889.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Wicket-and-JAVASCRIPT-variables-tp14902889p14907106.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicket and JAVASCRIPT variables

2008-01-16 Thread Martin Funk

mea culpa,

could you try again please.

mf

Ballist1c schrieb:

I have had a look, the GMap2 contrib is missing source files :(

GOverlayListenerBehavior class is required ... but the SVN I got doesnt have
it ... so thats not an option.




igor.vaynberg wrote:
  

have you seen wicketstuff's google maps integration projects?

-igor


On Jan 16, 2008 5:14 PM, Ballist1c [EMAIL PROTECTED] wrote:


Hey guys,

Im working with google maps and what I want to accomplish is have
location
data from our DB backend parsed into the google map for display.

At the moment, what I have achieved is having the google map display
multiple locations statically defined within the javascript itself, and I
have my dynamic location data accessible from the panel in which the
google
map is loaded in.

Where I am stopped at the moment is figuring out a way to parse hundreds
of
location coordinates thru to the Javascript.  I had a look at manually
initializing a JS array var, but the format which Googlemaps uses makes
it a
real pain in the arse.

To give you an idea of the javascript for the array variable

var officeLayer = [
  {
zoom: [0, 6],
places: [
  {
name: New York Sales  Engineering Office,
icon: [house, house-shadow],
posn: [40.754606, -73.986794]
  },
  {
name: Atlanta Sales amp; Engineering Office,
icon: [house, house-shadow],
posn: [33.781506, -84.387422]
  },
  {
name: Dallas Sales Office,
icon: [house, house-shadow],
posn: [36.4724385, -101.044637]
  },
  {
name: Cambridge Sales  Engineering Office,
icon: [house, house-shadow],
posn: [42.362331, -71.083661]
  },
  {
name: Chicago Sales Office,
icon: [house, house-shadow],
posn: [41.889232, -87.628767]
  },
  {
name: Denver  Boulder Offices,
icon: [house, house-shadow],
posn: [39.563011, -104.868962]
  },
  {
name: Detroit Sales Office,
icon: [house, house-shadow],
posn: [42.475482, -83.244587]
  },
  {
name: Santa Monica  Irvine Offices,
icon: [house, house-shadow],
posn: [33.715585, -118.177435]
  },
  {
name: Phoenix Sales  Engineering Office,
icon: [house, house-shadow],
posn: [33.411782, -111.926247]
  },
  {
name: Pittsburgh Engineering Office,
icon: [house, house-shadow],
posn: [40.444541, -79.946254]
  },
  {
name: Seattle Engineering  Sales Offices,
icon: [house, house-shadow],
posn: [47.664261, -122.274308]
  },
  {
name: Canada Sales Office,
icon: [house, house-shadow],
posn: [43.645478, -79.378843]
  },
]
  },

anyone got any ideas?
--
View this message in context:
http://www.nabble.com/Wicket-and-JAVASCRIPT-variables-tp14902889p14902889.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
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]