Re: How to ... nicely wire strings through spring.

2008-06-30 Thread Igor Vaynberg
create an applicationpropreties bean and set its values via the ${}
syntax. then inject that into wicket components.

-igor

On Sun, Jun 29, 2008 at 11:01 PM, Ned Collyer [EMAIL PROTECTED] wrote:

 Hi,

 I'm using dependency injection via @SpringBean, and I need access to
 configurable String value in my Application class.

 My main context file is using a
 org.springframework.beans.factory.config.PropertyPlaceholderConfigurer which
 allows me to use ${} syntax for wiring values from a set of properties files
 directly to a bean definition.

 Eg,
 GenericNonWicketApp.properties
  configDir=/usr/banana/config

 AppContext.xml
 bean class=someclass
  property name=configDir value=${configDir} /
 /bean

 I'd like to be able to wire this value against the WebApplication in wicket,
 and I have been able to do this as follows:

 bean id=configDir class=java.lang.String
constructor-arg index=0 value=${configDir} /
 /bean

 MyWebApplication.java
  @SpringBean(name = configDir)
  private String configDir;


 Is this the desired way of configuring these type of things (eg, simple
 objects such as Strings and Integers)?
 --
 View this message in context: 
 http://www.nabble.com/How-to-...-nicely-wire-%22strings%22-through-spring.-tp18189203p18189203.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: How to ... nicely wire strings through spring.

2008-06-30 Thread Ned Collyer

Just implemented that inbetween refreshes of here.

Thanks Igor.


igor.vaynberg wrote:
 
 create an applicationpropreties bean and set its values via the ${}
 syntax. then inject that into wicket components.
 
 -igor
 

-- 
View this message in context: 
http://www.nabble.com/How-to-...-nicely-wire-%22strings%22-through-spring.-tp18189203p18189313.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: generics

2008-06-30 Thread Martijn Dashorst
I'm guessing somewhere this week or so. We need to flush out the unit
test failures and get some preliminary feedback. Also we need to have
time available to actually build the release.

My time is limited because we're in the final stages before publishing
and I have to read our book twice or so.

Martijn

On Mon, Jun 30, 2008 at 2:36 AM, James Carman
[EMAIL PROTECTED] wrote:
 What sort of time frame are we looking at for a release with this new
 generics paradigm?

 On Sun, Jun 29, 2008 at 3:54 PM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 On Sun, Jun 29, 2008 at 12:48 PM, Sven Meier [EMAIL PROTECTED] wrote:
 Hi,

 I've just converted two projects to the new generics setup and everything
 worked out nicely.
 I think this is how generics should be applied to Wicket.

 Igor, thanks for your hard work on this.

 wasnt just me :)

 -igor


 Sven

 Igor Vaynberg schrieb:

 development of the 1.4 branch has been quiet lately, this is because
 the core team has been busy working on an alternative way of
 generifiing the framework. an early result of that effort can be found
 here [1]. The key difference in [1] is that we have decoupled the
 component from the type of the model.

 here is the list of major differences:

 (1) only components that use their model have a generic type
 (components you are likely to call getmodel/getmodelobject on as a
 user). so far these are link,form,formcomponent
 subclasses,listview,listitem,(other repeaters will follow soon). this
 allows for typesafety where it makes sense, and eliminates a ton of
 noise from code. we will generify others upon request if a good
 usecase is provided and we think it is widely applicable.

 (2) non-generified components do not have IModelT get/setModel and T
 get/setModelObject, instead they have IModel?get/setDefaultModel and
 Object get/setDefaultModelObject. this clearly expresses that the
 default component model is not tied to the type of component. this is
 a bit of a pain from the code migration point of view, but we think is
 worth the effort. generifyed components are free to implement the old
 IModelT get/setModel, etc, but have to keep the unsafe cast inside.
 see ListItem for an example.

 basically we feel this is a much cleaner way then what is 1.4m2. this
 is a call for confirmation/discussion from our user base. do try to
 port a small project or a part of a larger project you are working on
 to the [1] branch to see how the new api feels. if we do like this
 more the new branch will be merged into what will be 1.4m3.

 [1] https://svn.apache.org/repos/asf/wicket/sandbox/ivaynberg/generics

 -igor

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





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



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



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





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Re: generics

2008-06-30 Thread Igor Vaynberg
unit tests are fixed...

-igor

On Sun, Jun 29, 2008 at 11:16 PM, Martijn Dashorst
[EMAIL PROTECTED] wrote:
 I'm guessing somewhere this week or so. We need to flush out the unit
 test failures and get some preliminary feedback. Also we need to have
 time available to actually build the release.

 My time is limited because we're in the final stages before publishing
 and I have to read our book twice or so.

 Martijn

 On Mon, Jun 30, 2008 at 2:36 AM, James Carman
 [EMAIL PROTECTED] wrote:
 What sort of time frame are we looking at for a release with this new
 generics paradigm?

 On Sun, Jun 29, 2008 at 3:54 PM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 On Sun, Jun 29, 2008 at 12:48 PM, Sven Meier [EMAIL PROTECTED] wrote:
 Hi,

 I've just converted two projects to the new generics setup and everything
 worked out nicely.
 I think this is how generics should be applied to Wicket.

 Igor, thanks for your hard work on this.

 wasnt just me :)

 -igor


 Sven

 Igor Vaynberg schrieb:

 development of the 1.4 branch has been quiet lately, this is because
 the core team has been busy working on an alternative way of
 generifiing the framework. an early result of that effort can be found
 here [1]. The key difference in [1] is that we have decoupled the
 component from the type of the model.

 here is the list of major differences:

 (1) only components that use their model have a generic type
 (components you are likely to call getmodel/getmodelobject on as a
 user). so far these are link,form,formcomponent
 subclasses,listview,listitem,(other repeaters will follow soon). this
 allows for typesafety where it makes sense, and eliminates a ton of
 noise from code. we will generify others upon request if a good
 usecase is provided and we think it is widely applicable.

 (2) non-generified components do not have IModelT get/setModel and T
 get/setModelObject, instead they have IModel?get/setDefaultModel and
 Object get/setDefaultModelObject. this clearly expresses that the
 default component model is not tied to the type of component. this is
 a bit of a pain from the code migration point of view, but we think is
 worth the effort. generifyed components are free to implement the old
 IModelT get/setModel, etc, but have to keep the unsafe cast inside.
 see ListItem for an example.

 basically we feel this is a much cleaner way then what is 1.4m2. this
 is a call for confirmation/discussion from our user base. do try to
 port a small project or a part of a larger project you are working on
 to the [1] branch to see how the new api feels. if we do like this
 more the new branch will be merged into what will be 1.4m3.

 [1] https://svn.apache.org/repos/asf/wicket/sandbox/ivaynberg/generics

 -igor

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





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



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



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





 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.4 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



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



Re: Gmap2 problem with Firefox 3.0

2008-06-30 Thread Murat Yücel
I am not able to see the examples in IE 7 either. Could you confirm this?

There also seems to be a problem with using png images as a marker.
Found this fix which seems to solve the problem.
http://homepage.ntlworld.com/bobosola/pnghowto.htm

/Murat

2008/6/27 Sven Meier [EMAIL PROTECTED]:

 Hi,

 so it seems this problem is not gmap2 specific. It's just the way our
 markup is structured, which seems no longer be supported by firefox 3. The
 following simple example show the failure:

 div style=width: 200px; height: 200px
   wicket:panel
   div style=width: 100%; height: 100%; background: #ff
   /div
   /wicket:panel
 /div

 The nested div is no longer strechted to the full size of the containing
 div.
 I'll see how we can restructure our markup, but generally this change in
 forefox's layout might effect other places too.

 Sven

 Ryan Sonnek schrieb:

  On 6/26/08, Martin Funk [EMAIL PROTECTED] wrote:


 Sven Meier wrote:



 Hi,

 I'm investigation the issue:
 It seems that Google's css is being screwed up in FF3. When I let Wicket
 strip all wicket tags *or* assign pixel width (instead of 100%) to the
 element holding the map, everthing works fine in FF3.



 btw. Sven,
 I now can confirm the effect of stripping too.

 so a quick solution would be running the app in deployment mode.

 Can the strip wicket tags setting be declared at a component level, or


 does it affect the entire server?





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




New to Wicket: Confused with versions, wicket-extensions etc.

2008-06-30 Thread jdj

Hello,

I'm new to Wicket. I'm using Wicket 1.3.3.

I'm looking for a date picker component for Wicket, and I noticed that there
is one in the  http://wicket.sourceforge.net/wicket-extensions/
wicket-extensions  package. However, the information on that website seems
to be out of date, it's about wicket-extensions 1.2 while the newest version
in the Maven repository is wicket-extensions 1.3.3.

In wicket-extensions 1.3.3, the DatePicker, which was in the package
wicket.extensions.markup.html.datepicker in version 1.2, seems to be gone.

I cannot find documentation for wicket-extensions 1.3.3 anywhere. Where is
it?

Is there a date picker component available in the current version of Wicket
or Wicket Extenstions? If so, where can I find it? If not, then where can I
find a date picker for Wicket?
-- 
View this message in context: 
http://www.nabble.com/New-to-Wicket%3A-Confused-with-versions%2C-wicket-extensions-etc.-tp18190491p18190491.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: gmap2 now only works for wicket 1.4 ?

2008-06-30 Thread smallufo
eh
Sorry...
I cannot find gmap2's wicket-1.3.x branch.
Can you tell me where can I check it out ?
Thanks a lot.


2008/6/30 Sven Meier [EMAIL PROTECTED]:

 gmap2 trunk depends on wicket trunk, i.e. 1.4. We have to adjust it to the
 latest generics changes.

 Please use the wicket-1.3.x branch, if you're working with wicket 1.3.

 Sven

 smallufo schrieb:

  I checked out the latest gmap2 from svn.
 And found it is full of error , most are generics errors , such as :

 The type RepeatingView is not generic; it cannot be parameterized with
 arguments  Void
 The type WebMarkupContainer is not generic; it cannot be parameterized
 with
 arguments T

 Some are missing fields , such as  GClientGeocoder.
 Does it now only works for wicket 1.4 , the generics version ?





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




Converters and Validators

2008-06-30 Thread Ayodeji Aladejebi
Hi,
I want to know if this is the right thing to do if a value required
conversion

Textfield dateField = new TextField(date, Date.class);

dateField.add(new DateBeforeAnotherDateValidator());

class DateBeforeAnotherDateValidator{
 protected void onValidate(IValidatable validatable) {
Date choosenDate = (Date) validatable.getValue(); //will this cast
work
}
}

Are converters invoked before validators. can I do this

thanks


Re: New to Wicket: Confused with versions, wicket-extensions, looking for date picker

2008-06-30 Thread Charlie Dobbie
There's a Datepicker component in the wicket-datetime package.  If using Maven:

dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-datetime/artifactId
version1.3.4/version
/dependency



2008/6/30 jdj [EMAIL PROTECTED]:

 Hello,

 I'm new to Wicket. I'm using Wicket 1.3.3.

 I'm looking for a date picker component for Wicket, and I noticed that there
 is one in the  http://wicket.sourceforge.net/wicket-extensions/
 wicket-extensions  package. However, the information on that website seems
 to be out of date, it's about wicket-extensions 1.2 while the newest version
 in the Maven repository is wicket-extensions 1.3.3.

 In wicket-extensions 1.3.3, the DatePicker, which was in the package
 wicket.extensions.markup.html.datepicker in version 1.2, seems to be gone.

 I cannot find documentation for wicket-extensions 1.3.3 anywhere. Where is
 it?

 Is there a date picker component available in the current version of Wicket
 or Wicket Extenstions? If so, where can I find it? If not, then where can I
 find a date picker for Wicket?

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



