Re: [Wicket-user] IMPORTANT: your opinion on the constructor change in 2.0

2007-03-06 Thread Gustavo Hexsel
What's the advantage of the new code (no, I'm not currently using
Wicket 2.0)?  Is it processing performance?  Memory usage?  Is the
framework code a lot less complex?  A little less complex?

   []s Gus


On 3/6/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
 Hi,

 We (Wicket's developers) are having some discussion over 1.3 vs 2.0
 and how difficult it is as a nun-funded project to spend so much time
 synchronizing the branches.

 A major issue in the discussion is that not everyone is convinced
 anymore that the constructor change in 2.0 is for the better. There
 are pros and cons for sure, but we want to get your opinion on this.

 Please help us out giving your opinion. We want to know:

 1) Who uses 2.0 for serious projects?

 2) What do you think of the constructor change? Do you prefer 1.3's
 add style or 2.0's style of passing in the parent construction time.

 3) If we would ever backtrack on the constructor change (*if*, don't
 panic for now) how much trouble would that give you?

 Please don't be shy giving your opinion. This is an important issue in
 the future development of Wicket.

 Regards,

 Eelco

 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] VOTE: IModel and 'model object' name change

2007-01-23 Thread Gustavo Hexsel
+0 for changing, except not sure it's what Johnathan suggested.

My problem is with using the word Model at all for the objects that
access model properties (maybe they should be ModelAccessors,
ModelExposer, ModelAdaptor, ModelBridge, ModelConnector, or something
along the lines... then ReflectionModelAccessor or
CompositeModelAccessor, ...).  They're not really models in any sense
that existing software patterns might agree, except maybe from the
framework-only perspective.   The methods wouldn't even have to change
that much then.

 []s Gus



On 1/23/07, Matthijs Wensveen [EMAIL PROTECTED] wrote:
 +1 Don't know if my vote counts or not, but anyway.

 I'm one of those users that had trouble with the ambiguity between model
 object (as in the IModel instance) and modelObject (the object contained
 by the model). Worse, In my project's team all the modelObjects were
 classes with the naming convention XXXModel so we had IModels containing
 modelObjects that were XXXModels. If that isn't an example of bad
 naming, then what is? :D

 In my opinion models containing values that are (of course) objects is
 much clearer and would prevent this kind of madness. Luckily Eclipse has
 great refactoring features, so XXXModel soon became XXXModelObject.

 Matthijs

 Eelco Hillenius wrote:
  -1. Regardless of whether the change is for the better, it will break
  way too much existing code not to mention the tutorials on the
  internet etc.
 
  Eelco
 
 
  On 1/22/07, Jonathan Locke [EMAIL PROTECTED] wrote:
 
  i'd like us to vote on changing IModel to this in 2.0 (i know it's very
  late, but please at least read my argument below and think about it for a
  moment):
 
  public interface IModelV extends IDetachable
  {
V getValue();
void setValue(V value);
  }
 
  we would also change getModelObject() to getValue() as well as any other
  related methods like getModelObjectAsString() to getValueAsString() (or
  valueAsString() if preferred).  there might be naming conflicts somewhere 
  or
  other problems, but i don't know of any offhand.
 
  i realize we're about to enter beta, but i feel like this matters since our
  users have been telling us for some time now that models are hard to
  understand and it seems likely that the term 'model object' (as derived 
  from
  the IModel interface naming) is really not helping anyone to understand
  things.  in fact, that term is actually ambiguous since the object
  implementing IModel might be informally understood to be the model object
  (which is not what we mean).
 
  i realize this change would affect the book and so eelco and martijn may
  very understandably not want to deal with that so i won't be upset if this
  change can't happen.  but i'd like to see it if it's possible, so at any
  rate, i'm +1 and i think igor says he's +0.
 
 
  Jonathan Locke wrote:
 
  We did already break the model contract with 1.2/1.3... would
  get/setObject-get/setValue be a huge hassle?  Or am I spacing something
  here?
 
 
  Jonathan Locke wrote:
 
  Made a few more changes.  I think it's getting shorter/better.
 
  My one regret looking at this documentation is that I wish
  IModel.get/setObject were actually IModel.get/setValue.  Or was there
  some crazy reason we didn't do this?  It would be much easier and more
  natural to talk about a model's value this way...
 
 
  Jonathan Locke wrote:
 
  Nice work.  I made a few small changes and rephrased the first paragraph
  to be even more specific.  Maybe it could be tweaked a little more, but
  I think this sums it up better now:
 
  In Wicket, a model holds a value for a component to display and/or
  edit. How exactly this value is held is determined by a given model's
  implementation of the wicket.model.IModel interface. This interface
  decouples a component from the data which forms its value. This in turn
  decouples the whole Wicket framework from any and all details of model
  storage, such as the details of a given persistence technology. As far
  as Wicket itself is concerned, a model is anything that implements the
  IModel interface, no matter how it might do that.
 
  It does feel like this is the best place to show the IModel interface
  since readers will be wondering what it looks like already.  It sounds
  scarier than it is, so why delay?
 
 
  Loren Rosen wrote:
 
  I've saved my rewritten version. (See
  http://cwiki.apache.org/confluence/display/WICKET/Working+with+Wicket+models)
  Comments by everyone from experts to complete newbies
  are most welcome. Doubtless there are things that are confusing or
  flat-out wrong.
 
  In addition to rephrasing or rewriting a lot of material, and adding a
  few things, I
  excised some details I thought would be distracting for a beginner.
  Some of this
  material is, I think, still useful, perhaps in a slightly more advanced
  More about
  Models page.
 
 
  igor.vaynberg wrote:
 
  go ahead and edit the page...the wiki is versioned i think so we can
  always
 

[Wicket-user] Patch to compile wicket-portlet-examples-1.3 for wicket 2.0

2006-12-29 Thread Gustavo Hexsel

 Hi there,

 I've noticed that the 2.0 repository didn't have
wicket-portlet-examples.  I'm sending a patch that enables
wicket-portlet-examples in the 1.x branch to compile under Wicket2.0.
If anyone feels like adding the code to the branch (I don't have
commit rights), feel free to use/modify the patch as sees fit.

[]s Gus

Property changes on: .
___
Name: svn:ignore
   - 
target

   + target
build
dist


Index: src/main/java/wicket/examples/portlet/ExamplePortlet.java
===
--- src/main/java/wicket/examples/portlet/ExamplePortlet.java	(revision 491085)
+++ src/main/java/wicket/examples/portlet/ExamplePortlet.java	(working copy)
@@ -1,9 +1,8 @@
 package wicket.examples.portlet;
 import javax.portlet.WindowState;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import wicket.ResourceReference;
 import wicket.markup.html.basic.Label;
 import wicket.markup.html.form.Form;
@@ -19,7 +18,7 @@
  */
 public class ExamplePortlet extends PortletPage
 {
-	private static final Log log = LogFactory.getLog(ExamplePortlet.class);
+	private static final Logger log = LoggerFactory.getLogger(ExamplePortlet.class);
 
 	/**
 	 * 
@@ -31,12 +30,12 @@
 		PropertyModel messageModel = new PropertyModel(this, message);
 
 		// The label displays the currently set message
-		add(new Label(msg, messageModel));
+		new Label(this, msg, messageModel);
 
 		// Add a form to change the message. We don't need to do anything
 		// else with this form as the shared model is automatically updated
 		// on form submits
-		Form form = new Form(form)
+		Form form = new Form(this, form)
 		{
 
 			protected void onSubmit()
@@ -46,29 +45,27 @@
 
 		};
 		
-		form.add(new TextField(msgInput, messageModel));
+		new TextField(form, msgInput, messageModel);
 
-		add(new Link(link)
+		new Link(this, link)
 		{
 			public void onClick()
 			{
 log.info(link clicked);
 message = Link clicked!;
 			}
-		});
+		};
 
-		add(form);
-		add(new Link(link2)
+		new Link(this, link2)
 		{
 
 			public void onClick()
 			{
 setResponsePage(new ExamplePortlet2(ExamplePortlet.this));
 			}
-		});
+		};
 
-		add(new Image(image,new ResourceReference(ExamplePortlet.class,wicket-logo.png)));
-
+		new Image(this, image,new ResourceReference(ExamplePortlet.class,wicket-logo.png));
 	}
 
 	private String message = [type your message to the world here];
Index: src/main/java/wicket/examples/portlet/ExamplePortlet2.java
===
--- src/main/java/wicket/examples/portlet/ExamplePortlet2.java	(revision 491085)
+++ src/main/java/wicket/examples/portlet/ExamplePortlet2.java	(working copy)
@@ -6,10 +6,9 @@
 
 import javax.portlet.PortletMode;
 import javax.portlet.WindowState;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import wicket.Page;
 import wicket.ajax.AjaxRequestTarget;
 import wicket.ajax.markup.html.AjaxLink;
@@ -25,7 +24,7 @@
  */
 public class ExamplePortlet2 extends PortletPage
 {
-	private static final Log log = LogFactory.getLog(ExamplePortlet.class);
+	private static final Logger log = LoggerFactory.getLogger(ExamplePortlet2.class);
 
 	long counter = 0;
 
@@ -42,16 +41,16 @@
 	 */
 	public ExamplePortlet2(final Page page)
 	{
-		add(new Link(link)
+		new Link(this, link)
 		{
 			public void onClick()
 			{
 setResponsePage(page);
 			}
-		});
-		add(new Label(windowState, new PropertyModel(this, windowState)));
-		add(new Label(portletMode, new PropertyModel(this, portletMode)));
-		add(new Image(image, new RenderedDynamicImageResource(100, 100)
+		};
+		new Label(this, windowState, new PropertyModel(this, windowState));
+		new Label(this, portletMode, new PropertyModel(this, portletMode));
+		new Image(this, image, new RenderedDynamicImageResource(100, 100)
 		{
 			protected boolean render(Graphics2D graphics)
 			{
@@ -67,20 +66,19 @@
 graphics.drawOval(x, y, dx, dy);
 return true;
 			}
-		}));
+		});
 
-		final Label counterValue = new Label(counter,
+		final Label counterValue = new Label(this, counter,
 new PropertyModel(this, counter));
 		counterValue.setOutputMarkupId(true);
-		add(counterValue);
-		add(new AjaxLink(counterLink)
+		new AjaxLink(this, counterLink)
 		{
 			public void onClick(AjaxRequestTarget target)
 			{
 counter++;
 target.addComponent(counterValue);
 			}
-		});
+		};
 	}
 
 	protected void onSetWindowState(WindowState state)
