Re: How to make img src in a component's template resolve to the image files in the package?

2008-03-31 Thread Matthew Young
urlfor(new ResourceReference(MyComponent.class, image.png));

Alright! That works.

And Enrique, now I understand what you were telling me.  Thanks.


Igor, I made this little thing:

public class PackageImage extends WebComponent {
private static final long serialVersionUID = 1L;
private Class? location;

public PackageImage(String id, Class? location) {
super(id);
this.location = location;
}

@Override protected void onComponentTag(final ComponentTag tag) {
checkComponentTag(tag, img);
super.onComponentTag(tag);
tag.put(src, urlFor(new ResourceReference(location, tag.getString
(src).toString(;
}

}


So that I can have in MyComponent.html:

   img wicket:id=img src=open.png/   -- just the image file
name --

and in MyComponent.java:

   add(new PackageImage(img, MyComponent.class));

And this gets the src fixed up to point to the image file.  I think it could
be useful in general.  Should Wicket have one built-in?



On Sun, Mar 30, 2008 at 9:33 PM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 urlfor(new ResourceReference(MyComponent.class, image.png));

 -igor


 On Sun, Mar 30, 2008 at 9:28 PM, Matthew Young [EMAIL PROTECTED] wrote:
  wicket:link doesnt touch components afaik
 
   :(  I need it to be a component.  My code is basically this:
 
  add(new WebMarkupContainer(img));
 
   Can I do something like this:
 
   add(new WebMarkupContainer(img) {
 
   @Override protected void onComponentTag(final ComponentTag tag)
  {
  super.onComponentTag(tag);
  tag.put(src, GIVE-ME-YOU-LOCATION-PLEASE + tag.getString
 (src));
  }
 
   });
 
   where GIVE-ME-YOU-LOCATION-PLEASE is some method to get
   /resources/com.mycompany.component.MyComponent/?
 
   On Sun, Mar 30, 2008 at 9:05 PM, Igor Vaynberg [EMAIL PROTECTED]
 
 
 
  wrote:
 
thats because you have a wicket:id there. wicket:link doesnt touch
components afaik
   
-igor
   
   
On Sun, Mar 30, 2008 at 8:57 PM, Matthew Young [EMAIL PROTECTED]
 wrote:
 So I did this:


  html xmlns:wicket
  body
   wicket:panel
 wicket:linkimg wicket:id=open src=open.png
 //wicket:link
   /wicket:panel
  /body
  /html

  the src attr doesn't change, it stays as open.png and not change
 to

 /resources/com.mycompany.component.MyComponent/open.png



 On Sun, Mar 30, 2008 at 8:37 PM, [EMAIL PROTECTED] wrote:

   Use wicket:link tags around the image
  
   -igor
  
   On 3/30/08, Enrique Rodriguez [EMAIL PROTECTED] wrote:
On Sun, Mar 30, 2008 at 7:45 PM, Matthew Young 
 [EMAIL PROTECTED]
   wrote:
 ...
 I don't want to hard code
 /resources/com.mycompany.component.MyComponent/open.png in
 the
   template
 and just have img src=open.png .../. Is there someway to
 work
out
the
 prefix /resources/com.mycompany.component.MyComponent/ and
 fix
up
   src
 attribute in code?
   
If you are in a Component you can call Component#urlFor().
   
If not in a Component, you can call:
   
RequestCycle.get()#urlFor();
   
You can use the form that takes a ResourceReference for the
 image.
   
HTH,
   
Enrique
   
   
-
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]
   
   
 

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




Re: Best method of testing behaviors.

2008-03-31 Thread Ned Collyer

Upon further investigation,

I am using UrlCompressingWebRequestProcessor in my WicketApplication class.

protected IRequestCycleProcessor newRequestCycleProcessor() {
return new UrlCompressingWebRequestProcessor();
}


If i have this, then try to send an instance of a page to the
tester.setStartPage

eg,
tester.setStartPage(new HomePage());

I get that stacktrace.

(i'm attaching a quickstart)
http://www.nabble.com/file/p16392631/20080331-test.tar.gz
20080331-test.tar.gz 

Am i doing something stupid?


igor.vaynberg wrote:
 
 weird, we use that construct all over the place. eg see FormSubmitTest
 
 -igor
 
-- 
View this message in context: 
http://www.nabble.com/Best-method-of-testing-borders-tp16389412p16392631.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: How to make img src in a component's template resolve to the image files in the package?

2008-03-31 Thread Igor Vaynberg
so if that is all it does why does it need to be a component?

also you shouldnt keep references to Class objects in your components,
app server will have trouble restarting the app when it tries to
unload it...so keep the class name instead

as far as having something like this by default in wicket, and this is
my personal opinion, your class only has 2-3 lines of code that
actually do anything, so i would say it is trivial. i can come up with
at least 10 trivial classes that have to do with images off the top of
my head, if we put them all into wicket it will get very cluttered
very quickly. so i would say, no, it takes 10 minutes to write one.

-igor

On Sun, Mar 30, 2008 at 11:06 PM, Matthew Young [EMAIL PROTECTED] wrote:
 urlfor(new ResourceReference(MyComponent.class, image.png));

  Alright! That works.

  And Enrique, now I understand what you were telling me.  Thanks.


  Igor, I made this little thing:

  public class PackageImage extends WebComponent {
 private static final long serialVersionUID = 1L;
 private Class? location;

 public PackageImage(String id, Class? location) {
 super(id);
 this.location = location;

 }

 @Override protected void onComponentTag(final ComponentTag tag) {
 checkComponentTag(tag, img);
 super.onComponentTag(tag);
 tag.put(src, urlFor(new ResourceReference(location, tag.getString
  (src).toString(;
 }

  }


  So that I can have in MyComponent.html:

img wicket:id=img src=open.png/   -- just the image file
  name --

  and in MyComponent.java:

add(new PackageImage(img, MyComponent.class));

  And this gets the src fixed up to point to the image file.  I think it could
  be useful in general.  Should Wicket have one built-in?



  On Sun, Mar 30, 2008 at 9:33 PM, Igor Vaynberg [EMAIL PROTECTED]


 wrote:

   urlfor(new ResourceReference(MyComponent.class, image.png));
  
   -igor
  
  
   On Sun, Mar 30, 2008 at 9:28 PM, Matthew Young [EMAIL PROTECTED] wrote:
wicket:link doesnt touch components afaik
   
 :(  I need it to be a component.  My code is basically this:
   
add(new WebMarkupContainer(img));
   
 Can I do something like this:
   
 add(new WebMarkupContainer(img) {
   
 @Override protected void onComponentTag(final ComponentTag tag)
{
super.onComponentTag(tag);
tag.put(src, GIVE-ME-YOU-LOCATION-PLEASE + tag.getString
   (src));
}
   
 });
   
 where GIVE-ME-YOU-LOCATION-PLEASE is some method to get
 /resources/com.mycompany.component.MyComponent/?
   
 On Sun, Mar 30, 2008 at 9:05 PM, Igor Vaynberg [EMAIL PROTECTED]
   
   
   
wrote:
   
  thats because you have a wicket:id there. wicket:link doesnt touch
  components afaik
 
  -igor
 
 
  On Sun, Mar 30, 2008 at 8:57 PM, Matthew Young [EMAIL PROTECTED]
   wrote:
   So I did this:
  
  
html xmlns:wicket
body
 wicket:panel
   wicket:linkimg wicket:id=open src=open.png
   //wicket:link
 /wicket:panel
/body
/html
  
the src attr doesn't change, it stays as open.png and not change
   to
  
   /resources/com.mycompany.component.MyComponent/open.png
  
  
  
   On Sun, Mar 30, 2008 at 8:37 PM, [EMAIL PROTECTED] wrote:
  
 Use wicket:link tags around the image

 -igor

 On 3/30/08, Enrique Rodriguez [EMAIL PROTECTED] wrote:
  On Sun, Mar 30, 2008 at 7:45 PM, Matthew Young 
   [EMAIL PROTECTED]
 wrote:
   ...
   I don't want to hard code
   /resources/com.mycompany.component.MyComponent/open.png in
   the
 template
   and just have img src=open.png .../. Is there someway to
   work
  out
  the
   prefix /resources/com.mycompany.component.MyComponent/ and
   fix
  up
 src
   attribute in code?
 
  If you are in a Component you can call Component#urlFor().
 
  If not in a Component, you can call:
 
  RequestCycle.get()#urlFor();
 
  You can use the form that takes a ResourceReference for the
   image.
 
  HTH,
 
  Enrique
 
 
  -
  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]
 
  

Re: Best method of testing behaviors.

2008-03-31 Thread Igor Vaynberg
it might be just that wickettester doesnt work with the compressing
url coding strategy. please file a bug and attach the quickstart to
that.

-igor


On Sun, Mar 30, 2008 at 11:26 PM, Ned Collyer [EMAIL PROTECTED] wrote:

  Upon further investigation,

  I am using UrlCompressingWebRequestProcessor in my WicketApplication class.

 protected IRequestCycleProcessor newRequestCycleProcessor() {
 return new UrlCompressingWebRequestProcessor();
 }


  If i have this, then try to send an instance of a page to the
  tester.setStartPage

  eg,
  tester.setStartPage(new HomePage());

  I get that stacktrace.

  (i'm attaching a quickstart)
  http://www.nabble.com/file/p16392631/20080331-test.tar.gz
  20080331-test.tar.gz

  Am i doing something stupid?



  igor.vaynberg wrote:
  
   weird, we use that construct all over the place. eg see FormSubmitTest
  
   -igor
  
  --
  View this message in context: 
 http://www.nabble.com/Best-method-of-testing-borders-tp16389412p16392631.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: Best method of testing behaviors.

2008-03-31 Thread lars vonk
Could this be related: https://issues.apache.org/jira/browse/WICKET-1434.
The behavior of startPage(Class) and startPage(Page) are currently not the
same in WicketTester.

Lars

On Mon, Mar 31, 2008 at 8:39 AM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 it might be just that wickettester doesnt work with the compressing
 url coding strategy. please file a bug and attach the quickstart to
 that.

 -igor


 On Sun, Mar 30, 2008 at 11:26 PM, Ned Collyer [EMAIL PROTECTED]
 wrote:
 
   Upon further investigation,
 
   I am using UrlCompressingWebRequestProcessor in my WicketApplication
 class.
 
  protected IRequestCycleProcessor newRequestCycleProcessor() {
  return new UrlCompressingWebRequestProcessor();
  }
 
 
   If i have this, then try to send an instance of a page to the
   tester.setStartPage
 
   eg,
   tester.setStartPage(new HomePage());
 
   I get that stacktrace.
 
   (i'm attaching a quickstart)
   http://www.nabble.com/file/p16392631/20080331-test.tar.gz
   20080331-test.tar.gz
 
   Am i doing something stupid?
 
 
 
   igor.vaynberg wrote:
   
weird, we use that construct all over the place. eg see
 FormSubmitTest
   
-igor
   
   --
   View this message in context:
 http://www.nabble.com/Best-method-of-testing-borders-tp16389412p16392631.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: Inspecting AjaxRequestTarget

2008-03-31 Thread Federico Fanton
On Fri, 28 Mar 2008 09:31:39 -0700
Igor Vaynberg [EMAIL PROTECTED] wrote:

 fine by me

Great, I'll keep an eye on SVN then, thanks to everyone :)


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



Re: Inspecting AjaxRequestTarget

2008-03-31 Thread Igor Vaynberg
you should probably open a jira issue, that way we wont forget about
it...because i already have

-igor


On Mon, Mar 31, 2008 at 12:19 AM, Federico Fanton [EMAIL PROTECTED] wrote:
 On Fri, 28 Mar 2008 09:31:39 -0700
  Igor Vaynberg [EMAIL PROTECTED] wrote:

   fine by me

  Great, I'll keep an eye on SVN then, thanks to everyone :)




  -
  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: Inspecting AjaxRequestTarget

2008-03-31 Thread Johan Compagner
done and fixed

On Mon, Mar 31, 2008 at 9:22 AM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 you should probably open a jira issue, that way we wont forget about
 it...because i already have

 -igor


 On Mon, Mar 31, 2008 at 12:19 AM, Federico Fanton [EMAIL PROTECTED] wrote:
  On Fri, 28 Mar 2008 09:31:39 -0700
   Igor Vaynberg [EMAIL PROTECTED] wrote:
 
fine by me
 
   Great, I'll keep an eye on SVN then, thanks to everyone :)
 
 
 
 
   -
   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: Best method of testing behaviors.

2008-03-31 Thread Johan Compagner
http://issues.apache.org/jira/browse/WICKET-861

On Mon, Mar 31, 2008 at 8:40 AM, lars vonk [EMAIL PROTECTED] wrote:

 Could this be related: https://issues.apache.org/jira/browse/WICKET-1434.
 The behavior of startPage(Class) and startPage(Page) are currently not the
 same in WicketTester.

 Lars

 On Mon, Mar 31, 2008 at 8:39 AM, Igor Vaynberg [EMAIL PROTECTED]
 wrote:

  it might be just that wickettester doesnt work with the compressing
  url coding strategy. please file a bug and attach the quickstart to
  that.
 
  -igor
 
 
  On Sun, Mar 30, 2008 at 11:26 PM, Ned Collyer [EMAIL PROTECTED]
  wrote:
  
Upon further investigation,
  
I am using UrlCompressingWebRequestProcessor in my WicketApplication
  class.
  
   protected IRequestCycleProcessor newRequestCycleProcessor() {
   return new UrlCompressingWebRequestProcessor();
   }
  
  
If i have this, then try to send an instance of a page to the
tester.setStartPage
  
eg,
tester.setStartPage(new HomePage());
  
I get that stacktrace.
  
(i'm attaching a quickstart)
http://www.nabble.com/file/p16392631/20080331-test.tar.gz
20080331-test.tar.gz
  
Am i doing something stupid?
  
  
  
igor.vaynberg wrote:

 weird, we use that construct all over the place. eg see
  FormSubmitTest

 -igor

--
View this message in context:
 
 http://www.nabble.com/Best-method-of-testing-borders-tp16389412p16392631.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: Intention of PropertyModel in 1.3

2008-03-31 Thread David Leangen

Thank you very much!!



On Sun, 2008-03-30 at 21:46 -0700, Igor Vaynberg wrote:
 patch applied. always report a jira issue, that way things dont get
 forgotten, and as you can see submitting a patch helps too :)
 
 -igor
 
 
 On Sun, Mar 30, 2008 at 9:36 PM, David Leangen [EMAIL PROTECTED] wrote:
 
   I didn't happen to see a reply to this thread, and the stack trace is
   still driving me bananas, so I submitted a patch. :-)
 
https://issues.apache.org/jira/browse/WICKET-1464
 
 
   Thanks, as always, Wicket committers. :-)
 
 
 
 
 
 
   On Thu, 2008-03-13 at 12:45 +0900, David Leangen wrote:
This used to work in 1.2.6, but now 1.3.1 complains that
there is no setter for this class.
   
   hmm, this should still work. mind filing a jira bug with
   a quickstart?
   
  You're right, it does still work. The thing is that during the 
  algorithm
  when the properties of the bean are being tested the entire exception
  stack is being printed out.
 
  This is a bit confusing because it can lead the developer to think 
  that
  an error occurred.
 
 
  I propose to log information instead of printing out the entire
  exception stack. If you agree to this, I don't mind submitting a 
  patch.
   
 What level is this reported to?
 Its not error right?
   
   
Current, DEBUG.
   
Still, though, I think a logging message would be better than polluting 
  output with the entire stack trace...
   
   
Cheers,
Dave
   
   
   
-
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]
 


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



Re: Page-dependent timeout values for session

2008-03-31 Thread Nino Saturnino Martinez Vazquez Wael

Hi Per

Eelco's written a part on it, look here : 
http://chillenious.wordpress.com/2007/06/19/how-to-create-a-text-area-with-a-heart-beat-with-wicket/


Checkout the updated part, which is the one I'd suggest you use...

regards Nino

Per Newgro wrote:

Hi Nino Saturnino Martinez Vazquez Wael:
  

It depends. If it's okay to go to the url you specify in the iframe on
repainting, it will work. If whatever happens in the iframe is part of a
flow, it could break it (but it depends on a lot of things) like how
does the other application handle sessions etc.

If the application which are within were using keepalives/ajaxtimers etc
it would not cause timeouts in the first place..

I only have one application, thats why i would like to assign timeout value by 
page. 
The part in the IFRAME represents a preselection for a hotel booking service 
(normal stuff like adults, nights, checkin day selection etc.). The selection 
is validated and set to valid values using ajax. 
The preselection-page contains a button which onsubmit opens another window 
with the booking page. So i would like to set the timeout value for 
preselection un-limited and for bookingpage to 10 minutes.


Btw what are keepalives - are they wicket parts - never heared of it?
  
Thanks for your help

Per



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


  


--
-Wicket for love

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]



Re: Best method of testing behaviors.

2008-03-31 Thread Nino Saturnino Martinez Vazquez Wael

I think you could benefit from the tagtester here right?

regards Nino

Ned Collyer wrote:

What I've done is.. but feels like it could be nicer. (but this is alright
really :))

public void testMyBehavior() {
//create form component to have behaviour placed around it.
FormComponent component = new TextField(testId, new
Model(testFieldValue));
component.error(An error);

XmlTag xmlTag = new XmlTag();
xmlTag.setName(test);

  
ComponentTag tag = new ComponentTag(xmlTag);

MyBehavior behavior = new MyBehavior();
behavior.onComponentTag(component, tag);

assert(tag.someproperty stuff to test).
}

The thing that was confusing me thus far, was wicketTester.startComponent.

Seems like I'm better off not using it.
  


--
-Wicket for love

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]



Re: Best Wicket Books or Tutorials

2008-03-31 Thread Gabor Szokoli
Hi,

On 3/31/08, Gareth Segree [EMAIL PROTECTED] wrote:

  If Wicket then
  I'm looking for good tutorials on wicket or books.

Make sure you understand Models before everything else,
and CompoundPropertyModel right after Hello World.

That's what I've learned from introducing wicket to my team.

We also had a good understanding of the basics before meddling with
Ajax. It probably would have confused us a lot otherwise.


Gabor Szokoli

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



Re: Referencing images in javascript - wicket 1.3.1

2008-03-31 Thread Andrew Moore

Thanks, that's perfect.


igor.vaynberg wrote:
 
 urlfor(new resourcereference(Panels.class, folder.gif));
 
 -igor
 
 
 On Fri, Mar 28, 2008 at 1:11 AM, Andrew Moore [EMAIL PROTECTED]
 wrote:

  I'm using wicket 1.3.1 and have a javascript file which needs to
 reference
  some images.

  I'm using the following code in a panel to include the javascript with
  images:

  CharSequence folder = getRequest().getRelativePathPrefixToContextRoot()
 +
  folder.gif;
  PackagedTextTemplate js = new PackagedTextTemplate(PageTreePanel.class,
  folder-tree-static.js);
  Map map = new HashMap();
  map.put(folder, folder);
  add(TextTemplateHeaderContributor.forJavaScript(js, new
  Model((Serializable)map)));

  Now, I can see that my ${folder} reference that I had in the javascript
 is
  getting replaced with the image file name, but the
  getRelativePathPrefixToContextRoot() returns ../ so the javascript
 image
  reference comes out as ../folder.gif

  I've tried to place the images all over the place, but cannot get it to
 find
  them.

  If I use firebug to manually edit the url to
  resources/com.example.web.page.Panels/folder.gif then the image shows.
 I
  just can't work out the correct way (or location) to place the image.

  Any help would be great.
  Thanks
  Andrew



  --
  View this message in context:
 http://www.nabble.com/Referencing-images-in-javascript---wicket-1.3.1-tp16347523p16347523.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/Referencing-images-in-javascript---wicket-1.3.1-tp16347523p16392864.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]



How do I get a change in my tree model to be displayed?

2008-03-31 Thread David Leangen

Hi.

The ajax stuff is a bit new to me, so sorry if this is an obvious
question.

I'm trying to figure out how to get my change in my tree model to show
up on screen.

I want to be able to expand to and select a node from the tree based on
its value (determined elsewhere in the application).

I resolve the path of the node I want, grab any not-yet-resolved
children from the DB (my tree is large, so I only fetch my children as
required), and then I expand and select.

  final ITreeState treeState = getTreeState();
  final TreeNode[] path = node.getPath();
  for( final TreeNode nextNode : path )
  {
  treeState.selectNode( node, true );
  nodeExpanded( nextNode );
  nodeSelected( nextNode );
  }

  invalidateAll();


Maybe I do some unnecessary stuff above, I don't know. In any case,
after expanding and selecting the node in my model, the big thing for me
is to get that change to take effect.


Thanks for the help!

David




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



Re: How do I get a change in my tree model to be displayed?

2008-03-31 Thread Thomas Kappler
Hi,

first of all, in the first line of the loop, shouldn't node be nextNode?

Then, you're directly calling listener methods, which are supposed to
be callbacks, i.e., they are called by the framework when, and after,
a selection or expansion happens. You should use the methods offered
by ITreeState, such as expandNode(node) (as you do with selectNode).
Your listener methods will be called, if you added your listener to
the tree.

Cheers,
Thomas


   final ITreeState treeState = getTreeState();
   final TreeNode[] path = node.getPath();
   for( final TreeNode nextNode : path )
   {
   treeState.selectNode( node, true );
   nodeExpanded( nextNode );
   nodeSelected( nextNode );
   }

   invalidateAll();

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



Re: How do I get a change in my tree model to be displayed?

2008-03-31 Thread David Leangen

Beautiful.

Thank you!



On Mon, 2008-03-31 at 10:25 +0200, Thomas Kappler wrote:
 Hi,
 
 first of all, in the first line of the loop, shouldn't node be nextNode?
 
 Then, you're directly calling listener methods, which are supposed to
 be callbacks, i.e., they are called by the framework when, and after,
 a selection or expansion happens. You should use the methods offered
 by ITreeState, such as expandNode(node) (as you do with selectNode).
 Your listener methods will be called, if you added your listener to
 the tree.
 
 Cheers,
 Thomas
 
 
final ITreeState treeState = getTreeState();
final TreeNode[] path = node.getPath();
for( final TreeNode nextNode : path )
{
treeState.selectNode( node, true );
nodeExpanded( nextNode );
nodeSelected( nextNode );
}
 
invalidateAll();
 
 -
 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]



Help to choice ajax component

2008-03-31 Thread Fabien D.

Hi everybody,

I m new user of wicket, and I need your opinion for helping me to do
something.

Like gmail when you attach a file, I would like to do a link which can be
clicked and permits to display a new textfield with a button (fo searching a
file) and a radiobox.
This link can be clicked again...

How can i do this thanks to wicket??
-- 
View this message in context: 
http://www.nabble.com/Help-to-choice-ajax-component-tp16393445p16393445.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: Best method of testing behaviors.

2008-03-31 Thread Ned Collyer

Doh - i didnt search adequately.  I raised
http://issues.apache.org/jira/browse/WICKET-1466
but I've marked it as a dupe.

I'm not sure if you guys want it just linked as dupe, or resolved as dupe. 
At the moment its resolved as dupe AND linked - and has the quickstart
attached.

Sorry for the polution. :(



Johan Compagner wrote:
 
 http://issues.apache.org/jira/browse/WICKET-861
 

-- 
View this message in context: 
http://www.nabble.com/Best-method-of-testing-borders-tp16389412p16394010.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: Help to choice ajax component

2008-03-31 Thread Nino Saturnino Martinez Vazquez Wael

Use a panel and a listview or something near that or:

Look at the example on fileupload in wicket examples:
http://wicketstuff.org/wicket13/upload/multi

regards Nino

Fabien D. wrote:

Hi everybody,

I m new user of wicket, and I need your opinion for helping me to do
something.

Like gmail when you attach a file, I would like to do a link which can be
clicked and permits to display a new textfield with a button (fo searching a
file) and a radiobox.
This link can be clicked again...

How can i do this thanks to wicket??
  


--
-Wicket for love

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]



Re: UploadProgress Bar and cancel button

2008-03-31 Thread Nino Saturnino Martinez Vazquez Wael
This is something not really wicket related, but more workerthread... 
You need for it to run asynch in order for wicket to be able to process 
it the way you want to, worker thread can solve this..


regards Nino

sunraider wrote:

I have a page with upload form and added the upload progress bar, I have
added the cancel button to it by setDefaultFormProcessing(false) but it does
not behave the same. The content is getting saved and even on empty form the
validation is being done. I removed the progress bar from the page and
everything seems to be working fine. I am not sure if that the way it should
be.


  


--
-Wicket for love

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]



Re: Inspecting AjaxRequestTarget

2008-03-31 Thread Federico Fanton
On Mon, 31 Mar 2008 09:57:51 +0200
Johan Compagner [EMAIL PROTECTED] wrote:

 done and fixed

And very quickly! Kudos to the Wicket devs!


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



Mount causes strange effects on my web application

2008-03-31 Thread SteamR

Hi,  I hope someone could help me with this...

I have 5 pages which are pretty standalone but stateful, and they have
nothing to do with each other.

Now I thought of having bookmarks for each of these pages, and added a mount
point to /pwa.

Now the problems started; my page's constructor was invoked three times
before actual output occured (it has an empty constructor), and a form
object loses its transient fields during a request-response cycle.

The transient field getting lost, is something I can fix, but invoking the
constructor three times and why wicket does so, is very strange...?

Anyone know any answer to this...

Btw, I am running wicket 1.3.1
-- 
View this message in context: 
http://www.nabble.com/Mount-causes-strange-effects-on-my-web-application-tp16395309p16395309.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: Help to choice ajax component

2008-03-31 Thread Fabien D.

Thank you for your help, but is there another solution??

Because i want to add as many FileUploadFiled (with Radio) as the user have
clicked in my link? My research don't let me optimistic by using ListView. 
-- 
View this message in context: 
http://www.nabble.com/Help-to-choice-ajax-component-tp16393445p16395513.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]



Package resource not found in YUI package

2008-03-31 Thread Fynn

Hey,

in my log are a couple of warnings that package resources are not found. I
use a Datepicker on this site, but this one runs as expected.
I looked in the wicket datetime 1.3.1 jar and have nothing found. How can i
disable this warnings or switch them off?

Thanks for helping me
Fynn

2008-03-27 10:14:24,966 INFO  [ajp-127.0.0.1-8009-19] STDOUT: 10:14:24,966
WARN  [PackageResource] Unable to find package resource [path =
org/apache/wicket/extensions/yui/skin.css, style = null, locale = null]
2008-03-27 10:14:24,966 INFO  [ajp-127.0.0.1-8009-19] STDOUT: 10:14:24,966
WARN  [PackageResource] Unable to find package resource [path =
org/apache/wicket/extensions/yui/skin.css, style = null, locale = null]
2008-03-27 10:14:24,970 INFO  [ajp-127.0.0.1-8009-1] STDOUT: 10:14:24,970
WARN  [PackageResource] Unable to find package resource [path =
org/apache/wicket/extensions/yui/button/button-min.js, style = null, locale
= null]
2008-03-27 10:14:24,971 INFO  [ajp-127.0.0.1-8009-29] STDOUT: 10:14:24,971
WARN  [PackageResource] Unable to find package resource [path =
org/apache/wicket/extensions/yui/charts/charts-experimental-min.js, style =
null, locale = null]
2008-03-27 10:14:24,973 INFO  [ajp-127.0.0.1-8009-31] STDOUT: 10:14:24,972
WARN  [PackageResource] Unable to find package resource [path =
org/apache/wicket/extensions/yui/colorpicker/colorpicker-beta-min.js, style
= null, locale = null]
2008-03-27 10:14:24,973 INFO  [ajp-127.0.0.1-8009-31] STDOUT: 10:14:24,973
WARN  [PackageResource] Unable to find package resource [path =
org/apache/wicket/extensions/yui/colorpicker/colorpicker-beta-min.js, style
= null, locale = null]
2008-03-27 10:14:24,974 INFO  [ajp-127.0.0.1-8009-1] STDOUT: 10:14:24,971
WARN  [PackageResource] Unable to find package resource [path =
org/apache/wicket/extensions/yui/button/button-min.js, style = null, locale
= null]
2008-03-27 10:14:24,975 INFO  [ajp-127.0.0.1-8009-29] STDOUT: 10:14:24,973
WARN  [PackageResource] Unable to find package resource [path =
org/apache/wicket/extensions/yui/charts/charts-experimental-min.js, style =
null, locale = null]
2008-03-27 10:14:25,021 INFO  [ajp-127.0.0.1-8009-24] STDOUT: 10:14:25,021
WARN  [PackageResource] Unable to find package resource [path =
org/apache/wicket/extensions/yui/datasource/datasource-beta-min.js, style =
null, locale = null]
2008-03-27 10:14:25,022 INFO  [ajp-127.0.0.1-8009-24] STDOUT: 10:14:25,022
WARN  [PackageResource] Unable to find package resource [path =
org/apache/wicket/extensions/yui/datasource/datasource-beta-min.js, style =
null, locale = null]
2008-03-27 10:14:25,040 INFO  [ajp-127.0.0.1-8009-12] STDOUT: 10:14:25,040
WARN  [PackageResource] Unable to find package resource [path =
org/apache/wicket/extensions/yui/datatable/datatable-beta-min.js, style =
null, locale = null]
2008-03-27 10:14:25,041 INFO  [ajp-127.0.0.1-8009-12] STDOUT: 10:14:25,041
WARN  [PackageResource] Unable to find package resource [path =
org/apache/wicket/extensions/yui/datatable/datatable-beta-min.js, style =
null, locale = null]
2008-03-27 10:14:25,050 INFO  [ajp-127.0.0.1-8009-14] STDOUT: 10:14:25,050
WARN  [PackageResource] Unable to find package resource [path =
org/apache/wicket/extensions/yui/dom/dom-min.js, style = null, locale =
null]
2008-03-27 10:14:25,052 INFO  [ajp-127.0.0.1-8009-14] STDOUT: 10:14:25,052
WARN  [PackageResource] Unable to find package resource [path =
org/apache/wicket/extensions/yui/dom/dom-min.js, style = null, locale =
null]
2008-03-27 10:14:25,052 INFO  [ajp-127.0.0.1-8009-23] STDOUT: 10:14:25,052
WARN  [PackageResource] Unable to find package resource [path =
org/apache/wicket/extensions/yui/editor/editor-beta-min.js, style = null,
locale = null]
2008-03-27 10:14:25,053 INFO  [ajp-127.0.0.1-8009-23] STDOUT: 10:14:25,053
WARN  [PackageResource] Unable to find package resource [path =
org/apache/wicket/extensions/yui/editor/editor-beta-min.js, style = null,
locale = null]
2008-03-27 10:14:25,054 INFO  [ajp-127.0.0.1-8009-15] STDOUT: 10:14:25,054
WARN  [PackageResource] Unable to find package resource [path =
org/apache/wicket/extensions/yui/dragdrop/dragdrop-min.js, style = null,
locale = null]
2008-03-27 10:14:25,056 INFO  [ajp-127.0.0.1-8009-15] STDOUT: 10:14:25,055
WARN  [PackageResource] Unable to find package resource [path =
org/apache/wicket/extensions/yui/dragdrop/dragdrop-min.js, style = null,
locale = null]
2008-03-27 10:14:25,095 INFO  [ajp-127.0.0.1-8009-22] STDOUT: 10:14:25,095
WARN  [PackageResource] Unable to find package resource [path =
org/apache/wicket/extensions/yui/element/element-beta-min.js, style = null,
locale = null]
-- 
View this message in context: 
http://www.nabble.com/Package-resource-not-found-in-YUI-package-tp16395623p16395623.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: Package resource not found in YUI package

2008-03-31 Thread Fabien D.

Have you check with the version 1.3.2?
-- 
View this message in context: 
http://www.nabble.com/Package-resource-not-found-in-YUI-package-tp16395623p16395915.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: right click popup context menu

2008-03-31 Thread Reinout van Schouwen
Hello Karen,

Op donderdag 06-03-2008 om 10:42 uur [tijdzone -0500], schreef Karen
Schaper:

 I have a data table and for each row that is generated, I'd like to be able
 to right click on the row and have actions that I can perform on the row
 appear in a popup menu.

At risk of stating the obvious, I feel compelled to point out that
depending on the second mouse button to show a context menu is bad
practice. It's not very discoverable, and moreover, some browsers /
browser extensions block javascript from gaining control over the
context menu under the second mouse button.

For generic pop-up menu guidelines in webapps, please see:
http://developers.sun.com/docs/web-app-guidelines/uispec4_1/07-simple.html#7.2.3.4

regards,

-- 
Reinout van Schouwen



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



Re: How to make img src in a component's template resolve to the image files in the package?

2008-03-31 Thread James Carman
On Mon, Mar 31, 2008 at 12:28 AM, Matthew Young [EMAIL PROTECTED] wrote:
 wicket:link doesnt touch components afaik

  :(  I need it to be a component.  My code is basically this:

 add(new WebMarkupContainer(img));

Why do you need it to be a component?  Are you controlling the
visibility of it via code?

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



Re: Package resource not found in YUI package

2008-03-31 Thread Fynn


Fabien D. wrote:
 
 Have you check with the version 1.3.2?
 

Yes, but wicket 1.3.2 dosn´t work for my app.
http://www.nabble.com/Wicket-1.3.2---java.lang.NullPointerException-ts16119078.html
http://www.nabble.com/Wicket-1.3.2---java.lang.NullPointerException-ts16119078.html
 
-- 
View this message in context: 
http://www.nabble.com/Package-resource-not-found-in-YUI-package-tp16395623p16395918.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: Help to choice ajax component

2008-03-31 Thread Nino Saturnino Martinez Vazquez Wael
Neither of the methods described inhibit you in number of files... Just 
increased the number as you go..


Fabien D. wrote:

Thank you for your help, but is there another solution??

Because i want to add as many FileUploadFiled (with Radio) as the user have
clicked in my link? My research don't let me optimistic by using ListView. 
  


--
-Wicket for love

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]



Re: TextField returning a null

2008-03-31 Thread Johan Compagner
if you are setting the type The converter is called and not  convertValue()
i am still not really happy with this but for 1.3/1.4 this is the way it
works

And i guess the String converter that does String to String doesnt óok at
that convert empty input to null value at all

Do you have your own?

johan


On Mon, Mar 31, 2008 at 1:38 PM, Eric Rotick [EMAIL PROTECTED] wrote:

 I do have the type set and I've been reading WICKET-606 and I'm using
 1.3.2and there is no converter and convertInput is not called.

 I've now written some code to show that there is a difference.

 form.add( new TextField( text1, new PropertyModel( this, text1 ) ) );
 form.add( new TextField( text2, new PropertyModel( this, text2 )
 ).setConvertEmptyInputStringToNull( true ) );
 form.add( new TextField( text3, new PropertyModel( this, text3 )
 ).setConvertEmptyInputStringToNull( false ) );
 form.add( new TextField( text4, new PropertyModel( this, text4 ),
 String.class ) );
 form.add( new TextField( text5, new PropertyModel( this, text5 ),
 String.class ).setConvertEmptyInputStringToNull( true ) );
 form.add( new TextField( text6, new PropertyModel( this, text6 ),
 String.class ).setConvertEmptyInputStringToNull( false ) );

 produces this

 Setting text1 to [null]
 Setting text2 to [null]
 Setting text3 to []
 Setting text4 to []
 Setting text5 to []
 Setting text6 to []

 So,

   - text1 and text2 are the same because
   setConvertEmptyInputStringToNull is true by default
   - text3 does what would be expected
   - text4 I'm not sure about
   - text5 and text6 are anomalous as either one or the other should
   produce a null

 I guess the main problem is that I'm not sure what is supposed to happen.
 I
 though that having set the type to String meant that the normal string
 processing took place and setConvertEmptyInputStringToNull did the job.

 As it is, I've learned more about how things work and I can overcome my
 problem. However, if anyone wants me to continue with this I would be
 happy
 to do so.

 Eric.

 On Fri, Mar 28, 2008 at 8:58 PM, Johan Compagner [EMAIL PROTECTED]
 wrote:

  Are you sure you dont have the type set?
  Is a converter used or is convertInput called?
 
  On 3/28/08, Eric Rotick [EMAIL PROTECTED] wrote:
   Hmm, it's not working for me.
  
   There's one other thing I spotted. The docs say that a TextField
  defaults to
   String.class even if it cannot work out the class from the model. My
  model
   is not one that allows for reflection to determine the class and
  initially
   all input to the TextField was being set as null even when there was
  some.
   As soon as I added the parameter to set the class to String it started
   saving strings correctly.
  
   I will have a look at the code to see if there's anything obvious.
  
   Eric.
  
   On Fri, Mar 28, 2008 at 4:37 PM, Igor Vaynberg 
 [EMAIL PROTECTED]
   wrote:
  
TexField.setConvertEmptyInputStringToNull( true ) worked fine for me
in a quickstart...
   
-igor
   
   
On Fri, Mar 28, 2008 at 8:25 AM, Eric Rotick [EMAIL PROTECTED]
  wrote:
 I've just been reading the section on Forms and validation in
 Wicket
  in
  Action and have tried

 AbstractValidator av = new AbstractValidator( ) {
 protected void onValidate( IValidatable validatable ) {
 // No nothing
 }
 public boolean validateOnNullValue( ) {
 return true;
 }
 };

  adding one of these to the TextField but still an empty string
 gets
  returned.

  All I want to do is get a null string rather than an empty string
  from
a
  TextField. Has nobody had this use case?




  On Thu, Mar 27, 2008 at 5:02 PM, Eric Rotick 
 [EMAIL PROTECTED]
wrote:

   I've just realised that the database is getting filled with
  columns
of
   empty strings which then don't cause the 'not null' test to
 trip.
  
   The culprit is the TextField returning an empty string rather
  than a
null.
   I can see there are some special considerations for returning a
  null
and I
   want to understand how they will effect me. However, I've tried
  
   TexField.setConvertEmptyInputStringToNull( true )
  
   with no effect and using
  
   new TextField( id ) {
   public boolean isInputNullable() {
   regturn true;
   }
   };
  
   also with no effect.
  
   I'm assuming I'm not the first person to see this effect and I
  guess
it's
   lack of understanding rather than some implicit behaviour but I
  can't
find
   anything guiding on the subject.
  
   In this case, the string has no special formatting, it just
 needs
  to
be
   stored verbatim in the database but the application logic in
 the
backend
   uses an empty string in a different way than a null string and,
  yes,
maybe
   the database should also 

Re: TextField returning a null

2008-03-31 Thread Johan Compagner
Ok i guess if if quickly look at the code.
If you dont do your own converter then it defaults i guess to the
DefaultConverter
that does this:

public Object convertToObject(String value, Locale locale)
{
if (value == null)
{
return null;
}
if (.equals(value))
{
if (((Class)type.get()) == String.class)
{
return ;
}
return null;
}

So if it is a String class and the input is  it does return 

we could change this:

final IConverter converter = getConverter(getType());
try
{
convertedInput = converter.convertToObject(getInput(),
getLocale());
}

in FormComponent..
If it is of Type String then after the conversion we still check for the
convert empty to null and do that..

Because now that boolean is of no use if you are setting the Type

johan

johan


On Mon, Mar 31, 2008 at 2:34 PM, Johan Compagner [EMAIL PROTECTED]
wrote:

 if you are setting the type The converter is called and not
 convertValue()
 i am still not really happy with this but for 1.3/1.4 this is the way it
 works

 And i guess the String converter that does String to String doesnt óok at
 that convert empty input to null value at all

 Do you have your own?

 johan



 On Mon, Mar 31, 2008 at 1:38 PM, Eric Rotick [EMAIL PROTECTED] wrote:

  I do have the type set and I've been reading WICKET-606 and I'm using
  1.3.2and there is no converter and convertInput is not called.
 
  I've now written some code to show that there is a difference.
 
  form.add( new TextField( text1, new PropertyModel( this, text1 ) )
  );
  form.add( new TextField( text2, new PropertyModel( this, text2 )
  ).setConvertEmptyInputStringToNull( true ) );
  form.add( new TextField( text3, new PropertyModel( this, text3 )
  ).setConvertEmptyInputStringToNull( false ) );
  form.add( new TextField( text4, new PropertyModel( this, text4 ),
  String.class ) );
  form.add( new TextField( text5, new PropertyModel( this, text5 ),
  String.class ).setConvertEmptyInputStringToNull( true ) );
  form.add( new TextField( text6, new PropertyModel( this, text6 ),
  String.class ).setConvertEmptyInputStringToNull( false ) );
 
  produces this
 
  Setting text1 to [null]
  Setting text2 to [null]
  Setting text3 to []
  Setting text4 to []
  Setting text5 to []
  Setting text6 to []
 
  So,
 
- text1 and text2 are the same because
setConvertEmptyInputStringToNull is true by default
- text3 does what would be expected
- text4 I'm not sure about
- text5 and text6 are anomalous as either one or the other should
produce a null
 
  I guess the main problem is that I'm not sure what is supposed to
  happen. I
  though that having set the type to String meant that the normal string
  processing took place and setConvertEmptyInputStringToNull did the job.
 
  As it is, I've learned more about how things work and I can overcome my
  problem. However, if anyone wants me to continue with this I would be
  happy
  to do so.
 
  Eric.
 
  On Fri, Mar 28, 2008 at 8:58 PM, Johan Compagner [EMAIL PROTECTED]
  wrote:
 
   Are you sure you dont have the type set?
   Is a converter used or is convertInput called?
  
   On 3/28/08, Eric Rotick [EMAIL PROTECTED] wrote:
Hmm, it's not working for me.
   
There's one other thing I spotted. The docs say that a TextField
   defaults to
String.class even if it cannot work out the class from the model. My
   model
is not one that allows for reflection to determine the class and
   initially
all input to the TextField was being set as null even when there was
   some.
As soon as I added the parameter to set the class to String it
  started
saving strings correctly.
   
I will have a look at the code to see if there's anything obvious.
   
Eric.
   
On Fri, Mar 28, 2008 at 4:37 PM, Igor Vaynberg 
  [EMAIL PROTECTED]
wrote:
   
 TexField.setConvertEmptyInputStringToNull( true ) worked fine for
  me
 in a quickstart...

 -igor


 On Fri, Mar 28, 2008 at 8:25 AM, Eric Rotick [EMAIL PROTECTED]
  
   wrote:
  I've just been reading the section on Forms and validation in
  Wicket
   in
   Action and have tried
 
  AbstractValidator av = new AbstractValidator( ) {
  protected void onValidate( IValidatable validatable ) {
  // No nothing
  }
  public boolean validateOnNullValue( ) {
  return true;
  }
  };
 
   adding one of these to the TextField but still an empty string
  gets
   returned.
 
   All I want to do is get a null string rather than an empty
  string
   from
 a
   TextField. Has nobody had this use case?
 
 
 
 
   On Thu, Mar 27, 2008 at 5:02 PM, Eric Rotick 
  [EMAIL PROTECTED]
 

Re: Variation for a page

2008-03-31 Thread Wouter Huijnink

Mathias P.W Nilsson wrote:

Hi! I have a page that can have multiple views. A detailed list, a text list
and a thumbnail list.
All data is comping from the same model but how can I change the layout for
the view? 


Should I use 3 different html templates or how should I solve this?
  


Define 3 Fragments in your markup file - in the populateItem method you 
select the fragment that matches the view selected by the user


Wouter

--
Wouter Huijnink
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500


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



London Wicket Event - Wednesday evening at Google

2008-03-31 Thread jweekend

Just a reminder that our next event is on Wednesday evening at Google's
offices.
You can register and keep an eye on full details 
http://jweekend.com/dev/LWUGReg/ here  (some of you have not confirmed or
cancelled yet - please do so as we need to fix security and manage the space
available).

Also let us know if you'd like to give a short presentation (anything
between 5 - 30 minutes is OK) this time or in the future.

Regards - Cemal
http://jWeekend.co.uk http://jWeekend.co.uk 

PS To those that have asked and others that are worried, we'll probably be
able to catch all of the 2nd half of Arsenal - Liverpool (quarter final of
the UEFA Champions League) at the pub.  

-- 
View this message in context: 
http://www.nabble.com/London-Wicket-Event---Wednesday-evening-at-Google-tp16396048p16396048.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: TextField returning a null

2008-03-31 Thread Eric Rotick
I guess, if this was a real issue then more users would have reported it.
However, as a TextField is such an innocent component then any confusing
behaviour should be addressed. Maintaining a common behaviour of
setConvertEmptyInputStringToNull would do that and your proposed solution
looks good.

One thing which was confusing from the javadocs level is the implication
that the setting of a type is defaulted; i.e.

public TextField( String id, Class type ) {
super( id );
setType( type );
...
}

public TextField( String id ) {
super( id );
Class type = workOutTypeFromModelIfPossible( );
if( type == null ) {
type = String.class;
}
setType( type );
...
}

In other words, there is always a type set unless the model is one which
does not allow for it to be derived in which case String is assumed as in
the FormComponent javadocs for setType.

Eric.

On Mon, Mar 31, 2008 at 1:37 PM, Johan Compagner [EMAIL PROTECTED]
wrote:

 Ok i guess if if quickly look at the code.
 If you dont do your own converter then it defaults i guess to the
 DefaultConverter
 that does this:

 public Object convertToObject(String value, Locale locale)
{
if (value == null)
{
return null;
}
if (.equals(value))
{
if (((Class)type.get()) == String.class)
{
return ;
}
return null;
}

 So if it is a String class and the input is  it does return 

 we could change this:

 final IConverter converter = getConverter(getType());
try
{
convertedInput = converter.convertToObject(getInput(),
 getLocale());
}

 in FormComponent..
 If it is of Type String then after the conversion we still check for the
 convert empty to null and do that..

 Because now that boolean is of no use if you are setting the Type

 johan

 johan


 On Mon, Mar 31, 2008 at 2:34 PM, Johan Compagner [EMAIL PROTECTED]
 wrote:

  if you are setting the type The converter is called and not
  convertValue()
  i am still not really happy with this but for 1.3/1.4 this is the way it
  works
 
  And i guess the String converter that does String to String doesnt óok
 at
  that convert empty input to null value at all
 
  Do you have your own?
 
  johan
 
 
 
  On Mon, Mar 31, 2008 at 1:38 PM, Eric Rotick [EMAIL PROTECTED]
 wrote:
 
   I do have the type set and I've been reading WICKET-606 and I'm using
   1.3.2and there is no converter and convertInput is not called.
  
   I've now written some code to show that there is a difference.
  
   form.add( new TextField( text1, new PropertyModel( this, text1 ) )
   );
   form.add( new TextField( text2, new PropertyModel( this, text2 )
   ).setConvertEmptyInputStringToNull( true ) );
   form.add( new TextField( text3, new PropertyModel( this, text3 )
   ).setConvertEmptyInputStringToNull( false ) );
   form.add( new TextField( text4, new PropertyModel( this, text4 ),
   String.class ) );
   form.add( new TextField( text5, new PropertyModel( this, text5 ),
   String.class ).setConvertEmptyInputStringToNull( true ) );
   form.add( new TextField( text6, new PropertyModel( this, text6 ),
   String.class ).setConvertEmptyInputStringToNull( false ) );
  
   produces this
  
   Setting text1 to [null]
   Setting text2 to [null]
   Setting text3 to []
   Setting text4 to []
   Setting text5 to []
   Setting text6 to []
  
   So,
  
 - text1 and text2 are the same because
 setConvertEmptyInputStringToNull is true by default
 - text3 does what would be expected
 - text4 I'm not sure about
 - text5 and text6 are anomalous as either one or the other should
 produce a null
  
   I guess the main problem is that I'm not sure what is supposed to
   happen. I
   though that having set the type to String meant that the normal string
   processing took place and setConvertEmptyInputStringToNull did the
 job.
  
   As it is, I've learned more about how things work and I can overcome
 my
   problem. However, if anyone wants me to continue with this I would be
   happy
   to do so.
  
   Eric.
  
   On Fri, Mar 28, 2008 at 8:58 PM, Johan Compagner [EMAIL PROTECTED]
 
   wrote:
  
Are you sure you dont have the type set?
Is a converter used or is convertInput called?
   
On 3/28/08, Eric Rotick [EMAIL PROTECTED] wrote:
 Hmm, it's not working for me.

 There's one other thing I spotted. The docs say that a TextField
defaults to
 String.class even if it cannot work out the class from the model.
 My
model
 is not one that allows for reflection to determine the class and
initially
 all input to the TextField was being set as null even when there
 was
some.
 As soon as I added the parameter to set the class to String it
   started
 saving strings correctly.

 I will have a look at the code to see if there's anything obvious.

 Eric.

 

Re: TextField returning a null

2008-03-31 Thread Johan Compagner
We already try to guess the type if the user doesn't set it (but not in
constructor but much later when the component/model hierarchy is completed)
But if the type is a String.class we will not set it and ignore it.

So you shouldn't set the type to String.class by default, only set it when
you really want a String to String conversion.

johan


On Mon, Mar 31, 2008 at 3:46 PM, Eric Rotick [EMAIL PROTECTED] wrote:

 I guess, if this was a real issue then more users would have reported it.
 However, as a TextField is such an innocent component then any confusing
 behaviour should be addressed. Maintaining a common behaviour of
 setConvertEmptyInputStringToNull would do that and your proposed solution
 looks good.

 One thing which was confusing from the javadocs level is the implication
 that the setting of a type is defaulted; i.e.

 public TextField( String id, Class type ) {
 super( id );
 setType( type );
 ...
 }

 public TextField( String id ) {
 super( id );
 Class type = workOutTypeFromModelIfPossible( );
 if( type == null ) {
 type = String.class;
 }
 setType( type );
 ...
 }

 In other words, there is always a type set unless the model is one which
 does not allow for it to be derived in which case String is assumed as in
 the FormComponent javadocs for setType.

 Eric.

 On Mon, Mar 31, 2008 at 1:37 PM, Johan Compagner [EMAIL PROTECTED]
 wrote:

  Ok i guess if if quickly look at the code.
  If you dont do your own converter then it defaults i guess to the
  DefaultConverter
  that does this:
 
  public Object convertToObject(String value, Locale locale)
 {
 if (value == null)
 {
 return null;
 }
 if (.equals(value))
 {
 if (((Class)type.get()) == String.class)
 {
 return ;
 }
 return null;
 }
 
  So if it is a String class and the input is  it does return 
 
  we could change this:
 
  final IConverter converter = getConverter(getType());
 try
 {
 convertedInput = converter.convertToObject(getInput(),
  getLocale());
 }
 
  in FormComponent..
  If it is of Type String then after the conversion we still check for the
  convert empty to null and do that..
 
  Because now that boolean is of no use if you are setting the Type
 
  johan
 
  johan
 
 
  On Mon, Mar 31, 2008 at 2:34 PM, Johan Compagner [EMAIL PROTECTED]
  wrote:
 
   if you are setting the type The converter is called and not
   convertValue()
   i am still not really happy with this but for 1.3/1.4 this is the way
 it
   works
  
   And i guess the String converter that does String to String doesnt óok
  at
   that convert empty input to null value at all
  
   Do you have your own?
  
   johan
  
  
  
   On Mon, Mar 31, 2008 at 1:38 PM, Eric Rotick [EMAIL PROTECTED]
  wrote:
  
I do have the type set and I've been reading WICKET-606 and I'm
 using
1.3.2and there is no converter and convertInput is not called.
   
I've now written some code to show that there is a difference.
   
form.add( new TextField( text1, new PropertyModel( this, text1 )
 )
);
form.add( new TextField( text2, new PropertyModel( this, text2 )
).setConvertEmptyInputStringToNull( true ) );
form.add( new TextField( text3, new PropertyModel( this, text3 )
).setConvertEmptyInputStringToNull( false ) );
form.add( new TextField( text4, new PropertyModel( this, text4
 ),
String.class ) );
form.add( new TextField( text5, new PropertyModel( this, text5
 ),
String.class ).setConvertEmptyInputStringToNull( true ) );
form.add( new TextField( text6, new PropertyModel( this, text6
 ),
String.class ).setConvertEmptyInputStringToNull( false ) );
   
produces this
   
Setting text1 to [null]
Setting text2 to [null]
Setting text3 to []
Setting text4 to []
Setting text5 to []
Setting text6 to []
   
So,
   
  - text1 and text2 are the same because
  setConvertEmptyInputStringToNull is true by default
  - text3 does what would be expected
  - text4 I'm not sure about
  - text5 and text6 are anomalous as either one or the other should
  produce a null
   
I guess the main problem is that I'm not sure what is supposed to
happen. I
though that having set the type to String meant that the normal
 string
processing took place and setConvertEmptyInputStringToNull did the
  job.
   
As it is, I've learned more about how things work and I can overcome
  my
problem. However, if anyone wants me to continue with this I would
 be
happy
to do so.
   
Eric.
   
On Fri, Mar 28, 2008 at 8:58 PM, Johan Compagner 
 [EMAIL PROTECTED]
  
wrote:
   
 Are you sure you dont have the type set?
 Is a converter used or is convertInput called?

 On 3/28/08, Eric Rotick [EMAIL PROTECTED] wrote:
  Hmm, it's 

how to change the Label Value

2008-03-31 Thread shrimpywu

hi all,
i am new to wicket, 
just ask a simple question..

how to change the value of a label
for example
Label label = new Label(id,imodel);

how can do label.setValue(some string);

plz help..
-- 
View this message in context: 
http://www.nabble.com/how-to-change-the-Label-Value-tp16396259p16396259.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: Resources relative to application context

2008-03-31 Thread Al Maw
Actually, this should Just Work (tm). Are you running on Tomcat?

Regards,

Alastair

On Mon, Mar 31, 2008 at 4:34 AM, [EMAIL PROTECTED] wrote:

 You got it

 -igor


 On 3/30/08, Zheng, Xiahong [EMAIL PROTECTED] wrote:
  Thanks Igor. But my resource in this case is style sheet not image. Does
  that mean I need to write a similar component to accomplish that?
 
  -Original Message-
  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
  Sent: Sunday, March 30, 2008 3:48 PM
  To: users@wicket.apache.org
  Subject: Re: Resources relative to application context
 
  see source of ContextImage for details
 
  -igor
 
 
  On Sun, Mar 30, 2008 at 11:50 AM, Zheng, Xiahong [EMAIL PROTECTED]
  wrote:
   How does wicket find such resource, e.g. as follows?
  
   link href=style/my.css type=text/css rel=stylesheet /
  
   I found this only works if I mount my pages with
  
   mount(/pages, PackageName.forClass(Home.class));
  
   Otherwise, I need to specify absolute URL. This is fine. However, the
   subsequent problem I ran into is wicket failed to load resources
  after a
   form submit which is probably caused by the resulting URL not being
   mounted. So my question is,
  
   How do I mount the resulting URL after a form submit or other event?
  Is
   HybridUrlCodingStrategy designed for this purpose?
  
  
   Thanks,
   Xiaohong
  
   -
   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]
 
 

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




Re: how to change the Label Value

2008-03-31 Thread Fabien D.

Label label = new Label(id,new Model(Here you set your value));


shrimpywu wrote:
 