Re: generics

2008-06-30 Thread Johan Compagner
i looked through the code and it is fine by me.
Lets test this then in a Build and see what people think of this.


On Mon, Jun 30, 2008 at 8:54 AM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 unit tests are fixed...

 -igor

 On Sun, Jun 29, 2008 at 11:16 PM, Martijn Dashorst
 [EMAIL PROTECTED] wrote:
  I'm guessing somewhere this week or so. We need to flush out the unit
  test failures and get some preliminary feedback. Also we need to have
  time available to actually build the release.
 
  My time is limited because we're in the final stages before publishing
  and I have to read our book twice or so.
 
  Martijn
 
  On Mon, Jun 30, 2008 at 2:36 AM, James Carman
  [EMAIL PROTECTED] wrote:
  What sort of time frame are we looking at for a release with this new
  generics paradigm?
 
  On Sun, Jun 29, 2008 at 3:54 PM, Igor Vaynberg [EMAIL PROTECTED]
 wrote:
  On Sun, Jun 29, 2008 at 12:48 PM, Sven Meier [EMAIL PROTECTED] wrote:
  Hi,
 
  I've just converted two projects to the new generics setup and
 everything
  worked out nicely.
  I think this is how generics should be applied to Wicket.
 
  Igor, thanks for your hard work on this.
 
  wasnt just me :)
 
  -igor
 
 
  Sven
 
  Igor Vaynberg schrieb:
 
  development of the 1.4 branch has been quiet lately, this is because
  the core team has been busy working on an alternative way of
  generifiing the framework. an early result of that effort can be
 found
  here [1]. The key difference in [1] is that we have decoupled the
  component from the type of the model.
 
  here is the list of major differences:
 
  (1) only components that use their model have a generic type
  (components you are likely to call getmodel/getmodelobject on as a
  user). so far these are link,form,formcomponent
  subclasses,listview,listitem,(other repeaters will follow soon). this
  allows for typesafety where it makes sense, and eliminates a ton of
  noise from code. we will generify others upon request if a good
  usecase is provided and we think it is widely applicable.
 
  (2) non-generified components do not have IModelT get/setModel and
 T
  get/setModelObject, instead they have IModel?get/setDefaultModel
 and
  Object get/setDefaultModelObject. this clearly expresses that the
  default component model is not tied to the type of component. this is
  a bit of a pain from the code migration point of view, but we think
 is
  worth the effort. generifyed components are free to implement the old
  IModelT get/setModel, etc, but have to keep the unsafe cast inside.
  see ListItem for an example.
 
  basically we feel this is a much cleaner way then what is 1.4m2. this
  is a call for confirmation/discussion from our user base. do try to
  port a small project or a part of a larger project you are working on
  to the [1] branch to see how the new api feels. if we do like this
  more the new branch will be merged into what will be 1.4m3.
 
  [1]
 https://svn.apache.org/repos/asf/wicket/sandbox/ivaynberg/generics
 
  -igor
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
  --
  Become a Wicket expert, learn from the best: http://wicketinaction.com
  Apache Wicket 1.3.4 is released
  Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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




Re: Wicket Presentation

2008-06-30 Thread Nino Saturnino Martinez Vazquez Wael
It's really great to see the different angles we pitch these 
presentations with.. After the summer I'll hold some presentations too, 
i'll drop the slides here as well or should we do it on the wiki?


egolan74 wrote:

http://www.nabble.com/file/p18191471/Wicket_Introduction.ppt
Wicket_Introduction.ppt 
Hi,

I have just finished giving my colleagues at Tikal Knowledge an introduction
session of Wicket.
It came out great and the responses were very positive.

I would like to give special thanks to Eelco Hillenius who really helped me.
Thanks also to this community :)

Eyal Golan

-
Eyal Golan
[EMAIL PROTECTED]

Visit:  http://jvdrums.sourceforge.net/ http://jvdrums.sourceforge.net/ 
LinkedIn:  http://www.linkedin.com/in/egolan74
href=http://www.linkedin.com/in/egolan74 
  


--
-Wicket for love

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


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



Re: New to Wicket: Confused with versions, wicket-extensions, looking for date picker

2008-06-30 Thread Nino Saturnino Martinez Vazquez Wael

did you see:


 IMPORTANT NOTICE

Wicket 1.2 is no longer supported. For supported versions go to Apache 
Wicket http://wicket.apache.org.



Please look at the apache web site...:) Sourceforge is sort of 
deprecated and only contains information on wicket 1.2


jdj wrote:

Hello,

I'm new to Wicket. I'm using Wicket 1.3.3.

I'm looking for a date picker component for Wicket, and I noticed that there
is one in the  http://wicket.sourceforge.net/wicket-extensions/
wicket-extensions  package. However, the information on that website seems
to be out of date, it's about wicket-extensions 1.2 while the newest version
in the Maven repository is wicket-extensions 1.3.3.

In wicket-extensions 1.3.3, the DatePicker, which was in the package
wicket.extensions.markup.html.datepicker in version 1.2, seems to be gone.

I cannot find documentation for wicket-extensions 1.3.3 anywhere. Where is
it?

Is there a date picker component available in the current version of Wicket
or Wicket Extenstions? If so, where can I find it? If not, then where can I
find a date picker for Wicket?
  


--
-Wicket for love

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


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



Re: Wicket Presentation

2008-06-30 Thread Martijn Dashorst
Put them up on slideshare please.

Martijn

On Mon, Jun 30, 2008 at 12:42 PM, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
 It's really great to see the different angles we pitch these presentations
 with.. After the summer I'll hold some presentations too, i'll drop the
 slides here as well or should we do it on the wiki?

 egolan74 wrote:

 http://www.nabble.com/file/p18191471/Wicket_Introduction.ppt
 Wicket_Introduction.ppt Hi,
 I have just finished giving my colleagues at Tikal Knowledge an
 introduction
 session of Wicket.
 It came out great and the responses were very positive.

 I would like to give special thanks to Eelco Hillenius who really helped
 me.
 Thanks also to this community :)

 Eyal Golan

 -
 Eyal Golan
 [EMAIL PROTECTED]

 Visit:  http://jvdrums.sourceforge.net/ http://jvdrums.sourceforge.net/
 LinkedIn:  http://www.linkedin.com/in/egolan74
 href=http://www.linkedin.com/in/egolan74

 --
 -Wicket for love

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


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





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Re: Junit Wicket tests in Wasp/Swarm environment

2008-06-30 Thread Andrea Jahn
Hi,

I was using Wicket 1.3.3 and tester.destroy() worked fine.

But I had to change to Wicket 1.3.4 (because of WICKET-1558) and now I get
the
following Exception when tester.destroy() is called:

java.lang.NullPointerException
 at
org.apache.wicket.security.swarm.actions.SwarmActionFactory.destroy(SwarmActionFactory.java:502)
 at
org.apache.wicket.security.WaspWebApplication.onDestroy(WaspWebApplication.java:107)
 at org.apache.wicket.Application.internalDestroy(Application.java:890)
 at
org.apache.wicket.protocol.http.WebApplication.internalDestroy(WebApplication.java:448)
 at
org.apache.wicket.protocol.http.MockWebApplication.destroy(MockWebApplication.java:674)
 at test.front.LoginTest.tearDown(LoginTest.java:65)
 at junit.framework.TestCase.runBare(TestCase.java:140)
 at junit.framework.TestResult$1.protect(TestResult.java:110)
 at junit.framework.TestResult.runProtected(TestResult.java:128)
 at junit.framework.TestResult.run(TestResult.java:113)
 at junit.framework.TestCase.run(TestCase.java:124)
 at junit.framework.TestSuite.runTest(TestSuite.java:232)
 at junit.framework.TestSuite.run(TestSuite.java:227)
 at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
 at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
 at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
 at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
 at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
 at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
 at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

I'm using Wasp/Swarm 1.3-SNAPSHOT.

Thanks
Andrea