Index: pom.xml
===
--- pom.xml	(revision 491085)
+++ pom.xml	(working copy)
@@ -22,24 +22,20 @@
 	xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd;
 
 	

Re: [Wicket-user] Patch to compile wicket-portlet-examples-1.3 for wicket 2.0

2006-12-29 Thread Gustavo Hexsel
I'll try to get it to actually run (not only compile), then I'll submit :)


On 12/29/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
 thanks, could you please attach it to a jira issue - there is the checkbox
 you need to check in when making an attachment in jira that specifies the
 code is asl compliant

 -igor



  On 12/29/06, Gustavo Hexsel [EMAIL PROTECTED] wrote:
 
Hi there,
 
I've noticed that the 2.0 repository didn't have
  wicket-portlet-examples.  I'm sending a patch that enables
  wicket-portlet-examples in the 1.x branch to compile under Wicket2.0.
  If anyone feels like adding the code to the branch (I don't have
  commit rights), feel free to use/modify the patch as sees fit.
 
   []s Gus
 
 
 
 -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
  opinions on IT  business topics through brief surveys - and earn cash
 
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 


 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV

 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Suggestions/Questions on the Portlet code

2006-11-15 Thread Gustavo Hexsel
  Why is the creation of a PortletApplication done in the
WicketPortlet, instead of the WicketPortletServlet?  It seems to me
that, more likely than not, if the application contains more than one
portlet, they'll end up sharing the session (they need to if there's
inter-portlet communication).  Was this done for a specific reason?

  On the same lines, why does WicketPortletServlet extend
WicketServlet?  Do they actually share executable code?  I tried
putting some breakpoints in WicketServlet but they didn't seem to
trigger, while breakpoints on WicketPortlet did.

  If there's no reason for the current inheritance setup, may I
suggest some changes?
- WicketPortletServlet could instantiate the PortletApplication (since
the app is shared amongst all Portlets)
- WicketPortlet could reference the home PortletPage instead of the
PortletApplication

[]s Gus

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Multi-portlet app?

2006-11-14 Thread Gustavo Hexsel
Actually, this doesn't seem to work at all.  When I put 2 portlets
(just copied  pasted from the Wicket example, and changed the
wicket:ids so they wouldn't conflict), the second one is expired
whenever I click on anything on it.  Any hints on what I should be
trying to improve in Wicket or the example for this?

[]s Gus



On 11/13/06, Gustavo Hexsel [EMAIL PROTECTED] wrote:
   Hi folks,

   I was taking a look at Wicket's support for Portlets, and after a
 bit of a struggle (mostly caused by Liferay, Ubuntu, MySQL and
 Tomcat), I got the examples working.

   Then I got curious and tried to set the app to have 2 portlets that
 communicate, but I'm a little lost.  Is it even possible?  The
 javadocs seem to indicate that there should be one application per
 portlet declaration, which seems conceptually wrong to me (should be
 one Portlet instead).  Each PortletApplication seems to be a factory
 for a session.  Will they both get called?  Any recommended way of
 sharing the session for communication purposes?

   Hm... Guess I'll try that and post the results in case someone else
 is curious. :)

 []s Gus


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Multi-portlet app?

2006-11-14 Thread Gustavo Hexsel
  Hm, I don't yet fully understand the framework, yet what seems to be
happening is that when the page is generated, each portlet is rendered
once.  Same happens when I submit the form in one of the portlets.
However, when I submit a form on one, then after a refresh submit the
other, I get 3 rendering phases, 2 for the portlet that was last
clicked.

  I'm trying to generate a simple test case to illustrate this.

 []s Gus



On 11/14/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
 janne is the portlet guy, are you reading with us?

 -igor



 On 11/14/06, Gustavo Hexsel [EMAIL PROTECTED]  wrote:
 
  Actually, this doesn't seem to work at all.  When I put 2 portlets
  (just copied  pasted from the Wicket example, and changed the
  wicket:ids so they wouldn't conflict), the second one is expired
  whenever I click on anything on it.  Any hints on what I should be
  trying to improve in Wicket or the example for this?
 
  []s Gus
 
 
 
  On 11/13/06, Gustavo Hexsel [EMAIL PROTECTED] wrote:
 Hi folks,
  
 I was taking a look at Wicket's support for Portlets, and after a
   bit of a struggle (mostly caused by Liferay, Ubuntu, MySQL and
   Tomcat), I got the examples working.
  
 Then I got curious and tried to set the app to have 2 portlets that
   communicate, but I'm a little lost.  Is it even possible?  The
   javadocs seem to indicate that there should be one application per
   portlet declaration, which seems conceptually wrong to me (should be
   one Portlet instead).  Each PortletApplication seems to be a factory
   for a session.  Will they both get called?  Any recommended way of
   sharing the session for communication purposes?
  
 Hm... Guess I'll try that and post the results in case someone else
   is curious. :)
  
   []s Gus
  
 
 
 -
  Using Tomcat but need to do more? Need to support web services, security?
  Get stuff done quickly with pre-integrated technology to make your job
 easier
  Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 -
 SF.net email is sponsored by: A Better Job is Waiting for You - Find it Now.
 Check out Slashdot's new job board. Browse through tons of technical jobs
 posted by companies looking to hire people just like you.
 http://jobs.slashdot.org/

 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Multi-portlet app?

2006-11-14 Thread Gustavo Hexsel

On 11/14/06, Gustavo Hexsel [EMAIL PROTECTED] wrote:

  Here's an example.  I've removed the lib folder to make the size
manageable (I was only using commons-logging, log4j and yesterday's
snapshot of Wicket Core).

  It all works as long as you don't submit both forms in the same
session, then the second one always fails.

 []s Gus



On 11/14/06, Gustavo Hexsel [EMAIL PROTECTED] wrote:
   Hm, I don't yet fully understand the framework, yet what seems to be
 happening is that when the page is generated, each portlet is rendered
 once.  Same happens when I submit the form in one of the portlets.
 However, when I submit a form on one, then after a refresh submit the
 other, I get 3 rendering phases, 2 for the portlet that was last
 clicked.

   I'm trying to generate a simple test case to illustrate this.

  []s Gus



 On 11/14/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
  janne is the portlet guy, are you reading with us?
 
  -igor
 
 
 
  On 11/14/06, Gustavo Hexsel [EMAIL PROTECTED]  wrote:
  
   Actually, this doesn't seem to work at all.  When I put 2 portlets
   (just copied  pasted from the Wicket example, and changed the
   wicket:ids so they wouldn't conflict), the second one is expired
   whenever I click on anything on it.  Any hints on what I should be
   trying to improve in Wicket or the example for this?
  
   []s Gus
  
  
  
   On 11/13/06, Gustavo Hexsel [EMAIL PROTECTED] wrote:
  Hi folks,
   
  I was taking a look at Wicket's support for Portlets, and after a
bit of a struggle (mostly caused by Liferay, Ubuntu, MySQL and
Tomcat), I got the examples working.
   
  Then I got curious and tried to set the app to have 2 portlets that
communicate, but I'm a little lost.  Is it even possible?  The
javadocs seem to indicate that there should be one application per
portlet declaration, which seems conceptually wrong to me (should be
one Portlet instead).  Each PortletApplication seems to be a factory
for a session.  Will they both get called?  Any recommended way of
sharing the session for communication purposes?
   
  Hm... Guess I'll try that and post the results in case someone else
is curious. :)
   
[]s Gus
   
  
  
  -
   Using Tomcat but need to do more? Need to support web services, security?
   Get stuff done quickly with pre-integrated technology to make your job
  easier
   Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
  
  http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
  -
  SF.net email is sponsored by: A Better Job is Waiting for You - Find it Now.
  Check out Slashdot's new job board. Browse through tons of technical jobs
  posted by companies looking to hire people just like you.
  http://jobs.slashdot.org/
 
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 






tester.renametozipplz
Description: Binary data
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Multi-portlet app?

2006-11-13 Thread Gustavo Hexsel
  Hi folks,

  I was taking a look at Wicket's support for Portlets, and after a