 hi all,
 i am new to wicket, 
 just ask a simple question..
 
 how to change the value of a label
 for example
 Label label = new Label(id,imodel);
 
 how can do label.setValue(some string);
 
 plz help..
 

-- 
View this message in context: 
http://www.nabble.com/how-to-change-the-Label-Value-tp16396259p16396263.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: continueToOriginalDestination resolves to wrong URL

2008-03-31 Thread Al Maw
That bug was closed for rc 1, so you shouldn't be having this issue unless
you're on a beta version.

Please could you provide some more details?
Which Wicket version?
Which servlet container?

Regards,

Alastair

On Mon, Mar 31, 2008 at 3:32 AM, Zheng, Xiahong [EMAIL PROTECTED]
wrote:

 Just realized this was reported in WICKET-588. Was the fix included in
 1.3.2 release?

 -Original Message-
 From: Zheng, Xiahong
 Sent: Sunday, March 30, 2008 9:28 PM
 To: users@wicket.apache.org
 Subject: continueToOriginalDestination resolves to wrong URL

 Scenario,

 1) request http://myapp/pages/watchlist
 2) throws throw new
 RestartResponseAtInterceptPageException(Login.class);
 3) Use sign in
 4) user redirected to http://pages/watchlist note: path /myapp is
 dropped

 Any idea?

 -
 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: Help to choice ajax component

2008-03-31 Thread Fabien D.

I've investigued the ListView, and i have succeded for doing my dynamic
adding item.
The problem now is that when i add a Item, all the fields are reseted, It
don't keep the information in the field.

The is my code : 

this.test = new ArrayList();

CheckBox toto = new CheckBox(selected);
FileUploadField upload = new FileUploadField(upload);
TextField description = new TextField(description);

test.add(new CUploadArticle(toto,upload,description));

ajout_site = new ListView(list_site, test) {
protected void populateItem(ListItem item) {
CUploadArticle p = (CUploadArticle) 
item.getModelObject();
item.add(p.getRadio());
item.add(p.getId());
item.add(p.getName());
}
};
this.form_ajoutinfcommunautaire.add(ajout_site);


Link lien = new Link(ajout_site) {
public void onClick() {
CheckBox toto = new CheckBox(selected);
FileUploadField upload = new FileUploadField(upload);
TextField description = new TextField(description);

test.add(new CUploadArticle(toto,upload,description));
ajout_site.setList(test);
}
};
lien.add(new Label(name,Upload another file));
lien.setVisible(true);
this.form_ajoutinfcommunautaire.add(lien);


How can i do this???
-- 
View this message in context: 
http://www.nabble.com/Help-to-choice-ajax-component-tp16393445p16396267.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 group on linkedin

2008-03-31 Thread Nino Saturnino Martinez Vazquez Wael

Hi

I've created a linkedin group for wicket, please feel free to join.. And 
I hope it's okay that I created it..


regards Nino

--
-Wicket for love

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]



Re: Wicket group on linkedin

2008-03-31 Thread Ryan Sonnek
url?

On Mon, Mar 31, 2008 at 9:27 AM, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
 Hi

  I've created a linkedin group for wicket, please feel free to join.. And
  I hope it's okay that I created it..

  regards Nino

  --
  -Wicket for love

  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]



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



Using colspan in DataGridView?

2008-03-31 Thread James Carman
I have a table in our application that uses colspans for certain
cells.  The AbstractDataGridView (and DataGridView subclass) uses the
concept of an ICellPopulator.  This assumes that there will be m x n
table cells (m = number cols, n = number rows) since it manufactures
each cell's Item and then lets the populator populate it.  What I
would like to do is create a new AbstractDataGridView that maybe uses
an IItemFactory which looks something like this:


public interface IItemFactory
{
  public Item createItem(String componentId, IModel rowModel);
}

If the IItemFactory returns null, then I just don't add anything to
the current RepeatingView for that row.  Does that make sense?  Is
this the easiest way to go about what I want?

James

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



Re: Wicket group on linkedin

2008-03-31 Thread Nino Saturnino Martinez Vazquez Wael

Right:) Im not familiar with linkedin:)

This is the group invitation url, I believe..

http://www.linkedin.com/e/gis/80181/73AB8A016DFF

Ryan Sonnek wrote:

url?

On Mon, Mar 31, 2008 at 9:27 AM, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
  

Hi

 I've created a linkedin group for wicket, please feel free to join.. And
 I hope it's okay that I created it..

 regards Nino

 --
 -Wicket for love

 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]





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


  


--
-Wicket for love

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]



Re: Wicket group on linkedin

2008-03-31 Thread Thomas Kappler
On Mon, Mar 31, 2008 at 4:37 PM, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
  This is the group invitation url, I believe..

  http://www.linkedin.com/e/gis/80181/73AB8A016DFF

Seems to work.  I registered, approval is pending.

Thomas

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



RE: Best Wicket Books or Tutorials

2008-03-31 Thread Fatih Mehmet UÇAR

That is a good one. Below is the contents pages of the book. You may decide
better when  you see the scope,contents of the book.







Table of Contents
Foreword
3
How to create AJAX web-based application easily?..3
How this book can help you learn Wicket?3
Unique contents in this
book.3
Target audience and
prerequisites4
Acknowledgments.
4
Chapter 1 Getting Started with
Wicket.11
What's in this
chapter?12
Developing a Hello World application with Wicket..12
Installing
Eclipse.
.12
Installing
Tomcat.1
2
Installing
Wicket..
.14
Creating a Hello Word
application...14
Generating dynamic
content23
Common errors in Wicket applications25
More rigorous version of the template.27
Simpler version of the
template...27
Page objects are
serializable...28
Debugging a Wicket
application..29
Summary.
32
Chapter 2 Using
Forms35
What's in this
chapter?36
Developing a stock quote application..36
Mismatch in component hierarchy...42
Using a combo
box..42
Inputting a
date
46
Displaying feedback
messages...49
Marking input as
required51
Using the
DatePicker...55
Summary.
57
Chapter 3 Validating
Input...59
What's in this
chapter?60
Postage
calculator..
.60
Using an object to represent the request.62
Making sure the page is
serializable67
What if the input is
invalid?..69
6 Enjoying Web Development with Wicket
Null input and
validators..73
Validating the patron
code...75
Displaying the error messages in red..77
Displaying invalid fields in
red..78
Creating a feedback label component.80
Validating a combination of multiple input values81
Pattern
validator...
...84
Summary.
84
Chapter 4 Creating an
e-Shop.87
What's in this
chapter?88
Creating an
e-shop..88
Listing the
products.88
Using a model for the
Labels...93
Showing the product
details94
Implementing a shopping
cart.97
How Tomcat and the browser maintain the session..103
The checkout
function...106
Implementing the login
function.108
Implementing the checkout function..113
Protecting a bunch of
pages..118
Implementing
logout..119
Summary.

Re: Best Wicket Books or Tutorials

2008-03-31 Thread Eelco Hillenius
On Mon, Mar 31, 2008 at 7:45 AM, Gareth Segree
[EMAIL PROTECTED] wrote:
 Is Enjoying Web Development with Wicket any good?

Easiest way to start reading yourself, as you can download the first
three chapters for free. And the first chapter of both Wicket In
Action and Pro Wicket are freely downloadable as well.

Eelco

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



Re: Best Wicket Books or Tutorials

2008-03-31 Thread Nino Saturnino Martinez Vazquez Wael

Hi Gareth

I'd also suggest that you create a wiki page on books and tutorials you 
find..


I've written one tutorial the blog tutorial(I admit it needs a little 
loving from my side, especially around the documentation and exercises):

   http://cwiki.apache.org/confluence/display/WICKET/Blog+Tutorial




Gareth Segree wrote:

Which framework should I invest in JSF/Struts 2/Spring MVC/Wicket for someone 
moving from jsp?

If Wicket then
I'm looking for good tutorials on wicket or books.
How does Enjoying Web Development with Wicket stackup?
What's the best wicket book available?

The same for the other framework
  


--
-Wicket for love

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]



Re: London Wicket Event - Wednesday evening at Google

2008-03-31 Thread Al Maw
Further to this, we'd really like to hear some user stories about what
you're up to with Wicket.

If you'd like to do a two-minute demo pimping your site and telling us what
you've found good/bad about developing with Wicket, that would be great. If
you can't or don't want to do a demo, but have a screenshot or two you'd
like me to put up while you talk for 30 seconds, that's also fine - please
e-mail me with PNGs.

I'm looking forward to seeing you all there.

Best regards,

Alastair


On Mon, Mar 31, 2008 at 1:56 PM, jweekend [EMAIL PROTECTED]
wrote:


 Just a reminder that our next event is on Wednesday evening at Google's
 offices.
 You can register and keep an eye on full details
 http://jweekend.com/dev/LWUGReg/ here  (some of you have not confirmed or
 cancelled yet - please do so as we need to fix security and manage the
 space
 available).

 Also let us know if you'd like to give a short presentation (anything
 between 5 - 30 minutes is OK) this time or in the future.

 Regards - Cemal
 http://jWeekend.co.uk http://jWeekend.co.uk

 PS To those that have asked and others that are worried, we'll probably be
 able to catch all of the 2nd half of Arsenal - Liverpool (quarter final of
 the UEFA Champions League) at the pub.

 --
 View this message in context:
 http://www.nabble.com/London-Wicket-Event---Wednesday-evening-at-Google-tp16396048p16396048.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: Best method of testing behaviors.

2008-03-31 Thread Igor Vaynberg
On Mon, Mar 31, 2008 at 1:50 AM, Ned Collyer [EMAIL PROTECTED] wrote:

  Doh - i didnt search adequately.  I raised
  http://issues.apache.org/jira/browse/WICKET-1466
  but I've marked it as a dupe.

  I'm not sure if you guys want it just linked as dupe, or resolved as dupe.
  At the moment its resolved as dupe AND linked - and has the quickstart
  attached.

i think youve covered your bases pretty well :)

  Sorry for the polution. :(

happens

-igor






  Johan Compagner wrote:
  
   http://issues.apache.org/jira/browse/WICKET-861
  

  --
  View this message in context: 
 http://www.nabble.com/Best-method-of-testing-borders-tp16389412p16394010.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: Mount causes strange effects on my web application

2008-03-31 Thread Igor Vaynberg
does sound very strange. are you sure you dont have something like
img src=/ in your markup? empty src will cause the browser to
re-request the same url..

-igor


On Mon, Mar 31, 2008 at 2:54 AM, SteamR [EMAIL PROTECTED] wrote:

  Hi,  I hope someone could help me with this...

  I have 5 pages which are pretty standalone but stateful, and they have
  nothing to do with each other.

  Now I thought of having bookmarks for each of these pages, and added a mount
  point to /pwa.

  Now the problems started; my page's constructor was invoked three times
  before actual output occured (it has an empty constructor), and a form
  object loses its transient fields during a request-response cycle.

  The transient field getting lost, is something I can fix, but invoking the
  constructor three times and why wicket does so, is very strange...?

  Anyone know any answer to this...

  Btw, I am running wicket 1.3.1
  --
  View this message in context: 
 http://www.nabble.com/Mount-causes-strange-effects-on-my-web-application-tp16395309p16395309.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: Resources relative to application context

2008-03-31 Thread Zheng, Xiahong
Yes, on tomcat 6.0. 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Al Maw
Sent: Monday, March 31, 2008 10:12 AM
To: users@wicket.apache.org
Subject: Re: Resources relative to application context

Actually, this should Just Work (tm). Are you running on Tomcat?

Regards,

Alastair

On Mon, Mar 31, 2008 at 4:34 AM, [EMAIL PROTECTED] wrote:

 You got it

 -igor


 On 3/30/08, Zheng, Xiahong [EMAIL PROTECTED] wrote:
  Thanks Igor. But my resource in this case is style sheet not image.
Does
  that mean I need to write a similar component to accomplish that?
 
  -Original Message-
  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
  Sent: Sunday, March 30, 2008 3:48 PM
  To: users@wicket.apache.org
  Subject: Re: Resources relative to application context
 
  see source of ContextImage for details
 
  -igor
 
 
  On Sun, Mar 30, 2008 at 11:50 AM, Zheng, Xiahong
[EMAIL PROTECTED]
  wrote:
   How does wicket find such resource, e.g. as follows?
  
   link href=style/my.css type=text/css rel=stylesheet /
  
   I found this only works if I mount my pages with
  
   mount(/pages, PackageName.forClass(Home.class));
  
   Otherwise, I need to specify absolute URL. This is fine. However,
the
   subsequent problem I ran into is wicket failed to load resources
  after a
   form submit which is probably caused by the resulting URL not
being
   mounted. So my question is,
  
   How do I mount the resulting URL after a form submit or other
event?
  Is
   HybridUrlCodingStrategy designed for this purpose?
  
  
   Thanks,
   Xiaohong
  
  
-
   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]
 
 

 -
 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: continueToOriginalDestination resolves to wrong URL