2008/6/20, Maurice Marrink [EMAIL PROTECTED]:

 In the teardown do tester.destroy() this will clean up everything.

 Maurice

 On Fri, Jun 20, 2008 at 10:16 AM, Andrea Jahn
 [EMAIL PROTECTED] wrote:
  Hi,
  Thank you very much for the Java solution :) !
  I have also corrected the place to return a new custom session :).
 
  Now the first test case runs without problems,
  but in the second and third test case I get the following exception:
 
  java.lang.IllegalArgumentException: Another ActionFactory is already
  registered with the following key:
 test.front.MyWicketTester$1:MyAppl-login
   at
 
 org.apache.wicket.security.actions.Actions.registerActionFactory(Actions.java:80)
   at
 
 org.apache.wicket.security.swarm.actions.SwarmActionFactory.init(SwarmActionFactory.java:86)
   at
 
 xxx.yyy.zzz.front.security.MyActionFactory.init(MyActionFactory.java:28)
   at
 
 xxx.yyy.zzz.front.MyApplication.setupActionFactory(MyApplication.java:177)
   at
 
 org.apache.wicket.security.swarm.SwarmWebApplication.init(SwarmWebApplication.java:96)
   at xxx.yyy.zzz.front.MyApplication.init(MyApplication.java:38)
   at
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:526)
   at
 
 org.apache.wicket.protocol.http.MockWebApplication.init(MockWebApplication.java:151)
   at
 
 org.apache.wicket.util.tester.BaseWicketTester.init(BaseWicketTester.java:205)
   at
 org.apache.wicket.util.tester.WicketTester.init(WicketTester.java:308)
   at
 org.apache.wicket.util.tester.WicketTester.init(WicketTester.java:291)
   at test.front.MyWicketTester.init(MyWicketTester.java:27)
   at test.front.LoginTest.setUp(LoginTest.java:50)
   at junit.framework.TestCase.runBare(TestCase.java:132)
 
 
  I tried to unregister the hive, but anyway the exception is thrown.
  How can I remove the ActionFactory ? Or can I avoid, that it is
 registered
  again ?
 
  Thanks again
  Andrea
 
 
 
  public class MyWicketTester extends WicketTester
  {
   public MyWicketTester(final ApplicationContextMock appctx)
   {
 super(new MyApplication() {
   @Override
   protected void initSpring() {
 
 addComponentInstantiationListener(new
 SpringComponentInjector(this,
  appctx));
 InjectorHolder.getInjector().inject(this);
   };
 
   @Override
   public Session newSession(final Request request, Response response)
 {
...
   }
 });
   }
  }
 
 
  public class LoginTest extends TestCase
  {
   private WicketTester tester;
   private FormTester form;
   private PersonService personServiceMock;
   private LocationService locationServiceMock;
 
   @Before
   public void setUp() throws Exception {
 
 personServiceMock = EasyMock.createStrictMock(PersonService.class);
 locationServiceMock =
 EasyMock.createStrictMock(LocationService.class);
 
 ApplicationContextMock appctx = new ApplicationContextMock();
 appctx.putBean(personService, personServiceMock);
 appctx.putBean(locationService, locationServiceMock);
 
 tester = new MyWicketTester(appctx);
   }
 
   @After
   public void tearDown() {
 
 // unregister factory
 
 
 

Adding custom resource properties files

2008-06-30 Thread Lorenzo Bolzani
Hi,
we have two pages sharing the same set of user messages so we would
like to be able to share the same file.
The two pages are different and cannot subclass a same parent.
We cannot extract a common component because we have two different
views on the same data.

Maybe we could define an empty panel and share that only for the user
massages but I do not like this idea.

Is there a way to add/override a new resource file at the page level?
So that key are looked up in this way:

component
form
page
custom page file- this is new
application

and at the class level too. In other words I just want to insert e new file.

We looked at IResourceLoader and this looks like an option
(registering a custom Loader in the application init()). We tried and
this works.

The problem is how to integrate this new Loader with the standard
ComponentStringResourceLoader so that the key is looked up also in the
standard way.

We had a look at PropertiesFactory trying to register a new file, but
the list of resources is determined by a ResourceNameIterator in the
method loadStringResources and is not easy to modify the behaviour of
this method.
So the only options seems to be to extend
ComponentStringResourceLoader overriding loadStringResource(Class,
String, Locale, String) with a big cut and paste.

Is there any other option?


Thanks, bye


Lorenzo

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



Re: Exception for MixedParamUrlCodingStrategy

2008-06-30 Thread Erik van Oosten
I've no idea how this could work, or why it doesn't now.
Could you not just include different panels on one page, instead of
forwarding to different pages?

Regards,
Erik.


Mathias P.W Nilsson schreef:
 https://localhost/hairless-web/brand/71/

 this is the generated URL.

 The BrandInterceptor send request to ItemList. Maybe this isn't the way to
 do this?

 public BrandInterceptor( PageParameters parameters ){
   
   filters = new LinkedListItemFilter(); 
   Long brandId = parameters.getLong( id );
   if ( brandId != null ) { 
   Brand brand = getBrandDao().getBrand( brandId );
   filters.add( new BrandFilter( brand ));
   setResponsePage( new ItemListPage( filters )  );
   } else{
   
   setResponsePage( new Base() );
   }
   }
   

-- 

--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/



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



Re: Wicket Presentation

2008-06-30 Thread Martijn Dashorst
On Mon, Jun 30, 2008 at 12:57 PM, Erik van Oosten [EMAIL PROTECTED] wrote:
 On slideshare, don't forget to allow download of the original file
 (powerpoint or otherwise).

Mwah... Only if you want to. There is no obligation to do so.

Martijn

-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Re: New to Wicket: Confused with versions, wicket-extensions, looking for date picker

2008-06-30 Thread jdj

Yes, I did see that. And I went to the Apache Wicket website, found something
about Wicket extensions, and discovered that the date picker component is no
longer included.

And so I asked my question: Is there a date picker component available in
the current version of Wicket or Wicket Extenstions? If so, where can I find
it? If not, then where can I find a date picker for Wicket?

- Jesper


Nino.Martinez wrote:
 
 did you see:
 
 
   IMPORTANT NOTICE
 
 Wicket 1.2 is no longer supported. For supported versions go to Apache 
 Wicket http://wicket.apache.org.
 
 
 Please look at the apache web site...:) Sourceforge is sort of 
 deprecated and only contains information on wicket 1.2
 

-- 
View this message in context: 
http://www.nabble.com/New-to-Wicket%3A-Confused-with-versions%2C-wicket-extensions%2C-looking-for-date-picker-tp18190491p18193655.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: New to Wicket: Confused with versions, wicket-extensions, looking for date picker

2008-06-30 Thread jdj

Thanks - where can I find more information about that datetime component?


Charlie Dobbie wrote:
 
 There's a Datepicker component in the wicket-datetime package.  If using
 Maven:
 
 dependency
   groupIdorg.apache.wicket/groupId
   artifactIdwicket-datetime/artifactId
   version1.3.4/version
 /dependency
 

-- 
View this message in context: 
http://www.nabble.com/New-to-Wicket%3A-Confused-with-versions%2C-wicket-extensions%2C-looking-for-date-picker-tp18190491p18193690.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Junit Wicket tests in Wasp/Swarm environment

2008-06-30 Thread Maurice Marrink
Apparently the junit tests in wicket 1.3.4 trigger a call to destroy
twice. Since i am setting several fields to null this causes the
second destroy to fail.
As a quick fix i have put some nullchecks in the code. A new snapshot
should be available shortly (see
http://wicketstuff.org/teamcity/overview.html ). You can force maven
to download this new snapshot by using the -U flag.

I will check why wicket is now doing a dual destroy and correct this
if possible.

Maurice

On Mon, Jun 30, 2008 at 12:48 PM, Andrea Jahn
[EMAIL PROTECTED] wrote:
 Hi,

 I was using Wicket 1.3.3 and tester.destroy() worked fine.

 But I had to change to Wicket 1.3.4 (because of WICKET-1558) and now I get
 the
 following Exception when tester.destroy() is called:

 java.lang.NullPointerException
  at
 org.apache.wicket.security.swarm.actions.SwarmActionFactory.destroy(SwarmActionFactory.java:502)
  at
 org.apache.wicket.security.WaspWebApplication.onDestroy(WaspWebApplication.java:107)
  at org.apache.wicket.Application.internalDestroy(Application.java:890)
  at
 org.apache.wicket.protocol.http.WebApplication.internalDestroy(WebApplication.java:448)
  at
 org.apache.wicket.protocol.http.MockWebApplication.destroy(MockWebApplication.java:674)
  at test.front.LoginTest.tearDown(LoginTest.java:65)
  at junit.framework.TestCase.runBare(TestCase.java:140)
  at junit.framework.TestResult$1.protect(TestResult.java:110)
  at junit.framework.TestResult.runProtected(TestResult.java:128)
  at junit.framework.TestResult.run(TestResult.java:113)
  at junit.framework.TestCase.run(TestCase.java:124)
  at junit.framework.TestSuite.runTest(TestSuite.java:232)
  at junit.framework.TestSuite.run(TestSuite.java:227)
  at
 org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
  at
 org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
  at
 org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
  at
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
  at
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
  at
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
  at
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

 I'm using Wasp/Swarm 1.3-SNAPSHOT.

 Thanks
 Andrea



 2008/6/20, Maurice Marrink [EMAIL PROTECTED]:

 In the teardown do tester.destroy() this will clean up everything.

 Maurice

 On Fri, Jun 20, 2008 at 10:16 AM, Andrea Jahn
 [EMAIL PROTECTED] wrote:
  Hi,
  Thank you very much for the Java solution :) !
  I have also corrected the place to return a new custom session :).
 
  Now the first test case runs without problems,
  but in the second and third test case I get the following exception:
 
  java.lang.IllegalArgumentException: Another ActionFactory is already
  registered with the following key:
 test.front.MyWicketTester$1:MyAppl-login
   at
 
 org.apache.wicket.security.actions.Actions.registerActionFactory(Actions.java:80)
   at
 
 org.apache.wicket.security.swarm.actions.SwarmActionFactory.init(SwarmActionFactory.java:86)
   at
 
 xxx.yyy.zzz.front.security.MyActionFactory.init(MyActionFactory.java:28)
   at
 
 xxx.yyy.zzz.front.MyApplication.setupActionFactory(MyApplication.java:177)
   at
 
 org.apache.wicket.security.swarm.SwarmWebApplication.init(SwarmWebApplication.java:96)
   at xxx.yyy.zzz.front.MyApplication.init(MyApplication.java:38)
   at
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:526)
   at
 
 org.apache.wicket.protocol.http.MockWebApplication.init(MockWebApplication.java:151)
   at
 
 org.apache.wicket.util.tester.BaseWicketTester.init(BaseWicketTester.java:205)
   at
 org.apache.wicket.util.tester.WicketTester.init(WicketTester.java:308)
   at
 org.apache.wicket.util.tester.WicketTester.init(WicketTester.java:291)
   at test.front.MyWicketTester.init(MyWicketTester.java:27)
   at test.front.LoginTest.setUp(LoginTest.java:50)
   at junit.framework.TestCase.runBare(TestCase.java:132)
 
 
  I tried to unregister the hive, but anyway the exception is thrown.
  How can I remove the ActionFactory ? Or can I avoid, that it is
 registered
  again ?
 
  Thanks again
  Andrea
 
 
 
  public class MyWicketTester extends WicketTester
  {
   public MyWicketTester(final ApplicationContextMock appctx)
   {
 super(new MyApplication() {
   @Override
   protected void initSpring() {
 
 addComponentInstantiationListener(new
 SpringComponentInjector(this,
  appctx));
 InjectorHolder.getInjector().inject(this);
   };
 
   @Override
   public Session newSession(final Request request, Response response)
 {
...
   }
 });
   }
  }
 
 
  public class LoginTest extends TestCase
  {
   private WicketTester tester;
   private FormTester form;
   private PersonService personServiceMock;
   private LocationService 

Re: Wikcet Freechart and SVG

2008-06-30 Thread Federico Fanton
On Sun, 29 Jun 2008 21:03:29 -0300
Manuel Corrales [EMAIL PROTECTED] wrote:

 Hey, great!! But still having issues, sorry to bother you again. Now i added
 the svg to the page, but the browser do not display it. The image is there,
 because when i right click the broken image that is displayed by the broser
 and press save as, i can save the svg and is good. Should my html tag be
 different, or should i set something else on my code:

Not every browser handles SVGs directly, some need a plugin (guess which one :) 
).. In our project I use the object .../ tag, so for example when the page is 
rendered it has a

object style=height: 32px; width: 32px; data=images/logo.svg/

Bye!


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



Re: New to Wicket: Confused with versions, wicket-extensions etc.

2008-06-30 Thread Martijn Dashorst
On Mon, Jun 30, 2008 at 2:57 PM, Maurice Marrink [EMAIL PROTECTED] wrote:
 Is there a date picker component available in the current version of Wicket
 or Wicket Extenstions? If so, where can I find it? If not, then where can I
 find a date picker for Wicket?

 Extensions still has a datepicker
 org.apache.wicket.extensions.yui.calendar.DatePicker

That is in DateTime

Martijn

-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Re: New to Wicket: Confused with versions, wicket-extensions etc.

2008-06-30 Thread Maurice Marrink
On Mon, Jun 30, 2008 at 3:02 PM, Martijn Dashorst
[EMAIL PROTECTED] wrote:
 On Mon, Jun 30, 2008 at 2:57 PM, Maurice Marrink [EMAIL PROTECTED] wrote:
 Is there a date picker component available in the current version of Wicket
 or Wicket Extenstions? If so, where can I find it? If not, then where can I
 find a date picker for Wicket?

 Extensions still has a datepicker
 org.apache.wicket.extensions.yui.calendar.DatePicker

 That is in DateTime

 Martijn

You are correct :) the packagename threw me off.

Maurice

 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.4 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



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



Re: New to Wicket: Confused with versions, wicket-extensions, looking for date picker

2008-06-30 Thread Frank Bille
This question is asked twice. See[0] for the other thread:

[0]:
http://www.nabble.com/New-to-Wicket%3A-Confused-with-versions%2C-wicket-extensions-etc.-tp18190491p18190491.html

On Mon, Jun 30, 2008 at 10:00 AM, jdj [EMAIL PROTECTED] wrote:


 Hello,

 I'm new to Wicket. I'm using Wicket 1.3.3.

 I'm looking for a date picker component for Wicket, and I noticed that
 there
 is one in the  http://wicket.sourceforge.net/wicket-extensions/
 wicket-extensionshttp://wicket.sourceforge.net/wicket-extensions/wicket-extensions
  package. However, the information on that website seems
 to be out of date, it's about wicket-extensions 1.2 while the newest
 version
 in the Maven repository is wicket-extensions 1.3.3.

 In wicket-extensions 1.3.3, the DatePicker, which was in the package
 wicket.extensions.markup.html.datepicker in version 1.2, seems to be gone.

 I cannot find documentation for wicket-extensions 1.3.3 anywhere. Where is
 it?

 Is there a date picker component available in the current version of Wicket
 or Wicket Extenstions? If so, where can I find it? If not, then where can I
 find a date picker for Wicket?
 --
 View this message in context:
 http://www.nabble.com/New-to-Wicket%3A-Confused-with-versions%2C-wicket-extensions%2C-looking-for-date-picker-tp18190491p18190491.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: Wikcet Freechart and SVG