bit of a struggle (mostly caused by Liferay, Ubuntu, MySQL and
Tomcat), I got the examples working.

  Then I got curious and tried to set the app to have 2 portlets that
communicate, but I'm a little lost.  Is it even possible?  The
javadocs seem to indicate that there should be one application per
portlet declaration, which seems conceptually wrong to me (should be
one Portlet instead).  Each PortletApplication seems to be a factory
for a session.  Will they both get called?  Any recommended way of
sharing the session for communication purposes?

  Hm... Guess I'll try that and post the results in case someone else
is curious. :)

[]s Gus

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Null and NullValid

2006-04-19 Thread Gustavo Hexsel
  Still on the properties suffixes saga:

  The process for determining suffixes 'null' and 'nullValid' seems to have 
changed.  Until 1.2b3, the loader would try to load the component name (without 
the hierarchy) followed by 'null'.  For instance, for my list component, named 
site, that contains dropdownchoices, the properties name for the null value 
was:

site.null=Please select a site

  On 1.2rc1, the process seems to be using the hierarchy, which causes the 
prefix to include the listitem index.  I've stepped through the code, and it 
seems to be looking for:

form.authenticationPanel.loginType.passwordSupportedDiv.siteLoginList.0.site.nullValid

  which is impossible to use as I have a variable number of entries on the 
page.  Is there a work-around?

  Also, is there a compelling reason for have 'null' and 'nullValid' suffixes?  
It broke a bunch of pages for a corner-case which I can't even imagine (same 
component being mandatory sometimes and sometimes not, and needing different 
messages on each case???).

  []s Gus


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Null and NullValid

2006-04-19 Thread Gustavo Hexsel
  It seems to be only looking for nullValid or {full hierarchy}.nullValid.

  []s Gus





DEBUG| wicket.resource.loader.AbstractStringResourceLoader - Try to load 
resource from: 
com.sagebrush.pinpoint.administration.source.BaseEditSourcePage:en_US; key: 
nullValid

DEBUG| wicket.resource.loader.AbstractStringResourceLoader - Try to load 
resource from: 
com.sagebrush.pinpoint.administration.source.BaseEditSourcePage:en_US; key: 
form.authenticationPanel.loginType.passwordSupportedDiv.siteLoginList.0.site.nullValid

INFO | wicket.resource.PropertiesFactory - Loading properties files from 
file:/C:/development/projects/Pinpoint-1.5/oberon/Admin/exploded/WEB-INF/classes/com/sagebrush/pinpoint/administration/source/SourceLoginPanel.properties

DEBUG| wicket.resource.loader.AbstractStringResourceLoader - Try to load 
resource from: 
com.sagebrush.pinpoint.administration.source.SourceLoginPanel:en_US; key: 
nullValid

DEBUG| wicket.resource.loader.AbstractStringResourceLoader - Found resource 
from: com.sagebrush.pinpoint.administration.source.SourceLoginPanel:en_US; key: 
nullValid

DEBUG| wicket.resource.loader.AbstractStringResourceLoader - Try to load 
resource from: 
com.sagebrush.pinpoint.administration.source.BaseEditSourcePage:en_US; key: 
nullValid

DEBUG| wicket.resource.loader.AbstractStringResourceLoader - Try to load 
resource from: 
com.sagebrush.pinpoint.administration.source.BaseEditSourcePage:en_US; key: 
form.authenticationPanel.loginType.passwordSupportedDiv.siteLoginList.1.site.nullValid
...

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Juergen
Donnerstag
Sent: April 19, 2006 10:16 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Null and NullValid


wicket does a whole lot more than that. Add
log4j.logger.wicket.resource.loader=DEBUG
log4j.logger.wicket.Localizer=DEBUG
to your log4j.properties to get information on the resolution process.
The javadoc on AbstractStringResourceLoader and an article in the wiki
describe the process as well

Juergen

On 4/19/06, Gustavo Hexsel [EMAIL PROTECTED] wrote:
  Still on the properties suffixes saga:

  The process for determining suffixes 'null' and 'nullValid' seems to have 
 changed.  Until 1.2b3, the loader would try to load the component name 
 (without the hierarchy) followed by 'null'.  For instance, for my list 
 component, named site, that contains dropdownchoices, the properties name 
 for the null value was:

 site.null=Please select a site

  On 1.2rc1, the process seems to be using the hierarchy, which causes the 
 prefix to include the listitem index.  I've stepped through the code, and it 
 seems to be looking for:

 form.authenticationPanel.loginType.passwordSupportedDiv.siteLoginList.0.site.nullValid

  which is impossible to use as I have a variable number of entries on the 
 page.  Is there a work-around?

  Also, is there a compelling reason for have 'null' and 'nullValid' suffixes? 
  It broke a bunch of pages for a corner-case which I can't even imagine (same 
 component being mandatory sometimes and sometimes not, and needing different 
 messages on each case???).

  []s Gus


 ---
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Wicket 1.2-rc1 available for download

2006-04-17 Thread Gustavo Hexsel
  Argh, my tests don't run anymore.  Is there a place where I can find the 
detailed changelog between 1.2b3 to 1.2rc1?

  []s Gus



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Martijn Dashorst
Sent: April 17, 2006 2:41 PM
To: Wicket User
Subject: [Wicket-user] Wicket 1.2-rc1 available for download


The first release candidate of the 1.2 version of Wicket and its subprojects is 
available for download.

You can download the release here:


http://sourceforge.net/project/showfiles.php?group_id=119783


Available in this release are:
 o wicket
 o wicket-extensions
 o wicket-examples
 o wicket-auth-roles
 o wicket-auth-roles-examples 
 o wicket-spring
 o wicket-spring-examples
 o wicket-spring-annot
 o wicket-spring-annot-examples
 o wicket-quickstart

This release has several fixes on the beta3 release, so it is highly 
recommended to update your current development to rc1. 

With this release we are finally in the end game for 1.2. We hope to move 
quickly with these releases, so please consider upgrading and help test the 
final stages. We don't expect major and minor changes in the API's, as such 
subsequent releases should be a drop in replacement (we do keep the possibility 
open that a bug might require us to break this promise). 

Martijn

-- 
Wicket 1.2 is coming! Write Ajax applications without touching JavaScript!
-- http://wicketframework.org 


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Wicket 1.2-rc1 available for download

2006-04-17 Thread Gustavo Hexsel
  Also, a suggestion: the licenses for ognl and echo2 are still being shipped, 
although the jars were already removed.

  []s Gus



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Martijn Dashorst
Sent: April 17, 2006 2:41 PM
To: Wicket User
Subject: [Wicket-user] Wicket 1.2-rc1 available for download


The first release candidate of the 1.2 version of Wicket and its subprojects is 
available for download.

You can download the release here:


http://sourceforge.net/project/showfiles.php?group_id=119783


Available in this release are:
 o wicket
 o wicket-extensions
 o wicket-examples
 o wicket-auth-roles
 o wicket-auth-roles-examples 
 o wicket-spring
 o wicket-spring-examples
 o wicket-spring-annot
 o wicket-spring-annot-examples
 o wicket-quickstart

This release has several fixes on the beta3 release, so it is highly 
recommended to update your current development to rc1. 

With this release we are finally in the end game for 1.2. We hope to move 
quickly with these releases, so please consider upgrading and help test the 
final stages. We don't expect major and minor changes in the API's, as such 
subsequent releases should be a drop in replacement (we do keep the possibility 
open that a bug might require us to break this promise). 

Martijn

-- 
Wicket 1.2 is coming! Write Ajax applications without touching JavaScript!
-- http://wicketframework.org 


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Wicket 1.2-rc1 available for download

2006-04-17 Thread Gustavo Hexsel
  No problem.  For some of them, I'm pretty sure I was misusing the API... 
that's why I asked what the differences were.  Here's a few problems I've found:

- WicketTester's init() method (which overrides the WebApplication's) wasn't 
being called upon creation.  Now it seems to be called.  I had an AppTester 
which extended WicketTester and did some init for some -but not all - tests. 
(my abuse #1)

- the property affix NumberValidator#RangeValidator became 
NumberValidator.range

- getExceptionSettings().setThrowExceptionOnMissingResource(true) seems to be 
ignored on WicketTester, which worsened the problem above

- TypeValidator is marked as deprecated, and the method 
FormComponent.setType(Class) is given as a replacement, but there's not 
indication on how to build the property affix.  Luckily, TypeValidator still 
seems to work for that one.

- I have a base form which gets inherited for specific behaviour.  The form 
itself has a method which runs complex validations and calls error(String) to 
set the form's error messages.  Those messages don't seem to be registering 
with the final page.  I'll try to create and submit a simpler test for this one.

  []s Gus



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Eelco
Hillenius
Sent: April 17, 2006 4:39 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Wicket 1.2-rc1 available for download


Hi Gustavo,

Sorry for the inconvenience. What kind of test cases are failing? If
you use jWebUnit tests, you probably should set

HttpUnitOptions.setExceptionsThrownOnScriptError(false);

as jWebUnit does not seem not recognize history as a valid javascript property.

Could you give more specifics please?

Eelco


On 4/17/06, Gustavo Hexsel [EMAIL PROTECTED] wrote:
   Argh, my tests don't run anymore.  Is there a place where I can find the 
 detailed changelog between 1.2b3 to 1.2rc1?

   []s Gus


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=kkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Wicket 1.2-rc1 available for download

2006-04-17 Thread Gustavo Hexsel
  Actually, the last problem was (base form not being validated) turned out to 
be a problem with my contribution: 
- I have a Button in the form, so I should be calling the submit(buttonId) 
instead of just submit(), else it calls the Form.submit() method instead.

  WicketTester behaves similarly but not exactly like the real WebApplication, 
in regard to forms.

  []s Gus


-Original Message-
From: Gustavo Hexsel 
Sent: April 17, 2006 5:03 PM
To: 'wicket-user@lists.sourceforge.net'
Subject: RE: [Wicket-user] Wicket 1.2-rc1 available for download


  No problem.  For some of them, I'm pretty sure I was misusing the API... 
that's why I asked what the differences were.  Here's a few problems I've found:

- WicketTester's init() method (which overrides the WebApplication's) wasn't 
being called upon creation.  Now it seems to be called.  I had an AppTester 
which extended WicketTester and did some init for some -but not all - tests. 
(my abuse #1)

- the property affix NumberValidator#RangeValidator became 
NumberValidator.range

- getExceptionSettings().setThrowExceptionOnMissingResource(true) seems to be 
ignored on WicketTester, which worsened the problem above

- TypeValidator is marked as deprecated, and the method 
FormComponent.setType(Class) is given as a replacement, but there's not 
indication on how to build the property affix.  Luckily, TypeValidator still 
seems to work for that one.

- I have a base form which gets inherited for specific behaviour.  The form 
itself has a method which runs complex validations and calls error(String) to 
set the form's error messages.  Those messages don't seem to be registering 
with the final page.  I'll try to create and submit a simpler test for this one.

  []s Gus



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Eelco
Hillenius
Sent: April 17, 2006 4:39 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Wicket 1.2-rc1 available for download


Hi Gustavo,

Sorry for the inconvenience. What kind of test cases are failing? If
you use jWebUnit tests, you probably should set

HttpUnitOptions.setExceptionsThrownOnScriptError(false);

as jWebUnit does not seem not recognize history as a valid javascript property.

Could you give more specifics please?

Eelco


On 4/17/06, Gustavo Hexsel [EMAIL PROTECTED] wrote:
   Argh, my tests don't run anymore.  Is there a place where I can find the 
 detailed changelog between 1.2b3 to 1.2rc1?

   []s Gus


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=kkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Download after post broken in 1.2

2006-04-12 Thread Gustavo Hexsel
  Hi there,

  I used to have a download-after-submit, following an email I saw a while ago. 
 It used a construct like this:
final WebResponse response = 
(WebResponse)getRequestCycle().getResponse();
response.setContentType(text/csv);
response.setHeader(Content-Disposition, filename=\+ filename + 
\);
response.write(reportData);
getRequestCycle().setResponsePage((WebPage)null);

  This seems to be not possible in 1.2 beta 3 (complains that the argument page 
cannot be null).  Is there a work-around for this?  Was this formalized in some 
other way?  I tried looking at the Migration to 1.2 guidelines, but didn't see 
anything that matched.

  Thanks,


[]s Gus


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Download after post broken in 1.2

2006-04-12 Thread Gustavo Hexsel
  Nevermind, I found the answer I was looking for
http://sourceforge.net/mailarchive/message.php?msg_id=15192574

  Sorry about the repeated questions, lots have changed between 1.1.1 and 1.2 
and Sourceforge's mail list search has gotten worse over the last 4 months or 
so... can't reorder the list by posting date anymore.

  []s Gus




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Gustavo
Hexsel
Sent: April 12, 2006 11:22 AM
To: wicket-user@lists.sourceforge.net
Subject: [Wicket-user] Download after post broken in 1.2


  Hi there,

  I used to have a download-after-submit, following an email I saw a while ago. 
 It used a construct like this:
final WebResponse response = 
(WebResponse)getRequestCycle().getResponse();
response.setContentType(text/csv);
response.setHeader(Content-Disposition, filename=\+ filename + 
\);
response.write(reportData);
getRequestCycle().setResponsePage((WebPage)null);

  This seems to be not possible in 1.2 beta 3 (complains that the argument page 
cannot be null).  Is there a work-around for this?  Was this formalized in some 
other way?  I tried looking at the Migration to 1.2 guidelines, but didn't see 
anything that matched.

  Thanks,


[]s Gus


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=kkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] RE: WicketTester and checkAccess redirections

2006-04-11 Thread Gustavo Hexsel
  Juergen gave me some pointers and I decided to try migrating to 1.2.  I have 
to say things are quite a bit more complicated now...  how do I get access to 
the request from an AuthorizationStrategy?  I need to check if the request's IP 
is within a pre-configured range.  Before, I was doing this on checkAccess():

final ServletWebRequest servletWebRequest = (ServletWebRequest) 
getRequest();
final HttpServletRequest request = 
servletWebRequest.getHttpServletRequest();
final String clientIP = request.getRemoteAddr();
boolean isOffSiteIP = 
ConfigurationService.getInstance().isOffSiteIP(clientIP);
boolean isOffSiteAllowed = 
ConfigurationService.getInstance().load().isOffSiteAccessEnabled().booleanValue();

if(isOffSiteIP  !isOffSiteAllowed){
... redirect to appropriate warning page
}

[]s Gus



-Original Message-
From: Gustavo Hexsel 
Sent: April 10, 2006 6:10 PM
To: 'wicket-user@lists.sourceforge.net'
Subject: WicketTester and checkAccess redirections


  Hi,

  I'm using Wicket 1.1.1 and trying to get my first WicketTester to work with 
the current app.  I can't seem to get the redirectToInterceptPage(Page) method 
to actually redirect to the page.  It works fine from Tomcat and Jetty, but the 
WicketTester seems to ignore the call (though I stepped into it and saw it was 
actually called).

  Is this the expected behaviour?  If so, how do you test the interceptions?


[]s Gus


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Re: zero session state/stateless pages

2006-04-11 Thread Gustavo Hexsel
  Mine is also not adding the session to the URL.  Isn't this automatically 
handled by the servlet engine (tomcat or jetty) without wicket or programmer 
intervention?  That's probably why some of us don't see it... browser brand and 
version versus servlet engine version.

  []s Gus


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: April 11, 2006 3:34 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Re: zero session state/stateless pages



Off the top of my head, because you are likely using an older version
of Wicket where we did not encode the URL. I believe that was a bug ;)
The most current version always encodes the URL. Remember, if you do not
encode the URL, you risk losing the session without warning.

Gili

Michael Day wrote:
 Wicket is not adding jsessionid to my URLs.  I have a simple page called
 Home that contains a BookmarkablePageLink to Page2, but the URL for
 Page2 does not get jsessionid appended to the URL on the first hit, even
 with cookies disabled.  Why is this?
 
 Michael Day
 
 On Apr 11, 2006, at 5:11 PM, Johan Compagner wrote:
 
 but it is up to wicket.
 We do call response.encodeUrl if we don't do that then jsessionid is
 not inserted into the url.

 But if we don't do that then sessions could be lost when a browser has
 cookies disabled..

 johan


 On 4/11/06, Nathan Hamblen [EMAIL PROTECTED] wrote: Michael Day
 wrote:
  If not, then wicket cannot be used for public web sites (news,
  online store, etc) that need to be indexed in today's search engines.

 Johan Compagner wrote:
  If you want a really stateless page/site. Then everything must be
  bookmarkable/mountable links..and you can't use our
  form components
 [...]

 Yes. Ample bookmarkable links are all you need for good indexing. Try
 googling British Lemon Meringue Pie and see that the second result is
 in fact a Wicket demo application.

 I wouldn't worry about forms too much since Google doesn't follow them
 anyway. As long as you can get to the content through bookmarkable
 links, it will be indexed. The fact that a session always exists is
 irrelevant and entirely normal. (Even ASP 3.0 created a session on the
 very first hit.)

 My only wish is to get rid of that silly ;jsessionid=66kiemewvs53 but I
 don't think that's up to Wicket.

 Nathan



 ---
 This SF.Net email is sponsored by xPML, a groundbreaking scripting
 language
 that extends applications into web and mobile media. Attend the live
 webcast
 and join the prime developer group breaking into this new coding
 territory!
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 
 
 
 ---
 This SF.Net email is sponsored by xPML, a groundbreaking scripting language
 that extends applications into web and mobile media. Attend the live
 webcast
 and join the prime developer group breaking into this new coding territory!
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Testing attribute modifiers

2006-04-11 Thread Gustavo Hexsel
  Is there a way to test the final result of an attribute modifier?  I'm using 
them to set the src attribute of some img tags, set parameters on certain 
javascript functions, etc.  But I haven't seen any example of how to validate 
if it's working correctly.

  Thanks!

[]s Gus


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] WicketTester and checkAccess redirections

2006-04-10 Thread Gustavo Hexsel
  Hi,

  I'm using Wicket 1.1.1 and trying to get my first WicketTester to work with 
the current app.  I can't seem to get the redirectToInterceptPage(Page) method 
to actually redirect to the page.  It works fine from Tomcat and Jetty, but the 
WicketTester seems to ignore the call (though I stepped into it and saw it was 
actually called).

  Is this the expected behaviour?  If so, how do you test the interceptions?