2008-03-31 Thread Zheng, Xiahong
My environment:

Wicket version: 1.3.2
Servlet Container: tomcat 6.0.14

The problem is definitely still there if I map wicketfilter at /*.
However, I just found if I add an extra path such as /abc/* in the
mapping it starts to work. This workaround requires my application to
add an extra path to the url which I want to avoid.

Interestingly, this workaround also solves the relative stylesheet
loading problem that I was facing at the same time.

 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Al Maw
Sent: Monday, March 31, 2008 10:15 AM
To: users@wicket.apache.org
Subject: Re: continueToOriginalDestination resolves to wrong URL

That bug was closed for rc 1, so you shouldn't be having this issue
unless
you're on a beta version.

Please could you provide some more details?
Which Wicket version?
Which servlet container?

Regards,

Alastair

On Mon, Mar 31, 2008 at 3:32 AM, Zheng, Xiahong [EMAIL PROTECTED]
wrote:

 Just realized this was reported in WICKET-588. Was the fix included in
 1.3.2 release?

 -Original Message-
 From: Zheng, Xiahong
 Sent: Sunday, March 30, 2008 9:28 PM
 To: users@wicket.apache.org
 Subject: continueToOriginalDestination resolves to wrong URL

 Scenario,

 1) request http://myapp/pages/watchlist
 2) throws throw new
 RestartResponseAtInterceptPageException(Login.class);
 3) Use sign in
 4) user redirected to http://pages/watchlist note: path /myapp is
 dropped

 Any idea?

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



AjaxSubmitButton and Session Timeout (1.2.7)

2008-03-31 Thread Markus Strickler
Hi-

we have some problems with a page that uses AjaxSubmitButton. Once the session
has expired clicking the button just does nothing.
AJAX debug gives the follwing output:

INFO:
INFO: Initiating Ajax POST request on
/app/?wicket:interface=:6:textMessageEditorForm:save:-1:IUnversionedBehaviorListenerwicket:behaviorId=0wicket:ignoreIfNotActive=truerandom=0.15552442536196975
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (0 characters)
INFO:
ERROR: Error while parsing response: Could not find root ajax-response element
INFO: Invoking post-call handler(s)...
INFO: Invoking failure handler(s)...

Is there a way to display some enduser error message in this case or just
redirect to the Page Expired error page?

Thanks for any help,

-markus


This message was sent using IMP, the Internet Messaging Program.

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



Re: AjaxSubmitButton and Session Timeout (1.2.7)

2008-03-31 Thread Igor Vaynberg
you can register general failure handlers in your page:

easiest way is to simply have function wicketGlobalFailureHandler() {
... } defined somewhere, a better way is to define it like this:
Wicket.Ajax.registerFailureHandler(function() { ...})

-igor


On Mon, Mar 31, 2008 at 10:15 AM, Markus Strickler [EMAIL PROTECTED] wrote:
 Hi-

  we have some problems with a page that uses AjaxSubmitButton. Once the 
 session
  has expired clicking the button just does nothing.
  AJAX debug gives the follwing output:

  INFO:
  INFO: Initiating Ajax POST request on
  
 /app/?wicket:interface=:6:textMessageEditorForm:save:-1:IUnversionedBehaviorListenerwicket:behaviorId=0wicket:ignoreIfNotActive=truerandom=0.15552442536196975
  INFO: Invoking pre-call handler(s)...
  INFO: Received ajax response (0 characters)
  INFO:
  ERROR: Error while parsing response: Could not find root ajax-response 
 element
  INFO: Invoking post-call handler(s)...
  INFO: Invoking failure handler(s)...

  Is there a way to display some enduser error message in this case or just
  redirect to the Page Expired error page?

  Thanks for any help,

  -markus

  
  This message was sent using IMP, the Internet Messaging Program.

  -
  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:enclosure isn't working with ajax?

2008-03-31 Thread Igor Vaynberg
enclosures dont really work with ajax. you would have to update some
container that the enclosure is in

-igor


On Mon, Mar 31, 2008 at 10:22 AM, Juha Alatalo
[EMAIL PROTECTED] wrote:
 Hi,

  is there any way to set a component, which is surrounded by
  wicket:enclosure, visible via ajax? setOutputMarkupPlaceholderTag(true);
  doesn't seem to be working when component is surrounded by wicket:enclosure.

  I made a simple example:
  http://download.syncrontech.com/public/EnclosureTest.zip

  Ajax debug:

  INFO: focus set on ajaxLinkb8
  INFO:
  INFO: Initiating Ajax GET request on
  ?wicket:interface=:3:ajaxLink::IBehaviorListener:0:random=0.6930893807323287
  INFO: Invoking pre-call handler(s)...
  INFO: Received ajax response (160 characters)
  INFO:
  ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent
  id=containerb9 ![CDATA[div id=containerb9Plah,
  plah/div]]/component/ajax-response
  INFO: Response parsed. Now invoking steps...
  ERROR: Component with id [[containerb9]] a was not found while trying to
  perform markup update. Make sure you called
  component.setOutputMarkupId(true) on the component whose markup you are
  trying to update.
  INFO: Response processed successfully.
  INFO: Invoking post-call handler(s)...
  INFO: Calling focus on ajaxLinkb8
  INFO: focus removed from ajaxLinkb8

  Should this example be working == Should I create a JIRA issue?

  - Juha

  -
  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:enclosure isn't working with ajax?

2008-03-31 Thread Igor Vaynberg
wicket:enclosure is a _convinience_ so dont expect it to work
everywhere for every imaginable usecase.

-igor

On Mon, Mar 31, 2008 at 10:30 AM, Juha Alatalo
[EMAIL PROTECTED] wrote:
 Ok. That's the answer I was afraid of.

  - Juha



  Igor Vaynberg wrote:
   enclosures dont really work with ajax. you would have to update some
   container that the enclosure is in
  
   -igor
  
  
   On Mon, Mar 31, 2008 at 10:22 AM, Juha Alatalo
   [EMAIL PROTECTED] wrote:
   Hi,
  
is there any way to set a component, which is surrounded by
wicket:enclosure, visible via ajax? setOutputMarkupPlaceholderTag(true);
doesn't seem to be working when component is surrounded by 
 wicket:enclosure.
  
I made a simple example:
http://download.syncrontech.com/public/EnclosureTest.zip
  
Ajax debug:
  
INFO: focus set on ajaxLinkb8
INFO:
INFO: Initiating Ajax GET request on

 ?wicket:interface=:3:ajaxLink::IBehaviorListener:0:random=0.6930893807323287
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (160 characters)
INFO:
?xml version=1.0 encoding=UTF-8?ajax-responsecomponent
id=containerb9 ![CDATA[div id=containerb9Plah,
plah/div]]/component/ajax-response
INFO: Response parsed. Now invoking steps...
ERROR: Component with id [[containerb9]] a was not found while trying to
perform markup update. Make sure you called
component.setOutputMarkupId(true) on the component whose markup you are
trying to update.
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: Calling focus on ajaxLinkb8
INFO: focus removed from ajaxLinkb8
  
Should this example be working == Should I create a JIRA issue?
  
- Juha
  
-
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]



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



Re: Wicket group on linkedin

2008-03-31 Thread Nino Saturnino Martinez Vazquez Wael

Fixed. And we are already 18 in the group:)

Gerolf Seitz wrote:

nice.
one minor issue: the url of the website is wrong:
it's not www.wicket.apache.org but just http://wicket.apache.org.

cheers,
  gerolf

On Mon, Mar 31, 2008 at 4:27 PM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

  

Hi

I've created a linkedin group for wicket, please feel free to join.. And
I hope it's okay that I created it..

regards Nino

--
-Wicket for love

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 for love

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]



Re: How to use an action level authorization?

2008-03-31 Thread Eelco Hillenius
My question is simple... :) How to use an action level
  authorization. I cannot find any info or example.

There is an example of it in wicket-examples that uses wicket-auth
(which in itself is mainly an example project).

Eelco

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



Re: How to make img src in a component's template resolve to the image files in the package?

2008-03-31 Thread Matthew Young
To Igor and James:

so if that is all it does why does it need to be a component?

Why do you need it to be a component?  Are you controlling the
visibility of it via code?

#1, I need to add(IBehavior) to the img's to make change to their class
attribute, so I need them to be a component.

#2, I don't like img src attributes in template like this:

src=resources/com.mycompany.component.MyComponent/open.png
src=resources/com.mycompany.component.MyComponent/close.png
src=resources/com.mycompany.component.MyComponent/north.png
src=resources/com.mycompany.component.MyComponent/sourth.png
etc

This would break if I re-name the component or move it to a different
package. It would be better if they are:

src=open.png
src=close.png
src=north.png
src=sourth.png
etc

and change the src attribute to full paths in code. The little PackageImage
class solve this use case.

so i would say, no, it takes 10 minutes to write one

I completely agree it's very trivial to create after getting help here
:)   Still I commit error by holding on to Class reference (thanks for
pointing out).  If there is such class built-in, then no chance for such
error and this use case is taken care of.

i can come up with at least 10 trivial classes that have to do with images
off the top of my head

Well, this is the thing: you know Wicket inside out. Stuffs that are trivial
for you may not be so trivial to regular Wicket user.  But I totally
understand your reluctance to add stuff to Wicket.  It's like adding key
words to Java, the answer is almost always no.  So if not adding these
little trivial stuff, a wiki showing all the little image use cases
would be great.

Anyway, I am not happy with my little PackageImage class.  I want to allow
application to override the image files to have different look and only
fallback to the built-in images, just like localization. How can this be
done?

On Mon, Mar 31, 2008 at 4:35 AM, James Carman [EMAIL PROTECTED]
wrote:

 On Mon, Mar 31, 2008 at 12:28 AM, Matthew Young [EMAIL PROTECTED] wrote:
  wicket:link doesnt touch components afaik
 
   :(  I need it to be a component.  My code is basically this:
 
  add(new WebMarkupContainer(img));

 Why do you need it to be a component?  Are you controlling the
 visibility of it via code?

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




Re: convert open-close to open

2008-03-31 Thread Gerolf Seitz
what's the use case for doing that?

  Gerolf

On Mon, Mar 31, 2008 at 4:32 PM, Eyal Golan [EMAIL PROTECTED] wrote:

 Hi,
 How can I convert a tag that is of type open-close: input bla bla bla /
 to input bla bla /input ?

 The API says that I should not use the setTag(XmlTag) method.
 If I do I get all kind of exceptions.
 Second question: How will I close it?

 I do all the above in the onComponentTag method.

 Thanks


 --
 Eyal Golan
 [EMAIL PROTECTED]

 Visit: http://jvdrums.sourceforge.net/



Re: convert open-close to open

2008-03-31 Thread Nino Saturnino Martinez Vazquez Wael

Is it even something wicket supports?

Gerolf Seitz wrote:

what's the use case for doing that?

  Gerolf

On Mon, Mar 31, 2008 at 4:32 PM, Eyal Golan [EMAIL PROTECTED] wrote:

  

Hi,
How can I convert a tag that is of type open-close: input bla bla bla /
to input bla bla /input ?

The API says that I should not use the setTag(XmlTag) method.
If I do I get all kind of exceptions.
Second question: How will I close it?

I do all the above in the onComponentTag method.

Thanks


--
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/




  


--
-Wicket for love

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]



Re: convert open-close to open

2008-03-31 Thread Gerolf Seitz
yes, this is what happens to span wicket:id=myLabel/ all the time.
also with wicket:message key=key/, ...

  Gerolf

On Mon, Mar 31, 2008 at 9:04 PM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

 Is it even something wicket supports?

 Gerolf Seitz wrote:
  what's the use case for doing that?
 
Gerolf
 
  On Mon, Mar 31, 2008 at 4:32 PM, Eyal Golan [EMAIL PROTECTED] wrote:
 
 
  Hi,
  How can I convert a tag that is of type open-close: input bla bla bla
 /
  to input bla bla /input ?
 
  The API says that I should not use the setTag(XmlTag) method.
  If I do I get all kind of exceptions.
  Second question: How will I close it?
 
  I do all the above in the onComponentTag method.
 
  Thanks
 
 
  --
  Eyal Golan
  [EMAIL PROTECTED]
 
  Visit: http://jvdrums.sourceforge.net/
 
 
 
 

 --
 -Wicket for love

 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]




Re: London Wicket Event - Wednesday evening at Google

2008-03-31 Thread Jonathan Locke


With Google sponsoring Wicket meetings, I'm wondering if we might someday
see Wicket/GWT integration?


jweekend wrote:
 
 Just a reminder that our next event is on Wednesday evening at Google's
 offices.
 You can register and keep an eye on full details 
 http://jweekend.com/dev/LWUGReg/ here  (some of you have not confirmed or
 cancelled yet - please do so as we need to fix security and manage the
 space available).
 
 Also let us know if you'd like to give a short presentation (anything
 between 5 - 30 minutes is OK) this time or in the future.
 
 Regards - Cemal
  http://jWeekend.co.uk http://jWeekend.co.uk 
 
 PS To those that have asked and others that are worried, we'll probably be
 able to catch all of the 2nd half of Arsenal - Liverpool (quarter final of
 the UEFA Champions League) at the pub.  
 
 

-- 
View this message in context: 
http://www.nabble.com/London-Wicket-Event---Wednesday-evening-at-Google-tp16396048p16398935.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: convert open-close to open

2008-03-31 Thread Johan Compagner
No, wicket doesnt alter html like that

On 3/31/08, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
 Is it even something wicket supports?

 Gerolf Seitz wrote:
  what's the use case for doing that?
 
Gerolf
 
  On Mon, Mar 31, 2008 at 4:32 PM, Eyal Golan [EMAIL PROTECTED] wrote:
 
 
  Hi,
  How can I convert a tag that is of type open-close: input bla bla bla /
  to input bla bla /input ?
 
  The API says that I should not use the setTag(XmlTag) method.
  If I do I get all kind of exceptions.
  Second question: How will I close it?
 
  I do all the above in the onComponentTag method.
 
  Thanks
 
 
  --
  Eyal Golan
  [EMAIL PROTECTED]
 
  Visit: http://jvdrums.sourceforge.net/
 
 
 
 

 --
 -Wicket for love

 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]



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



Re: convert open-close to open

2008-03-31 Thread Gerolf Seitz
well, not wrt the blablabla thing, but it does change
open-close tags to open-body-close.

On Mon, Mar 31, 2008 at 9:12 PM, Johan Compagner [EMAIL PROTECTED]
wrote:

 No, wicket doesnt alter html like that

 On 3/31/08, Nino Saturnino Martinez Vazquez Wael
 [EMAIL PROTECTED] wrote:
  Is it even something wicket supports?
 
  Gerolf Seitz wrote:
   what's the use case for doing that?
  
 Gerolf
  
   On Mon, Mar 31, 2008 at 4:32 PM, Eyal Golan [EMAIL PROTECTED]
 wrote:
  
  
   Hi,
   How can I convert a tag that is of type open-close: input bla bla
 bla /
   to input bla bla /input ?
  
   The API says that I should not use the setTag(XmlTag) method.
   If I do I get all kind of exceptions.
   Second question: How will I close it?
  
   I do all the above in the onComponentTag method.
  
   Thanks
  
  
   --
   Eyal Golan
   [EMAIL PROTECTED]
  
   Visit: http://jvdrums.sourceforge.net/
  
  
  
  
 
  --
  -Wicket for love
 
  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]
 
 

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




Re: London Wicket Event - Wednesday evening at Google

2008-03-31 Thread Johan Compagner
How do you see that intergration?
The only thing that gwt has on the server is 'services'
Dont see how wicket can do much there

On 3/31/08, Jonathan Locke [EMAIL PROTECTED] wrote:


 With Google sponsoring Wicket meetings, I'm wondering if we might someday
 see Wicket/GWT integration?


 jweekend wrote:
 
  Just a reminder that our next event is on Wednesday evening at Google's
  offices.
  You can register and keep an eye on full details
  http://jweekend.com/dev/LWUGReg/ here  (some of you have not confirmed or
  cancelled yet - please do so as we need to fix security and manage the
  space available).
 
  Also let us know if you'd like to give a short presentation (anything
  between 5 - 30 minutes is OK) this time or in the future.
 
  Regards - Cemal
   http://jWeekend.co.uk http://jWeekend.co.uk
 
  PS To those that have asked and others that are worried, we'll probably be
  able to catch all of the 2nd half of Arsenal - Liverpool (quarter final of
  the UEFA Champions League) at the pub.
 
 

 --
 View this message in context:
 http://www.nabble.com/London-Wicket-Event---Wednesday-evening-at-Google-tp16396048p16398935.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: How to make img src in a component's template resolve to the image files in the package?

2008-03-31 Thread Johan Compagner
Whats wrong with

/resources/images/xxx.jpg



On 3/31/08, Matthew Young [EMAIL PROTECTED] wrote:
 To Igor and James:

 so if that is all it does why does it need to be a component?

 Why do you need it to be a component?  Are you controlling the
 visibility of it via code?

 #1, I need to add(IBehavior) to the img's to make change to their class
 attribute, so I need them to be a component.

 #2, I don't like img src attributes in template like this:

 src=resources/com.mycompany.component.MyComponent/open.png
 src=resources/com.mycompany.component.MyComponent/close.png
 src=resources/com.mycompany.component.MyComponent/north.png
 src=resources/com.mycompany.component.MyComponent/sourth.png
 etc

 This would break if I re-name the component or move it to a different
 package. It would be better if they are:

 src=open.png
 src=close.png
 src=north.png
 src=sourth.png
 etc

 and change the src attribute to full paths in code. The little PackageImage
 class solve this use case.

 so i would say, no, it takes 10 minutes to write one

 I completely agree it's very trivial to create after getting help here
 :)   Still I commit error by holding on to Class reference (thanks for
 pointing out).  If there is such class built-in, then no chance for such
 error and this use case is taken care of.

 i can come up with at least 10 trivial classes that have to do with images
 off the top of my head

 Well, this is the thing: you know Wicket inside out. Stuffs that are trivial
 for you may not be so trivial to regular Wicket user.  But I totally
 understand your reluctance to add stuff to Wicket.  It's like adding key
 words to Java, the answer is almost always no.  So if not adding these
 little trivial stuff, a wiki showing all the little image use cases
 would be great.

 Anyway, I am not happy with my little PackageImage class.  I want to allow
 application to override the image files to have different look and only
 fallback to the built-in images, just like localization. How can this be
 done?

 On Mon, Mar 31, 2008 at 4:35 AM, James Carman [EMAIL PROTECTED]
 wrote:

  On Mon, Mar 31, 2008 at 12:28 AM, Matthew Young [EMAIL PROTECTED] wrote:
   wicket:link doesnt touch components afaik
  
:(  I need it to be a component.  My code is basically this:
  
   add(new WebMarkupContainer(img));
 
  Why do you need it to be a component?  Are you controlling the
  visibility of it via code?
 
  -
  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: London Wicket Event - Wednesday evening at Google

2008-03-31 Thread jweekend

Jonathan,

It's certainly good to have them hosting us and to have a drink with some of
the guys working there who have plenty of interesting ideas. 
As for the love-child, I already suggested a name ... Gwicket; not very
imaginative maybe, but you've got to admit it sounds like a name you would
give some powerful framework.

Regards - Cemal
http://jWeekend.co.uk http://jWeekend.co.uk 



Jonathan Locke wrote:
 
 
 With Google sponsoring Wicket meetings, I'm wondering if we might someday
 see Wicket/GWT integration?
 
 
 jweekend wrote:
 
 Just a reminder that our next event is on Wednesday evening at Google's
 offices.
 You can register and keep an eye on full details 
 http://jweekend.com/dev/LWUGReg/ here  (some of you have not confirmed or
 cancelled yet - please do so as we need to fix security and manage the
 space available).
 
 Also let us know if you'd like to give a short presentation (anything
 between 5 - 30 minutes is OK) this time or in the future.
 
 Regards - Cemal
  http://jWeekend.co.uk http://jWeekend.co.uk 
 
 PS To those that have asked and others that are worried, we'll probably
 be able to catch all of the 2nd half of Arsenal - Liverpool (quarter
 final of the UEFA Champions League) at the pub.  
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/London-Wicket-Event---Wednesday-evening-at-Google-tp16396048p16399036.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: How to make img src in a component's template resolve to the image files in the package?

2008-03-31 Thread Igor Vaynberg
On Mon, Mar 31, 2008 at 11:44 AM, Matthew Young [EMAIL PROTECTED] wrote:

  src=resources/com.mycompany.component.MyComponent/open.png

or just wicket:linkimg src=open.png//wicket:link

  so i would say, no, it takes 10 minutes to write one

  I completely agree it's very trivial to create after getting help here
  :)   Still I commit error by holding on to Class reference (thanks for
  pointing out).  If there is such class built-in, then no chance for such
  error and this use case is taken care of.

so you make the same error in some other component you write. this is
just something you have to be aware of.

  Well, this is the thing: you know Wicket inside out. Stuffs that are trivial
  for you may not be so trivial to regular Wicket user.  But I totally
  understand your reluctance to add stuff to Wicket.  It's like adding key
  words to Java, the answer is almost always no.  So if not adding these
  little trivial stuff, a wiki showing all the little image use cases
  would be great.

what you have done you could have done after reading wicket in action,
or some other book. resource handling is something framework specific,
so you have to invest a little learning time.

  Anyway, I am not happy with my little PackageImage class.  I want to allow
  application to override the image files to have different look and only
  fallback to the built-in images, just like localization. How can this be
  done?

src=getstring(somekey,null,defaultvalue);

-igor


  On Mon, Mar 31, 2008 at 4:35 AM, James Carman [EMAIL PROTECTED]
  wrote:



   On Mon, Mar 31, 2008 at 12:28 AM, Matthew Young [EMAIL PROTECTED] wrote:
wicket:link doesnt touch components afaik
   
 :(  I need it to be a component.  My code is basically this:
   
add(new WebMarkupContainer(img));
  
   Why do you need it to be a component?  Are you controlling the
   visibility of it via code?
  
   -
   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]



Maven and InMethod Grid

2008-03-31 Thread Pinger

Got a Noob questions here. I want to use the InMethod Grid for wicket, but I
have to use maven. Can anyone who is using it post the relevant part of
their POM file. 

Thanks


-- 
View this message in context: 
http://www.nabble.com/Maven-and-InMethod-Grid-tp16399038p16399038.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: London Wicket Event - Wednesday evening at Google

2008-03-31 Thread Igor Vaynberg
you can make roundtripping easier. for example, you develop a login
panel that lets users either login or signup. a wicket component may
look something like this:

add(new LoginPanel(panel) {
  onLoging(String username, String password) {..}
  onSignup(String first, String last, String login, String password,
String email) {..}
}

LoginPanel would extend some BaseGwtWidget which will make it easy to:
* include gwt module javascript into the page
* generate binding javascript that binds callbacks to said module's javascript
* create the callback urls with json? unmarshalling
* json marshal data to the gwt widget

just thinking out loud. some isolated very rich components might be
easier to build in gwt then with wicket's ajax.

-igor




On Mon, Mar 31, 2008 at 12:19 PM, Johan Compagner [EMAIL PROTECTED] wrote:
 How do you see that intergration?
  The only thing that gwt has on the server is 'services'
  Dont see how wicket can do much there



  On 3/31/08, Jonathan Locke [EMAIL PROTECTED] wrote:
  
  
   With Google sponsoring Wicket meetings, I'm wondering if we might someday
   see Wicket/GWT integration?
  
  
   jweekend wrote:
   
Just a reminder that our next event is on Wednesday evening at Google's
offices.
You can register and keep an eye on full details
http://jweekend.com/dev/LWUGReg/ here  (some of you have not confirmed or
cancelled yet - please do so as we need to fix security and manage the
space available).
   
Also let us know if you'd like to give a short presentation (anything
between 5 - 30 minutes is OK) this time or in the future.
   
Regards - Cemal
 http://jWeekend.co.uk http://jWeekend.co.uk
   
PS To those that have asked and others that are worried, we'll probably 
 be
able to catch all of the 2nd half of Arsenal - Liverpool (quarter final 
 of
the UEFA Champions League) at the pub.
   
   
  
   --
   View this message in context:
   
 http://www.nabble.com/London-Wicket-Event---Wednesday-evening-at-Google-tp16396048p16398935.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]



Re: Maven and InMethod Grid

2008-03-31 Thread Matej Knopp
Sorry, I don't think the grid components are available in any public
repo. I'd add it to bamboo on wicketstuff but somehow i can't access
the server.

-Matej


On Mon, Mar 31, 2008 at 9:27 PM, Pinger [EMAIL PROTECTED] wrote:

  Got a Noob questions here. I want to use the InMethod Grid for wicket, but I
  have to use maven. Can anyone who is using it post the relevant part of
  their POM file.

  Thanks


  --
  View this message in context: 
 http://www.nabble.com/Maven-and-InMethod-Grid-tp16399038p16399038.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]





-- 
Resizable and reorderable grid components.
http://www.inmethod.com

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



Re: convert open-close to open

2008-03-31 Thread Eyal Golan
I found my mistake.
Instead of writing input wicket:id=ddd .../ , I told all my colleges to
write input wicket:id=ddd .../input
As I found that this is the way Wicket suggests writing the markup.

On Mon, Mar 31, 2008 at 9:47 PM, Gerolf Seitz [EMAIL PROTECTED]
wrote:

 what's the use case for doing that?

  Gerolf

 On Mon, Mar 31, 2008 at 4:32 PM, Eyal Golan [EMAIL PROTECTED] wrote:

  Hi,
  How can I convert a tag that is of type open-close: input bla bla bla
 /
  to input bla bla /input ?
 
  The API says that I should not use the setTag(XmlTag) method.
  If I do I get all kind of exceptions.
  Second question: How will I close it?
 
  I do all the above in the onComponentTag method.
 
  Thanks
 
 
  --
  Eyal Golan
  [EMAIL PROTECTED]
 
  Visit: http://jvdrums.sourceforge.net/
 




-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/


Re: Maven and InMethod Grid

2008-03-31 Thread Maurice Marrink
Server works fine for me. but unless it is for a wicketstuff project
you are better of installing the jars in your companies repo.

Maurice

On Mon, Mar 31, 2008 at 9:33 PM, Matej Knopp [EMAIL PROTECTED] wrote:
 Sorry, I don't think the grid components are available in any public
  repo. I'd add it to bamboo on wicketstuff but somehow i can't access
  the server.

  -Matej




  On Mon, Mar 31, 2008 at 9:27 PM, Pinger [EMAIL PROTECTED] wrote:
  
Got a Noob questions here. I want to use the InMethod Grid for wicket, 
 but I
have to use maven. Can anyone who is using it post the relevant part of
their POM file.
  
Thanks
  
  
--
View this message in context: 
 http://www.nabble.com/Maven-and-InMethod-Grid-tp16399038p16399038.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]
  
  



  --
  Resizable and reorderable grid components.
  http://www.inmethod.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: Bug on modal window

2008-03-31 Thread Matej Knopp
It can not be span. Span is an inline element so you can't put block
element such as divs inside span. That is invalid markup and it
confuses browsers.

-Matej

On Mon, Mar 31, 2008 at 10:22 PM, Marco Aurélio Silva [EMAIL PROTECTED] wrote:
 Hi all

  I found a bug in ModalWindow of wicket 1.2.6. If the markup of modalwindow
  is inside a tag p, the modal doesn't work on IE6 and IE7.
  I wrote a CMS componente where the user can insert links on the page. If
  user insert a link that is a popup inside a tag p /p the popup doesn't
  open. This is what I can see on ajax debbuger:

  *INFO: *
  *INFO: *
  Initiating Ajax GET request on
  
 /myapp/app/?wicket:interface=:3:cms:p:body:content:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:link:buttonContainer:lis:cont:link::IBehaviorListenerwicket:behaviorId=0random=
  0.4619706830869044
  *INFO: *Invoking pre-call handler(s)...
  *INFO: *Received ajax response (1937 characters)
  *INFO: *
  ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent
  
 id=cms_p_body_content_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_link_buttonContainer_lis_cont_modalWindowRepeater
  ![CDATA[span style=display:none
  
 id=cms_p_body_content_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_link_buttonContainer_lis_cont_modalWindowRepeater

 div 
 id=cms_p_body_content_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_link_buttonContainer_lis_cont_modalWindowRepeater_content

  object width=425 height=355param value=
  http://www.youtube.com/v/ve9U1QunUoghl=nl
   name=movie/paramparam name=wmode
  value=transparent/paramembed width=425 height=355
  type=application/x-shockwave-flash wmode=transparent src=
  http://www.youtube.com/v/ve9U1QunUoghl=nl;/embed/object
  /div
  /span]]/componentevaluate![CDATA[var element =
  document.getElementById
  
 (cms_p_body_content_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_link_buttonContainer_lis_cont_modalWindowRepeater_content);
  var settings = new Object();
  settings.minWidth=200;
  settings.minHeight=200;
  settings.className=w_blue;
  settings.width=448;
  settings.height=355;
  settings.resizable=false;
  settings.widthUnit=px;
  settings.heightUnit=px;
  settings.element = element;
  settings.mask=semi-transparent;
  settings.onClose
   = function() { var
  
 wcall=wicketAjaxGet('/myapp/app/?wicket:interface=:3:cms:p:body:content:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:link:buttonContainer:lis:cont:modalWindowRepeater::IBehaviorListenerwicket:behaviorId=1',
  function() { }, function() { }); };
  Wicket.Window.create(settings).show();
  ]]/evaluate/ajax-response
  *INFO: *Response parsed. Now invoking steps...
  *ERROR: *Error while parsing response: Unknow runtimer error.
  *INFO: *Invoking post-call handler(s)...
  *INFO: *Invoking failure handler(s)...

  What I found out is that the error only happens if the markup of modal
  window is a SPAN. If I use a DIV, the modal works fine. Unfortunately I
  can't use DIV because DIV cause line break, and this break the layout of my
  page. I tried to debug the javascript, but is a lot of lines and the JS
  debugger of IE didn't help. Can anyone help me?




-- 
Resizable and reorderable grid components.
http://www.inmethod.com

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



Re: Maven and InMethod Grid

2008-03-31 Thread Matej Knopp
I know it does. It seems to refuse only slovak IP :)

-Matej

On Mon, Mar 31, 2008 at 10:00 PM, Maurice Marrink [EMAIL PROTECTED] wrote:
 Server works fine for me. but unless it is for a wicketstuff project
  you are better of installing the jars in your companies repo.

  Maurice



  On Mon, Mar 31, 2008 at 9:33 PM, Matej Knopp [EMAIL PROTECTED] wrote:
   Sorry, I don't think the grid components are available in any public
repo. I'd add it to bamboo on wicketstuff but somehow i can't access
the server.
  
-Matej
  
  
  
  
On Mon, Mar 31, 2008 at 9:27 PM, Pinger [EMAIL PROTECTED] wrote:

  Got a Noob questions here. I want to use the InMethod Grid for wicket, 
 but I
  have to use maven. Can anyone who is using it post the relevant part of
  their POM file.

  Thanks


  --
  View this message in context: 
 http://www.nabble.com/Maven-and-InMethod-Grid-tp16399038p16399038.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]


  
  
  
--
Resizable and reorderable grid components.
http://www.inmethod.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]





-- 
Resizable and reorderable grid components.
http://www.inmethod.com

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



Re: Bug on modal window

2008-03-31 Thread Marco Aurélio Silva
But it works fine on FF

On Mon, Mar 31, 2008 at 5:35 PM, Matej Knopp [EMAIL PROTECTED] wrote:

 It can not be span. Span is an inline element so you can't put block
 element such as divs inside span. That is invalid markup and it
 confuses browsers.

 -Matej

 On Mon, Mar 31, 2008 at 10:22 PM, Marco Aurélio Silva [EMAIL PROTECTED]
 wrote:
  Hi all
 
   I found a bug in ModalWindow of wicket 1.2.6. If the markup of
 modalwindow
   is inside a tag p, the modal doesn't work on IE6 and IE7.
   I wrote a CMS componente where the user can insert links on the page.
 If
   user insert a link that is a popup inside a tag p /p the popup
 doesn't
   open. This is what I can see on ajax debbuger:
 
   *INFO: *
   *INFO: *
   Initiating Ajax GET request on
 
  
 /myapp/app/?wicket:interface=:3:cms:p:body:content:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:link:buttonContainer:lis:cont:link::IBehaviorListenerwicket:behaviorId=0random=
   0.4619706830869044
   *INFO: *Invoking pre-call handler(s)...
   *INFO: *Received ajax response (1937 characters)
   *INFO: *
   ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent
 
  
 id=cms_p_body_content_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_link_buttonContainer_lis_cont_modalWindowRepeater
   ![CDATA[span style=display:none
 
  
 id=cms_p_body_content_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_link_buttonContainer_lis_cont_modalWindowRepeater
 
  div
 id=cms_p_body_content_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_link_buttonContainer_lis_cont_modalWindowRepeater_content
 
   object width=425 height=355param value=
   http://www.youtube.com/v/ve9U1QunUoghl=nl
name=movie/paramparam name=wmode
   value=transparent/paramembed width=425 height=355
   type=application/x-shockwave-flash wmode=transparent src=
   http://www.youtube.com/v/ve9U1QunUoghl=nl;/embed/object
   /div
   /span]]/componentevaluate![CDATA[var element =
   document.getElementById
 
  
 (cms_p_body_content_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_link_buttonContainer_lis_cont_modalWindowRepeater_content);
   var settings = new Object();
   settings.minWidth=200;
   settings.minHeight=200;
   settings.className=w_blue;
   settings.width=448;
   settings.height=355;
   settings.resizable=false;
   settings.widthUnit=px;
   settings.heightUnit=px;
   settings.element = element;
   settings.mask=semi-transparent;
   settings.onClose
= function() { var
 
  
 wcall=wicketAjaxGet('/myapp/app/?wicket:interface=:3:cms:p:body:content:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:link:buttonContainer:lis:cont:modalWindowRepeater::IBehaviorListenerwicket:behaviorId=1',
   function() { }, function() { }); };
   Wicket.Window.create(settings).show();
   ]]/evaluate/ajax-response
   *INFO: *Response parsed. Now invoking steps...
   *ERROR: *Error while parsing response: Unknow runtimer error.
   *INFO: *Invoking post-call handler(s)...
   *INFO: *Invoking failure handler(s)...
 
   What I found out is that the error only happens if the markup of modal
   window is a SPAN. If I use a DIV, the modal works fine. Unfortunately I
   can't use DIV because DIV cause line break, and this break the layout
 of my
   page. I tried to debug the javascript, but is a lot of lines and the JS
   debugger of IE didn't help. Can anyone help me?
 



 --
 Resizable and reorderable grid components.
 http://www.inmethod.com

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




Re: Bug on modal window

2008-03-31 Thread Matej Knopp
It can cause all kinds of problems, even ones you can not see
immediately, like with forms or other layout problems. If it's invalid
then it's invalid. Not all browsers can cope with that.

-Matej

On Mon, Mar 31, 2008 at 10:54 PM, Marco Aurélio Silva [EMAIL PROTECTED] wrote:
 Actually, it works with span also on IE, it only not works if  the span is
  inside the p tag


  On Mon, Mar 31, 2008 at 5:35 PM, Matej Knopp [EMAIL PROTECTED] wrote:



  It can not be span. Span is an inline element so you can't put block
   element such as divs inside span. That is invalid markup and it
   confuses browsers.
  
   -Matej
  
   On Mon, Mar 31, 2008 at 10:22 PM, Marco Aurélio Silva [EMAIL PROTECTED]
   wrote:
Hi all
   
 I found a bug in ModalWindow of wicket 1.2.6. If the markup of
   modalwindow
 is inside a tag p, the modal doesn't work on IE6 and IE7.
 I wrote a CMS componente where the user can insert links on the page.
   If
 user insert a link that is a popup inside a tag p /p the popup
   doesn't
 open. This is what I can see on ajax debbuger:
   
 *INFO: *
 *INFO: *
 Initiating Ajax GET request on
   

 /myapp/app/?wicket:interface=:3:cms:p:body:content:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:link:buttonContainer:lis:cont:link::IBehaviorListenerwicket:behaviorId=0random=
 0.4619706830869044
 *INFO: *Invoking pre-call handler(s)...
 *INFO: *Received ajax response (1937 characters)
 *INFO: *
 ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent
   

 id=cms_p_body_content_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_link_buttonContainer_lis_cont_modalWindowRepeater
 ![CDATA[span style=display:none
   

 id=cms_p_body_content_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_link_buttonContainer_lis_cont_modalWindowRepeater
   
div
   
 id=cms_p_body_content_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_link_buttonContainer_lis_cont_modalWindowRepeater_content
   
 object width=425 height=355param value=
 http://www.youtube.com/v/ve9U1QunUoghl=nl
  name=movie/paramparam name=wmode
 value=transparent/paramembed width=425 height=355
 type=application/x-shockwave-flash wmode=transparent src=
 http://www.youtube.com/v/ve9U1QunUoghl=nl;/embed/object
 /div
 /span]]/componentevaluate![CDATA[var element =
 document.getElementById
   

 (cms_p_body_content_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_link_buttonContainer_lis_cont_modalWindowRepeater_content);
 var settings = new Object();
 settings.minWidth=200;
 settings.minHeight=200;
 settings.className=w_blue;
 settings.width=448;
 settings.height=355;
 settings.resizable=false;
 settings.widthUnit=px;
 settings.heightUnit=px;
 settings.element = element;
 settings.mask=semi-transparent;
 settings.onClose
  = function() { var
   

 wcall=wicketAjaxGet('/myapp/app/?wicket:interface=:3:cms:p:body:content:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:link:buttonContainer:lis:cont:modalWindowRepeater::IBehaviorListenerwicket:behaviorId=1',
 function() { }, function() { }); };
 Wicket.Window.create(settings).show();
 ]]/evaluate/ajax-response
 *INFO: *Response parsed. Now invoking steps...
 *ERROR: *Error while parsing response: Unknow runtimer error.
 *INFO: *Invoking post-call handler(s)...
 *INFO: *Invoking failure handler(s)...
   
 What I found out is that the error only happens if the markup of modal
 window is a SPAN. If I use a DIV, the modal works fine. Unfortunately I
 can't use DIV because DIV cause line break, and this break the layout
   of my
 page. I tried to debug the javascript, but is a lot of lines and the JS
 debugger of IE didn't help. Can anyone help me?
   
  
  
  
   --
   Resizable and reorderable grid components.
   http://www.inmethod.com
  


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




-- 
Resizable and reorderable grid components.
http://www.inmethod.com

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



Re: Bug on modal window

2008-03-31 Thread Martijn Dashorst
What is your point? it works != it is good/legal/standards
compliant/works everywhere/works any time/etc.

Browsers are notorious for incompatible behavior for standards
compliant markup. You just found out what happens with non-standards
compliant markup.

Martijn

On 3/31/08, Marco Aurélio Silva [EMAIL PROTECTED] wrote:
 But it works fine on FF


  On Mon, Mar 31, 2008 at 5:35 PM, Matej Knopp [EMAIL PROTECTED] wrote:

   It can not be span. Span is an inline element so you can't put block
   element such as divs inside span. That is invalid markup and it
   confuses browsers.
  
   -Matej
  
   On Mon, Mar 31, 2008 at 10:22 PM, Marco Aurélio Silva [EMAIL PROTECTED]
   wrote:
Hi all
   
 I found a bug in ModalWindow of wicket 1.2.6. If the markup of
   modalwindow
 is inside a tag p, the modal doesn't work on IE6 and IE7.
 I wrote a CMS componente where the user can insert links on the page.
   If
 user insert a link that is a popup inside a tag p /p the popup
   doesn't
 open. This is what I can see on ajax debbuger:
   
 *INFO: *
 *INFO: *
 Initiating Ajax GET request on
   

 /myapp/app/?wicket:interface=:3:cms:p:body:content:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:link:buttonContainer:lis:cont:link::IBehaviorListenerwicket:behaviorId=0random=
 0.4619706830869044
 *INFO: *Invoking pre-call handler(s)...
 *INFO: *Received ajax response (1937 characters)
 *INFO: *
 ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent
   

 id=cms_p_body_content_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_link_buttonContainer_lis_cont_modalWindowRepeater
 ![CDATA[span style=display:none
   

 id=cms_p_body_content_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_link_buttonContainer_lis_cont_modalWindowRepeater
   
div
   
 id=cms_p_body_content_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_link_buttonContainer_lis_cont_modalWindowRepeater_content
   
 object width=425 height=355param value=
 http://www.youtube.com/v/ve9U1QunUoghl=nl
  name=movie/paramparam name=wmode
 value=transparent/paramembed width=425 height=355
 type=application/x-shockwave-flash wmode=transparent src=
 http://www.youtube.com/v/ve9U1QunUoghl=nl;/embed/object
 /div
 /span]]/componentevaluate![CDATA[var element =
 document.getElementById
   

 (cms_p_body_content_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_right_cont_link_buttonContainer_lis_cont_modalWindowRepeater_content);
 var settings = new Object();
 settings.minWidth=200;
 settings.minHeight=200;
 settings.className=w_blue;
 settings.width=448;
 settings.height=355;
 settings.resizable=false;
 settings.widthUnit=px;
 settings.heightUnit=px;
 settings.element = element;
 settings.mask=semi-transparent;
 settings.onClose
  = function() { var
   

 wcall=wicketAjaxGet('/myapp/app/?wicket:interface=:3:cms:p:body:content:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:right:cont:link:buttonContainer:lis:cont:modalWindowRepeater::IBehaviorListenerwicket:behaviorId=1',
 function() { }, function() { }); };
 Wicket.Window.create(settings).show();
 ]]/evaluate/ajax-response
 *INFO: *Response parsed. Now invoking steps...
 *ERROR: *Error while parsing response: Unknow runtimer error.
 *INFO: *Invoking post-call handler(s)...
 *INFO: *Invoking failure handler(s)...
   
 What I found out is that the error only happens if the markup of modal
 window is a SPAN. If I use a DIV, the modal works fine. Unfortunately I
 can't use DIV because DIV cause line break, and this break the layout
   of my
 page. I tried to debug the javascript, but is a lot of lines and the JS
 debugger of IE didn't help. Can anyone help me?
   
  
  
  
   --
   Resizable and reorderable grid components.
   http://www.inmethod.com
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  



-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2

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



UrlValidator: optional schema or default schema?

2008-03-31 Thread Dan Kaplan
Hello, I was using the UrlValidator yesterday and I wished that there was a
way for the schema to be optional.  I think this would be useful most of the
time as you normally expect someone to paste the URL of a website in certain
situations.  In that case, http:// can be assumed, if it's not presented.
How can I accomplish that?

 

Thanks,

Dan



Re: How to make img src in a component's template resolve to the image files in the package?

2008-03-31 Thread Al Maw
Errr, or you could use the Image component, with a standard package
resource?

Regards,

Alastair


On Mon, Mar 31, 2008 at 8:26 PM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 On Mon, Mar 31, 2008 at 11:44 AM, Matthew Young [EMAIL PROTECTED] wrote:
 
   src=resources/com.mycompany.component.MyComponent/open.png

 or just wicket:linkimg src=open.png//wicket:link

   so i would say, no, it takes 10 minutes to write one
 
   I completely agree it's very trivial to create after getting help
 here
   :)   Still I commit error by holding on to Class reference (thanks for
   pointing out).  If there is such class built-in, then no chance for
 such
   error and this use case is taken care of.

 so you make the same error in some other component you write. this is
 just something you have to be aware of.

   Well, this is the thing: you know Wicket inside out. Stuffs that are
 trivial
   for you may not be so trivial to regular Wicket user.  But I totally
   understand your reluctance to add stuff to Wicket.  It's like adding
 key
   words to Java, the answer is almost always no.  So if not adding
 these
   little trivial stuff, a wiki showing all the little image use cases
   would be great.

 what you have done you could have done after reading wicket in action,
 or some other book. resource handling is something framework specific,
 so you have to invest a little learning time.

   Anyway, I am not happy with my little PackageImage class.  I want to
 allow
   application to override the image files to have different look and only
   fallback to the built-in images, just like localization. How can this
 be
   done?

 src=getstring(somekey,null,defaultvalue);

 -igor

 
   On Mon, Mar 31, 2008 at 4:35 AM, James Carman 
 [EMAIL PROTECTED]
   wrote:
 
 
 
On Mon, Mar 31, 2008 at 12:28 AM, Matthew Young [EMAIL PROTECTED]
 wrote:
 wicket:link doesnt touch components afaik

  :(  I need it to be a component.  My code is basically this:

 add(new WebMarkupContainer(img));
   
Why do you need it to be a component?  Are you controlling the
visibility of it via code?
   
-
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: continueToOriginalDestination resolves to wrong URL

2008-03-31 Thread Al Maw
Yep, this is probably https://issues.apache.org/jira/browse/WICKET-1205

Am off to see if I can fix it right now.

Regards,

Alastair

On Mon, Mar 31, 2008 at 5:54 PM, Zheng, Xiahong [EMAIL PROTECTED]
wrote:

 My environment:

 Wicket version: 1.3.2
 Servlet Container: tomcat 6.0.14

 The problem is definitely still there if I map wicketfilter at /*.
 However, I just found if I add an extra path such as /abc/* in the
 mapping it starts to work. This workaround requires my application to
 add an extra path to the url which I want to avoid.

 Interestingly, this workaround also solves the relative stylesheet
 loading problem that I was facing at the same time.




 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
 Of Al Maw
 Sent: Monday, March 31, 2008 10:15 AM
 To: users@wicket.apache.org
 Subject: Re: continueToOriginalDestination resolves to wrong URL

 That bug was closed for rc 1, so you shouldn't be having this issue
 unless
 you're on a beta version.

 Please could you provide some more details?
 Which Wicket version?
 Which servlet container?

 Regards,

 Alastair

 On Mon, Mar 31, 2008 at 3:32 AM, Zheng, Xiahong [EMAIL PROTECTED]
 wrote:

  Just realized this was reported in WICKET-588. Was the fix included in
  1.3.2 release?
 
  -Original Message-
  From: Zheng, Xiahong
  Sent: Sunday, March 30, 2008 9:28 PM
  To: users@wicket.apache.org
  Subject: continueToOriginalDestination resolves to wrong URL
 
  Scenario,
 
  1) request http://myapp/pages/watchlist
  2) throws throw new
  RestartResponseAtInterceptPageException(Login.class);
  3) Use sign in
  4) user redirected to http://pages/watchlist note: path /myapp is
  dropped
 
  Any idea?
 
  -
  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]




Re: convert open-close to open

2008-03-31 Thread Johan Compagner
is that supported input with a close tag?

On Mon, Mar 31, 2008 at 9:49 PM, Eyal Golan [EMAIL PROTECTED] wrote:

 I found my mistake.
 Instead of writing input wicket:id=ddd .../ , I told all my colleges
 to
 write input wicket:id=ddd .../input
 As I found that this is the way Wicket suggests writing the markup.

 On Mon, Mar 31, 2008 at 9:47 PM, Gerolf Seitz [EMAIL PROTECTED]
 wrote:

  what's the use case for doing that?
 
   Gerolf
 
  On Mon, Mar 31, 2008 at 4:32 PM, Eyal Golan [EMAIL PROTECTED] wrote:
 
   Hi,
   How can I convert a tag that is of type open-close: input bla bla bla
  /
   to input bla bla /input ?
  
   The API says that I should not use the setTag(XmlTag) method.
   If I do I get all kind of exceptions.
   Second question: How will I close it?
  
   I do all the above in the onComponentTag method.
  
   Thanks
  
  
   --
   Eyal Golan
   [EMAIL PROTECTED]
  
   Visit: http://jvdrums.sourceforge.net/
  
 



 --
 Eyal Golan
 [EMAIL PROTECTED]

 Visit: http://jvdrums.sourceforge.net/



Re: London Wicket Event - Wednesday evening at Google

2008-03-31 Thread Ned Collyer

Woogle would be so much cooler :).  He could be another Ewok for sure!


jweekend wrote:
 
 As for the love-child, I already suggested a name ... Gwicket; not very
 imaginative maybe, but you've got to admit it sounds like a name you would
 give some powerful framework.
 

-- 
View this message in context: 
http://www.nabble.com/London-Wicket-Event---Wednesday-evening-at-Google-tp16396048p16399135.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: London Wicket Event - Wednesday evening at Google

2008-03-31 Thread Igor Vaynberg
i thought this is woogle:
http://www.google.com/coop/cse?cx=00079654818618231%3Aenjwek-gxxg

-igor


On Mon, Mar 31, 2008 at 3:48 PM, Ned Collyer [EMAIL PROTECTED] wrote:

  Woogle would be so much cooler :).  He could be another Ewok for sure!



  jweekend wrote:
  
   As for the love-child, I already suggested a name ... Gwicket; not very
   imaginative maybe, but you've got to admit it sounds like a name you would
   give some powerful framework.
  

  --
  View this message in context: 
 http://www.nabble.com/London-Wicket-Event---Wednesday-evening-at-Google-tp16396048p16399135.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: continueToOriginalDestination resolves to wrong URL

2008-03-31 Thread Al Maw
I've just spent two hours trying to reproduce this and failing to (see the
bug). If anyone can give me a reproduceable test-case for this wrapped up in
a nice Maven 2-backed project that I can just unzip and work with, then I
will very keenly fix this. As it is, I just can't reproduce it.

I guess it would be useful if you could see if the zip I've attached to the
issue can reproduce the problem on your local machine. If it does, please be
as specific as possible about your set-up as possible (OS, JDK version,
browser version, Tomcat minor revision, etc.) and I'll try to get a mirror
environment set up so we can work out what the heck the problem could be.

Are people running this behind a mod_proxy or something? Or are you seeing
this issue when pointed at localhost:8080?

Regards,

Alastair

On Mon, Mar 31, 2008 at 10:23 PM, Al Maw [EMAIL PROTECTED] wrote:

 Yep, this is probably https://issues.apache.org/jira/browse/WICKET-1205

 Am off to see if I can fix it right now.

 Regards,

 Alastair


 On Mon, Mar 31, 2008 at 5:54 PM, Zheng, Xiahong [EMAIL PROTECTED]
 wrote:

  My environment:
 
  Wicket version: 1.3.2
  Servlet Container: tomcat 6.0.14
 
  The problem is definitely still there if I map wicketfilter at /*.
  However, I just found if I add an extra path such as /abc/* in the
  mapping it starts to work. This workaround requires my application to
  add an extra path to the url which I want to avoid.
 
  Interestingly, this workaround also solves the relative stylesheet
  loading problem that I was facing at the same time.
 
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
  Of Al Maw
  Sent: Monday, March 31, 2008 10:15 AM
  To: users@wicket.apache.org
  Subject: Re: continueToOriginalDestination resolves to wrong URL
 
  That bug was closed for rc 1, so you shouldn't be having this issue
  unless
  you're on a beta version.
 
  Please could you provide some more details?
  Which Wicket version?
  Which servlet container?
 
  Regards,
 
  Alastair
 
  On Mon, Mar 31, 2008 at 3:32 AM, Zheng, Xiahong [EMAIL PROTECTED]
  wrote:
 
   Just realized this was reported in WICKET-588. Was the fix included in
   1.3.2 release?
  
   -Original Message-
   From: Zheng, Xiahong
   Sent: Sunday, March 30, 2008 9:28 PM
   To: users@wicket.apache.org
   Subject: continueToOriginalDestination resolves to wrong URL
  
   Scenario,
  
   1) request http://myapp/pages/watchlist
   2) throws throw new
   RestartResponseAtInterceptPageException(Login.class);
   3) Use sign in
   4) user redirected to http://pages/watchlist note: path /myapp is
   dropped
  
   Any idea?
  
   -
   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]
 
 



Accessing non-Wicket JavaScript variables inside Wicket

2008-03-31 Thread Michael Mehrle
I wrote a file uploader that works inside a Wicket modal window based on
jQuery. Here's the original PHP based framework I based my work on:

http://www.phpletter.com/Demo/AjaxFileUpload-Demo/

It's up and running (took some tweaking to say the least), but I am
still facing one hurdle:

The file processing on the backend is done via a regular Wicket page.
After verifying and saving the file it responds back with either an
error or success JSON message that's sent back to my JavaScript function
which originated the AJAX call. This way I can pop up alerts and advice
the user if there are problems. So far so good.

The problem I have is that I need to also bounce back the image id,
since it needs to be further processed inside my Wicket panel. So, let's
say I stick that id into my JSON message, and that it's available inside
my JavaScript function that handles the success/failure function. What
would be an elegant way to access that id from within Wicket? Again,
remember that this whole image uploader is outside the Wicket framework.
I would like to grab that id in my setCloseButtonCallback method after
the modal has been closed.

Any ideas would be greatly appreciated.

Thanks!

Michael

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



consume rss feeds in wicket

2008-03-31 Thread Ryan Sonnek
I just published a new wicketstuff-rome component that will allow
users to consume rss feeds in wicket.  This is something that I've
been meaning to do for a *long* time, and finally got around to it.
http://www.jroller.com/wireframe/entry/consume_rss_feeds_within_wicket

I've seen a few posts on this list over the past few months for users
wanting something like this, so please take a look and see if it hits
the sweet spot.  I currently expose the RSS feed as a ListView
Model, and I'd love to hear if anyone has other ways of doing it.

The implementation uses a LoadableDetachableModel, and I'd be
interested to hear feedback from dev's to see if this makes sense or
if there's a better way.

Thanks!
Ryan

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



Re: Variation for a page

2008-03-31 Thread Mathias P.W Nilsson

Thanks! I'm using Fragment right now but I have some difficulties in
updateing the fragment.

I have 3 private classes in my Wicket page for each fragment.

private final class ThumbnailFragment extends Fragment
{
private static final long serialVersionUID = 0L;

public ThumbnailFragment( final String panel , final String id,
ListDataProvider provider )
{
super(panel, id, TDSSearch.this );


final DataView view = new DataView( view,  provider ) 
{
private static final long serialVersionUID = 1L;

public void populateItem( Item item) {
Sheet sheet = (Sheet) item.getModelObject();
item.add( new Label( documentid , 
sheet.getDocumentId().toString()
));
item.add( new Label( name , 
sheet.getIdentifier() ));

item.add( new ListView(languages ,
getCultureDao().getOrderableCultures( new Long( 2 ))){

@Override
protected void 
populateItem(ListItem item ) {
CultureDTO culture = 
(CultureDTO) item.getModelObject();
item.add( new Label( 
language , culture.getName() ));
}

});

}


};
view.setItemsPerPage(1);
add(view);
add(new PagingNavigator(navigator, view));
}
}


Every fragment has a PageNavigator. I would first like this navigator to be
in the page and not in the fragment. The second question is how do I switch
Fragment?
-- 
View this message in context: 
http://www.nabble.com/Variation-for-a-page-tp16396032p16404502.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]



URL Binding

2008-03-31 Thread Alan Gutierrez

How do I implement this URL strategy?

http://twitter.com/bigeasy

Where the page is generated based on a single path parameter?

I'm new to Wicket. Where to I look?

Alan

--
Alan Gutierrez | [EMAIL PROTECTED] | http://blogometer.com/ | 504  
717 1428

Think New Orleans | http://thinknola.com/



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



Re: URL Binding

2008-03-31 Thread Nick Heudecker
mountBookmarkablePage(..) in Application?


On Mon, Mar 31, 2008 at 8:48 PM, Alan Gutierrez [EMAIL PROTECTED] wrote:

 How do I implement this URL strategy?

 http://twitter.com/bigeasy

 Where the page is generated based on a single path parameter?

 I'm new to Wicket. Where to I look?

 Alan

 --
 Alan Gutierrez | [EMAIL PROTECTED] | http://blogometer.com/ | 504
 717 1428
 Think New Orleans | http://thinknola.com/



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




-- 
Nick Heudecker
Professional Wicket Training  Consulting
http://www.systemmobile.com

Eventful - Intelligent Event Management
http://www.eventfulhq.com


Re: URL Binding

2008-03-31 Thread Igor Vaynberg
and IndexedUrlCodingStrategy

-igor


On Mon, Mar 31, 2008 at 7:29 PM, Nick Heudecker [EMAIL PROTECTED] wrote:
 mountBookmarkablePage(..) in Application?




  On Mon, Mar 31, 2008 at 8:48 PM, Alan Gutierrez [EMAIL PROTECTED] wrote:

   How do I implement this URL strategy?
  
   http://twitter.com/bigeasy
  
   Where the page is generated based on a single path parameter?
  
   I'm new to Wicket. Where to I look?
  
   Alan
  
   --
   Alan Gutierrez | [EMAIL PROTECTED] | http://blogometer.com/ | 504
   717 1428
   Think New Orleans | http://thinknola.com/
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  


  --
  Nick Heudecker
  Professional Wicket Training  Consulting
  http://www.systemmobile.com

  Eventful - Intelligent Event Management
  http://www.eventfulhq.com


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



Re: URL Binding

2008-03-31 Thread Igor Vaynberg
cant mount the homepage to / yet, will be available in a later release.

so just mount(/foo, getHomePage())

-igor


On Mon, Mar 31, 2008 at 7:53 PM, Alan Gutierrez [EMAIL PROTECTED] wrote:
 Nope.

  java.lang.IllegalArgumentException: The mount path '/' is reserved
  for the application home page

  I'm trying this...

  public class WicketApplication extends DataApplication
  {
 public WicketApplication()
 {
 mountBookmarkablePage(, EventPage.class);
 }
  }

  Not working.

  Alan



  On Mar 31, 2008, at 9:29 PM, Nick Heudecker wrote:
   mountBookmarkablePage(..) in Application?
  
  
   On Mon, Mar 31, 2008 at 8:48 PM, Alan Gutierrez
   [EMAIL PROTECTED] wrote:
  
   How do I implement this URL strategy?
  
   http://twitter.com/bigeasy
  
   Where the page is generated based on a single path parameter?
  
   I'm new to Wicket. Where to I look?
  
   Alan
  
   --
   Alan Gutierrez | [EMAIL PROTECTED] | http://blogometer.com/ | 504
   717 1428
   Think New Orleans | http://thinknola.com/
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
   --
   Nick Heudecker
   Professional Wicket Training  Consulting
   http://www.systemmobile.com
  
   Eventful - Intelligent Event Management
   http://www.eventfulhq.com

  --
  Alan Gutierrez | [EMAIL PROTECTED] | http://blogometer.com/ | 504
  717 1428
  Think New Orleans | http://thinknola.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]



Conditional Content

2008-03-31 Thread Alan Gutierrez
I like displaying my validation error messages right above the  
control in question.


If I markup my document like so...

div wicket:id=nameError
This was an error.
/div
input name=name wicket:id=name/

Is there a way to remove div from the Java controller if there is no  
error?


Alan

--
Alan Gutierrez | [EMAIL PROTECTED] | http://blogometer.com/ | 504  
717 1428

Think New Orleans | http://thinknola.com/



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



Re: London Wicket Event - Wednesday evening at Google

2008-03-31 Thread Jonathan Locke


well it would be nice to make embedding GWT /applications/ easy too, but
actually i was sortof remembering my old sprockets idea, i guess.  i really
don't know GWT well enough (there are not enough hours in the day it
seems...), so i don't know if this is a bad idea technically (if, for
example, GWT were slow or heavyweight to start up), but i was hoping that
one could create wicket wrappers for GWT applets that do fancy editing of
wicket models.  then wicket users could just drop in the GWT components and
get lots of fancy client-side editing of their richer wicket models (rich
text, images, stock lists, charts, spline editors, whatever).

a GWT wicket component would be a subclass of something like GwtPanel.  it
would get a POJO model from wicket on loading through a GWT callback to some
GwtPanel glue code.  then, when the component was done editing it, the GWT
side would have an interface to send the model back to wicket, which would
update the wicket-side component model and call something like
onModelChanged (only with an ajax request target so the wicket component
could refresh other parts of the page).  so, for example, using a
super-fancy GWT rich text editor might look like:

class SuperFancyGwtRichHtmlEditor extends GwtPanel { ... }

add(new SuperFancyGwtRichHtmlEditor(htmlEditor, new PropertyModel(product,
htmlDescription)) 
{
public void onModelChanged(final AjaxRequestTarget target) {
// update the product list with fancy rich text
target.addComponent(products);
}
});

this worked pretty well for sprockets and the code should still be up there
on wicket-stuff somewhere, but nobody used sprockets much (i guess because
they're applets).  if this turns out to be a good idea, i suggest grockets
as a name to honor sprockets and mike myers.  hey, all i want here is sharks
with frickin' lasers attached to their heads, okay?

best,

   jon


igor.vaynberg wrote:
 
 you can make roundtripping easier. for example, you develop a login
 panel that lets users either login or signup. a wicket component may
 look something like this:
 
 add(new LoginPanel(panel) {
   onLoging(String username, String password) {..}
   onSignup(String first, String last, String login, String password,
 String email) {..}
 }
 
 LoginPanel would extend some BaseGwtWidget which will make it easy to:
 * include gwt module javascript into the page
 * generate binding javascript that binds callbacks to said module's
 javascript
 * create the callback urls with json? unmarshalling
 * json marshal data to the gwt widget
 
 just thinking out loud. some isolated very rich components might be
 easier to build in gwt then with wicket's ajax.
 
 -igor
 
 
 
 
 On Mon, Mar 31, 2008 at 12:19 PM, Johan Compagner [EMAIL PROTECTED]
 wrote:
 How do you see that intergration?
  The only thing that gwt has on the server is 'services'
  Dont see how wicket can do much there



  On 3/31/08, Jonathan Locke [EMAIL PROTECTED] wrote:
  
  
   With Google sponsoring Wicket meetings, I'm wondering if we might
 someday
   see Wicket/GWT integration?
  
  
   jweekend wrote:
   
Just a reminder that our next event is on Wednesday evening at
 Google's
offices.
You can register and keep an eye on full details
http://jweekend.com/dev/LWUGReg/ here  (some of you have not
 confirmed or
cancelled yet - please do so as we need to fix security and manage
 the
space available).
   
Also let us know if you'd like to give a short presentation
 (anything
between 5 - 30 minutes is OK) this time or in the future.
   
Regards - Cemal
 http://jWeekend.co.uk http://jWeekend.co.uk
   
PS To those that have asked and others that are worried, we'll
 probably be
able to catch all of the 2nd half of Arsenal - Liverpool (quarter
 final of
the UEFA Champions League) at the pub.
   
   
  
   --
   View this message in context:
  
 http://www.nabble.com/London-Wicket-Event---Wednesday-evening-at-Google-tp16396048p16398935.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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/London-Wicket-Event---Wednesday-evening-at-Google-tp16396048p16411092.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: convert open-close to open

2008-03-31 Thread Eyal Golan
yes it does.
as well as button, which is what I intended originally

On Tue, Apr 1, 2008 at 12:43 AM, Johan Compagner [EMAIL PROTECTED]
wrote:

 is that supported input with a close tag?

 On Mon, Mar 31, 2008 at 9:49 PM, Eyal Golan [EMAIL PROTECTED] wrote:

  I found my mistake.
  Instead of writing input wicket:id=ddd .../ , I told all my colleges
  to
  write input wicket:id=ddd .../input
  As I found that this is the way Wicket suggests writing the markup.
 
  On Mon, Mar 31, 2008 at 9:47 PM, Gerolf Seitz [EMAIL PROTECTED]
  wrote:
 
   what's the use case for doing that?
  
Gerolf
  
   On Mon, Mar 31, 2008 at 4:32 PM, Eyal Golan [EMAIL PROTECTED]
 wrote:
  
Hi,
How can I convert a tag that is of type open-close: input bla bla
 bla
   /
to input bla bla /input ?
   
The API says that I should not use the setTag(XmlTag) method.
If I do I get all kind of exceptions.
Second question: How will I close it?
   
I do all the above in the onComponentTag method.
   
Thanks
   
   
--
Eyal Golan
[EMAIL PROTECTED]
   
Visit: http://jvdrums.sourceforge.net/
   
  
 
 
 
  --
  Eyal Golan
  [EMAIL PROTECTED]
 
  Visit: http://jvdrums.sourceforge.net/
 




-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/


Re: Best Wicket Books or Tutorials

2008-03-31 Thread Eyal Golan
Gabor,
do you have sliders of your introduction?
I would like to have some info regarding CompoundPropertyModel ...

On Mon, Mar 31, 2008 at 11:10 AM, Gabor Szokoli [EMAIL PROTECTED] wrote:

 Hi,

 On 3/31/08, Gareth Segree [EMAIL PROTECTED] wrote:
 
   If Wicket then
   I'm looking for good tutorials on wicket or books.

 Make sure you understand Models before everything else,
 and CompoundPropertyModel right after Hello World.

 That's what I've learned from introducing wicket to my team.

 We also had a good understanding of the basics before meddling with
 Ajax. It probably would have confused us a lot otherwise.


 Gabor Szokoli

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




-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/


Re: Best Wicket Books or Tutorials

2008-03-31 Thread Igor Vaynberg
On Mon, Mar 31, 2008 at 9:07 PM, Eyal Golan [EMAIL PROTECTED] wrote:
  I would like to have some info regarding CompoundPropertyModel ...

http://cwiki.apache.org/WICKET/working-with-wicket-models.html

-igor




  On Mon, Mar 31, 2008 at 11:10 AM, Gabor Szokoli [EMAIL PROTECTED] wrote:

   Hi,
  
   On 3/31/08, Gareth Segree [EMAIL PROTECTED] wrote:
   
 If Wicket then
 I'm looking for good tutorials on wicket or books.
  
   Make sure you understand Models before everything else,
   and CompoundPropertyModel right after Hello World.
  
   That's what I've learned from introducing wicket to my team.
  
   We also had a good understanding of the basics before meddling with
   Ajax. It probably would have confused us a lot otherwise.
  
  
   Gabor Szokoli
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  


  --
  Eyal Golan
  [EMAIL PROTECTED]

  Visit: http://jvdrums.sourceforge.net/


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



  1   2   >