2008-06-30 Thread Manuel Corrales
Yes, i know, but i have tried with firefox and opera. Also to implement the
object solution i have to write the image to the disc first and then
dynamically set the data attribute on the object tag.

Nino: what do you mean by where is the page? If i can see a non SVG image
with exactly the same page, shouldn't i be able to see an SVG image?

Best regards.

On Mon, Jun 30, 2008 at 9:24 AM, Federico Fanton [EMAIL PROTECTED] wrote:

 On Sun, 29 Jun 2008 21:03:29 -0300
 Manuel Corrales [EMAIL PROTECTED] wrote:

  Hey, great!! But still having issues, sorry to bother you again. Now i
 added
  the svg to the page, but the browser do not display it. The image is
 there,
  because when i right click the broken image that is displayed by the
 broser
  and press save as, i can save the svg and is good. Should my html tag be
  different, or should i set something else on my code:

 Not every browser handles SVGs directly, some need a plugin (guess which
 one :) ).. In our project I use the object .../ tag, so for example when
 the page is rendered it has a

 object style=height: 32px; width: 32px; data=images/logo.svg/

 Bye!


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




Swarm/Acegi and logging out

2008-06-30 Thread David R Robison
I am using Swarm with Acegi integration. Authentication and 
authorization work fine, but I am having trouble logging out. I use a 
link to a Logout class that implements the following code to log the 
user out.
  
public class LoggedOutPage extends SecureWebPage {

   private static final long serialVersionUID = 1L;

   /**
* Constructor.
*/
   public LoggedOutPage() {
   super();
   logout();
   setResponsePage(MainPage.class);
   }
  
   /**

* log the user out.
*/
   public void logout() {
   SecurityContextHolder.getContext().setAuthentication(null);
   WebRequest webRequest = (WebRequest)getRequest();
   webRequest.getHttpServletRequest().getSession().invalidate();
   }
}

However, when I am redirected to the MainPage.class, the user is not 
asked to login again and the class throws a null pointer error when it 
tries to access the logged in user. Am I doing something wrong?

Thanks, David

--

David R Robison
Open Roads Consulting, Inc.
708 S. Battlefield Blvd., Chesapeake, VA 23322
phone: (757) 546-3401
e-mail: [EMAIL PROTECTED]
web: http://openroadsconsulting.com
blog: http://therobe.blogspot.com
book: http://www.xulonpress.com/book_detail.php?id=2579

This e-mail communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed.  If you are not the intended recipient, you should immediately stop reading this message and delete it from all computers that it resides on. Any unauthorized reading, distribution, copying or other use of this communication (or its attachments) is strictly prohibited.  If you have received this communication in error, please notify us immediately.  









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



Re: Swarm/Acegi and logging out

2008-06-30 Thread Maurice Marrink
You have to realize that both swarm and acegi keep a copy of the
logged in user. So you have to logoff at 2 places.
You could use a logoff page but imo it would be better to do the
logging off in the link itself. Something like:
Link logoff = new Link(logoff)
{

private static final long serialVersionUID = 1L;

public void onClick()
{
WaspSession waspSession = 
((WaspSession)getSession());
if (waspSession.logoff(getLogoffContext()))
{

SecurityContextHolder.getContext().setAuthentication(null);
// homepage is not allowed anymore so 
we end up at the loginpage

setResponsePage(Application.get().getHomePage());

}
else
error(A problem occured during the 
logoff process, please try
again or contact support);
}
};
add(logoff);

By placing this link on your basepage all pages extending from
basepage will have a logoff button.

Maurice
On Mon, Jun 30, 2008 at 4:10 PM, David R Robison
[EMAIL PROTECTED] wrote:
 I am using Swarm with Acegi integration. Authentication and authorization
 work fine, but I am having trouble logging out. I use a link to a Logout
 class that implements the following code to log the user out.
  public class LoggedOutPage extends SecureWebPage {
   private static final long serialVersionUID = 1L;

   /**
* Constructor.
*/
   public LoggedOutPage() {
   super();
   logout();
   setResponsePage(MainPage.class);
   }
 /**
* log the user out.
*/
   public void logout() {
   SecurityContextHolder.getContext().setAuthentication(null);
   WebRequest webRequest = (WebRequest)getRequest();
   webRequest.getHttpServletRequest().getSession().invalidate();
   }
 }

 However, when I am redirected to the MainPage.class, the user is not asked
 to login again and the class throws a null pointer error when it tries to
 access the logged in user. Am I doing something wrong?
 Thanks, David

 --

 David R Robison
 Open Roads Consulting, Inc.
 708 S. Battlefield Blvd., Chesapeake, VA 23322
 phone: (757) 546-3401
 e-mail: [EMAIL PROTECTED]
 web: http://openroadsconsulting.com
 blog: http://therobe.blogspot.com
 book: http://www.xulonpress.com/book_detail.php?id=2579

 This e-mail communication (including any attachments) may contain
 confidential and/or privileged material intended solely for the individual
 or entity to which it is addressed.  If you are not the intended recipient,
 you should immediately stop reading this message and delete it from all
 computers that it resides on. Any unauthorized reading, distribution,
 copying or other use of this communication (or its attachments) is strictly
 prohibited.  If you have received this communication in error, please notify
 us immediately.







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



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



Re: [PROPOSAL] Use path in URL when target is instance of BookmarkablePageRequestTarget

2008-06-30 Thread Peter Ertl
+1 -- sounds reasonable, doesn't break anything (hopefully :-), easier  
path-based security on apache front end proxy, 


Good work, David :-)



Am 30.06.2008 um 07:33 schrieb David Leangen:




Wouldn't this be useless except from the fact of been pretty ?


Yes, it would indeed be useless in that functionally, it contributes
nothing. It also takes nothing away. So by definition I guess that's a
refactoring.

The purpose of this refactoring, just like any other for that  
matter, is

to better communicate intent.


Cheers,
David



On Mon, Jun 30, 2008 at 2:12 AM, David Leangen [EMAIL PROTECTED]  
wrote:




Currently, when a target is an instance of
IListenerInterfaceRequestTarget, the URL gets mounted (so to  
speak) on

the root of where the wicket application is located.

So, if the servlet context path for the wicket application is set
to /home/, then all targets (whether bookmarkable or not), are  
written

as something like /home/?wicket:interface=:0.

This works, but I think it somewhat defeats the purpose of having
mounted pages.

Rather, I think it would be better that when the target is an  
instance

of BookmarkablePageRequestTarget, since we can get the target path
easily, we should therefore write the URL to that target path, and  
not

the application's root path.

So, if I have a form on a page mounted at /home/myform, the above  
link

gets rendered as /home/myform/?wicket:interface=:0 instead.


Now, I perfectly understand that this type page has state, so is no
longer bookmarkable. However, at least we can preserve the pretty  
URL

aspect of the page, which IMO is the original intent.

[On that topic, I notice that people often confuse the two
related-but-different topics of pretty urls and bookmarkable  
pages.
I wonder if there isn't a better way of formalising the two  
concepts so

people get less confused... no ideas, just thinking out loud.]


Anyway, I tried this out by modifying WebRequestCodingStrategy.  
The fix

is quite simple and it appears to work without any problems.


If you think this is a reasonable proposal, I will create an issue  
and

submit my patch.


Thank you!
David




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





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



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



Re: [nbusers] WebApp Src/Html/css Updating == Redeploying / Refreshing Way

2008-06-30 Thread Francisco Diaz Trepat - gmail
Thanks Elco we are looking at the article right now.

f(t)

PS: We have your early edition, it was great, it is great. Thank you.

On Sun, Jun 29, 2008 at 3:50 PM, Eelco Hillenius [EMAIL PROTECTED]
wrote:

 I don't think it's Wicket's fault either, but someone could scan
 Wicket's code for problems like described here:
 http://blogs.sun.com/fkieviet/entry/classloader_leaks_the_dreaded_java

 Eelco

 On Fri, Jun 27, 2008 at 11:58 AM, Francisco Diaz Trepat - gmail
 [EMAIL PROTECTED] wrote:
  Hi I send this mail to the Netbeans user list. And this is what some has
  responded. I don't think is the case, and I know this is a wicket list,
 but
  could some-one developing wicket on  netbeans 6.1 is dealing or has dealt
  with this issue?
 
  Thanks,
  f(t)
 
  -- Forwarded message --
  From: Petr Hejl [EMAIL PROTECTED]
  Date: Fri, Jun 27, 2008 at 2:31 PM
  Subject: Re: [nbusers] WebApp Src/Html/css Updating == Redeploying /
  Refreshing Way
  To: [EMAIL PROTECTED]
  Cc: Petr Jiricka [EMAIL PROTECTED]
 
 
  Hi,
  this is usually bug (memory leak) in used framework. For example
 hibernate
  is using PermGen space a lot and there were several issues (leaks)
 related
  to this. It is usually related to dynamically created classes.
  P.
 
 
  Francisco Diaz Trepat - gmail wrote:
 
  Hi, we are having the following problem, and believe it is the way we
 work
  with it. On developing mode the Apache Tomcat fails saying out of
 memory.
 
  We are developing a Wicket app.
 
  Each change we do, we basically run the project again, or do a
 right-click
  == undeply and deploy
 
  Some times we touch a CSS or and HTML file, and have to touch a JAVA
 file
  just to reload it.
 
  After a few or better said, many, times of doing this (some touch,
 re-run,
  or undeploy-deploy) the Apache finally fails throwing an exception of
 Out of
  memory and something about perm objects.
 
  On Eclipse, a coworker is just Saving the CSS file to see the changes on
  the Browser, he doesn't need to re-run or re-deploy.
 
  Can some one tell me what we are doing wrong?
 
  Thanks,
  f(t)
 
 
 

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




Re: Swarm/Acegi and logging out

2008-06-30 Thread David R Robison
Thanks for the quick reply. In the code, do I need to keep around my 
original LoginContext and return it with getLogoffContext() call or does 
it not matter what Login Context I send to logoff? If so, is the current 
LogonContext saved somewhere in wicket already?

Thanks, David

Maurice Marrink wrote:

You have to realize that both swarm and acegi keep a copy of the
logged in user. So you have to logoff at 2 places.
You could use a logoff page but imo it would be better to do the
logging off in the link itself. Something like:
Link logoff = new Link(logoff)
{

private static final long serialVersionUID = 1L;

public void onClick()
{
WaspSession waspSession = 
((WaspSession)getSession());
if (waspSession.logoff(getLogoffContext()))
{

SecurityContextHolder.getContext().setAuthentication(null);
// homepage is not allowed anymore so 
we end up at the loginpage

setResponsePage(Application.get().getHomePage());

}
else
error(A problem occured during the 
logoff process, please try
again or contact support);
}
};
add(logoff);

By placing this link on your basepage all pages extending from
basepage will have a logoff button.

Maurice
On Mon, Jun 30, 2008 at 4:10 PM, David R Robison
[EMAIL PROTECTED] wrote:
  

I am using Swarm with Acegi integration. Authentication and authorization
work fine, but I am having trouble logging out. I use a link to a Logout
class that implements the following code to log the user out.
 public class LoggedOutPage extends SecureWebPage {
  private static final long serialVersionUID = 1L;

  /**
   * Constructor.
   */
  public LoggedOutPage() {
  super();
  logout();
  setResponsePage(MainPage.class);
  }
/**
   * log the user out.
   */
  public void logout() {
  SecurityContextHolder.getContext().setAuthentication(null);
  WebRequest webRequest = (WebRequest)getRequest();
  webRequest.getHttpServletRequest().getSession().invalidate();
  }
}