[]s Gus


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Default button when hitting Enter

2006-02-09 Thread Gustavo Hexsel
  Hi Igor,

  thanks a lot for the suggestions.  I've tried creating very simple 
specialized panels that behaved as the submit buttons and a submit button 
group.

  I'm attaching the code for anyone curious or desperate enough.  I don't know 
enough of how to make proper wicket components, so this probably breaks a 
hundred wicket design rules - but it solves my problem.  Feel free to fix, 
modify, add, or reuse in any manner.  Things I know are bad:
- you can only have one form (damn JS)
- you cannot have a field with an id of submittedButton (ditto for JS)
- you can only have one SubmitButtonGroup
- get/setButtonId shouldn't be public, or some other model type should be used
- no docs, no tests (ARGH there goes test first down the drain :)

  To use it, just include a span element for each of the buttons, and one for 
the button group.  In the Java code, add something like this to the form:
private void addButtons() {
group = new SubmitButtonGroup(buttonGroup);
final SubmitButton searchButton = new 
SubmitButton(searchButton, Search, group);
add(searchButton);
add(new SubmitButton(browseButton, Browse, group));

group.setDefaultButton(searchButton);
add(group);
}

protected void onSubmit() {
if (searchButton.equals(group.getButtonId())) {
search();
} else if (browseButton.equals(group.getButtonId())) {
browse();
} else {
logger.error(Unexpected submit);
}
}

  []s Gus



-- Início da mensagem original ---

  De: [EMAIL PROTECTED]
Para: wicket-user@lists.sourceforge.net
  Cc:
Data: Wed, 8 Feb 2006 20:28:31 -0800
 Assunto: Re: [Wicket-user] Default button when hitting Enter

 i believe this is actually how all browsers/html work. the first button in
 the form is always the default one. it sucks, you just have to learn to work
 around it.

 a while back i really needed this to work properly. so what i did was use
 javascript.

 add a hidden input to the form and initialize it with the name of the
 default button.

 then each button becomes type=button instead of type=submit and onclick
 you do something like onclick=this.form.tracker=this.name; this.form.submit
 ;

 that way your hidden input always contains the name of the button clicked,
 or default one if form was submitted using enter.

 another thing to try is to set taborder on the form controls, maybe that way
 the button with lowest tab order becomes the default, but i havent tried it
 and dont know if its cross browser.

 i suppose we could design a javascript system like above for wicket. if you
 are willing to put in the time to do it i would be willing to help.

 -Igor


 On 2/8/06, Gustavo Hexsel [EMAIL PROTECTED] wrote:
 
Hi all,
 
is there a way of setting which one is the default button when hitting
  Enter on a form?  I've tried looking for Wicket or Javascript solutions, I
  can't seem to find something that will post the correct button on the form -
  it's always the first one in the markup.
 
The closest I've got was:
  --
  function submitEnter(myfield,e) {
  var keycode;
  if (window.event) {
  keycode = window.event.keyCode;
  } else if (e) {
  keycode = e.which;
  } else {
  return true;
  }
  if (keycode == 13) {
  document.forms['searchForm'].searchButton.click();
  return false;
  } else {
  return true;
  }
  }
  ...
  button wicket:id=browseButton type=submitBrowse/button
  ...
  input wicket:id=searchTerm maxlength=100 size=45 type=text
  onKeyUp=return submitEnter(this, event); /
  ...
  button wicket:id=searchButton type=submit
  id=searchButtonSearch/button
  ...
  ---
 
I've tried both button and input type=submit, both with the same
  result.  Wicket still reports the post as being done from the other
  button.  Below is the page's code that deals with the buttons:
  add(new Button(searchButton) {
  protected void onSubmit() {
  search();
  }
  });
  add(new Button(browseButton) {
  protected void onSubmit() {
  browse();
  }
  });
 
From there, I just have a log that prints info that came from the form
  (which seems to have been updated correctly).
 
I'm using Firefox 1.5, Wicket 1.1.
 
Are there any obvious mistakes?  Is there a way to do this?  I could
  resort to using Javascript to manipulate some hidden

[Wicket-user] Default button when hitting Enter

2006-02-08 Thread Gustavo Hexsel
  Hi all,

  is there a way of setting which one is the default button when hitting Enter 
on a form?  I've tried looking for Wicket or Javascript solutions, I can't seem 
to find something that will post the correct button on the form - it's always 
the first one in the markup.

  The closest I've got was:
--
function submitEnter(myfield,e) {
var keycode;
if (window.event) {
keycode = window.event.keyCode;
} else if (e) {
keycode = e.which;
} else {
return true;
}
if (keycode == 13) {
document.forms['searchForm'].searchButton.click();
return false;
} else {
return true;
}
}
...
button wicket:id=browseButton type=submitBrowse/button
...
input wicket:id=searchTerm maxlength=100 size=45 type=text 
onKeyUp=return submitEnter(this, event); /
...
button wicket:id=searchButton type=submit 
id=searchButtonSearch/button
...
---

  I've tried both button and input type=submit, both with the same 
result.  Wicket still reports the post as being done from the other button.  
Below is the page's code that deals with the buttons:
add(new Button(searchButton) {
protected void onSubmit() {
search();
}
});
add(new Button(browseButton) {
protected void onSubmit() {
browse();
}
});

  From there, I just have a log that prints info that came from the form (which 
seems to have been updated correctly).

  I'm using Firefox 1.5, Wicket 1.1.

  Are there any obvious mistakes?  Is there a way to do this?  I could resort 
to using Javascript to manipulate some hidden input...

  Thanks!

  []s Gus





---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Replacing nested panels in a form

2005-12-08 Thread Gustavo Hexsel
  Hi folks,

  I have a nested panel inside of a form that gets replaced based on the 
selection of a combo box.

  The problem is that when I change the value on the combobox (by selecting 
another value on the web form), the values on other form components (that ones 
not on the nested panel) get erased, and I get validation errors on all 
submits, as if values were all empty.  It looks like the model might be lost 
somewhere.

  I'm using a CompoundPropertyModel, and setting it only on the form itself.

  It seems to work when I set individual PropertyModels for all components in 
the nested Panel (but not if I set CompoundPropertyModels), which is a good 
workaround but took me a while to figure out.

  Is this expected?  I was expecting to be able to set a CompoundPropertyModel 
on the nested panel, or not have to set a model at all (and it would use the 
parent's - the form's).

  []s Gus




---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37alloc_id865op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] IOnChangeListener (DropDownChioce... etc) support preserve form state ?

2005-12-08 Thread Gustavo Hexsel
  Ops, nevermind, I found the answer to my question here.

  []s Gus



-- Início da mensagem original ---

  De: [EMAIL PROTECTED]
Para: wicket-user@lists.sourceforge.net
  Cc:
Data: Thu, 8 Dec 2005 09:26:03 +0100
 Assunto: Re: [Wicket-user] IOnChangeListener (DropDownChioce... etc) support 
preserve form state ?

 In the current 1.2 head stream this is already working.

 If you use there a DropDown it will preserve youre formstate.

 johan


 On 12/8/05, Ingram Chen [EMAIL PROTECTED] wrote:
 
  Hi all,
 
  Several weeks ago, there are some discussion on perserving form state
  via
  an internal method registerNewUserInput() of FormComponent. This works
  for Form calling onSubmit or using Button. But it seems that
  onSelectionChanged()
  of IOnChangeListener still does not support this feature.
  Is there any plan to support this ? If not, is there any way to perserve
  form state when
  onSelectionChanged() is called ?
 
  Thanks in advance.
 
  --
  Ingram Chen
  Java [EMAIL PROTECTED]
  Institue of BioMedical Sciences Academia Sinica Taiwan
  blog: http://www.javaworld.com.tw/roller/page/ingramchen




---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37alloc_id865op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Best use of Links

2005-11-18 Thread Gustavo Hexsel
  Hi all,

  I wanted to know what's the best way to use Links (PageLinks, 
BookmarkablePageLinks).

  In the beginning, I was using BookmarkablePageLink's and converting 
everything to and from Strings.  That obviously was flawed, as I was using 
string names and passing them back and forth (lost strong-typing, occasionally 
forgot one parameter, or mistyped the name of it).  It also made me reload 
objects from the database even though I had them handy on the calling class.

  Then I tried using PageLink's, passing a new XXXPage(whateverparameter) in 
the constructor.  That didn't work either, as pages have links back and forth, 
leading to stackoverflows.

  Then I moved one step up in the object hierarchy and started using Link's, 
but it seems such red tape for each link having to write:
add(new Link(cancelLink) {
public void onClick() { setResponsePage(new 
EditProviderPage(provider)); };
});

  Any suggestions?


   []s Gus






---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re:[Wicket-user] Spring Integration

2005-07-11 Thread Gustavo Hexsel
  One possible way would be to have a parent page class that would hold it, and 
customize your page factory to set it in all created pages.  It's pretty easy.  
Let me know if you can't picture it and I'll try to write a sample code.

  I use dependency injection in most of my pages and unfortunately, it doesn't 
look nearly as pretty as I wanted it to.  Most Wicket examples favour service 
locator instead... I guess you might find yourself in the same boat.

  []s Gus


-- Início da mensagem original ---

  De: [EMAIL PROTECTED]
Para: wicket-user@lists.sourceforge.net
  Cc:
Data: Mon, 11 Jul 2005 11:16:47 -0500
 Assunto: [Wicket-user] Spring Integration

 Hi,

 I'm looking into Wicket and would like to know what the preferred
 method of integrating Wicket with Spring.  I'll need access to the
 bean factory in the page classes.  I checked the wiki and didn't see
 anything.  Thanks for the help.

 -Nick


 ---
 This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
 July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
 core and dual graphics technology at this free one hour event hosted by HP,
 AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
__
UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia. 
http://www.uol.com.br/fone




---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Spring Integration

2005-07-11 Thread Gustavo Hexsel
  That's not exactly dependency injection.  Ideally, Spring should be the 
page factory, so it creates the pages and sets the dependencies for you.  I'm 
sorry Phil, I know this is not perfect from the serialization point of view, 
but the pages are the controllers for this app, they need to know the services 
that model the system as well as the interface that displays it.  As I said, 
Wicket works better for service locators than for dep inj.

  A page that lists all customers should have an instance of a service that 
list the customers...

  []s Gus


-- Início da mensagem original ---

  De: [EMAIL PROTECTED]
Para: wicket-user@lists.sourceforge.net
  Cc:
Data: Mon, 11 Jul 2005 12:46:31 -0500
 Assunto: Re: [Wicket-user] Spring Integration

 Here's how I'm approaching it now:

 public class MyApplication extends WebApplication {

 private XmlBeanFactory beans;

 public MyApplication() {
 ClassPathResource res = new 
 ClassPathResource(applicationContext.xml);
 beans = new XmlBeanFactory(res);
 }

 public Object getBean(String name) {
 return beans.getBean(name);
 }

 }

 And I'll just reference it from my Page classes using
 getApplication().getBean(...).



 On 7/11/05, Phil Kulak [EMAIL PROTECTED] wrote:
  Holding the beans in the pages is not a good idea. I did this for a
  bit, but the pages are serialized and your app-context beans aren't.
  So then you have to make your app-context beans serializable, which
  defeats the point of having an app context.
 
  -Phil
 
  On 7/11/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
   What would you need to make it pretty? If you have concrete idea's on
   how we can improve Wicket for this, please share them.
  
   Eelco
  
   Gustavo Hexsel wrote:
  
 One possible way would be to have a parent page class that would hold 
it, and customize your page factory to set it in all created pages.  
It's pretty easy.  Let me know if you can't picture it and I'll try to 
write a sample code.
   
 I use dependency injection in most of my pages and unfortunately, it 
doesn't look nearly as pretty as I wanted it to.  Most Wicket examples 
favour service locator instead... I guess you might find yourself in 
the same boat.
   
 []s Gus
   
   
   -- Início da mensagem original ---
   
 De: [EMAIL PROTECTED]
   Para: wicket-user@lists.sourceforge.net
 Cc:
   Data: Mon, 11 Jul 2005 11:16:47 -0500
Assunto: [Wicket-user] Spring Integration
   
   
   
   Hi,
   
   I'm looking into Wicket and would like to know what the preferred
   method of integrating Wicket with Spring.  I'll need access to the
   bean factory in the page classes.  I checked the wiki and didn't see
   anything.  Thanks for the help.
   
   -Nick
   
   
   ---
   This SF.Net email is sponsored by the 'Do More With Dual!' webinar 
   happening
   July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
   core and dual graphics technology at this free one hour event hosted by 
   HP,
   AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
   
   
   __
   UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia.
   http://www.uol.com.br/fone
   
   
   
   
   ---
   This SF.Net email is sponsored by the 'Do More With Dual!' webinar 
   happening
   July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
   core and dual graphics technology at this free one hour event hosted by 
   HP,
   AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
  
  
  
   ---
   This SF.Net email is sponsored by the 'Do More With Dual!' webinar 
   happening
   July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
   core and dual graphics technology at this free one hour event hosted by 
   HP,
   AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
  ---
  This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
  July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
  core and dual graphics technology at this free

Re: [Wicket-user] Spring Integration

2005-07-11 Thread Gustavo Hexsel
  I don't want to open a big discussion on service locator vs dependency 
injection.  I know you guys are trying to accomodate as many points of view as 
possible.  I'll check if I can find something to help.  The point was that 
there are situations when dependency injection prevents problems with systems 
that grow too fast in complexity.  It all comes to people making assumptions 
that no longer hold, or just being plainly lazy.

  Our problem was that people tended to group many services into the same 
locator, which created code dependencies throughout the whole system (couldn't 
compile or move a piece of code to another project without a big refactoring).  
The interesting is that Martin Fowler makes the same suggestion on his 
website...  it was an assumption that code would never be reused in other 
projects so the dependency was not a big deal... oh well.

  Maybe the solution goes on the lines of using Spring to act as a factory for 
all components, and maybe have a default delegate (the normal Wicket classes) 
deal with it when Spring didn't know or didn't want to create a specific 
component.  Does this make sense at all?

  []s Gus

 
__
UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia.  
http://www.uol.com.br/fone




---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] database connections, connection pools, and wicket

2005-07-04 Thread Gustavo Hexsel
  Suggestion: use Spring's excellent JDBC framework.  It's simple (only a 
handful of classes you need to learn) and very helpful.  From what I saw at the 
JDBC 4.0 preview in JavaOne, it's got quite a bit in common with Spring.

  []s Gus


-- Início da mensagem original ---

  De: [EMAIL PROTECTED]
Para: wicket-user@lists.sourceforge.net
  Cc:
Data: Mon, 04 Jul 2005 20:10:47 +0200
 Assunto: Re: [Wicket-user] database connections, connection pools, and wicket

 There is no special support for that currently. I don't know whether
 many users directly use JDBC at all. My guess is that most people will 
 use ORMs (JDO, Hibernate, Cyenne, iBatis etc) or EJBs, and that
 connections will either be handled through those frameworks, or by using
 JNDI datasources, so that they can be configured with your application 
 server.

 If you want to do it yourself, there are lots of pooling
 implementations, like e.g. jakarta commons-dbcp (which you can use
 directly).

 Eelco


 Geertjan Wielenga wrote:

 
  Does anyone have any experience with making database connections --
  especially via connection pools -- with Wicket applications? Is there
  some special support for that?
 
  -- Gj
 
 
  ---
  SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
  from IBM. Find simple to follow Roadmaps, straightforward articles,
  informative Webcasts and more! Get everything you need to get up to
  speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user




 ---
 SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
 from IBM. Find simple to follow Roadmaps, straightforward articles,
 informative Webcasts and more! Get everything you need to get up to
 speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
__
UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia. 
http://www.uol.com.br/fone




---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Adding feedback to a List Item

2005-07-04 Thread Gustavo Hexsel
  Hi folks,

  I'm still playing around with per-field feedback.

  I have an object that contains another list of objects (think a Company with 
a list of editable Contacts).  In the Company page users can edit all the 
contacts if they want.  Each field in contact (name, email, phone) has a 
corresponding feedback component associated.  The fields from contact are being 
mapped correctly to and from the model.  The feedback fields are not.  Let me 
show the code.  I used a CustomValidator to be sure an error message was being 
added (it is).
---
This is the page:

tr wicket:id=contactstdtable width=100%
tr
td nowrapbContact Email: /b/td
td width=100%input wicket:id=email type=text //td
td nowrapspan wicket:id=emailFeedbacksample email error 
msg/span/td
/tr...
/tr

This is the corresponding form creation:

final List contacts = providerModel.getContacts();
final ListView listView = new ListView(contacts, contacts) {
public void populateItem(final ListItem listItem) {
addContact(listItem, permissions);
}
};
add(listView);
...
/* in the the addContact method */
final TextField field = new TextField(email, new PropertyModel(contact, 
email));
field.add(new CustomValidator() {
public void onValidate(String s) {
logger.debug(Validate:  + s);
if (s == null || s.length() == 0) {
field.error(Email cannot be empty);
}
}
});
listItem.add(field);
listItem.add(new DisplayOnError(emailFeedback, field));
-
The DisplayOnError component is an extension of Label that is visible if there 
is no error in the managed component (passed in the constructor).  The 
component works for the name of the company.  The problem with using it for 
contacts is that td nowrapspan wicket:id=emailFeedbacksample email error 
msg/span/td is never visible, even when I set the error flag in the managed 
field.

  Is the behaviour different for feedback on managed subfields on a form?


  []s Gus


 
__
UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia. 
http://www.uol.com.br/fone




---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Wiggling out of feedback panel