However, when I am redirected to the MainPage.class, the user is not asked
to login again and the class throws a null pointer error when it tries to
access the logged in user. Am I doing something wrong?
Thanks, David

--

David R Robison
Open Roads Consulting, Inc.
708 S. Battlefield Blvd., Chesapeake, VA 23322
phone: (757) 546-3401
e-mail: [EMAIL PROTECTED]
web: http://openroadsconsulting.com
blog: http://therobe.blogspot.com
book: http://www.xulonpress.com/book_detail.php?id=2579

This e-mail communication (including any attachments) may contain
confidential and/or privileged material intended solely for the individual
or entity to which it is addressed.  If you are not the intended recipient,
you should immediately stop reading this message and delete it from all
computers that it resides on. Any unauthorized reading, distribution,
copying or other use of this communication (or its attachments) is strictly
prohibited.  If you have received this communication in error, please notify
us immediately.







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





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

  


--

David R Robison
Open Roads Consulting, Inc.
708 S. Battlefield Blvd., Chesapeake, VA 23322
phone: (757) 546-3401
e-mail: [EMAIL PROTECTED]
web: http://openroadsconsulting.com
blog: http://therobe.blogspot.com
book: http://www.xulonpress.com/book_detail.php?id=2579

This e-mail communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed.  If you are not the intended recipient, you should immediately stop reading this message and delete it from all computers that it resides on. Any unauthorized reading, distribution, copying or other use of this communication (or its attachments) is strictly prohibited.  If you have received this communication in error, please notify us immediately.  








Re: Swarm/Acegi and logging out

2008-06-30 Thread Maurice Marrink
You do not need to return the same instance but you do need to return
an instance of the same class. Swarm does not keep your original
logincontext anywhere, rather it keeps some sort of hash around.
logging off with a new instance of the same class will produce the
same hash. For that purpose most logincontexts have 2 constructors:
one with arguments, so the user can be authenticated. and a no-arg
constructor you can use when logging off.

Maurice

On Mon, Jun 30, 2008 at 4:29 PM, David R Robison
[EMAIL PROTECTED] wrote:
 Thanks for the quick reply. In the code, do I need to keep around my
 original LoginContext and return it with getLogoffContext() call or does it
 not matter what Login Context I send to logoff? If so, is the current
 LogonContext saved somewhere in wicket already?
 Thanks, David

 Maurice Marrink wrote:

 You have to realize that both swarm and acegi keep a copy of the
 logged in user. So you have to logoff at 2 places.
 You could use a logoff page but imo it would be better to do the
 logging off in the link itself. Something like:
 Link logoff = new Link(logoff)
{

private static final long serialVersionUID = 1L;

public void onClick()
{
WaspSession waspSession =
 ((WaspSession)getSession());
if (waspSession.logoff(getLogoffContext()))
{

 SecurityContextHolder.getContext().setAuthentication(null);
// homepage is not allowed anymore
 so we end up at the loginpage

  setResponsePage(Application.get().getHomePage());

}
else
error(A problem occured during the
 logoff process, please try
 again or contact support);
}
};
add(logoff);

 By placing this link on your basepage all pages extending from
 basepage will have a logoff button.

 Maurice
 On Mon, Jun 30, 2008 at 4:10 PM, David R Robison
 [EMAIL PROTECTED] wrote:


 I am using Swarm with Acegi integration. Authentication and authorization
 work fine, but I am having trouble logging out. I use a link to a Logout
 class that implements the following code to log the user out.
  public class LoggedOutPage extends SecureWebPage {
  private static final long serialVersionUID = 1L;

  /**
   * Constructor.
   */
  public LoggedOutPage() {
  super();
  logout();
  setResponsePage(MainPage.class);
  }
/**
   * log the user out.
   */
  public void logout() {
  SecurityContextHolder.getContext().setAuthentication(null);
  WebRequest webRequest = (WebRequest)getRequest();
  webRequest.getHttpServletRequest().getSession().invalidate();
  }
 }

 However, when I am redirected to the MainPage.class, the user is not
 asked
 to login again and the class throws a null pointer error when it tries to
 access the logged in user. Am I doing something wrong?
 Thanks, David

 --

 David R Robison
 Open Roads Consulting, Inc.
 708 S. Battlefield Blvd., Chesapeake, VA 23322
 phone: (757) 546-3401
 e-mail: [EMAIL PROTECTED]
 web: http://openroadsconsulting.com
 blog: http://therobe.blogspot.com
 book: http://www.xulonpress.com/book_detail.php?id=2579

 This e-mail communication (including any attachments) may contain
 confidential and/or privileged material intended solely for the
 individual
 or entity to which it is addressed.  If you are not the intended
 recipient,
 you should immediately stop reading this message and delete it from all
 computers that it resides on. Any unauthorized reading, distribution,
 copying or other use of this communication (or its attachments) is
 strictly
 prohibited.  If you have received this communication in error, please
 notify
 us immediately.







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




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



 --

 David R Robison
 Open Roads Consulting, Inc.
 708 S. Battlefield Blvd., Chesapeake, VA 23322
 phone: (757) 546-3401
 e-mail: [EMAIL PROTECTED]
 web: http://openroadsconsulting.com
 blog: http://therobe.blogspot.com
 book: http://www.xulonpress.com/book_detail.php?id=2579

 This e-mail communication (including any attachments) may contain
 confidential and/or privileged material intended solely for the individual
 or entity to which it is addressed.  If you are not the intended recipient,
 you should immediately stop reading this message and delete it from all
 computers that it resides on. Any unauthorized reading, distribution,
 copying or other use of this communication (or its attachments) is strictly
 prohibited.  If you have 

Re: Wikcet Freechart and SVG

2008-06-30 Thread Nino Saturnino Martinez Vazquez Wael



Manuel Corrales wrote:

Yes, i know, but i have tried with firefox and opera. Also to implement the
object solution i have to write the image to the disc first and then
dynamically set the data attribute on the object tag.

Nino: what do you mean by where is the page? If i can see a non SVG image
with exactly the same page, shouldn't i be able to see an SVG image?

  
I just wanted to see how you implemented it in the page... Both java and 
html (just to double check)... And I saw the part about some browsers 
not handling svg very good.

Best regards.

On Mon, Jun 30, 2008 at 9:24 AM, Federico Fanton [EMAIL PROTECTED] wrote:

  

On Sun, 29 Jun 2008 21:03:29 -0300
Manuel Corrales [EMAIL PROTECTED] wrote:



Hey, great!! But still having issues, sorry to bother you again. Now i
  

added


the svg to the page, but the browser do not display it. The image is
  

there,


because when i right click the broken image that is displayed by the
  

broser


and press save as, i can save the svg and is good. Should my html tag be
different, or should i set something else on my code:
  

Not every browser handles SVGs directly, some need a plugin (guess which
one :) ).. In our project I use the object .../ tag, so for example when
the page is rendered it has a

object style=height: 32px; width: 32px; data=images/logo.svg/

Bye!


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





  


--
-Wicket for love

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


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



Re: Virtual Desktop (Mocha UI, or?)

2008-06-30 Thread Nino Saturnino Martinez Vazquez Wael

I looked into it sometime ago, but there were not a community interest.

I think it's very possible:) And id be happy to answer questions helping 
implement it.


Jan Mikkelsen wrote:

Hi
I am interested in building an application based on Wicket and Mocha UI
(which depends on Mootools). Would that be possible? Does anybody have
experiences with other virtual desktop solutions with Wicket?
Thanks,
Jan Mikkelsen
  


--
-Wicket for love

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


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



Re: Adding custom resource properties files

2008-06-30 Thread Scott Swank
The ComponentStringResourceLoader uses an Iterator named something
like (no code in front of me) ResourceNameIterator.  This iterator
is used to find resources and markup.  You can't just set it on the
Application.getResourceSettings (though I should create a jira  patch
for that...), so you have to subclass the main string and markup
loaders to use your own iterator.  Then you put those loaders on
Application.getResouceSettings.

I'll fill in more details after I'm at work if that above is unclear.

- Scott


On Mon, Jun 30, 2008 at 3:49 AM, Lorenzo Bolzani [EMAIL PROTECTED] wrote:
 Hi,
 we have two pages sharing the same set of user messages so we would
 like to be able to share the same file.
 The two pages are different and cannot subclass a same parent.
 We cannot extract a common component because we have two different
 views on the same data.

 Maybe we could define an empty panel and share that only for the user
 massages but I do not like this idea.

 Is there a way to add/override a new resource file at the page level?
 So that key are looked up in this way:

 component
 form
 page
 custom page file- this is new
 application

 and at the class level too. In other words I just want to insert e new file.

 We looked at IResourceLoader and this looks like an option
 (registering a custom Loader in the application init()). We tried and
 this works.

 The problem is how to integrate this new Loader with the standard
 ComponentStringResourceLoader so that the key is looked up also in the
 standard way.

 We had a look at PropertiesFactory trying to register a new file, but
 the list of resources is determined by a ResourceNameIterator in the
 method loadStringResources and is not easy to modify the behaviour of
 this method.
 So the only options seems to be to extend
 ComponentStringResourceLoader overriding loadStringResource(Class,
 String, Locale, String) with a big cut and paste.

 Is there any other option?


 Thanks, bye


 Lorenzo

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



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



Re: redirect page in the constructor

2008-06-30 Thread Igor Vaynberg
does it work?

-igor

On Mon, Jun 30, 2008 at 2:28 AM, Eyal Golan [EMAIL PROTECTED] wrote:
 OK.
 That is what I did.
 So, if a instantiate a page and then put it as a parameter in the exception,
 I am fine?
 ...
 TicketTreeQueuePage ticketTreeQueuePage = new
 TicketTreeQueuePage(pageParameters);
 throw new RestartResponseAtInterceptPageException(ticketTreeQueuePage);


 Thanks


 On Wed, Jun 25, 2008 at 5:11 PM, Igor Vaynberg [EMAIL PROTECTED]
 wrote:

 use restartresponseexception instead

 -igor

 On Wed, Jun 25, 2008 at 5:36 AM, Eyal Golan [EMAIL PROTECTED] wrote:
  Hi,
  After reviewing some discussion regarding the issue.
  http://issues.apache.org/jira/browse/WICKET-696
 
  and
 
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg30288.html
 
  What is the conclusion?
  Is the original page being mapped or no?
 
  thanks
 
  --
  Eyal Golan
  [EMAIL PROTECTED]
 
  Visit: http://jvdrums.sourceforge.net/
  LinkedIn: http://www.linkedin.com/in/egolan74
 
  P Save a tree. Please don't print this e-mail unless it's really
 necessary
 

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




 --
 Eyal Golan
 [EMAIL PROTECTED]

 Visit: http://jvdrums.sourceforge.net/
 LinkedIn: http://www.linkedin.com/in/egolan74

 P Save a tree. Please don't print this e-mail unless it's really necessary


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



Re: Validation .properties File Location

2008-06-30 Thread Igor Vaynberg
validators do not yet support their own bundles. i believe this is
scheduled for 1.5

-igor

On Mon, Jun 30, 2008 at 6:30 AM, Hoover, William [EMAIL PROTECTED] wrote:
 Does custom validation .properties default to the class package of the
 validator (similar to how .java and .properties work with WebPage)?

 org.mycompany.validation.AbcValidation.java
 org.mycompany.validation.AbcValidation.properties


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



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



Re: Problem test RadioChoice

2008-06-30 Thread Fabien D.

Hi,

Have you try :

YourRadioChoice.add(new AjaxFormComponentUpdatingBehavior(onchange) {
private static final long serialVersionUID = 1L;
protected void onUpdate(AjaxRequestTarget target) {
..
target.addComponent(Component);
}
});

-- 
View this message in context: 
http://www.nabble.com/Problem-test-RadioChoice-tp18196023p18198138.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Adding custom resource properties files

2008-06-30 Thread Igor Vaynberg
why not put these common messages into yourapplication.properties ?

-igor

On Mon, Jun 30, 2008 at 3:49 AM, Lorenzo Bolzani [EMAIL PROTECTED] wrote:
 Hi,
 we have two pages sharing the same set of user messages so we would
 like to be able to share the same file.
 The two pages are different and cannot subclass a same parent.
 We cannot extract a common component because we have two different
 views on the same data.

 Maybe we could define an empty panel and share that only for the user
 massages but I do not like this idea.

 Is there a way to add/override a new resource file at the page level?
 So that key are looked up in this way:

 component
 form
 page
 custom page file- this is new
 application

 and at the class level too. In other words I just want to insert e new file.

 We looked at IResourceLoader and this looks like an option
 (registering a custom Loader in the application init()). We tried and
 this works.

 The problem is how to integrate this new Loader with the standard
 ComponentStringResourceLoader so that the key is looked up also in the
 standard way.

 We had a look at PropertiesFactory trying to register a new file, but
 the list of resources is determined by a ResourceNameIterator in the
 method loadStringResources and is not easy to modify the behaviour of
 this method.
 So the only options seems to be to extend
 ComponentStringResourceLoader overriding loadStringResource(Class,
 String, Locale, String) with a big cut and paste.

 Is there any other option?


 Thanks, bye


 Lorenzo

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



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



Re: Problem test RadioChoice

2008-06-30 Thread Igor Vaynberg
i dont think the tester supports onselectionchanged callbacks. file an RFE

-igor

On Mon, Jun 30, 2008 at 6:43 AM, Murat Yücel [EMAIL PROTECTED] wrote:
 Hi All

 I have some problem testing a RadioChoice which is overrides the methods:
 wantOnSelectionChangedNotifications and onSelectionChanged.

 In my test class i use the method select on the FormTester, but is seems
 like the onSelectionChanged method is never called.
 I have looked at the select code and it seems like there have been made some
 logic for a DropDownChoice.

 Does this only work for a DropDown or am i doing something wrong?

 /Murat


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



modal CloseButtonCallback returning old value

2008-06-30 Thread taygolf

hey guys. I have a problem that is stumping me. I have 2 textfields one
called type and one called subtype. THey both have modal windows that are
opened to show the list of values that can be selected for them. Of course I
have it setup where the user can not select a subtype before they select a
type and the list of values for subtype changes depending on what subtype is
selected.

Now if I user selects a type and subtype and then decideds to change the
type I am setting the subtype to blank. This all works fine. Now when the
user decides to select a new subtype they are presented with the correct
list to choose from. If instead of selecting a value and clicking submit the
user for some strange reason decides to click the X button to close the
modal window the old value that was whipped out and replaced with blank when
the user choose a new type returns to the blank! I can not allow this to
happen even though it will probably not happen often in the real world.

My quick fix is to set onCloseButtonClicked to return false. This forces the
user to pick a value but I would rather figure out what is allowing it to
put in the old value. I am guessing that it is coming from cache some how
but I am not sure.

Any suggestions?

Thanks

T 
-- 
View this message in context: 
http://www.nabble.com/modal-CloseButtonCallback-returning-old-value-tp18198443p18198443.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wikcet Freechart and SVG

2008-06-30 Thread Manuel Corrales
Here is the page code: (this is all prototype code, just messing around with
graphics on wicket)

JFreeChart chart = ChartFactory.createPieChart(Resumen de gastos,
dataSet, true, true, false);
PiePlot plot = (PiePlot) chart.getPlot();
plot.setSectionOutlinesVisible(false);
add(new Image(image,new JFreeChartImage(image, chart, 640,
480)));

Thanks a lot!!

On Mon, Jun 30, 2008 at 11:36 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:



 Manuel Corrales wrote:

 Yes, i know, but i have tried with firefox and opera. Also to implement
 the
 object solution i have to write the image to the disc first and then
 dynamically set the data attribute on the object tag.

 Nino: what do you mean by where is the page? If i can see a non SVG image
 with exactly the same page, shouldn't i be able to see an SVG image?



 I just wanted to see how you implemented it in the page... Both java and
 html (just to double check)... And I saw the part about some browsers not
 handling svg very good.

 Best regards.

 On Mon, Jun 30, 2008 at 9:24 AM, Federico Fanton [EMAIL PROTECTED] wrote:



 On Sun, 29 Jun 2008 21:03:29 -0300
 Manuel Corrales [EMAIL PROTECTED] wrote:



 Hey, great!! But still having issues, sorry to bother you again. Now i


 added


 the svg to the page, but the browser do not display it. The image is


 there,


 because when i right click the broken image that is displayed by the


 broser


 and press save as, i can save the svg and is good. Should my html tag be
 different, or should i set something else on my code:


 Not every browser handles SVGs directly, some need a plugin (guess which
 one :) ).. In our project I use the object .../ tag, so for example
 when
 the page is rendered it has a

 object style=height: 32px; width: 32px; data=images/logo.svg/

 Bye!


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








 --
 -Wicket for love

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


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




Re: Wikcet Freechart and SVG

2008-06-30 Thread Nino Saturnino Martinez Vazquez Wael

hmm whats JFreeChart image?


I usually do this, in my domain classes :

   JFreeChart chart = ChartFactory
   .createTimeSeriesChart(
   Messages.getString(ReportWeightChart.5, 
locale), Messages.getString(ReportWeightChart.6, locale), 
Messages.getString(ReportWeightChart.7, locale), dataset, true, true, 
false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

   return chart.createBufferedImage(500, 270);

And this in the wicket page :

   Report simpleReport = (Report) item.getModelObject();

   BufferedImage report = simpleReport.getReport(getLocale());
   ImageResource imageResource = new ImageResource(report);
   item.add(new Image(image, imageResource));


Ahh, I see you are mixing things(found the JFreeChart on the wiki).. You 
cant do it like that it should be like this(although the otherway can 
also be done):


JFreeChart chart = ChartFactory.createPieChart(Resumen de gastos,
   dataSet, true, true, false);
   PiePlot plot = (PiePlot) chart.getPlot();
   plot.setSectionOutlinesVisible(false);
   add(new Image(image,chart.createBufferedImage(640, 480)));




Manuel Corrales wrote:

Here is the page code: (this is all prototype code, just messing around with
graphics on wicket)

JFreeChart chart = ChartFactory.createPieChart(Resumen de gastos,
dataSet, true, true, false);
PiePlot plot = (PiePlot) chart.getPlot();
plot.setSectionOutlinesVisible(false);
add(new Image(image,new JFreeChartImage(image, chart, 640,
480)));

Thanks a lot!!

On Mon, Jun 30, 2008 at 11:36 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

  

Manuel Corrales wrote:



Yes, i know, but i have tried with firefox and opera. Also to implement
the
object solution i have to write the image to the disc first and then
dynamically set the data attribute on the object tag.

Nino: what do you mean by where is the page? If i can see a non SVG image
with exactly the same page, shouldn't i be able to see an SVG image?



  

I just wanted to see how you implemented it in the page... Both java and
html (just to double check)... And I saw the part about some browsers not
handling svg very good.



Best regards.

On Mon, Jun 30, 2008 at 9:24 AM, Federico Fanton [EMAIL PROTECTED] wrote:



  

On Sun, 29 Jun 2008 21:03:29 -0300
Manuel Corrales [EMAIL PROTECTED] wrote:





Hey, great!! But still having issues, sorry to bother you again. Now i


  

added




the svg to the page, but the browser do not display it. The image is


  

there,




because when i right click the broken image that is displayed by the


  

broser




and press save as, i can save the svg and is good. Should my html tag be
different, or should i set something else on my code:


  

Not every browser handles SVGs directly, some need a plugin (guess which
one :) ).. In our project I use the object .../ tag, so for example
when
the page is rendered it has a

object style=height: 32px; width: 32px; data=images/logo.svg/

Bye!


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







  

--
-Wicket for love

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


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





  


--
-Wicket for love

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


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



Wicket Iolite, maven guru wanted

2008-06-30 Thread Nino Saturnino Martinez Vazquez Wael

Hi

Could some maven guru please take a look at wicket iolite..? The problem 
are that it is a multi module project, so in order to get it working I 
had to map everything as resources in the archetype.xml , this it 
not good because the java package mojo does not look on these files 
meaning that java packages arent supported:(


--
-Wicket for love

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


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



Re: redirect page in the constructor

2008-06-30 Thread Igor Vaynberg
On Mon, Jun 30, 2008 at 11:59 AM, Bruno Borges [EMAIL PROTECTED] wrote:
 I have an idea that sounds crazy,  but imho,  is better then throwing an
 exception (stack trace is a little bit expensive to the VM).

right, because we dont care about performance :)

/**
 * Immediately aborts any further processing.
 *
 * @author Igor Vaynberg (ivaynberg)
 */
public class AbortException extends RuntimeException
{
private static final long serialVersionUID = 1L;

/**
 * @see java.lang.Throwable#fillInStackTrace()
 */
public synchronized Throwable fillInStackTrace()
{
// we do not need a stack trace, so to speed things up just 
return null
return null;
}

}


-igor





 Here  it goes:

 public class MyPage extends WebPage {
  @Redirect(MyPageRedirector.class)
  public MyPage() {
add(new Label(label, Foo));
  }

  public static class MyPageRedirector implements IRedirectPage {
public void redirect(Object ... args) {
  // args is an array of objects that might be passed as arguments to
 MyPage annotated constructor, if it has arguments
  if (args[0].equals(success)) {
RequestCycle.get().setResponsePage(AnotherPage.class);
  }
}
  }
 }

 The concept here is to define a class that implements  IRedirectPage and
 annotate the constructor which must check something if it intents to
 redirect to another page. IMHO,  this is a nice feature as it sounds more
 elegant than throwing an exception and saves a lot of object creation time.

 Any thoughts?

 []'s

 --
 Bruno Borges
 blog.brunoborges.com.br
 +55 21 76727099

 The glory of great men should always be
 measured by the means they have used to
 acquire it.
 - Francois de La Rochefoucauld

 On Mon, Jun 30, 2008 at 12:23 PM, Igor Vaynberg [EMAIL PROTECTED]
 wrote:

 does it work?

 -igor

 On Mon, Jun 30, 2008 at 2:28 AM, Eyal Golan [EMAIL PROTECTED] wrote:
  OK.
  That is what I did.
  So, if a instantiate a page and then put it as a parameter in the
 exception,
  I am fine?
  ...
  TicketTreeQueuePage ticketTreeQueuePage = new
  TicketTreeQueuePage(pageParameters);
  throw new RestartResponseAtInterceptPageException(ticketTreeQueuePage);
 
 
  Thanks
 
 
  On Wed, Jun 25, 2008 at 5:11 PM, Igor Vaynberg [EMAIL PROTECTED]
  wrote:
 
  use restartresponseexception instead
 
  -igor
 
  On Wed, Jun 25, 2008 at 5:36 AM, Eyal Golan [EMAIL PROTECTED] wrote:
   Hi,
   After reviewing some discussion regarding the issue.
   http://issues.apache.org/jira/browse/WICKET-696
  
   and
  
 
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg30288.html
  
   What is the conclusion?
   Is the original page being mapped or no?
  
   thanks
  
   --
   Eyal Golan
   [EMAIL PROTECTED]
  
   Visit: http://jvdrums.sourceforge.net/
   LinkedIn: http://www.linkedin.com/in/egolan74
  
   P Save a tree. Please don't print this e-mail unless it's really
  necessary
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  --
  Eyal Golan
  [EMAIL PROTECTED]
 
  Visit: http://jvdrums.sourceforge.net/
  LinkedIn: http://www.linkedin.com/in/egolan74
 
  P Save a tree. Please don't print this e-mail unless it's really
 necessary
 

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




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