2005-06-24 Thread Gustavo Hexsel
  Well, this one is more for the records than to bug you guys asking questions. 
 I was trying to find a way to get out of the FeedbackPanel (I don't like the 
messages to be grouped, I don't like the messages to be ordered in a 
semi-random fashion - is it alphabetical? - , I don't like the fields not to 
have feedback where I want it, I don't like the layout, etc).  I've tried the 
FeedbackXXXBorder, but that only printed a red * and I didn't find how to set a 
message, or use the one the validators produced.

The solution I've used was to extends the Label component to display when there 
is an error:

public class DisplayOnError extends Label {
  private final Component componentToCheckForError;

  public DisplayOnError(String s, Component componentToCheckForError) {
super(s);
this.componentToCheckForError = componentToCheckForError;
  }

  @Override
  protected void onBeginRequest() {
if (componentToCheckForError.hasErrorMessage()) {
  setVisible(true);
  setModel(new 
Model(componentToCheckForError.getFeedbackMessage().getMessage()));
} else {
  setVisible(false);
}
  }
}

On my page's constructor:
  username = new TextField(username, new PropertyModel(login, username));
  add(username);
  add(new DisplayOnError(usernameFeedback, username));

I'm doing manual validation for now, but I suppose it would work with the 
validators.  One possible reason to use manual validation is to preempt 
messages - let's assume, for instance, that having no username is an error so 
important that I don't want to display that the password is not the same in 2 
fields, as the password fields get erased on submit anyway.  I have on my 
page's onSubmit():
  if (validate the retrieved model) {
username.error(error blahblahblah with the username);
  }

In the HTML:
tdinput wicket:id=username type=text value=sample_username 
size=20//td
tdspan wicket:id=usernameFeedbackSample Username error message/span/td


  []s Gus

 
__
UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia.  
http://www.uol.com.br/fone




---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Should Borders isolate the surrounding data from the inner content?

2005-06-24 Thread Gustavo Hexsel
  Can't use wicket:remove ... /wicket:remove, as I'd have to include the 
whole page, even html where the wicket namespace is defined.  Either that or 
break the XML tree structure by closing tags when inner tags are still open.

  []s Gus


-- Início da mensagem original ---

  De: [EMAIL PROTECTED]
Para: wicket-user@lists.sourceforge.net
  Cc:
Data: Fri, 24 Jun 2005 10:28:09 -0700
 Assunto: RE: [Wicket-user] Should Borders isolate the surrounding data from 
the inner content?

 Here is a quick and dirty walkthrough of how the border component works with
 your example:

 1) your page starts rendering:
 html xmlns:wicket=http://wicket.sourceforge.net/;
 body!-- from LoginPage.html --

 2) wicket encounters span wicket:id=border and resolves it to your
 border component

 3) border renders

 3.1) border ouputs its open tag
 span wicket:id=border

 3.2) border begins rendering its body by processing its template (notice
 everything before wicket:border and after /wicket:border is ignored
 head
  title wicket:id=pageTitlePage Title/title
  link wicket:id=urlContextAdder rel=stylesheet href=general.css
  type=text/css /
/head
body!-- from PCDBorder.html --

 3.3) wicket encounters wicket:body tag and renders border's body from the
 page template
 form wicket:id=loginForm
  ... a couple of fields, tables to align ...
  /form
  span wicket:id=feedback/

 3.4) wicket finishes rendering the border
 /span
  ... closing the tags ...
/body
  /wicket:border
 /html

 3.5) border is done rendering, the close tag is rendered
/span

 4) page continues its rendering after the border tag
 /body
 /html

 So if you do not want doulbe body tags do not include them in your page
 template, or if you want to be able to preview stuff surround them with
 wicket:remove ... /wicket:remove

 Hope this helps,
 Igor


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Hexsel
 Sent: Friday, June 24, 2005 10:17 AM
 To: wicket-user
 Subject: RE: [Wicket-user] Should Borders isolate the surrounding data from
 the inner content?

   No, I'm talking about the content around the border, for instance I'm
 getting 2 body tags:
 body!-- from LoginPage.html --
span wicket:id=borderwicket:border
head!-- from the Border too --
  title wicket:id=pageTitlePCD Login/title
  link href=/pcd/general.css type=text/css rel=stylesheet
  wicket:id=urlContextAdder/
/head
  body!-- from PCDBorder.html --

   As far as I understand the borders, the first body should not be there,
 right?  What I understood from borders was: the component you add will get
 replaced in your page.  That's what the span wicket:id=border is there
 for... the content inside that span will be replaced inside the
 wicket:border  tag, right?  Maybe I just misunderstood it.

   But if it is so, how can I add a common head to all my pages?  I
 disagree with the reasons in the new How-to page for not including anything
 outside the body tag.  I think that most web applications (mostly
 functional, database driven web apps) should have a simple functional
 design, not full of JS or having different CSS files for each page.  So
 having a way to mandate the CSS to be the same is useful for me.  In case of
 dire need, there are ways of adding Javascript other than putting it in the
 head.

   []s Gus


 -- Início da mensagem original ---

   De: [EMAIL PROTECTED]
 Para: wicket-user@lists.sourceforge.net
   Cc:
 Data: Thu, 23 Jun 2005 18:33:37 -0700
  Assunto: RE: [Wicket-user] Should Borders isolate the surrounding data from
 the inner content?

  Are you referring to the span wicket:id=boxBorder and
  wicket:border type tags? If so, in your application class'
  constructor or init add this
  line:
 
  getSettings().seStripWicketTags( true );
 
  It will tell wicket to strip wicket specific markup from the produced
 html.
  By default this setting is off I think because it aids development. I
  think that will also strip wicket:id variables.
 
  Igor
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo
  Hexsel
  Sent: Thursday, June 23, 2005 5:40 PM
  To: wicket-user
  Subject: [Wicket-user] Should Borders isolate the surrounding data
  from the inner content?
 
Hmm.  I'm still having some trouble with the borders.  I'm trying to
  use borders to set the general layout, however the tags surrounding
  the inner content are also being added.  Do I need to create panels? 
  If I do, do I need to create 2 classes for each page (a page and a
  panel) that uses the border?
 
  ---
This is my border:
  ---
  html xmlns:wicket=http://wicket.sourceforge.net/;
  wicket:border
head
  title wicket:id=pageTitlePage Title/title
  link wicket:id=urlContextAdder rel=stylesheet href=general.css
  type=text/css /
/head
body!-- from

[Wicket-user] How to find out which component is not being rendered correctly and why?

2005-06-23 Thread Gustavo Hexsel
  Hi gentlemen,

  how do I find out which component is not being rendered correctly?  I've 
mostly copied and pasted from different parts of the examples, but I think I 
missed something and I've found that the messages are quite cryptical.  At 
first there were a few problems with binding and OGNL, but I've solved that yet 
am still not able to find what's wrong.

  Here's the log, though I'd like to know more how to interpret the info than 
to be pointed to the root of this particular error:

Unexpected RuntimeException

wicket.WicketRuntimeException: The component(s) below failed to render:

1. [EMAIL PROTECTED] id = pageTitle, page = 
com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.pageTitle.Label, 
isVisible = true, isVersioned = true], loginForm=[MarkupContainer [Component id 
= loginForm, page = com.sagebrush.oberon.pcd.page.LoginPage, path = 
3.border.loginForm.LoginPage$LoginForm, isVisible = true, isVersioned = true]], 
boxBorder=[MarkupContainer [Component id = boxBorder, page = 
com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.boxBorder.BoxBorder, 
isVisible = true, isVersioned = true]], [EMAIL PROTECTED] id = realName, page = 
com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.menu.realName.Label, 
isVisible = false, isVersioned = 
true]},attributeModifiers=null,flags=26,id=menu,model=null,[EMAIL 
PROTECTED], feedback=[MarkupContainer [Component id = feedback, page = 
com.sagebrush.oberon.pcd.page.LoginPage, path = 
3.border.feedback.FeedbackPanel, isVisible = true, isVersioned = 
true]]},attributeModifiers=null,flags=26,id=border,model=null,[EMAIL 
PROTECTED]null,[EMAIL PROTECTED] Login 
Page,autoIndex=0,feedbackMessages=[feedbackMessages = 
[]],pageMapName=null,versionManager=null,[EMAIL PROTECTED]@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@[EMAIL 
PROTECTED],attributeModifiers=null,flags=282,id=3,model=null,parent=null]]
2. [Component id = pageTitle, page = com.sagebrush.oberon.pcd.page.LoginPage, 
path = 3.border.pageTitle.Label, isVisible = true, isVersioned = true]
3. [MarkupContainer [Component id = loginForm, page = 
com.sagebrush.oberon.pcd.page.LoginPage, path = 
3.border.loginForm.LoginPage$LoginForm, isVisible = true, isVersioned = true]]
4. [MarkupContainer [Component id = passwordFeedback, page = 
com.sagebrush.oberon.pcd.page.LoginPage, path = 
3.border.loginForm.passwordFeedback.FormComponentFeedbackBorder, isVisible = 
true, isVersioned = true]]
5. [MarkupContainer [Component id = errorIndicator, page = 
com.sagebrush.oberon.pcd.page.LoginPage, path = 
3.border.loginForm.passwordFeedback.errorIndicator.FormComponentFeedbackBorder$ErrorIndicator,
 isVisible = false, isVersioned = true]]
6. [MarkupContainer [Component id = username, page = 
com.sagebrush.oberon.pcd.page.LoginPage, path = 
3.border.loginForm.passwordFeedback.username.TextField, isVisible = true, 
isVersioned = false]]
7. [MarkupContainer [Component id = usernameFeedback, page = 
com.sagebrush.oberon.pcd.page.LoginPage, path = 
3.border.loginForm.usernameFeedback.FormComponentFeedbackBorder, isVisible = 
true, isVersioned = true]]
8. [MarkupContainer [Component id = errorIndicator, page = 
com.sagebrush.oberon.pcd.page.LoginPage, path = 
3.border.loginForm.usernameFeedback.errorIndicator.FormComponentFeedbackBorder$ErrorIndicator,
 isVisible = false, isVersioned = true]]