Re: redirect page in the constructor

2008-06-30 Thread Bruno Borges
I know that Igor. In fact, I wasn't thinking really about performance here.
I suggested the annotation because sounds more objective than throwing an
exception. Exceptions are for errors or invalidations. Redirection is a flow
control. No error in that.

But,  anyway... it was an idea... Ideas are born to be killed or to grow up.
:-)

[]'s
--
Bruno Borges
blog.brunoborges.com.br
+55 21 76727099

The glory of great men should always be
measured by the means they have used to
acquire it.
- Francois de La Rochefoucauld

On Mon, Jun 30, 2008 at 4:07 PM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 On Mon, Jun 30, 2008 at 11:59 AM, Bruno Borges [EMAIL PROTECTED]
 wrote:
  I have an idea that sounds crazy,  but imho,  is better then throwing an
  exception (stack trace is a little bit expensive to the VM).

 right, because we dont care about performance :)

 /**
  * Immediately aborts any further processing.
  *
  * @author Igor Vaynberg (ivaynberg)
  */
 public class AbortException extends RuntimeException
 {
private static final long serialVersionUID = 1L;

/**
 * @see java.lang.Throwable#fillInStackTrace()
 */
public synchronized Throwable fillInStackTrace()
{
// we do not need a stack trace, so to speed things up just
 return null
return null;
}

 }


 -igor




 
  Here  it goes:
 
  public class MyPage extends WebPage {
   @Redirect(MyPageRedirector.class)
   public MyPage() {
 add(new Label(label, Foo));
   }
 
   public static class MyPageRedirector implements IRedirectPage {
 public void redirect(Object ... args) {
   // args is an array of objects that might be passed as arguments to
  MyPage annotated constructor, if it has arguments
   if (args[0].equals(success)) {
 RequestCycle.get().setResponsePage(AnotherPage.class);
   }
 }
   }
  }
 
  The concept here is to define a class that implements  IRedirectPage and
  annotate the constructor which must check something if it intents to
  redirect to another page. IMHO,  this is a nice feature as it sounds more
  elegant than throwing an exception and saves a lot of object creation
 time.
 
  Any thoughts?
 
  []'s
 
  --
  Bruno Borges
  blog.brunoborges.com.br
  +55 21 76727099
 
  The glory of great men should always be
  measured by the means they have used to
  acquire it.
  - Francois de La Rochefoucauld
 
  On Mon, Jun 30, 2008 at 12:23 PM, Igor Vaynberg [EMAIL PROTECTED]
 
  wrote:
 
  does it work?
 
  -igor
 
  On Mon, Jun 30, 2008 at 2:28 AM, Eyal Golan [EMAIL PROTECTED] wrote:
   OK.
   That is what I did.
   So, if a instantiate a page and then put it as a parameter in the
  exception,
   I am fine?
   ...
   TicketTreeQueuePage ticketTreeQueuePage = new
   TicketTreeQueuePage(pageParameters);
   throw new
 RestartResponseAtInterceptPageException(ticketTreeQueuePage);
  
  
   Thanks
  
  
   On Wed, Jun 25, 2008 at 5:11 PM, Igor Vaynberg 
 [EMAIL PROTECTED]
   wrote:
  
   use restartresponseexception instead
  
   -igor
  
   On Wed, Jun 25, 2008 at 5:36 AM, Eyal Golan [EMAIL PROTECTED]
 wrote:
Hi,
After reviewing some discussion regarding the issue.
http://issues.apache.org/jira/browse/WICKET-696
   
and
   
  
 
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg30288.html
   
What is the conclusion?
Is the original page being mapped or no?
   
thanks
   
--
Eyal Golan
[EMAIL PROTECTED]
   
Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74
   
P Save a tree. Please don't print this e-mail unless it's really
   necessary
   
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
   --
   Eyal Golan
   [EMAIL PROTECTED]
  
   Visit: http://jvdrums.sourceforge.net/
   LinkedIn: http://www.linkedin.com/in/egolan74
  
   P Save a tree. Please don't print this e-mail unless it's really
  necessary
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

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




Re: redirect page in the constructor

2008-06-30 Thread Eyal Golan
Igor,
Yes it does work

On Mon, Jun 30, 2008 at 6:23 PM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 does it work?

 -igor

 On Mon, Jun 30, 2008 at 2:28 AM, Eyal Golan [EMAIL PROTECTED] wrote:
  OK.
  That is what I did.
  So, if a instantiate a page and then put it as a parameter in the
 exception,
  I am fine?
  ...
  TicketTreeQueuePage ticketTreeQueuePage = new
  TicketTreeQueuePage(pageParameters);
  throw new RestartResponseAtInterceptPageException(ticketTreeQueuePage);
 
 
  Thanks
 
 
  On Wed, Jun 25, 2008 at 5:11 PM, Igor Vaynberg [EMAIL PROTECTED]
  wrote:
 
  use restartresponseexception instead
 
  -igor
 
  On Wed, Jun 25, 2008 at 5:36 AM, Eyal Golan [EMAIL PROTECTED] wrote:
   Hi,
   After reviewing some discussion regarding the issue.
   http://issues.apache.org/jira/browse/WICKET-696
  
   and
  
 
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg30288.html
  
   What is the conclusion?
   Is the original page being mapped or no?
  
   thanks
  
   --
   Eyal Golan
   [EMAIL PROTECTED]
  
   Visit: http://jvdrums.sourceforge.net/
   LinkedIn: http://www.linkedin.com/in/egolan74
  
   P Save a tree. Please don't print this e-mail unless it's really
  necessary
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  --
  Eyal Golan
  [EMAIL PROTECTED]
 
  Visit: http://jvdrums.sourceforge.net/
  LinkedIn: http://www.linkedin.com/in/egolan74
 
  P Save a tree. Please don't print this e-mail unless it's really
 necessary
 

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




-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P Save a tree. Please don't print this e-mail unless it's really necessary


Re: [PROPOSAL] Use path in URL when target is instance of BookmarkablePageRequestTarget

2008-06-30 Thread Eelco Hillenius
 If you think this is a reasonable proposal, I will create an issue and
 submit my patch.

A good patch attached to an issue is always the best way to convince others :-)

Eelco

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



Re: Slightly-OT: lower tier validation

2008-06-30 Thread Ryan
Eelco,

This is perfect and a great idea. Thanks for sharing. If this isn't
posted somewhere on the wiki I think it would be a great entry.

Thanks again!,
Ryan

On Mon, Jun 30, 2008 at 11:08:59AM -0700, Eelco Hillenius exclaimed:

 Does anyone have any pointers, suggestions, or opinions? Perhaps some wisdom 
 from
 past experiences?

I think Hibernate Validator would be a good way to go. Consider
implementing a variant of IComponentOnBeforeRenderListener to add some
basic validations so that you don't have to get through your business
tier all the time, and can do things like setting field sizes in your
UI automatically. Something like (adjust to your own needs):

public final class ValidationListener implements
IComponentOnBeforeRenderListener {

   public void onBeforeRender(Component component) {
   if (component instanceof FormComponent  
 !component.hasBeenRendered()) {
   processComponent((FormComponent) component);
   }
   }

   public void processComponent(FormComponent component) {
   IModel model = component.getModel();
   if (model instanceof IPropertyReflectionAwareModel) {
   Field field = ((IPropertyReflectionAwareModel) 
 model).getPropertyField();
   if (field != null) {
   processComponentField(field, component);
   }
   }
   }

   private void processComponentField(Field field, FormComponent 
 component) {

   if (field.getDeclaredAnnotations().length  0) {

   if (field.isAnnotationPresent(Column.class)) {

   boolean big = 
 field.isAnnotationPresent((Lob.class));
   Column column = 
 field.getAnnotation(Column.class);

   Class? type = field.getType();
   if (big == false  type.equals(String.class)) {
   addMaxLengthValidator(component, 
 column.length());
   }

   if (column.nullable() == false  type != 
 Boolean.class  type !=
Boolean.TYPE) {
   component.setRequired(true);
   }
   }

   if (field.isAnnotationPresent(EmailValidator.class)) {
   EmailValidator validator = 
 field.getAnnotation(EmailValidator.class);

   
 component.add(EmailAddressValidator.getInstance());

   if (validator.required()) {
   component.setRequired(true);
   }
   }

   if 
 (field.isAnnotationPresent(ts4.valid.annot.StringValidator.class)) {
   ts4.valid.annot.StringValidator validator =
field.getAnnotation(ts4.valid.annot.StringValidator.class);

   if (validator.required()) {
   component.setRequired(true);
   }
   if (validator.min() != 0) {
   
 component.add(StringValidator.minimumLength(validator.min()));
   }
   if (validator.max() != Integer.MAX_VALUE) {
   
 component.add(StringValidator.maximumLength(validator.max()));
   }
   }
   }
   }

   private void addMaxLengthValidator(FormComponent component, final int 
 length) {
   component.add(StringValidator.maximumLength(length));

   if (component instanceof TextField) {
   component.add(new AbstractBehavior() {
   private static final long serialVersionUID = 1L;

   @Override
   public void onComponentTag(Component component, 
 ComponentTag tag) {
   if 
 (tag.getAttributes().get(maxlength) == null) {
   tag.put(maxlength, length);
   }
   }
   });
   }
   }
}


Eelco

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

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



Re: Wikcet Freechart and SVG

2008-06-30 Thread Manuel Corrales
I am going to try your code as soon as i can, but i still don't understand
where are you generating the svg image on this code.

On Mon, Jun 30, 2008 at 1:59 PM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

 hmm whats JFreeChart image?


 I usually do this, in my domain classes :

   JFreeChart chart = ChartFactory
   .createTimeSeriesChart(
   Messages.getString(ReportWeightChart.5, locale),
 Messages.getString(ReportWeightChart.6, locale),
 Messages.getString(ReportWeightChart.7, locale), dataset, true, true,
 false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
   return chart.createBufferedImage(500, 270);

 And this in the wicket page :

   Report simpleReport = (Report) item.getModelObject();

   BufferedImage report = simpleReport.getReport(getLocale());
   ImageResource imageResource = new ImageResource(report);
   item.add(new Image(image, imageResource));


 Ahh, I see you are mixing things(found the JFreeChart on the wiki).. You
 cant do it like that it should be like this(although the otherway can also
 be done):

 JFreeChart chart = ChartFactory.createPieChart(Resumen de gastos,
   dataSet, true, true, false);
   PiePlot plot = (PiePlot) chart.getPlot();
   plot.setSectionOutlinesVisible(false);
   add(new Image(image,chart.createBufferedImage(640, 480)));





 Manuel Corrales wrote:

 Here is the page code: (this is all prototype code, just messing around
 with
 graphics on wicket)

 JFreeChart chart = ChartFactory.createPieChart(Resumen de gastos,
dataSet, true, true, false);
PiePlot plot = (PiePlot) chart.getPlot();
plot.setSectionOutlinesVisible(false);
add(new Image(image,new JFreeChartImage(image, chart, 640,
 480)));

 Thanks a lot!!

 On Mon, Jun 30, 2008 at 11:36 AM, Nino Saturnino Martinez Vazquez Wael 
 [EMAIL PROTECTED] wrote:



 Manuel Corrales wrote:



 Yes, i know, but i have tried with firefox and opera. Also to implement
 the
 object solution i have to write the image to the disc first and then
 dynamically set the data attribute on the object tag.

 Nino: what do you mean by where is the page? If i can see a non SVG
 image
 with exactly the same page, shouldn't i be able to see an SVG image?





 I just wanted to see how you implemented it in the page... Both java and
 html (just to double check)... And I saw the part about some browsers not
 handling svg very good.



 Best regards.

 On Mon, Jun 30, 2008 at 9:24 AM, Federico Fanton [EMAIL PROTECTED]
 wrote:





 On Sun, 29 Jun 2008 21:03:29 -0300
 Manuel Corrales [EMAIL PROTECTED] wrote:





 Hey, great!! But still having issues, sorry to bother you again. Now i




 added




 the svg to the page, but the browser do not display it. The image is




 there,




 because when i right click the broken image that is displayed by the




 broser




 and press save as, i can save the svg and is good. Should my html tag
 be
 different, or should i set something else on my code:




 Not every browser handles SVGs directly, some need a plugin (guess
 which
 one :) ).. In our project I use the object .../ tag, so for example
 when
 the page is rendered it has a

 object style=height: 32px; width: 32px; data=images/logo.svg/

 Bye!


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









 --
 -Wicket for love

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


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








 --
 -Wicket for love

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


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