9. [MarkupContainer [Component id = username, page = 
com.sagebrush.oberon.pcd.page.LoginPage, path = 
3.border.loginForm.passwordFeedback.username.TextField, isVisible = true, 
isVersioned = false]]
10. [MarkupContainer [Component id = boxBorder, page = 
com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.boxBorder.BoxBorder, 
isVisible = true, isVersioned = true]]
11. [EMAIL PROTECTED] id = realName, page = 
com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.menu.realName.Label, 
isVisible = false, isVersioned = 
true]},attributeModifiers=null,flags=26,id=menu,model=null,[EMAIL 
PROTECTED] id = pageTitle, page = com.sagebrush.oberon.pcd.page.LoginPage, path 
= 3.border.pageTitle.Label, isVisible = true, isVersioned = true], 
loginForm=[MarkupContainer [Component id = loginForm, page = 
com.sagebrush.oberon.pcd.page.LoginPage, path = 
3.border.loginForm.LoginPage$LoginForm, isVisible = true, isVersioned = true]], 
boxBorder=[MarkupContainer [Component id = boxBorder, page = 
com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.boxBorder.BoxBorder, 
isVisible = true, isVersioned = true]], [EMAIL PROTECTED]@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED], feedback=[MarkupContainer 
[Component id = feedback, page = com.sagebrush.oberon.pcd.page.LoginPage, path 
= 3.border.feedback.FeedbackPanel, isVisible = true, isVersioned = 
true]]},attributeModifiers=null,flags=26,id=border,model=null,[EMAIL 
PROTECTED]null,[EMAIL PROTECTED] Login 
Page,autoIndex=0,feedbackMessages=[feedbackMessages = 
[]],pageMapName=null,versionManager=null,[EMAIL PROTECTED]@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@[EMAIL 

[Wicket-user] Simple link replacement

2005-06-23 Thread Gustavo Hexsel
  Thanks for the help with the border.  I just couldn't find what I did 
differently from the examples, something was obviously amiss - after a few 
hours, I just threw it out and started from a straight copy of one of the 
examples and changed a line or two at a time.  Things are going well now, 
except I couldn't find a way to generate relative URLs yet.  I've looked at all 
packages and tried to use ResourceLink and AutoLinkResolver, but none of those 
seem to do what I want...

  How do you replace absolute URLs for resources like CSS's and images?  My 
border includes the head tag to force everyone to use the standard CSS, 
however I don't know how to produce

  link rel=stylesheet href=/myapplication/mycsspath/general.css 
type=text/css /

  Using the relative url (just general.css) tries to fetch the value from the 
root of the application server, which would prevent me from packaging the app 
as a .WAR file.

  Any tips?

[]s Gus


PS.: sorry for posting question after question!  I've been trying the javadocs 
and examples, but some things are not answered there...


 
__
UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia.  
http://www.uol.com.br/fone




---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Simple link replacement

2005-06-23 Thread Gustavo Hexsel
  Many thanks to the people of the list.  I got both problems resolved:

- the problem with the border not being added was (as I've found out latter) 
was my checkAccess() method returning false under certain situations.  My 
fault, yet I still don't get why the page was being generated  at all, much 
less without the border.
- the simple link replacement was a REAAALLY easy component to build, based on 
Igor's basetag.  If anyone wants to reuse it, alter, fix it, rename it, add to 
the distribution, feel free.  I'm sure other people will have the same problem 
I did, coming from other frameworks.

  The javadoc needs some formatting... which I'm not sure how-to :)

  []s Gus


-- Início da mensagem original ---

  De: [EMAIL PROTECTED]
Para: wicket-user@lists.sourceforge.net
  Cc:
Data: Thu, 23 Jun 2005 15:28:32 -0700
 Assunto: RE: [Wicket-user] Simple link replacement

 Gustavo,

 Im taking off for home so here is something quick that might help. You can
 tweak the attribute modifier by overriding the newValue method and
 prepending your path to whatever is alrady there instead of replacing it
 completely.

 Hope it helps,
 Igor


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Hexsel
 Sent: Thursday, June 23, 2005 3:01 PM
 To: wicket-user
 Subject: [Wicket-user] Simple link replacement

   Thanks for the help with the border.  I just couldn't find what I did
 differently from the examples, something was obviously amiss - after a few
 hours, I just threw it out and started from a straight copy of one of the
 examples and changed a line or two at a time.  Things are going well now,
 except I couldn't find a way to generate relative URLs yet.  I've looked at
 all packages and tried to use ResourceLink and AutoLinkResolver, but none of
 those seem to do what I want...

   How do you replace absolute URLs for resources like CSS's and images?
 My border includes the head tag to force everyone to use the standard CSS,
 however I don't know how to produce

   link rel=stylesheet href=/myapplication/mycsspath/general.css
 type=text/css /

   Using the relative url (just general.css) tries to fetch the value from
 the root of the application server, which would prevent me from packaging
 the app as a .WAR file.

   Any tips?

 []s Gus


 PS.: sorry for posting question after question!  I've been trying the
 javadocs and examples, but some things are not answered there...



 __
 UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia.
 http://www.uol.com.br/fone




 ---
 SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from
 IBM. Find simple to follow Roadmaps, straightforward articles, informative
 Webcasts and more! Get everything you need to get up to speed, fast.
 http://ads.osdn.com/?ad_idt77alloc_id492op=ick
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 
 
__
UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia. 
http://www.uol.com.br/fone




---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Starting in Wicket

2005-06-16 Thread Gustavo Hexsel
  Hi folks,

  I'm evaluating Wicket as a replacement for some of our web code.  I've 
checked out Spring and found out that besides the learning curve being very 
high for anything but trivial tasks, it didn't save as much coding as I 
expected...

  So I've realized that some things that frameworks don't show you in tutorials 
are usually the hard ones.  I've been trying to find out how to do some things 
in Wicket, but couldn't find anywhere in the docs or examples (I wonder if I 
looked in the right places)

- what's the preferred way of nesting web pages?  Like adding a default menu, a 
header, etc.  Would you @page import it?
- how do you provide per-field feedback?  The feedback-panel component just 
accumulates all fields in a single component.
- is there a way of forcing a filter before all pages (for instance, to check 
if a login is present in the session) without having to edit all pages?  Or 
should I use a filter as in the Servlet API?

  Thanks a lot!

[]s Gus

 
__
UOL Fone: Fale com o Brasil e o Mundo com at 90% de economia. 
http://www.uol.com.br/fone




---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Starting in Wicket

2005-06-16 Thread Gustavo Hexsel
  Yes, Spring MVC, I also like use some Spring components (though I don't like 
xml-based dep injection).

1) Borders and panel - yes, that seems to do what

2) ... well, I usually appreciate a webpage to AT LEAST put the problem fields 
on emphasis, messages on the bottom confuse me, specially if they have more 
than 5 or 6 fields.  But I guess it's a matter of personal opinion.  Still, 
anyone knows the answer for this one?

3) The base class works too.  The only drawback is that it does not garantee 
that a novice programmer won't forget to extend that class and thus break 
security.

  Thanks for the answers, I think I can try it out now!


  []s Gus


-- Incio da mensagem original ---

  De: [EMAIL PROTECTED]
Para: wicket-user@lists.sourceforge.net
  Cc:
Data: Thu, 16 Jun 2005 15:12:48 -0700
 Assunto: Re: [Wicket-user] Starting in Wicket

 Well, first off, I assume you mean Spring MVC, since that would be the
 only competitor with Wicket. And you're right, Spring MVC is nice, but
 it's still a model 2 framework. It was just added to the project as a
 kind of default web tier framework. I use Spring with Wicket for the
 web tier; they are a great pair that way.

 1. Check out the border and panel components. They do exactly what
 you're looking for. The examples use them extensively.

 2. This one I don't know about since I hate webpages that do that. If
 there is a way to do this, I would like to know about it though.

 3. Just extend a common Page class that does whatever you need in the
 constructor. Alternatively, you could create a custom IPageFactory
 implementation that would execute whatever code you wanted before a
 page was created. Take a look at Page.checkAccess for your specific
 requirement. It makes security a breeze.

 On 6/16/05, Gustavo Hexsel [EMAIL PROTECTED] wrote:
Hi folks,
 
I'm evaluating Wicket as a replacement for some of our web code.  I've 
  checked out Spring and found out that besides the learning curve being very 
  high for anything but trivial tasks, it didn't save as much coding as I 
  expected...
 
So I've realized that some things that frameworks don't show you in 
  tutorials are usually the hard ones.  I've been trying to find out how to 
  do some things in Wicket, but couldn't find anywhere in the docs or 
  examples (I wonder if I looked in the right places)
 
  - what's the preferred way of nesting web pages?  Like adding a default 
  menu, a header, etc.  Would you @page import it?
  - how do you provide per-field feedback?  The feedback-panel component just 
  accumulates all fields in a single component.
  - is there a way of forcing a filter before all pages (for instance, to 
  check if a login is present in the session) without having to edit all 
  pages?  Or should I use a filter as in the Servlet API?
 
Thanks a lot!
 
  []s Gus

 
__
UOL Fone: Fale com o Brasil e o Mundo com at 90% de economia. 
http://www.uol.com.br/fone




---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user