Re: redirect page in the constructor

2008-06-30 Thread Igor Vaynberg
exceptions are for exceptional circumstances. i think redirecting to a
different page from a constructor of another page is pretty
exceptional...otherwise you wouldnt be in the constructor of the wrong
page :)

-igor

On Mon, Jun 30, 2008 at 12:14 PM, Bruno Borges [EMAIL PROTECTED] wrote:
 I know that Igor. In fact, I wasn't thinking really about performance here.
 I suggested the annotation because sounds more objective than throwing an
 exception. Exceptions are for errors or invalidations. Redirection is a flow
 control. No error in that.

 But,  anyway... it was an idea... Ideas are born to be killed or to grow up.
 :-)

 []'s
 --
 Bruno Borges
 blog.brunoborges.com.br
 +55 21 76727099

 The glory of great men should always be
 measured by the means they have used to
 acquire it.
 - Francois de La Rochefoucauld

 On Mon, Jun 30, 2008 at 4:07 PM, Igor Vaynberg [EMAIL PROTECTED]
 wrote:

 On Mon, Jun 30, 2008 at 11:59 AM, Bruno Borges [EMAIL PROTECTED]
 wrote:
  I have an idea that sounds crazy,  but imho,  is better then throwing an
  exception (stack trace is a little bit expensive to the VM).

 right, because we dont care about performance :)

 /**
  * Immediately aborts any further processing.
  *
  * @author Igor Vaynberg (ivaynberg)
  */
 public class AbortException extends RuntimeException
 {
private static final long serialVersionUID = 1L;

/**
 * @see java.lang.Throwable#fillInStackTrace()
 */
public synchronized Throwable fillInStackTrace()
{
// we do not need a stack trace, so to speed things up just
 return null
return null;
}

 }


 -igor




 
  Here  it goes:
 
  public class MyPage extends WebPage {
   @Redirect(MyPageRedirector.class)
   public MyPage() {
 add(new Label(label, Foo));
   }
 
   public static class MyPageRedirector implements IRedirectPage {
 public void redirect(Object ... args) {
   // args is an array of objects that might be passed as arguments to
  MyPage annotated constructor, if it has arguments
   if (args[0].equals(success)) {
 RequestCycle.get().setResponsePage(AnotherPage.class);
   }
 }
   }
  }
 
  The concept here is to define a class that implements  IRedirectPage and
  annotate the constructor which must check something if it intents to
  redirect to another page. IMHO,  this is a nice feature as it sounds more
  elegant than throwing an exception and saves a lot of object creation
 time.
 
  Any thoughts?
 
  []'s
 
  --
  Bruno Borges
  blog.brunoborges.com.br
  +55 21 76727099
 
  The glory of great men should always be
  measured by the means they have used to
  acquire it.
  - Francois de La Rochefoucauld
 
  On Mon, Jun 30, 2008 at 12:23 PM, Igor Vaynberg [EMAIL PROTECTED]
 
  wrote:
 
  does it work?
 
  -igor
 
  On Mon, Jun 30, 2008 at 2:28 AM, Eyal Golan [EMAIL PROTECTED] wrote:
   OK.
   That is what I did.
   So, if a instantiate a page and then put it as a parameter in the
  exception,
   I am fine?
   ...
   TicketTreeQueuePage ticketTreeQueuePage = new
   TicketTreeQueuePage(pageParameters);
   throw new
 RestartResponseAtInterceptPageException(ticketTreeQueuePage);
  
  
   Thanks
  
  
   On Wed, Jun 25, 2008 at 5:11 PM, Igor Vaynberg 
 [EMAIL PROTECTED]
   wrote:
  
   use restartresponseexception instead
  
   -igor
  
   On Wed, Jun 25, 2008 at 5:36 AM, Eyal Golan [EMAIL PROTECTED]
 wrote:
Hi,
After reviewing some discussion regarding the issue.
http://issues.apache.org/jira/browse/WICKET-696
   
and
   
  
 
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg30288.html
   
What is the conclusion?
Is the original page being mapped or no?
   
thanks
   
--
Eyal Golan
[EMAIL PROTECTED]
   
Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74
   
P Save a tree. Please don't print this e-mail unless it's really
   necessary
   
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
   --
   Eyal Golan
   [EMAIL PROTECTED]
  
   Visit: http://jvdrums.sourceforge.net/
   LinkedIn: http://www.linkedin.com/in/egolan74
  
   P Save a tree. Please don't print this e-mail unless it's really
  necessary
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

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




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



Re: A question about cookie value loading

2008-06-30 Thread nate roe
I'm now using Wicket 1.3.3 but I'm still seeing this behavior, where when my
ListView is visited (from Form.loadPersistentFormComponentValues(),) my
listView's children is null when it is visited in
FormComponent.visitFormComponentsPostOrderHelper().

It is difficult to understand why the ListView has no children at this
point, or how to make sure that it has children.

On Wed, Jun 11, 2008 at 11:40 AM, Timo Rantalaiho [EMAIL PROTECTED]
wrote:

 On Wed, 11 Jun 2008, nate roe wrote:
  When exactly are ListView children created (or reused)?

 Use the source, Luke! onBeforeRender AFAIK.

 Best wishes,
 Timo

 --
 Timo Rantalaiho
 Reaktor Innovations OyURL: http://www.ri.fi/ 

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




Wizard and CheckGroup

2008-06-30 Thread David Leangen

Hello.

I'm using a CheckGroup in a Wizard.

Let's say the CheckGroup is in step 2 of my Wizard:

 [1] - [2] - [3]

Going through the Wizard, during step 2, I check all the checkboxes,
then I go to step 3.

If I back up to step 2, everything remains checked.

However, if I back up again to step 1, then click next to step 2, I lose
all my checkmarks.


In the code for Check, whether or not the checkbox is checked is
determined by this:

  if (group.hasRawInput())
  {
final String[] input = group.getInputAsArray();

if (input != null)
{
  for (int i = 0; i  input.length; i++)
  {
if (uuid.equals(input[i]))
{
  tag.put(checked, checked);
}
  }
}
  }
  else if (collection.contains(getModelObject()))
  {
tag.put(checked, checked);
  }


When group.hasRawInput() returns false, and we fall through to the else
clause, everything works as expected.

However, when group.hasRawInput() returns true, on the next line
group.getInputAsArray() returns null. This means that the for condition
never gets executed, so my checkboxes don't get checked.

What's the story with hasRawInput()?


Thanks!
David





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



Re: Converters and Validators

2008-06-30 Thread Timo Rantalaiho
On Mon, 30 Jun 2008, Ayodeji Aladejebi wrote:
 Are converters invoked before validators. can I do this

raw input
  conversion - converted input, if conversion succeeds
  validation - modelObject update, if validation succeeds

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

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



Re: Wikcet Freechart and SVG

2008-06-30 Thread Nino Saturnino Martinez Vazquez Wael
Ahh okay, then you need to create a panel or something(maybe do it like 
image itself just copy the source and make it attachable to embed) that 
contains the embed...


Manuel Corrales wrote:

Sorry for my stupidity :(

Ive tried your code, and as said before, the svg is being generated 
ok, but it is not displayed on the browser (attached an image of the 
page). When i right click on the broken image icon, and press save as, 
i can download the svg.


For what i was reading, i dont think it is possible to include a svg 
image in a img tag, i think only embed object and iframe can 
have an svg image.


Anyway, i will keep looking for a solution.

Thanks!

On Mon, Jun 30, 2008 at 5:36 PM, Manuel Corrales 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:


I am going to try your code as soon as i can, but i still don't
understand where are you generating the svg image on this code.


On Mon, Jun 30, 2008 at 1:59 PM, Nino Saturnino Martinez Vazquez
Wael [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

hmm whats JFreeChart image?


I usually do this, in my domain classes :

  JFreeChart chart = ChartFactory
  .createTimeSeriesChart(
 
Messages.getString(ReportWeightChart.5, locale),

Messages.getString(ReportWeightChart.6, locale),
Messages.getString(ReportWeightChart.7, locale), dataset,
true, true, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
  return chart.createBufferedImage(500, 270);

And this in the wicket page :

  Report simpleReport = (Report)
item.getModelObject();

  BufferedImage report =
simpleReport.getReport(getLocale());
  ImageResource imageResource = new
ImageResource(report);
  item.add(new Image(image, imageResource));


Ahh, I see you are mixing things(found the JFreeChart on the
wiki).. You cant do it like that it should be like
this(although the otherway can also be done):


JFreeChart chart = ChartFactory.createPieChart(Resumen de
gastos,
  dataSet, true, true, false);
  PiePlot plot = (PiePlot) chart.getPlot();
  plot.setSectionOutlinesVisible(false);
  add(new Image(image,chart.createBufferedImage(640,
480)));





Manuel Corrales wrote:

Here is the page code: (this is all prototype code, just
messing around with
graphics on wicket)

JFreeChart chart = ChartFactory.createPieChart(Resumen de
gastos,
   dataSet, true, true, false);
   PiePlot plot = (PiePlot) chart.getPlot();
   plot.setSectionOutlinesVisible(false);
   add(new Image(image,new JFreeChartImage(image,
chart, 640,
480)));

Thanks a lot!!

On Mon, Jun 30, 2008 at 11:36 AM, Nino Saturnino Martinez
Vazquez Wael 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
wrote:

 


Manuel Corrales wrote:

   


Yes, i know, but i have tried with firefox and
opera. Also to implement
the
object solution i have to write the image to the
disc first and then
dynamically set the data attribute on the object tag.

Nino: what do you mean by where is the page? If i
can see a non SVG image
with exactly the same page, shouldn't i be able to
see an SVG image?



 


I just wanted to see how you implemented it in the
page... Both java and
html (just to double check)... And I saw the part
about some browsers not
handling svg very good.

   


Best regards.

On Mon, Jun 30, 2008 at 9:24 AM, Federico Fanton
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:



 


On Sun, 29 Jun 2008 21:03:29 -0300
Manuel Corrales [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:



   


Hey, great!! But still having issues,
sorry to bother you again. Now i


 


added


   


the svg to the page, but the browser do
not display it. The image is


 


there,