Re: eclipse and html extensions in src/main/java

2009-03-22 Thread Thomas Mäder
Bill, if you have a stack trace in the log, we might take a stab at guessing
the culprit (it's not often the base Eclipse tooling, but some add-on
plugin).

Thomas

On Sun, Mar 22, 2009 at 9:18 PM, Brill Pappin br...@pappin.ca wrote:

 Hmm, I'll have to investigate.
 I *don't* get it when I have it set up with the HTML in the resourses
 folder.


 - Brill Pappin
  Sent from my mobile.


 On 22-Mar-09, at 1:58 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:

  if you get this error then you are screwed whether the markup fles are
 in src/main/java or src/main/resources because they are both
 configured as classpath folders in eclipse.

 anyways, im using the latest 3.4 and dont have this problem.

 -igor

 On Sun, Mar 22, 2009 at 10:04 AM, Brill Pappin br...@pappin.ca wrote:

 I get the HTML editor as well but I also get some dialog popping up when
 I
 load the HTML from the src.

 I just updates to the latest this morning, so maybe there is something
 new.

 - Brill Pappin
  Sent from my mobile.


 On 22-Mar-09, at 12:38 PM, John Krasnay j...@krasnay.ca wrote:

  Works fine for me without any special configuration. I use the Eclipse
 JEE version and HTML files come up in the HTML Editor.

 Check which editor is associated with *.html files under Window 
 Preferences, then under General/Editors/File Associations.

 Eclipse remembers the last editor you used to open a particular file, so
 you might have to right-click the file in Package Explorer and select
 Open With  HTML Editor.

 jk

 On Sun, Mar 22, 2009 at 12:24:38PM -0400, Brill Pappin wrote:


 So eclipse is having trouble with the html extension files in the java
 source directory.

 I set up a demo for Wicket Skunkworks to demo the components we're
 working on, and I used the standard wicket pattern of putting the
 html alongside the java in order to make things clearer to how must
 people expect to see a wicket project, however Eclipse is complaining
 every time I open an HTML resource saying that its expecting a source
 file:

  An error has occurred. See error log for more details.
  Compilation unit name must end with .java, or one of the
 registered Java-like extensions

 Aside form registering an HTML extension as a compilation unit, does
 anyone know how to resolve this annoying issue?

 This is the first time I have run across it because up until now I
 have kept my resources in src/main/resources.

 - Brill

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


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


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



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


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




-- 
Wicket  Eclipse Consulting
www.devotek-it.ch
thomasmaeder.blogspot.com


Re: Why are we top-posting...

2009-03-22 Thread Thomas Mäder
Nazis!

And now that this thread is dead, we can all go and enjoy our lives ;-)

Thomas

On Sun, Mar 22, 2009 at 6:50 AM, taha siddiqi tawushaf...@gmail.com wrote:

 Now you all get a gun and shoot me :)

 I got your point

 How many times 

 No No No .. Enough 

 This is a declaration 

 I, TAHA, WILL NEVER SAY THAT TOP POSTING IS BAD OR BOTTOM POSTING IS
 GOOD

 CLOSE THIS POST... PLEASE .

 taha
 (internally still a bottom-poster by heart)


 On Sat, Mar 21, 2009 at 2:59 PM, Stephen Swinsburg
 s.swinsb...@lancaster.ac.uk wrote:
  You read text from bottom to top?
 
  I thought this was dead and buried, people can post however they like and
 we
  are not going to conform to someone's 'standard'. Think of it this way,
 it's
  a mailing list where people write and read emails. How do you read and
 write
  your email? Pretty sure you'd hit a quick 'Reply' and type your message
 at
  the top like 99% of the rest of the world? Why change it for a mailing
 list?
  It's not designed so that one final post has every piece of information
 in
  it, that is what threads are for. What if someone erases part of the
 email
  when they reply? You'd be stuffed then!
 
 
 
  On 21/03/2009, at 5:50 AM, C. Bergström wrote:
 
  A: Because it messes up the order in which people normally read text.
  Q: Why is it such a bad thing?
  A: Top-posting.
  Q: What is the most annoying thing on usenet and in e-mail?
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

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




-- 
Wicket  Eclipse Consulting
www.devotek-it.ch
thomasmaeder.blogspot.com


Re: Expected close tag for wicket:link ??

2009-03-04 Thread Thomas Mäder
Seeing the whole stack trace might help!

Thomas

On Wed, Mar 4, 2009 at 6:34 PM, Edwin Ansicodd erik.g.hau...@gmail.comwrote:


 I find this error in my log file when a wicket page loads.  Would anyone
 know
 what causes this error?

 ERROR org.apache.wicket.RequestCycle  - unexpected exception when handling
 another exception: Expected close tag for wicket:link
 --
 View this message in context:
 http://www.nabble.com/Expected-close-tag-for-%3Cwicket%3Alink%3Etp22335083p22335083.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




-- 
Wicket  Eclipse Consulting
www.devotek-it.ch
thomasmaeder.blogspot.com


Re: Wicket Bench error under Eclipse

2009-02-27 Thread Thomas Mäder
Looks like

com.eviware.soapui.eclipse.swt_awt.SwtAwtRequestEditor.init(SwtAwtRequestEditor.java:68)

is the culprit. I would guess that you only get the error when opening files
of a certain type (sth. related to SOAP, perhaps?). If so, try changing the
default editor for this particular file type
(preferences-General-Editors-File Associations)

hth

Thomas


On Fri, Feb 27, 2009 at 10:44 AM, Piller Sébastien pi...@hmcrecord.chwrote:

 Hi all,

 I have some problems using the WicketBench plugin under Eclipse Ganymede.

 It sometimes success in opening the files, and sometimes not. When it
 fails, I can see the following stack trace on Eclipse:

   java.lang.NullPointerException
   at

 com.eviware.soapui.eclipse.swt_awt.SwtAwtRequestEditor.init(SwtAwtRequestEditor.java:68)
   at

 org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:213)
   at

 org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:187)
   at
   wicketbench.eclipse.editor.WicketEditor.addPage(WicketEditor.java:211)
   at

 wicketbench.eclipse.editor.WicketEditor.createEditorsForNonJavaResources(WicketEditor.java:196)
   at
   wicketbench.eclipse.editor.WicketEditor.addEditors(WicketEditor.java:178)
   at
   wicketbench.eclipse.editor.WicketEditor.createPages(WicketEditor.java:77)
   at

 org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:310)
   at

 org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:661)
   at

 org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:428)
   at

 org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:594)
   at

 org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(EditorAreaHelper.java:263)
   at

 org.eclipse.ui.internal.EditorManager.setVisibleEditor(EditorManager.java:1410)
   at

 org.eclipse.ui.internal.EditorManager$5.runWithException(EditorManager.java:944)
   at

 org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
   at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
   at

 org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)
   at
   org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3378)
   at
   org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3036)
   at

 org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
   at

 org.eclipse.ui.internal.Workbench$27.runWithException(Workbench.java:1361)
   at

 org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
   at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
   at

 org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)
   at
   org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3378)
   at
   org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3036)
   at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2293)
   at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
   at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
   at

 org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
   at

 org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
   at
   org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
   at

 org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
   at

 org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
   at

 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
   at

 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
   at

 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
   at

 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at

 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at

 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
   at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
   at org.eclipse.equinox.launcher.Main.run(Main.java:1236)


 The weird thing is that I don't modify anything on the source files, and it
 sometimes fails to open and sometimes not. Maybe it is some workspace issue?
 I guess I'm not the only one to get it

 If I remember correctly, Igor is one of the writter of that plugin. Could
 anybody give me a fix?

 Thanks in advance ;)

 

Re: How exactly does RestartResponseAtInterceptPageException work?

2009-02-24 Thread Thomas Mäder
I've been thinking about this in the past. Our use case was a post while not
logged in. I guess retaining post data is not really a problem. Since the
Restart...Exception is under user control, the application would be
responsible for not sending megs and megs. Since there is exactly one
request pending in this way, I don't see the problem.

as for the rest of the problems: redoing posts would go a long way

Thomas


On Tue, Feb 24, 2009 at 2:03 PM, Martijn Dashorst 
martijn.dasho...@gmail.com wrote:

 The problem with returning to the original request is that it can be
 anything, including a post. While this is an interesting idea, I think
 there are hairy issues to be resolved before this can become in a
 workable state. Currently Wicket doesn't support it.

 Hairy stuff:
  - retaining post data (for how long?)
  - retaining multi-part post (for how long?)
  - ajax request... how can you return to that?
  - resource request... how can you return to that?

 etc.

 I do like the idea, it is almost continuation support...

 Martijn

 On Thu, Feb 19, 2009 at 5:59 AM, David Leangen wic...@leangen.net wrote:
 
  Jeremy,
 
  Thank you for this.
 
  To my knowledge, the onClick will not be rerun.
 
  Thank you.
 
  I was not able to find any doc about this anywhere, and I'm not sure
  what the designer's intentions were.
 
  How were you able to find this out?
 
 
  I would do getPage() in that onClick and send them to
  the page (passing the getPage()) that does
  something, then send them back after doing some work.  When they click
 on
  the link again, in theory, token shouldn't be null again...
 
  Thanks for the suggestion. That won't exactly work with the flow of my
 processes (the example code I gave was very much simplified), but at least
 you confirmed that the onClick() does not get rerun, so I can adjust
 accordingly.
 
  Thank you!
 
  =David
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 



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

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




-- 
Wicket  Eclipse Consulting
www.devotek-it.ch
thomasmaeder.blogspot.com


Re: What IDE best fits with Wicket?

2009-02-24 Thread Thomas Mäder
The nice thing about wicket is that you don't need tools. It's just Java and
just HTML, so anything will do. discover the simplicity would be the
slogan ;-) (Cue video of good looking people enjoying the simple pleasures
of life)

Thomas

On Mon, Feb 23, 2009 at 8:19 PM, Eduardo Nunes esnu...@gmail.com wrote:

 Hello guys,

 I don't want to generate a flame war but I want to know your opinion
 about what IDE best fits with Wicket?

 The basic requirements are: free and the set of plug-ins free too.

 Thanks,
 Eduardo S. Nunes

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




-- 
Wicket  Eclipse Consulting
www.devotek-it.ch
thomasmaeder.blogspot.com


Re: Dynamically changing CSS style attribute

2009-02-24 Thread Thomas Mäder
If I have understood Mr. Heptagon right the needle position depends on
server side state. What I would do is look at the source of
AttributeModifier and do something similar, but just take the existing style
attribute and replace the left value (using an regex or such). If
something usable results, you could share the joy (CssStyleModifier.java?)

Thomas

On Tue, Feb 24, 2009 at 8:21 PM, Martijn Reuvers
martijn.reuv...@gmail.comwrote:

 Hello,

 As Martin says use javascript, if you really want it easy use jQuery,
 you can do something like $('#myElem').css( ... ); and do the
 calculation in javascript. Check the docs on the exact syntax
 (docs.jquery.com),

 Martijn

 On Tue, Feb 24, 2009 at 8:00 PM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
  You could use javaScript
  http://docstore.mik.ua/orelly/webprog/jscript/ch18_03.htm
 
  **
  Martin
 
  2009/2/24 Seven Corners shel...@blackwave.tv:
 
  I have a control with a needle that moves.  The needle's value is
 continually
  changing, so on a timer I ask the server its value and set its position
 with
  the left CSS attribute, as in:
 
  .Needle
  {
   z-index: 1;
   width: 2px;
   ...
   left: 20%;
  }
 
  I do have a bean that returns a percentage string for the value, and I
 have
  verified I hit that getter when the update occurs.
 
  It looks like I need to create an AttributeModifier for this object's
 style
  attribute, and spit out ALL the style attributes in the model, not just
 the
  value for the left style attribute.  I don't want to do that, because
 it
  hard-codes irrelevant styles attributes and I might want to change them
 in
  the future.
 
  I could use an AttributeAppender, but wouldn't that just add a left to
 the
  end of the style attribute, so that over time (the timer goes off
 every
  minute), the style attribute would become a really long string?  Don't
  want to do that either.
 
  Is there some way just to tweak a single CSS attribute?
 
  Thanks.
  --
  View this message in context:
 http://www.nabble.com/Dynamically-changing-CSS-style-attribute-tp22187801p22187801.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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




-- 
Wicket  Eclipse Consulting
www.devotek-it.ch
thomasmaeder.blogspot.com


Re: Dynamically changing CSS style attribute

2009-02-24 Thread Thomas Mäder
Damn! I'm alway surprised about the turnaround times on this mailing list!
One nice thing about Wicket is that there are few privileged parties.
Usuallly you have a default implementation for some interface, but the
default implementation doesn't enjoy any special privileges. Eat your own
dogfood!

Thomas


On Tue, Feb 24, 2009 at 9:09 PM, Seven Corners shel...@blackwave.tv wrote:


 Ooh, that's a good idea, although I just got the JavaScript working to do
 exactly the same thing with an appendJavascript() call.


 svenmeier wrote:
 
  Why not keep the fixed settings in a style class and just update the
  style attribute with the current value (utilizing an AttributeModifier)?
 
  .Needle {
z-index: 1;
width: 2px;
...
  }
 
 
 
  Seven Corners schrieb:
  I have a control with a needle that moves.  The needle's value is
  continually
  changing, so on a timer I ask the server its value and set its position
  with
  the left CSS attribute, as in:
 
  .Needle
  {
z-index: 1;
width: 2px;
...
left: 20%;
  }
 
  I do have a bean that returns a percentage string for the value, and I
  have
  verified I hit that getter when the update occurs.
 
  It looks like I need to create an AttributeModifier for this object's
  style
  attribute, and spit out ALL the style attributes in the model, not just
  the
  value for the left style attribute.  I don't want to do that, because
  it
  hard-codes irrelevant styles attributes and I might want to change them
  in
  the future.
 
  I could use an AttributeAppender, but wouldn't that just add a left to
  the
  end of the style attribute, so that over time (the timer goes off
 every
  minute), the style attribute would become a really long string?  Don't
  want to do that either.
 
  Is there some way just to tweak a single CSS attribute?
 
  Thanks.
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Dynamically-changing-CSS-style-attribute-tp22187801p22189563.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




-- 
Wicket  Eclipse Consulting
www.devotek-it.ch
thomasmaeder.blogspot.com


Re: Modal Window inside a wizardstep

2009-02-24 Thread Thomas Mäder
Is this browser dependent?

Thomas

On Tue, Feb 24, 2009 at 4:23 PM, jensiator jens.alen...@megasol.se wrote:


 Hi.
  I got a modal window with a form(a search function). The modal window is
 opened from a wizard step that uses non ajax submitbuttons. When I press
 the
 enter key inside my modal search form, the underlying wizard step submits.
 Happens even when the AjaxButton is in focus in the modal window. Is there
 anyway to suppress the key down event in the underlying wizard form?
 Jens Alenius
 --
 View this message in context:
 http://www.nabble.com/Modal-Window-inside-a-wizardstep-tp22181084p22181084.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




-- 
Wicket  Eclipse Consulting
www.devotek-it.ch
thomasmaeder.blogspot.com


Re: Wicket meetup in Switzerland?

2009-02-22 Thread Thomas Mäder
Hello everyone,

I wasn't trying to whine, it just appears that a community-style meetup like
I had in mind is not going to fly in the Zürich region. Since I'm just a
lowly contractor, I don't really have the means to organize anything more
formal, with speakers and such (and keep it going). I would have thought it
interesting to learn what people in the region are doing with wicket. If I
can think of a new way to bring the community together, I'll try again.

cheers

Thomas

On Fri, Feb 20, 2009 at 12:17 PM, Thomas Mäder
thomas.mae...@devotek-it.chwrote:

 Whoa! The silence is deafening! Since I've had one answer in a week, I
 guess there is just no interest. Oh well...

 Thomas


 On Mon, Feb 16, 2009 at 12:04 PM, Thomas Mäder
 thomas.mae...@devotek-it.ch wrote:

 Hi Folks,

 I would be willing to organize a Wicket meetup in Switzerland if there is
 enough interest. I propose a meeting somewhere in Zürich. The format I
 imagine is that participants could (don't have to) shortly (15-20min.)
 present their work with Wicket (demos are always nice). That would be
 followed by general mingling with drinks  snacks.
 For the date, I would shoot for the week starting March 16, 17:30-20:30h.
 Would you be interested in participating in/hosting/sponsoring such a
 thing? Either reply here or to me privately, and if there is enough
 interest, I'll set up a thing on the wiki.

 Thomas

 --
 Thomas Mäder
 Wicket  Eclipse Consulting
 www.devotek-it.ch




 --
 Wicket  Eclipse Consulting
 www.devotek-it.ch
 thomasmaeder.blogspot.com




-- 
Wicket  Eclipse Consulting
www.devotek-it.ch
thomasmaeder.blogspot.com


Re: Wicket meetup in Switzerland?

2009-02-22 Thread Thomas Mäder
Schwizertütsch rules, of course!

;-) Thomas

Or we could hold a meeting in Canadian french, calisse!

On Fri, Feb 20, 2009 at 5:23 PM, Johan Compagner jcompag...@gmail.comwrote:

 that was the whole idea, now you spoiled it! ;(

 On Fri, Feb 20, 2009 at 17:09, Jeremy Thomerson
 jer...@wickettraining.comwrote:

  I've seen plenty of programming language flame wars, but it looks like
  Johan
  is starting a REAL language flamewar.  :)
 
  On Fri, Feb 20, 2009 at 9:41 AM, Johan Compagner jcompag...@gmail.com
  wrote:
 
   if you would do it in a time that i am in the swiss then i could also
   attend
   But that is now and then +/- 1 time in 2 months..
   (this  week i am in Bern)
  
   I dont have a problem if it was in real german, but it cant be in that
   swiss
   german (which has i my eyes nothing to do with german anyway)
   because that i really cant follow at all. its complete garbage.. ;)
  
   johan
  
  
   On Fri, Feb 20, 2009 at 12:17, Thomas Mäder
 thomas.mae...@devotek-it.ch
   wrote:
  
Whoa! The silence is deafening! Since I've had one answer in a week,
 I
guess
there is just no interest. Oh well...
   
Thomas
   
On Mon, Feb 16, 2009 at 12:04 PM, Thomas Mäder
thomas.mae...@devotek-it.chwrote:
   
 Hi Folks,

 I would be willing to organize a Wicket meetup in Switzerland if
  there
   is
 enough interest. I propose a meeting somewhere in Zürich. The
 format
  I
 imagine is that participants could (don't have to) shortly
  (15-20min.)
 present their work with Wicket (demos are always nice). That would
 be
 followed by general mingling with drinks  snacks.
 For the date, I would shoot for the week starting March 16,
   17:30-20:30h.
 Would you be interested in participating in/hosting/sponsoring such
 a
 thing? Either reply here or to me privately, and if there is enough
 interest, I'll set up a thing on the wiki.

 Thomas

 --
 Thomas Mäder
 Wicket  Eclipse Consulting
 www.devotek-it.ch

   
   
   
--
Wicket  Eclipse Consulting
www.devotek-it.ch
thomasmaeder.blogspot.com
   
  
 
 
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 




-- 
Wicket  Eclipse Consulting
www.devotek-it.ch
thomasmaeder.blogspot.com


Re: Can a TreeTable be pagable?

2009-02-20 Thread Thomas Mäder
In short: no.

Here's what I'd do: Use a table (which is pageable) and show the location in
the tree as breadcrumbs. When you click on a table item, you go into the
table item i.e. it goes to the bread crumbs and the children are shown in
the table.

Thomas

On Thu, Feb 19, 2009 at 12:36 PM, CraigGreenhalhj 
craig.greenha...@intersoftsolutions.co.uk wrote:



 --
 View this message in context:
 http://www.nabble.com/Can-a-TreeTable-be-pagable--tp22098653p22098653.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: Wicket meetup in Switzerland?

2009-02-20 Thread Thomas Mäder
Whoa! The silence is deafening! Since I've had one answer in a week, I guess
there is just no interest. Oh well...

Thomas

On Mon, Feb 16, 2009 at 12:04 PM, Thomas Mäder
thomas.mae...@devotek-it.chwrote:

 Hi Folks,

 I would be willing to organize a Wicket meetup in Switzerland if there is
 enough interest. I propose a meeting somewhere in Zürich. The format I
 imagine is that participants could (don't have to) shortly (15-20min.)
 present their work with Wicket (demos are always nice). That would be
 followed by general mingling with drinks  snacks.
 For the date, I would shoot for the week starting March 16, 17:30-20:30h.
 Would you be interested in participating in/hosting/sponsoring such a
 thing? Either reply here or to me privately, and if there is enough
 interest, I'll set up a thing on the wiki.

 Thomas

 --
 Thomas Mäder
 Wicket  Eclipse Consulting
 www.devotek-it.ch




-- 
Wicket  Eclipse Consulting
www.devotek-it.ch
thomasmaeder.blogspot.com


Re: XMLBeanFactory not serializable - what to do??

2009-02-17 Thread Thomas Mäder
LoadableDetachableModel?

Thomas

On Tue, Feb 17, 2009 at 12:43 PM, Edwin Ansicodd erik.g.hau...@gmail.comwrote:


 have a Serializable object on a Wicket page.  This object in turn has a
 reference to an XMLBeanFactory.  Wicket is giving me an error because
 XMLBeanFactory is not serializable.  What do I do??
 --
 View this message in context:
 http://www.nabble.com/XMLBeanFactory-not-serializable---what-to-do---tp22055512p22055512.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Wicket meetup in Switzerland?

2009-02-16 Thread Thomas Mäder
Hi Folks,

I would be willing to organize a Wicket meetup in Switzerland if there is
enough interest. I propose a meeting somewhere in Zürich. The format I
imagine is that participants could (don't have to) shortly (15-20min.)
present their work with Wicket (demos are always nice). That would be
followed by general mingling with drinks  snacks.
For the date, I would shoot for the week starting March 16, 17:30-20:30h.
Would you be interested in participating in/hosting/sponsoring such a thing?
Either reply here or to me privately, and if there is enough interest, I'll
set up a thing on the wiki.

Thomas

-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: Encoding Russian pages

2009-02-16 Thread Thomas Mäder
Hi Tim,

.properteis files are ALWAYS in ISO59something encoding (see the Javadoc to
java.lang.Properties. If you want to use a different encoding, you'll have
to either recode your properties files, use xml properties or somehow load
the .properties files yourself.

Thomas

On Mon, Feb 16, 2009 at 2:04 PM, Tim Squires w...@tnwdb.com wrote:

 Hi,

 I have been sent Russian translations to my default English pages.  Wicket
 picks up the _ru.properties bundles correctly but somewhere along the way,
 the encoding is not changing from UTF-8.  I gather that the Russian
 translated pages will need an encoding of cp1251.

 I have tried to force the encoding in the Page template using

 protected void configureResponse() {
super.configureResponse();
final String encoding = text/ + getMarkupType() + ;
 charset=cp1251;
getResponse().setContentType(encoding);
 }

 and in the application class

 @Override
 protected void init() {
super.init();
getMarkupSettings().setDefaultMarkupEncoding(cp1251);
 }

 but still Firefox and IE in Linux and Win show a page encoding of UTF-8.

 From the wiki

 http://cwiki.apache.org/WICKET/how-to-change-the-character-encoding.html

 and other mail, it looks like it's a problem outside of Wicket but I was
 hoping someone here would know a fix.

 You can see the test version at http://imagebank.crystalmark.co.uk

 I'm pretty sure my pc's are setup OK because I can see other Russian
 websites ok (although I cannot actually read them).

 Can anyone point me to what I have missed?

 Thanks,
 Tim




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




-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


SVN Checkout slow?

2009-02-16 Thread Thomas Mäder
Hi Guys,

I'm trying to check out wicket  wicket-extensions 1.4. RC2 from the svn
repository (via http). This is taking something like half an hour. Is that
normal?

Thomas

-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: SVN Checkout slow?

2009-02-16 Thread Thomas Mäder
Thanks, that's 100x faster.

Thomas

On Mon, Feb 16, 2009 at 2:46 PM, Martijn Dashorst 
martijn.dasho...@gmail.com wrote:

 try svn.eu.apache.org instead.

 Martijn

 On Mon, Feb 16, 2009 at 2:34 PM, Thomas Mäder
 thomas.mae...@devotek-it.ch wrote:
  Hi Guys,
 
  I'm trying to check out wicket  wicket-extensions 1.4. RC2 from the svn
  repository (via http). This is taking something like half an hour. Is
 that
  normal?
 
  Thomas
 
  --
  Thomas Mäder
  Wicket  Eclipse Consulting
  www.devotek-it.ch
 



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

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




-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: Wicket at ApacheCon EU'09 in Amsterdam

2009-02-13 Thread Thomas Mäder
Unfortunately, those 'idiotic managers' (and I'm not disagreeing with you)
hold the purse strings. The move to Apache was a big step towards acceptance
by the business types. If you try to sell a new technology with a weird name
to your manager, it's not helping that there are just some guys from the
internet behind this (let's not argue whether that really matters or not,
it's just about the impression it gives).

Let's just say this: there are at least two angles to selling a particular
technology: the business angle and the technical merits. While the technical
merits of Wicket are evangalized, the business case is less promoted.

Thomas

PS: Just for the record, I'm totally opposed to starting a wicket JSR.

On Fri, Feb 13, 2009 at 10:10 AM, Johan Compagner jcompag...@gmail.comwrote:

 and what would a wicket standard give you?
 Except that those idiotic managers then say its standardized.. now you can
 use it why is that is a standard for ever? dont think so everything dies.
 But would it run on more platforms?


-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: question about adding synchronized on mountsOnPath at WebRequestCodingStrategy

2009-02-12 Thread Thomas Mäder
The synchronizationn is around a HashMap lookup. Considering how much longer
it takes to actually process a request, I very much doubt that there is much
contention. Modern VM's are MUCH better at handling slight contention (like
2-4 contending threads) than older VMs. Don't worry!

Thomas

On Thu, Feb 12, 2009 at 7:12 AM, ywtsang ywts...@gmail.com wrote:


 at 1.3.5

 class: org.apache.wicket.protocol.http.request.WebRequestCodingStrategy
 method: urlCodingStrategyForPath

 the variable mountsOnPath is synchronized
 is this necessary?

 because the WebRequestCodingStrategy is initialized once by request cycle
 processor, which in turns is shared by all requests (i read this at Wicket
 In Action)

 so synchornized the mountsOnPath can produce a big lock contention
 problem
 if we have many requests at the same time?


 --
 View this message in context:
 http://www.nabble.com/question-about-adding-%22synchronized%22-on-mountsOnPath-at-WebRequestCodingStrategy-tp21970542p21970542.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: Nested Label Components

2009-02-12 Thread Thomas Mäder
You cannot nest components inside labels. What are you trying to achieve?

Thomas

On Thu, Feb 12, 2009 at 5:02 PM, Matías Tito mt...@zauber.com.ar wrote:

 How can I nested label components?

 WicketMessage: Expected close tag for 'li
 wicket:id=groupDescription' Possible attempt to embed component(s)
 'span wicket:id=qtyMembers' in the body of this component which
 discards its body

 html xmlns:wicket
 wicket:panel

h3 wicket:id=usernamejphernandez/h3

div class=loginCnt
div class=nav
   a href=#Mi perfil/anbsp;|nbsp;
   a wicket:id=logout href=#Salir/a
/div
div class=datos floatFix
wicket:link
img src=resources/icons/avatar_side.gif alt=/
/wicket:link
b#/b Notas / b#/bDebatesbr/
# puntos en este torneobr/
# es mi posición en elbr/
ranking de este torneo/div
div class=adicional
a wicket:id=groupsListPage href=#strongMis Grupos y
 Foros/strong/a
ul wicket:id=groupList
li wicket:id=groupDescriptionGRUPO
span wicket:id=qtyMembers( #
 Participantes)/span
/li
/ul
br /
span wicket:id=navigator/span
/div
/div
 /wicket:panel
 /html



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




-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: AbstractAjaxTimerBehavior / Firefox / Page constructor

2009-02-12 Thread Thomas Mäder
Why don't you put a breakpoint in the constructor and see let us know what
you find out? Is the constructor called through the same stack trace twice?

Thomas

On Thu, Feb 12, 2009 at 5:50 PM, Adriano dos Santos Fernandes 
adrian...@gmail.com wrote:

 I've a simple page as below, and when I call it from Firefox, ReportPage
 constructor is almost always called two times. Some times it's correctly
 called once. What may be wrong?

 public class ReportPage extends WebPage
 {
   private static final long serialVersionUID = 1L;
   private static final int CHECK_INTERVAL = 2;// segundos

   public ReportPage(PageParameters parameters)
   {
   super(parameters);

   WebMarkupContainer update = new WebMarkupContainer(update);
   add(update);
   update.add(new
 AbstractAjaxTimerBehavior(Duration.seconds(CHECK_INTERVAL)) {
   private static final long serialVersionUID = 1L;

   @Override
   protected void onTimer(AjaxRequestTarget target)
   {
   }
   });
   }
 }


 Adriano


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




-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: Wicket at ApacheCon EU'09 in Amsterdam

2009-02-12 Thread Thomas Mäder
I totally agree that the JSR process is horrid. However, Wicket could really
use some more corporate credibility (which a JSR would provide).
The problem, I guess is that there are simply no corporate interests behind
Wicket that would push the agenda. What wicket need is some evangelism, but
I guess all the core people have real jobs. What we need is less talks
titled why wicket is cool and more cut your development costs in two with
Wicket. From experience, I am totally convinced that you can save 50% off
your development costs if you switch to wicket (from just about any other
framework), however, I've yet to find a contracting job here in Zürich where
wicket is asked for (it's JSF, or even Struts).

Thomas

On Thu, Feb 12, 2009 at 6:36 PM, Johan Compagner jcompag...@gmail.comwrote:

 And then come into the horrible voting/administive stuff? Long Release
 cycles that are controlled, features that are discussed over and over.

 Hmm

 On 12/02/2009, Hoover, William whoo...@nemours.org wrote:
  Just out of curiosity... Are there any plans to push a JSR that Wicket
  could follow. I think there would be a lot more acceptance of Wicket if
  this was to happen :o)
 
  -Original Message-
  From: martijn.dasho...@gmail.com [mailto:martijn.dasho...@gmail.com] On
  Behalf Of Martijn Dashorst
  Sent: Wednesday, February 11, 2009 5:33 PM
  To: users@wicket.apache.org
  Subject: Wicket at ApacheCon EU'09 in Amsterdam
 
  We're happy to announce a lot of Wicket involvement at the upcoming
  ApacheCon in Amsterdam (23-27 March 2009)
 
  First of all we have 2 training sessions available:
   - Introduction to Wicket by Martijn Dashorst on Mon 23 March
  (http://tinyurl.com/aceu09wicket1)
   - Behavior-Driving Your Apache Wicket Application by Timo Rantalaiho on
  Tue 24 March (http://tinyurl.com/aceu09wicket2)
 
  Both courses are hosted by core members. Martijn has co-authored Wicket
  in Action and Timo has been involved with WicketTester and JDave. There
  is no better team to get you and your team up to speed with the finest
  Java web framework available and start cranking out fully tested
  applications.
 
  Martijn will also present Wicket in Action during the normal conference
  days. A quick introduction to Wicket's core features in just one hour.
  But attending the conference will give you much more:
  over 60 sessions covering your favorite Apache projects.
 
  Amsterdam is great, but Wicket meetups in Amsterdam are even better!
  We're attempting to schedule a Wicket meetup during the conference at
  the conference floor. Details will follow soon.
 
  Read more about ApacheCon EU 2009 here:
  http://www.eu.apachecon.com/c/aceu2009/
 
  See you in Amsterdam!
 
  Martijn
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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




-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: Nested Label Components

2009-02-12 Thread Thomas Mäder
No, you cannot attach a label component to the li item and then nest another
labe inside. How does your Java code look?

Thomas

On Thu, Feb 12, 2009 at 6:30 PM, Matías Tito mt...@zauber.com.ar wrote:

 I need to use span tag inside a li tag, both has a label componente.
 Then I get Expected close tag for 'li.
 ul wicket:id=groupList
li wicket:id=groupDescriptionGRUPO
span wicket:id=qtyMembers( #
  Participantes)/span
/li
/ul

 On Thu, 2009-02-12 at 18:22 +0100, Thomas Mäder wrote:
  You cannot nest components inside labels. What are you trying to achieve?
 
  Thomas
 
  On Thu, Feb 12, 2009 at 5:02 PM, Matías Tito mt...@zauber.com.ar
 wrote:
 
   How can I nested label components?
  
   WicketMessage: Expected close tag for 'li
   wicket:id=groupDescription' Possible attempt to embed component(s)
   'span wicket:id=qtyMembers' in the body of this component which
   discards its body
  
   html xmlns:wicket
   wicket:panel
  
  h3 wicket:id=usernamejphernandez/h3
  
  div class=loginCnt
  div class=nav
 a href=#Mi perfil/anbsp;|nbsp;
 a wicket:id=logout href=#Salir/a
  /div
  div class=datos floatFix
  wicket:link
  img src=resources/icons/avatar_side.gif alt=/
  /wicket:link
  b#/b Notas / b#/bDebatesbr/
  # puntos en este torneobr/
  # es mi posición en elbr/
  ranking de este torneo/div
  div class=adicional
  a wicket:id=groupsListPage href=#strongMis
 Grupos y
   Foros/strong/a
  ul wicket:id=groupList
  li wicket:id=groupDescriptionGRUPO
  span wicket:id=qtyMembers( #
   Participantes)/span
  /li
  /ul
  br /
  span wicket:id=navigator/span
  /div
  /div
   /wicket:panel
   /html
  
  
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 
 


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




-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: question about adding synchronized on mountsOnPath at WebRequestCodingStrategy

2009-02-12 Thread Thomas Mäder
Root of all evil! Root of all evil! ;-)

On Thu, Feb 12, 2009 at 6:41 PM, Johan Compagner jcompag...@gmail.comwrote:

 And for 1.4+ we could make that map concurrent if that isnt already the
 case




-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: Wicket at ApacheCon EU'09 in Amsterdam

2009-02-12 Thread Thomas Mäder
I guess there are advantages to being a committer ;-) But I maintain, Wicket
is well established on the technical front, but it could use a push on the
corporate side. Of course, I'm now waiting for the inrush of offers to prove
me wrong ;-)

Thomas

On Thu, Feb 12, 2009 at 8:14 PM, Johan Compagner jcompag...@gmail.comwrote:

 Hm no wicket jobs in switzerland? Damnn
 I am right now waiting for a plane  that will bring me again to basel
 and the bern. I guess i cant stay there much longer then i do now then
 (1.5 week) :(
 The switzerland has to come to holland. :)


-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: setting the value of a radio input field

2009-02-11 Thread Thomas Mäder
Server side state as a performance problem is WAY overrated. If you're not
working for Google, it's probably not a problem.
That said: if your Web application has state it has state however much you
may wish it were not so. The only way to remove that state is when you move
it to the client. Then, however, you have to transfer the state to the
server in order to do anything with it, so you're trading memory vs.
bandwith. You may also transfer the state to an external system (which
Wicket does with most pages in the session). Then you're trading memory vs.
time.
If you have a MB of state per session (which is already quite a lot), you
can serve 1024 concurrent sessions per GB of server memory. These days, you
can buy 16GB of memory for just about the price of one day of work from me
(oh, perhaps I really shouldn't tell you that ;-). You'll need to measure
and then decide how important technical statelessness is for you.

State is bad has become an article of faith somehow. There are many
applications where that is simply not true.

Thomas

PS: Arghhh...preaching again!


On Wed, Feb 11, 2009 at 2:43 AM, Story Henry henry.st...@bblfish.netwrote:

 Thanks for the tip Thomas! I have it now.

 I am really keen to avoid state on the servers, as a design principle. It
 forces me to think the web way as much as possible, and when one does,
 possibilities start becoming evident. So no I did not do any measurements
 there. But these principles are also what brought be to Wicket. I like the
 separation of html and logic. I think more needs to be done perhaps to make
 stateless programming as easy, or easier than stateful programming, but I
 won't pass judgement until I have used Wicket more, and feel like I
 understand it properly.

 In this case I think it also makes for nice URLs.

 I am using Wicket 1.4rc2 btw.

 So here is the code that works. I even deployed it at

 http://test.foafssl.org/cert/

 The following html http://bit.ly/wFLi and the following Java:
 http://bit.ly/p735F

 Give the following html

  form method=GET action=
   input type=submit name=Select /

   span wicket:id=person
   p
   input wicket:id=radio type=radio value=
 http://axel.deri.ie/~axepol/foaf.rdf#mehttp://axel.deri.ie/%7Eaxepol/foaf.rdf#me
 id=webid1-radio2 name=webid/
   table
   trtdName/tdtd wicket:id=nameAxel Polleres/td/tr
   trtdURI/tdtd wicket:id=uri
 http://axel.deri.ie/~axepol/foaf.rdf#mehttp://axel.deri.ie/%7Eaxepol/foaf.rdf#me
 /td/tr
   /table
   /p
   /span



 On 10 Feb 2009, at 17:29, Thomas Mäder wrote:

  The approach with

 Component radio= new Radio(radio, ...);

 is the right one. You can still try to add the AttributeModifier, but
 probably, you'll end up fighting the Radio implementation (perhaps you'll
 have to create a subclass?)
 However, I don't see why you don't just use the regular wicket approach?
 Did
 you actually measure that there is more load on the server? I highly doubt
 it.

 Thomas

 On Tue, Feb 10, 2009 at 4:35 PM, Story Henry henry.st...@bblfish.net
 wrote:

  Hi,

 I have been looking at how to set the value of a radio input field to a
 value of my choosing.
 If I use the Radio and Radio Group code as shown here:
 http://pastebin.com/m40b9b073
 I get html such as

 input wicket:id=radio type=radio value=radio2
 name=selectionGroup/
 input wicket:id=radio type=radio value=radio3
 name=selectionGroup/
 ...

 whereas I was hoping to get

 input wicket:id=radio type=radio value=
 http://bblfish.net/people/henry/card#me; name=selectionGroup/

 Searching the web I found the thread Setting a relevant value for radio
 buttons without using RadioChoice from December 2008 (
 http://tinyurl.com/cpfj49 ) I came to understand that RadioGroup saves
 all
 the mapping itself. I would rather it did not, reducing the load on the
 server, as I am using URLs as primary keys. This more RESTful and I think
 clearner.

 So if I cannot set this using the Radio component I thought perhaps I can
 use an AttributeModifier with code like the following:

 class ChoiceForm extends Form {

  ChoiceForm(String string, ListAgent agents) {
super(string);
ListView persons;
add(persons=new ListView(person, agents) {

   @Override
   protected void populateItem(ListItem item) {
  Agent agt = (Agent) item.getModelObject();
  Component radio = item.get(radio); //this is wrong! looking
 for solution
   radio.add(new AttributeModifier(value,new
 Model(agt.getWebID().toString(;
  item.add(new Label(name, agt.getName()));
  item.add(new Label(uri, agt.getWebID().toString()));
   }
});
persons.setReuseItems(true);
  }
 }

 I am not sure how one can get a component in the populateItem function so
 that one can then
 change the attribute for it.

 The html I am trying to work with is this:

 form wicket:id=select
 input type=submit name=Select/
 span wicket:id=selectionGroup
 span wicket:id=person
  p

Re: Page composition question

2009-02-11 Thread Thomas Mäder
Hi Uwe,

what is not clear is: are the detail info panels different for each of the 5
customer infos? Then you really would have 15 different html markups for the
5x3 panels? Or are the 3 panel kinds (special, detail, or additiional)
always the same, but appear (or not) for the different customer info types?
If you have 15 different html markups, you'll have to implement 15 different
panels. What's the problem with that? Chuck it in it's own package and
forget it.

Thomas

On Wed, Feb 11, 2009 at 9:37 AM, uwe janner ujan...@googlemail.com wrote:

 thx igor!

 but i still cant see how i can define the subPanels.

 in facelets, in the parent i would have written:
 ui:include name=detailInfo/ otherHTML/ ui:include
 name=specialInfo/ otherHTML/ ui:include name=additionalInfo/

 then there would be 5 different childs, each one defining the 3
 html-snippets:
 ui:define name=detailInfohtmlStuff for detailInfo/ui:define
 ui:define name=aditionalInfohtmlStuff for additionalInfo/ui:define
 .

 that means, the parent knows, somebody of his children has defined a
 snippet
 for detailInfo, and this will be inserted at the ui:include
 and so the three snippets can stay within the same file, e.g. in a
 SimpleCustomerDetails.xhtml

 and in wicket?

 i see how i would construct 3 different panels ( newpanel1,2 and 3 in your
 example) within the child class extending parentpanel - but every panel i
 create in the overwritten methods needs its own html file, doesnt it?
 that means, for one of the 5 types of customers i would have to write 3
 panels, one for each of the 3 parts:
 SimpleCustomerDetailInfoPanel.html, SimpleCustomerSpecialInfoPanel.html,
 SimpleCustomerAdditionalInfoPanel.html,
 then 3 for VipCustomerDetailInfoPanel.html, and so on, ending up with
 15
 different html files.

 i still dont see the way how i can put e.g.
 SimpleCustomerDetailInfoPanel.html, SimpleCustomerSpecialInfoPanel.html and
 SimpleCustomerAdditionalInfoPanel.html into one html file (as i can do it
 with facelets above), thereby reducing the nr of html files to 5. the 3
 parts belong together.

 thx4anyhint, uwe!



 On Wed, Feb 11, 2009 at 2:34 AM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:

  class abstract parentpanel extends panel {
   private panel panel1, panel2, panel3;
 
   protected abstract panel newpanel1(string id, imodel model);
   protected abstract panel newpanel2(string id, imodel model);
   protected abstract panel newpanel3(string id, imodel model);
 
   protected void onbeforerender() {
 if (panel1==null) {
   add(panel1=newpanel1(p1, getdefaultmodel());
   add(panel2=newpanel1(p2, getdefaultmodel());
   add(panel3=newpanel1(p3, getdefaultmodel());
}
   super.onbeforerender();
}
  }
 
  -igor
 
  On Tue, Feb 10, 2009 at 4:46 PM, uwe janner ujan...@googlemail.com
  wrote:
   dear wicketeers,
  
   i'm facing a problem with page composition where i cant find an elegant
   solution; i hope i can explain it comprehensible:
  
   i have a panel named CustomerInfo.
  
   there are 5 types of customers in the application.
  
   most of the CustomerInfo.html is the same for all types of customers -
   except three div's:
   DetailInfo, SpecialInfo and AdditionalInfo
  
   these two div's contain different html and different components for
 each
   type of customer;
  
   one way would be to create 15 different panels
 (DetailInfoCustomerType1,
   DetailInfoCustomerType2, DetailInfoCustomerType3, ,
   SpecialInfoCustomerType1, .)
   then, in CustomerInfo-panel i would include the right 3 panels
 depending
  on
   the customer type, e.g. (DetailInfoCustomerType1,
  SpecialInfoCustomerType1,
   AdditionalInfoCustomerType1);
  
   ok, its no good idea to have 15 separate panels, i want to group the 3
   html-snippets together (Detail, Special, Additional)
  
   how can i achieve this? as i understood, neither panels, nor fragments
  nor
   borders can be used for this.
   how could a parent container ( CustomerInfo ) fill 3 different areas
  (the
   3 div's) with 3 different fragments of a child (e.g.
   DetailInfoCustomerType2, SpecialInfoCustomerType2,
   AdditionalInfoCustomerType2)?
  
   if the 3 different areas were contiguous/adjacent i could use simple
 page
   inheritance, bc then the parent container pulls out the whole child's
   content with wicket:child/ .
  
   in my case i needed sth like wicket:child id=detailInfo/
  .much
   html/...wicket:child id=specialInfo/ .much
   html/...wicket:child id=additionalInfo/ .
   where with wicket:child id=xxx/ the parent would only include the
  part
   of the child with wicket:id xxx
  
   thxinadvance,uwe!
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 




-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: Tabbed Page

2009-02-11 Thread Thomas Mäder
What's the problem? A TabbedPanel is a Panel, so you can return it from
ITabl.getPanel().

Thomas

On Wed, Feb 11, 2009 at 12:21 PM, Daniel Ferreira Castro dfcas...@gmail.com
 wrote:

 Is it possible to have other tabbed pannels inside a tabbed panel?

 Imagine the example http://wicketstuff.org/wicket13/ajax/tabbed-panel.1
 If I click on first tab, instead of showing This is tab-panel 1 it would
 show, or at least I would like to, show another tabbed panel with tabs and
 those would have panels.

 Is it possible?  how?


-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: setting the value of a radio input field

2009-02-10 Thread Thomas Mäder
The approach with

Component radio= new Radio(radio, ...);

is the right one. You can still try to add the AttributeModifier, but
probably, you'll end up fighting the Radio implementation (perhaps you'll
have to create a subclass?)
However, I don't see why you don't just use the regular wicket approach? Did
you actually measure that there is more load on the server? I highly doubt
it.

Thomas

On Tue, Feb 10, 2009 at 4:35 PM, Story Henry henry.st...@bblfish.netwrote:

 Hi,

 I have been looking at how to set the value of a radio input field to a
 value of my choosing.
 If I use the Radio and Radio Group code as shown here:
 http://pastebin.com/m40b9b073
 I get html such as

 input wicket:id=radio type=radio value=radio2
 name=selectionGroup/
 input wicket:id=radio type=radio value=radio3
 name=selectionGroup/
 ...

 whereas I was hoping to get

 input wicket:id=radio type=radio value=
 http://bblfish.net/people/henry/card#me; name=selectionGroup/

 Searching the web I found the thread Setting a relevant value for radio
 buttons without using RadioChoice from December 2008 (
 http://tinyurl.com/cpfj49 ) I came to understand that RadioGroup saves all
 the mapping itself. I would rather it did not, reducing the load on the
 server, as I am using URLs as primary keys. This more RESTful and I think
 clearner.

 So if I cannot set this using the Radio component I thought perhaps I can
 use an AttributeModifier with code like the following:

 class ChoiceForm extends Form {

   ChoiceForm(String string, ListAgent agents) {
  super(string);
  ListView persons;
  add(persons=new ListView(person, agents) {

 @Override
 protected void populateItem(ListItem item) {
Agent agt = (Agent) item.getModelObject();
Component radio = item.get(radio); //this is wrong! looking
 for solution
 radio.add(new AttributeModifier(value,new
 Model(agt.getWebID().toString(;
item.add(new Label(name, agt.getName()));
item.add(new Label(uri, agt.getWebID().toString()));
 }
  });
  persons.setReuseItems(true);
   }
 }

 I am not sure how one can get a component in the populateItem function so
 that one can then
 change the attribute for it.

 The html I am trying to work with is this:

 form wicket:id=select
  input type=submit name=Select/
  span wicket:id=selectionGroup
  span wicket:id=person
p
input wicket:id=radio type=radio value=
 http://bblfish.net/people/henry/card#me/
table
  trtdName/tdtd wicket:id=nameHenry Story/td/tr
  trtdURI/tdtd wicket:id=uri
 http://bblfish.net/people/henry/card#me/td/tr
/table
/p
  /span
  /span
  input type=submit name=Select/
  /form

 Any suggestions as to where I should look for more information. I have
 searched all over the internet and Wicket In Action, but without success.

Henry Story

 Blog: http://blogs.sun.com/bblfish


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




-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: Ajax Example Page Problem

2009-02-09 Thread Thomas Mäder
Actually stating what the errors are might help.

Thomas

On Mon, Feb 9, 2009 at 2:38 PM, Daniel Ferreira Castro
dfcas...@gmail.comwrote:

 I am having some difficulties to understand the example present on
 http://www.wicket-library.com/wicket-examples/ajax/todo-list.1

 The problem as a matter of facts is that the example is full of inner
 classes and I am trying, using Eclipse, to make all of them Top Level
 Classes but everytime I do that I recieve erros on my project.

 Why am I tryingo to do this?  I will adapt the example to a form for my
 project, using a DTO to show on a listView, like the example, the
 proprieties of what I have just inserted on the database.

 If this way that I am trying to do is not the best way to do this, I will
 accpet any advises to guide me :)

 --
 Two rules to succeed in life:
 1 - don´t tell people everything you know.
 
 We shall go on to the end.
 We shall fight in France
 We shall fightover the seas and oceans.
 We shall fight with growing confidence and growing strength in the air.
 We shall defend our island whatever the cost may be
 We shall fight on beaches, we shall fight on the landing grounds,
 We shall fight in the fields and in the streets,
 We shall fight on the hills.
 We shall never surrender.
 Winston Churchill




-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: Behaviors and Strategy pattern

2009-02-08 Thread Thomas Mäder
It's probably closer to a decorator.

Thomas

On Sun, Feb 8, 2009 at 11:19 AM, HHB hubaghd...@yahoo.ca wrote:


 Hey,
 Is Behaviors in Wicket are implementation of the Strategy Pattern?
 Thanks.
 --
 View this message in context:
 http://www.nabble.com/Behaviors-and-Strategy-pattern-tp21897409p21897409.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: Using converters properly in Wicket?

2009-02-08 Thread Thomas Mäder
You can override getConverter() on a component to return any converter you
want.

Thomas

On Sun, Feb 8, 2009 at 6:53 PM, Martin Makundi 
martin.maku...@koodaripalvelut.com wrote:

 Hi!

 I am a bit confused with the converters in Wicket. I have some numbers
 which I want to display with two decimals and some other numbers with
 another amout of decimals.

 It appears like Wicket has only one instance of BigDecimalConverter,
 which is used everywhere. So if I adjust its NumberFormat, the effect
 will be seen everywhere. Is this true?

 Who knows of an flexible but elegant way to work with the Wicket
 converters? Creating new converters for each label or textfield
 results in a lot of garbage in the memory footprint...

 **
 Martin

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




-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: Using Eclipse Wicket for Modular Webapps

2009-02-07 Thread Thomas Mäder
I don't know. What's the class loader model the Netbeans uses?

Thomas

 BTW, I'm trying to understand why I didn't have to deal with the
 IClassResolver for bookmarkable pages...





-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: Another question for best practices

2009-02-06 Thread Thomas Mäder
No, what I meant was a single tag link and a list view:

link wicket:id=cssList/link

and in code:

List cssFiles= Array.asList(new String[] { base.css, special.css });
add(new ListView(cssList, cssFiles) {
  public void populateItem(ListItem item) {
 String cssFile= item.getModelObjectAsString();
 item.add(new AttributeModifier(href,  new AbstractReadOnlyModel() {
public Object getModel() {
   return the prefix, don't know where to get it+/+cssFile
}
 });
  }
});

this is off the top of my head, just to see if we're even on the same page.

Thomas

On Fri, Feb 6, 2009 at 12:15 PM, uwe janner ujan...@googlemail.com wrote:

 hi thomas,

 i dont really get your idea, maybe an example?

 what i did was: write the followning in the html:

 link wicket:id=baseCss href=base.css/
  and many more ...
 link wicket:id=specialCss href=special.css/

 and then i repeat myself in the page class (CssLink just puts the dynamic
 url part before the original href value):

 add( new CssLink(baseCss));
 ... and many more ...
 add( new CssLink(specialCss));





-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Using Eclipse Wicket for Modular Webapps

2009-02-06 Thread Thomas Mäder
Hi Folks,

I've been experimenting with getting the Eclipse plugin engine up inside a
wicket application. The idea is to build Wicket applications out of plugins.
You can find an article about my experiences (+sample code) here:
http://devotek-it.ch/stuff.html
I'm grateful for any feedback, both concerning the Eclipse/OSGI and the
Wicket part.

enjoy the weekend

Thomas

-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: Using Eclipse Wicket for Modular Webapps

2009-02-06 Thread Thomas Mäder
Hi Thijs,

You are right, the last sentence is garbled. It really is the last sentence,
thought, so You didn't miss anything relevant, though. I'll fix it tomorrow
morning.

thanks for the find

Thomas

On Fri, Feb 6, 2009 at 9:40 PM, Thijs Vonk vonk.th...@gmail.com wrote:

 Looks really interresting, I've read the pdf. but it seems that there is a
 part missing at the end...


 On 2/6/09 6:02 PM, Thomas Mäder wrote:

 Hi Folks,

 I've been experimenting with getting the Eclipse plugin engine up inside a
 wicket application. The idea is to build Wicket applications out of
 plugins.
 You can find an article about my experiences (+sample code) here:
 http://devotek-it.ch/stuff.html
 I'm grateful for any feedback, both concerning the Eclipse/OSGI and the
 Wicket part.

 enjoy the weekend

 Thomas





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




-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: Using Eclipse Wicket for Modular Webapps

2009-02-06 Thread Thomas Mäder
fixed.





 On Fri, Feb 6, 2009 at 9:40 PM, Thijs Vonk vonk.th...@gmail.com wrote:

 Looks really interresting, I've read the pdf. but it seems that there is a
 part missing at the end...





Re: SessionPerRequestFilter

2009-02-05 Thread Thomas Mäder
You might also configure the filter such that it is not active for paths
where you are sure you don't need the filter (think
Web-Content/StaticImages/*.jpg or other static content)

Thomas

On Thu, Feb 5, 2009 at 3:56 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 a single request is processed by a single thread. what might happen
 is, if you hit a page that has images, the browser will open more
 requests to retrieve those images - which will create more threads.

 what you should do is handle the session creation lazily - only create
 it when it is requested. use the filter to close the session (if its
 there) and reset a threadlocal holder rather then create the session
 in the filter.

 see brix-cms.googlecode.com - there is code in there that does just that.

 -igor

 On Wed, Feb 4, 2009 at 2:19 PM, Edgar Merino donvo...@gmail.com wrote:
  Hello,
 
I'm implementing a j2ee filter to obtain a jcr session per http request
  (using a threadlocal), however it sometimes opens more than once session
  when I open a webpage, I'm thinking this is because many threads are
  involved in a single request, but this affects performance (a lot), what
  workaround can I apply to avoid this kind of overhead (to have a real
  session per request instead of session per thread?).
 
  Correct me if I made the wrong assumptions,
  Edgar Merino
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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




-- 
Thomas Mäder
www.devotek-it.ch


Re: Another question for best practices

2009-02-05 Thread Thomas Mäder
What I would have tried is this: have a list view of web markup containers.
As a list item, create a WebMarkupContainer (mapped to the link tag). Add
an attribute modifier that fixes up the href attribute of the link tag.
You get the filename (header.css) from the ListView's model. Or am  I
missing somthing here?

Thomas

-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: java.lang.ClassCastException in ListMultipleChoice

2009-02-05 Thread Thomas Mäder
Stack trace please?

On Thu, Feb 5, 2009 at 10:16 PM, Agent Mahone maho...@yahoo.de wrote:

 Hi guys, I have a simple question.

 I´m using a ListMultipleChoice in my form.
 The selected items should be binded to Car.color as ListCar cars.

 If I bind the ListMultipleChoice to cars, I´ll get a
 java.lang.ClassCastException
 because wicket trys to map a ListString to ListCar.

 java.lang.ClassCastException: java.lang.String cannot be cast to
 com.***.***.Car

 Any ideas???

 Thanks for your help








-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: Problem with Wicket Ajax with IE7 64bits

2009-02-04 Thread Thomas Mäder
I guess it's hard to find a workaround without having a stack trace from a
windows debugger. If you knew where in the IE code the crash occurs, it
might be possible to guess the offending code in Wicket (and work around
that). That said, you might want to report the crash to the folks at MS. IE
8 is not in production yet, so I guess there is hope it will get fixed.

Thomas

PS: IE sucks!  ( ;-), but only slightly so)

On Tue, Feb 3, 2009 at 4:48 PM, Antoine Angenieux
aangeni...@clinigrid.comwrote:

 Hi Thomas,

 It is not a javascript error, that's why I don't think Wicket is really the
 culprit here... It's more like an internal IE error popping up a modal
 window saying Stack Overflow Error... nothing to do with Java or
 Javascript Stack Overflow ;)

 It seems to happen with Ajax responses that update more than 10 wicket
 components that's why I wonder if it could be the DOM manipulation
 implementation within this version of IE.

 Thx for your help !

 Cheers,

 Antoine.


 Thomas Mäder wrote:

 If you say Stack Overflow Error do you mean a crash or an error in
 Javascript?

 On Tue, Feb 3, 2009 at 3:49 PM, Antoine Angenieux
 aangeni...@clinigrid.comwrote:

  Hi Wicket users !

 I'm encountering a strange error when testing one my webapps (wicket 1.3
 latest trunk, but I can reproduce it with wicket 1.3.5) with Internet
 Explorer 7 64bits version on Vista 64 bits.

 On some ajax requests, internet explorer fails with a Stack overflow
 error. This does not happen with any other browsers. And it's not a
 javascript error message, but an IE error message.

 The Wicket Ajax Debug window shows no error at all, and I suspect that
 some
 DOM manipulation implem. in this version of IE is the culprit...

 When I try on the regular 32bits version, this nevers happens.

 Did anyone already encounter this issue or has any idea ?

 Cheers,

 Antoine.

 --
 Antoine Angénieux
 Associé

 Clinigrid
 5, avenue Mozart
 75016 Paris, France
 +336 60 21 09 18
 aangeni...@clinigrid.com



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





 --
 Antoine Angénieux
 Associé

 Clinigrid
 5, avenue Mozart
 75016 Paris, France
 +336 60 21 09 18
 aangeni...@clinigrid.com



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




-- 
Thomas Mäder
www.devotek-it.ch


Re: Component doesn't disappear when removing it via an ajax link

2009-02-03 Thread Thomas Mäder
And don't forget that you have to add any components you want updated to the
AjaxRequestTarget you get passed into the onClick() method.

Thomas

On Tue, Feb 3, 2009 at 7:43 AM, Jeremy Thomerson
jer...@wickettraining.comwrote:

 A couple of problems:

 1 - don't remove it. You should make it invisible (setVisible(false))

 2 - you're trying to remove the container from the link, but it was added
 to the panel.  You would have to call IngredientPanel.this.remove (but
 don't)


 Jeremy Thomerson
 http://www.wickettraining.com
 -- sent from a wireless device


 -Original Message-
 From: Martin Makundi martin.maku...@koodaripalvelut.com
 Sent: Tuesday, February 03, 2009 12:16 AM
 To: users@wicket.apache.org
 Subject: Re: Component doesn't disappear when removing it via an ajax link

 Run Wicket in development mode and investigate what happens in the
 Wicket Ajax Debug dialog (right bottom corner of your browser).

 **
 Martin

 2009/2/3 Azzeddine Daddah waarhei...@gmail.com:
  Hi,
  I've two text fields wrapped in a container. What I want to do is to let
 the
  user remove these fields via a link. This is my code which does not work.
  The wrapper container stills appear even the link is submitted:
 
  html xmlns:wicket
 wicket:panel
 div wicket:id=container
 input type=text wicket:id=recipeIngredientQty style=width: 15%;
  float: left; margin-right: 10px;/
 input type=text wicket:id=recipeIngredient style=width: 80%;
  margin-bottom: 7px;/
 a wicket:id=removeLink[x]/a
 /div
 /wicket:panel
  /html
 
  public class IngredientPanel extends Panel {
 
 /**
  * Creates a new {...@link IngredientPanel}.
  *
  * @param id the panel id; may not be codenull/code
  * @param model the panel model; may not be codenull/code
  */
 public IngredientPanel(String id, IModelRecipeIngredient model) {
 super(id, model);
 RecipeIngredient recipeIngredient = model.getObject();
 
 final WebMarkupContainer container = new
  WebMarkupContainer(container, model);
 container.setOutputMarkupId(true);
 container.add(new RequiredTextFieldString(recipeIngredientQty,
  new ModelString(recipeIngredient.getQuantity(;
 container.add(new RequiredTextFieldString(recipeIngredient,
 new
  ModelString(recipeIngredient.getIngredient().getName(;
 container.add(new AjaxLinkVoid(removeLink) {
 @Override
 public void onClick(AjaxRequestTarget target) {
 remove(container);
 }
 });
 add(container);
 }
  }
 
  Kind regards,
 
  Hbiloo
 

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



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




-- 
Thomas Mäder
www.devotek-it.ch


Re: Problem with Wicket Ajax with IE7 64bits

2009-02-03 Thread Thomas Mäder
If you say Stack Overflow Error do you mean a crash or an error in
Javascript?

On Tue, Feb 3, 2009 at 3:49 PM, Antoine Angenieux
aangeni...@clinigrid.comwrote:

 Hi Wicket users !

 I'm encountering a strange error when testing one my webapps (wicket 1.3
 latest trunk, but I can reproduce it with wicket 1.3.5) with Internet
 Explorer 7 64bits version on Vista 64 bits.

 On some ajax requests, internet explorer fails with a Stack overflow
 error. This does not happen with any other browsers. And it's not a
 javascript error message, but an IE error message.

 The Wicket Ajax Debug window shows no error at all, and I suspect that some
 DOM manipulation implem. in this version of IE is the culprit...

 When I try on the regular 32bits version, this nevers happens.

 Did anyone already encounter this issue or has any idea ?

 Cheers,

 Antoine.

 --
 Antoine Angénieux
 Associé

 Clinigrid
 5, avenue Mozart
 75016 Paris, France
 +336 60 21 09 18
 aangeni...@clinigrid.com



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




-- 
Thomas Mäder
www.devotek-it.ch


Re: Multi-module applications in Wicket

2009-02-02 Thread Thomas Mäder
What you call modules really sounds like different web applications (in
the java servlet sense). Is there a reason you cannot have multiple WARs?

Thomas

On Sun, Feb 1, 2009 at 2:09 PM, Daniel Lipski daniel.lipski...@gmail.comwrote:


 Hi

 Im working on web application divided into multiple 'modules' and Im
 wondering how to use Wicket in such
 scenario. Because 'module' means a lot, I'll specify what I would like to
 achive:
 1)diffrent home pages for each module
 2)diffrent session classes for each module (WebApplication.newSession)
 3)diffrent authentications (ie. module A - SSO, module B - web form)

 I can imagine two approaches:
 1)one Wicket application 'handling' both modules.But...:
 -because there is one appication I'll have to check logged user in
 WebApplication.newSession  WebApplication.getHomePage and return proper
 session object/home page class. Decision is taken on logged user, so in
 that
 methods Ill have to know which user has logged in. Is it possible to check
 logged user in this methods ? (arent they called before authentication ?)
 The other way is to make a decission not on logged user but on accessed
 Page
 (all pages in moduleA inherit from ModuleAWebPage and pages in moduleB
 inherit from ModuleBWebPage). But I doubt if requested page is avaliable in
 this two methods...
 -module A uses SSO to authenticate user, module B uses usual page, where
 should I choose how to authenticate user ? Which authenticating framework
 should I choose for this purpose ? (auth-roles, WASP ?)

 2)Two Wicket applications each 'handling' one module. Because there are two
 WebApplications there is no problem with determinig which session
 object/home page class return. There is no problem with diffrent
 authentications either.
 But...:
 -Is it possible  ? Can I map WicketFilter few times in web.xml ? I know
 that
 Wicket does a lots internal and I dont know if multiple Wicket 'instances'
 can be run in one classloader. Are there any caveats/limitations when
 multiple Wicket instances work in parell (does Application.get() or other
 static methods still work - I saw that they are implemened with ThreadLocal
 but ...?)
 -How running multiple Wicket instances influences session size and other
 resources ?
 -Ther is a lot of settings (DI, mounting startegies, 'global' converters,
 global resources) that need to be shared beetweend this two modules. For
 majority of them I can make super class for both ModuleAWebApplication and
 ModuleBWebApplication and put common code there, but does moduleA can
 access
 shared by moduleB resources ?
 -It looks a little bit strange for me to create diffrent Wicket Web
 applications for each module. From the 'outside'(servlet container) its
 still one apllication (one war) so there is a little mismatch. Of course
 this is the least siginificant reason but I would like to use proper
 solutions rather then stretch the wrong one.

 For now Im closer to solution 2), but I worry about things which I havnt
 foreseen. Maybe there is general rule/pattern/solution for writing
 multi-module web applciaions ? Im sure its common issue and many of you
 could share some experience.

 Thanks for any help.
 Regards
 Daniel


 --
 View this message in context:
 http://www.nabble.com/Multi-module-applications-in-Wicket-tp21774998p21774998.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




-- 
Thomas Mäder
www.devotek-it.ch


Re: What are the consequences on sharing panels between pages?

2009-02-02 Thread Thomas Mäder
Doesn't that sound like session state?

Thomas

On Sun, Feb 1, 2009 at 7:09 PM, Per Newgro per.new...@gmx.ch wrote:

 Hi Uwe,

 until now i can do everything :-). All my experiments with ldm failed so
 far. I have to store the states. But in DB? It's heavyweight for me.
 Maybe i should try a cookie based solution.

 Thanks for your doubts
 Cheers
 Per


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




-- 
Thomas Mäder
www.devotek-it.ch


Re: What are the consequences on sharing panels between pages?

2009-02-02 Thread Thomas Mäder
Well, Wicket has a Session Object. You can create your own subclass and
store stuff in there (WebApplication.newSession(...). If you want to share
state between pages, it's a natural place to put the state. One question you
can ask yourself is: how many instances of that panel would I have? If the
answer is: one per user, the state of the panel is session state. So you
have multiple copies of the panel, but they all store their state into the
session.

Thomas

On Mon, Feb 2, 2009 at 11:22 AM, Newgro per.new...@gmx.ch wrote:


 Hi Thomas,

 can you please explain this a bit. What do you mean by session state. How
 can i use session state in my context?

 Cheers
 Per
 --
 View this message in context:
 http://www.nabble.com/What-are-the-consequences-on-sharing-panels-between-pages--tp21772949p21787239.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




-- 
Thomas Mäder
www.devotek-it.ch


Re: What are Behaviors in Wicket?

2009-01-18 Thread Thomas Mäder
Behaviours are Objects that can participate in the rendering of a component.
They serve to extract behaviour (hence the name) that is common to various
components and which cannot be accommodated in the inheritance hierarchy.
For example, you can add javascript handlers to many html tags, so you can't
really find a nice inheritance hierarchy where a particular subclass tree
can have a javascript handler and all others cannot. Instead, you extract
the code to a behaviour (for example, there AbstractDefaultAjaxBehaviour to
look at) and add it to the components as needed.

hth

Thomas
---
Thomas Mäder
www.devotek-it.ch

On Sun, Jan 18, 2009 at 10:02 AM, HHB hubaghd...@yahoo.ca wrote:


 Hey,
 In easy words, what are Wicket Behaviors? what is their role?
 Thanks.
 --
 View this message in context:
 http://www.nabble.com/What-are-Behaviors-in-Wicket--tp21525487p21525487.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: building extensible components

2009-01-15 Thread Thomas Mäder
As I understand it, you have a generic container component, which may
contain different subpanels. You do know that Panels can actually have their
own markup and also markup inheritance (?), so you'd end up with three
classes: the main panel (container) and you add an instance of (sub)classes
2 (the static panel) and 3 (the dynamic panel). Favor composition over
inheritance!
Unless that's totally not what you mean

Thomas

On Thu, Jan 15, 2009 at 11:52 PM, Loren Cole loren.c...@gmail.com wrote:

 I'm building an app that will have *lots* of panels that all follow a very
 similar pattern:

 They have a form and a static view whose visibility gets toggled when when
 you click edit/cancel|save|delete
 They display a warning if their model is empty
 They pop up a warning when you delete them
 They allow you to edit their model

 I've written a few and realized that I am cutting and pasting way too much
 code; so, I want to build an abstract superclass, but am having trouble
 figuring out how.  Hopefully someone here may be able to help.

 I need my subclasses to add markup to both the static and form components,
 which I believe rules out markup inheritance because I would have to use
 wicket:child/ twice and can't imagine wicket being able to figure out
 what
 I meant.  The other option I see is to create a panel for both the static
 content and the form, and to extend the superclass to specify which panels
 to include for each, which seems workable but ugly...
 Am I missing something, is there a better way?


 The super class I want to write would look something like this, I just
 can't
 figure out how to associate the markup:

 public abstract class AttributePanel extends Panel {
WebMarkupContainer staticContainer  = new WebMarkupContainer(static);
WebMarkupContainer dynamicContainer = new WebMarkupContainer(dynamic);
AjaxLink editLink;
Form form;
Label unprovisioned = new Label(unprovisioned, No provisioning data
 has been entered for this service, perhaps you should add it now...);;
Attributable attribute;   //the model
ComponentFeedbackPanel feedback = new ComponentFeedbackPanel(feedback,
 this);
String ConfirmationMsg = You sure?;

public AttributePanel(final String id, final ModelService service) {
super(id, service);

// add static stuff
staticContainer.setOutputMarkupId(true)
.setOutputMarkupPlaceholderTag(true);
add(staticContainer);
staticContainer.add(unprovisioned.setVisible(false));
if (attribute.getRefItemID()==null) {
unprovisioned.setVisible(true);
}
populateStaticContainer(); //add some components specific to the
 subclass

//add dynamic stuff
dynamicContainer.setOutputMarkupId(true)
.setOutputMarkupPlaceholderTag(true);
add(dynamicContainer);
form = new Form(form);
form.add(new AjaxButton(submitButton, form) {
@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
save();
ServicePanel parent = (ServicePanel)
 findParent(ServicePanel.class);
parent.addOrReplace(this);
target.addComponent(parent);
}
@Override
protected void onError(AjaxRequestTarget target, Form form) {
target.addComponent(feedback);
}
});
feedback.setOutputMarkupId(true);
form.add(feedback);
dynamicContainer.add(form);
populateDynamicContainer();  //add some components specific to the
 subclass


// Link to show form
editLink = new AjaxLink(edit) {
@Override
public void onClick(AjaxRequestTarget target) {
showForm(target);
}
};
staticContainer.add(editLink);

// Link to return to static view without saving any changes
form.add(new AjaxLink(cancel) {
public void onClick(AjaxRequestTarget target) {
hideForm(target);
}
});

 //link to delete attribute
form.add(new Link(deprovision) {
 @Override
public void onClick() {
deprovision();
ServicePanel parent = (ServicePanel)
 findParent(ServicePanel.class);
parent.addOrReplace(this);
}
 }.add(new SimpleAttributeModifier(onclick, return confirm('
 +getConfirmationMsg()+'); )));
}

private void showForm(AjaxRequestTarget target) {
staticContainer.setVisible(true);
dynamicContainer.setVisible(false);
target.addComponent(staticContainer);
target.addComponent(dynamicContainer);
}

private void hideForm(AjaxRequestTarget target) {
staticContainer.setVisible(true);
dynamicContainer.setVisible(false);
target.addComponent(staticContainer);

Always serialize pages for debug purposes

2008-08-11 Thread Thomas Mäder
Hi Guys,

I seem to remember that there was a way to force Wicket to always serialize
pages on detach in order to make sure every page is serializable during
development. Can someone please point me to the FM so I can read it?
Searching Nabble  Google didn't turn up anything.

this is 1.3.3

Thomas


Re: Always serialize pages for debug purposes

2008-08-11 Thread Thomas Mäder
Yeah, but wasn't there official support for that? And if not, wouldn't
this be useful for debug?

Thomas

2008/8/11 Uwe Schäfer [EMAIL PROTECTED]

 Thomas Mäder schrieb:


  I seem to remember that there was a way to force Wicket to always
 serialize
 pages on detach in order to make sure every page is serializable during
 development. Can someone please point me to the FM so I can read it?
 Searching Nabble  Google didn't turn up anything.


 one guy once posted this one:


 snip


Re: Always serialize pages for debug purposes

2008-08-11 Thread Thomas Mäder
Ah bugger! That was most convenient! I'd be very much in favor of it's
making a comeback

Thomas

On Mon, Aug 11, 2008 at 4:56 PM, Jonas [EMAIL PROTECTED] wrote:

 It seems this feature was removed, but there's some javadoc
 left in org.apache.wicket.settings.IDebugSettings:
 [quote]
 iserializeSessionAttributes/i (defaults to true in development
 mode) - Causes the framework
  * to serialize any attribute put into session - this helps find Not
 Serializable errors early
 [/quote]

 On Mon, Aug 11, 2008 at 3:30 PM, Thomas Mäder [EMAIL PROTECTED]
 wrote:
  Yeah, but wasn't there official support for that? And if not, wouldn't
  this be useful for debug?
 
  Thomas
 
  2008/8/11 Uwe Schäfer [EMAIL PROTECTED]
 
  Thomas Mäder schrieb:
 
 
   I seem to remember that there was a way to force Wicket to always
  serialize
  pages on detach in order to make sure every page is serializable during
  development. Can someone please point me to the FM so I can read it?
  Searching Nabble  Google didn't turn up anything.
 
 
  one guy once posted this one:
 
 
  snip
 

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




Re: why are we coding Web apps?

2008-07-22 Thread Thomas Mäder
Easy Answer: MS Word!

Quid licet iovi non licet bovi as the romans said.In english: if
it's ok for Microsoft it's still not ok for you!

Thomas

snip

 Then the question is, why do they need those 7000 Windows 2000 Desktops?
  Wouldn't they be better served by 7000 X server workstations and
 several Unix machines with centralized user accounts?
/snip

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



Re: passing objects between pages

2008-07-22 Thread Thomas Mäder
I have three rules for directly referencing objects from pages

1) It's serializable
2) The valueis not going to change from the time I construct the page
to when I use the object
3) It doesn't matter if I get a copy of the object (because of deserialization).

2  3 can be summarized as the object being a value object

Thomas


On Mon, Jul 21, 2008 at 6:25 PM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 the easiest thing to do is to pass the imodelgroup into the second
 page. i assume you already have a detachable group model that you are
 using to list users, so just pass it to the next page.

 in general keeping references to objects is safe for as long as the
 objects them selves are valid. the problem with hibernate objects is
 that although you have a reference that you can keep forever, the
 object's lifecycle is not tied to that reference. the object is tied
 to the session whose scope is usually a request, so the object itself
 is only valid during the request, which is why you have to use
 loadable detachable models.

 if you had an object that is not tied to any kind of lifecycle you
 could keep a reference indefinetely.

 once you start talking about objects that live across pages you run
 into another issue. wicket serializes each page individually. that
 means if you pass a reference to an object from page A to page B, page
 B will end up with a clone and change made to that object inside page
 B will not be visible to page A. something to keep in mind. this is
 not a problem for multiple references to an object within a page
 because serialization will properly keep track of multiple references
 to the same object.

 clears things up?

 -igor

 On Mon, Jul 21, 2008 at 9:10 AM, John [EMAIL PROTECTED] wrote:
 hi, i am writing an application, but don't know how best to write it
 in wicket.  i can see lots of different ways to approach my problem
 and would appreciate some direction as to which approach is the most
 appropiate.  i have read the documentation in the wiki regarding
 models and understand the different page constructors but i am
 confused about how long the objects are safe to hold on to and which
 approach is best.

 here is some (pseudo)code for a page i need to write.  my situation is
 i have one page which shows the details about a Group (collection of
 users), which has a link on it to create a new User and add it to
 the Group.  (the CreateUser page has text boxes to set name ect and
 saves to the database on submit)  my ViewGroupDetails page:

 // first decision = set the Group as a final variable before creating
 the link so it is still there in the onClick?
 final Group g = (Group)getModelObject();
 new Link(adduser) {
  public void onclick() {
// or get Group from the page's model only when link clicked?
Group g = (Group)ViewGroup.this.getModelObject();
// second decision = pass the whole Group into the new page constructor?
setResponsePage(new CreateUser(g));
// or make the new User object here and pass it in?
User u = new User();
u.setGroup(g);
setResponsePage(new CreateUser(u));
// or pass in just the group id number?
setResponsePage(new CreateUser(g.getId()));
  }
 }

 so the constructor of my CreateUser page will either take a Group and
 will create the User (as above), or take a Group's id number and load
 the Group from the database first, or take a User directly.  an id
 number could be passed in by PageParameters or directly as an integer.
  an object could be passed bare or put inside a Model.  i am not sure
 i am making any sense!  i suppose my questions are...

 - how 'safe' is it to pass the Group directly to the new page constructor?

 - is it safe to create a final reference to an object and rely on that
 object being still there and intact by the time the link is clicked?

 - is it safe to getModelObject() to get the page's object at any time
 in the future?

 - i understand that the following is bad: new Label(group.getId())...
 better to use a model and load the id when needed... am i falling into
 the same trap with the final variables in the code above?

 john

 -
 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: why are we coding Web apps?

2008-07-21 Thread Thomas Mäder
It might be easier for you, but not for the corporate IT shop you're
trying to sell your stuff to. They probably have some wacked out
compliance test to go through for everything they want to install on
their 7000 Windows 2000 Desktops (XP being too newfangled and unproven
to be used). In contrast, web apps are usually not problematic (except
that you can't use Javascript).

Thomas


 Your reason is a special instance of a much more general reason. Web
 applications are much easier to deal with from a deployment
 perspective than desktop applications.

 I don't know, it's not difficult to set up an RMI server, or to deploy
 a Swing client with Web Start (gives the user a single-click launch
 from the browser).  I've done it, and frankly it's easier than messing
 with Tomcat and Web frameworks (no offense to Wicket).


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



Re: Running a huge wicket site(1m + users)

2008-07-21 Thread Thomas Mäder
Sorry, but I just don't see the need for transparent failover in most
cases. I don't believe many web applications have unsaved state over
more than a few requests. So yes, you lost a server and you have to
login again, but so what?  It's not like it's going to happen very
often to a single user. Sticky sessions for teh win! ;-)

And once you remove the need for session state replication the whole
argument for client side state just crumbles. Unless you do something
like gwt does. But that's really not a web application anymore, but a
fat client based on a crappy toolkit (compared to something like Swing
or Eclipse RCP). I don't believe Wicket is what you want, then and I
don't think Wicket should try to serve that space.

Thomas


 What is this data juggling you talk of? If you use sticky sessions
 (which is really necessary for any serious web application IMO) there
 should not be any data juggling.

 But if you need failover, you need a buddy system, because session sharing
 across multiple clusters is not that desirable or fast. You eliminate the
 necessary data-juggling by using an inferior way of failover. Because you
 need more memory and more processing power and LAN traffic to keep the state
 synchronized, you simply need more iron to serve your web application. So,
 you need to scale out to larger clusters earlier. It's cheaper and faster to
 keep the state at the client.

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



Re: Structure in Wicket Project

2008-07-21 Thread Thomas Mäder
Yeah, but such a policy is complete crap if you'll excuse my french.
You can break a wicket applicaion as easily by changing the html files
as by changing code. A html change IS a code change.

Thomas


 I hope this doesn't mean it is considered a hack...In some projects of
 mine I have the demand to pull html resources from the file system in order
 to allow editing them without redeployment (and having them in a different
 place so the editor has no access to the deploy directories).


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



Re: Wizard and CheckGroup

2008-07-03 Thread Thomas Mäder
Why would there be raw input for the Checkbbox on page 2 when stepping
from 1 to 2? What is happening is that the checkbox is populated from
the underlying model, which happens to come up unchecked. What you
should check is: why isnt's the model updated when you first step from
2 to 3? Are you looking at the same model instance?

Thomas

1) when you go from page 2 to three, the values in t

On Tue, Jul 1, 2008 at 5:09 AM, David Leangen [EMAIL PROTECTED] wrote:

 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]



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



Re: patterns for web ui apps. mvc models

2008-07-02 Thread Thomas Mäder
Yes, we have a domain model which talks to stateless backend services.
The controller, i.e. the application flow and event handling is in
the pages. We used to have a different architecture with Spring
Webflow (that was in the dark ages of JSF) as the controller. Since
we're building a single app, we haven't found it necessary to abstract
these control flows out of the pages. Your mileage may vary if you're
trying to reuse the workflow across multiple clients.

sermon
On the topic of patterns I have a favourite quote from a golf
istruction book: the best golf swing is one that gets the ball into
the hole in the fewest strokes. The patterns you find in books are
solutions that worked in the past for other people. Look at them and
decide if they work for your particular problem. If you can't decide,
you don't understand your problem domain yet.
/sermon

cheers, Thomas

On Wed, Jul 2, 2008 at 9:30 AM, marco m [EMAIL PROTECTED] wrote:



 Thomas Mäder wrote:
 
  Wicket is a framework to write (mostly) statefulweb pages. Unlike other
  web
  frameworks it does not impose a particular way to structure the
  application
  logic beyond that. Think of it like, say, the QT widget set. It's a way to
  display information and to be notified of user interactions.
 
  Thomas
 
  PS: when did the notion start that design pattens had an intrinsic value?
  Now new and improved with more patterns! Patterns are ways to structure
  code WHEN IT NEEDS STRUCTURING. A HelloWorld app DOES NOT NEED PATTERNS.
  (sorry for the shouting, pet peeve)
 
 

 I hear you Thomas.  Maybe I should ask the question another way...does
 anyone out there encapsulate their data access layer/service layer within
 their model or do people put that stuff in their pages/components? Is anyone
 using any patterns?  if not...i feel so last year!
 --
 View this message in context: 
 http://www.nabble.com/patterns-for-web-ui-apps.--mvc-models-tp18214140p18231819.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: No effect of code until restarting netbeans.

2008-07-01 Thread Thomas Mäder
Are you running in debug mode? Did you try to restart the server?

On Tue, Jul 1, 2008 at 9:58 AM, Sushant [EMAIL PROTECTED] wrote:


 I am a newuser using wicket. I have been facing this problem since a week.

 I'm in serious trouble. Whenever i make any changes in my code in netbeans
 the changes i have made doesn't works until i restart netbeans. After
 restarting my netbeans the changes that i have made in my code works.
 For e.g. If i have set as setResponsePage(Home.class) and later i change it
 to setResponsePage(Index.class) and save it. Now if i run my project than
 it
 still shows Home page until i restart netbeans. After i restart netbeans
 the
 problem is solved.

 I'm using netbeans 6.1
 Please help me with this problem.
 --
 View this message in context:
 http://www.nabble.com/No-effect-of-code-until-restarting-netbeans.-tp18211238p18211238.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: patterns for web ui apps. mvc models

2008-07-01 Thread Thomas Mäder
Wicket is a framework to write (mostly) statefulweb pages. Unlike other web
frameworks it does not impose a particular way to structure the application
logic beyond that. Think of it like, say, the QT widget set. It's a way to
display information and to be notified of user interactions.

Thomas

PS: when did the notion start that design pattens had an intrinsic value?
Now new and improved with more patterns! Patterns are ways to structure
code WHEN IT NEEDS STRUCTURING. A HelloWorld app DOES NOT NEED PATTERNS.
(sorry for the shouting, pet peeve)

On Tue, Jul 1, 2008 at 2:07 PM, marco m [EMAIL PROTECTED] wrote:


 Hi  guys,

 I've been thinking about the way in which wicket is an MVC framework and
 whether people use it according to the MVC pattern.

 Wikipedia has this to say:

 Model
The domain-specific representation of the information on which the
 application operates. Domain logic adds meaning to raw data (e.g.,
 calculating if today is the user's birthday, or the totals, taxes, and
 shipping charges for shopping cart items).
Many applications use a persistent storage mechanism (such as a
 database) to store data. MVC does not specifically mention the data access
 layer because it is understood to be underneath or encapsulated by the
 Model.
 View
Renders the model into a form suitable for interaction, typically a user
 interface element. Multiple views can exist for a single model for
 different
 purposes.
 Controller
Processes and responds to events, typically user actions, and may invoke
 changes on the model.

 I'm interested in whether people are using the model to encapsulate service
 calls.  In the wicket documentation I frequently see services in the page
 retrieving dtos and passing the dto to a component as a model.  This seems
 to be in conflict with the description of a model in the mvc pattern.
 Wicket is supposed to be an mvc framework, so why do the examples put
 services/daos in the pages?

 What patterns are folks using for their wicket apps?
 --
 View this message in context:
 http://www.nabble.com/patterns-for-web-ui-apps.--mvc-models-tp18214140p18214140.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: Panel switching and back button

2008-06-26 Thread Thomas Mäder
Aha, the problem is that ajax does not cause a history entry to be created.
I've seen workarounds for this (not with wicket, though) which reload a
hidden IFrame each time they make a relevant change. I can't see right now
how that helps you in wicket, tough.

Thomas


On Thu, Jun 26, 2008 at 1:56 PM, Cristi Manole [EMAIL PROTECTED]
wrote:

 yes, with Ajax

 On Thu, Jun 26, 2008 at 2:15 PM, Thomas Mäder [EMAIL PROTECTED]
 wrote:

  I would expect that to happen by default. Replacing a panel should create
 a
  new page version which should change the Page URL. Are you using AJAX?
 
  Thomas
 
  On Thu, Jun 26, 2008 at 10:07 AM, Cristi Manole [EMAIL PROTECTED]
  wrote:
 
   Hello,
  
   I am implementing navigation through my application by switching
 panels.
  
   When the user presses the back button, I'd like to show the previously
   displayed panel. Is this possible?
  
   Thanks,
   Cristi Manole
  
 



Re: Panel switching and back button

2008-06-26 Thread Thomas Mäder
Hmhhh... isn't there a Javascript function which allows to replace the URL
of the current page in the history? I'm not sure this would work, but
couldn't you try this:

1) replace the panel
2) reload the IFrame
3) now manipulate the browser history to point to the currect URL for the
current page version

Thomas

On Thu, Jun 26, 2008 at 3:08 PM, Cristi Manole [EMAIL PROTECTED]
wrote:

 yes, I know, I'm trying to figure out a solution myself.

 I was sure though somebody else ran into this. :)

 On Thu, Jun 26, 2008 at 3:28 PM, Thomas Mäder [EMAIL PROTECTED]
 wrote:

  Aha, the problem is that ajax does not cause a history entry to be
 created.
  I've seen workarounds for this (not with wicket, though) which reload a
  hidden IFrame each time they make a relevant change. I can't see right
 now
  how that helps you in wicket, tough.
 
  Thomas
 
 
  On Thu, Jun 26, 2008 at 1:56 PM, Cristi Manole [EMAIL PROTECTED]
  wrote:
 
   yes, with Ajax
  
   On Thu, Jun 26, 2008 at 2:15 PM, Thomas Mäder [EMAIL PROTECTED]
   wrote:
  
I would expect that to happen by default. Replacing a panel should
  create
   a
new page version which should change the Page URL. Are you using
 AJAX?
   
Thomas
   
On Thu, Jun 26, 2008 at 10:07 AM, Cristi Manole 
  [EMAIL PROTECTED]
wrote:
   
 Hello,

 I am implementing navigation through my application by switching
   panels.

 When the user presses the back button, I'd like to show the
  previously
 displayed panel. Is this possible?

 Thanks,
 Cristi Manole

   
  
 



Re: Wicket CMS

2008-06-24 Thread Thomas Mäder
It might spark interest if you add a bit of documentation and a live demo.
Not everyone has the time to read through your code.

Thomas

On Tue, Jun 24, 2008 at 4:21 PM, james yong [EMAIL PROTECTED] wrote:


 Hi,

 Is there anyone who would like to pool efforts for a wicket-based cms?

 Currently, I have a prototype verson at http://code.google.com/p/welo/,
 but
 I would like to put efforts into a better one (not necessary mine).

 Regards,
 James
 --
 View this message in context:
 http://www.nabble.com/Wicket-CMS-tp18092129p18092129.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: help with RadioGroup in Table

2008-06-24 Thread Thomas Mäder
 new Radio( select, new PropertyModel( model, selected ))

you're setting the model of the Radio to the selected property of whatever
is in the row model. What is in the row model? Have you tried just passing
in the row model?

Thomas

On Tue, Jun 24, 2008 at 1:59 PM, jnorris [EMAIL PROTECTED] wrote:


 This problem is a real show-stopper for me so I really need some help if
 anyone has done something similiar.  I added
 AjaxFormChoiceComponentUpdatingBehavior to the RadioGroup as mentioned in
 another post and it hits onUpdate every time a radio button is selected.
 However, I can't figure out 1) how to get the selected row item's data
 object from the table and 2) what component to add to the AjaxRequestTarget
 (tried the radio group but it throws an exception).

 BTW, I gave a prezo to my group a couple of weeks ago and there was some
 real interest in migrating to wicket in place of our bloated legacy system,
 providing I can finish off this proof of concept that I'm working on.
  There
 is also some pressure here to do a complete re-design in asp.net so I'm
 really hoping to provide an alternative to doing that.  If I can't get the
 radio group in the table working soon I'll have to abandon the wicket
 approach.  So, any hints, help, url's to examples, etc. will be greatly
 appreciated.

 Thanks,
 Jim
 --
 View this message in context:
 http://www.nabble.com/help-with-RadioGroup-in-Table-tp18036005p18089479.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: are checkboxes broken WAS: missing something: getting AjaxCheckBox to recheck value from model as its redrawn?

2008-06-24 Thread Thomas Mäder
Can you reproduce this in a quickstart? Considering nobody had a pertinent
ide the last time, it might be easier.

Thomas

On Tue, Jun 24, 2008 at 4:12 PM, Kirk Israel [EMAIL PROTECTED] wrote:

 OK, to summarize what came previously:
 we had a palette control (two parallel listboxes, with push buttons
 in between for moving items from one list to the other), and tried to
 have a checkbox that would select all - that part worked fine, but
 for some reason we couldn't get it so using the buttons to remove
 items from the right list would also cause the select all checkbox
 to be unchecked. We punted, and used a select all link that didn't
 need to be visually updated.

 But now we're seeing some kind of related problem... in this form we
 have a big CheckGroup -- (previously we had trouble getting the
 contents of the CheckGroup to update when they weren't DHTML-visible,
 so we redraw the whole panel the checkboxes are on). Individual
 subsets of the checkboxes in the overall checkgroup have their own
 select all and clear links, along with a written summary of what
 is selected inside that checkgroup.

 Now, when someone clicks the push button in the pallet control, the
 select all links for the checkgroup subsets seem to be updating the
 model (since we see the written summary labels update) but the
 checkboxes don't check! -- until you click one of the checkboxes in
 ANY of the check group subsets, then the select all links can update
 the checkboxes as well.

 By using labels w/ timestamps, it seems clear that everything is being
 redrawn. And even if all the internal logic for the palette control
 pushbutton is removed, it's just a AjaxFallbackButton with
 setDefaultFormProcessing(false) that does nothing, the select all
 links can no longer make the checkboxes show the correct state of
 their entry in the cjeckgroup, even as they're redrawn. (Until one is
 clicked, at which point the connection is restored)

 So what is going on here?  Does this symptom seem to point to
 something we're doing wrong, or is there some kind of generalized
 checkbox updating issue? (since this is KIND of like the previous
 problem)

 This is Wicket 1.3.3...



 On Tue, May 27, 2008 at 9:15 AM, Kirk Israel [EMAIL PROTECTED] wrote:
  The Model was a HashMapString,Boolean.
  When the page was first loaded, only true values were loaded into
  it, i.e. there were no keys or values for checkboxes that weren't
  supposed to be checked.
  Later, it didn't matter if we added in an explicit false value for a
  key, or removing the key, neither were enough to get the checkbox to
  read that its value had changed.
 
  On Sun, May 25, 2008 at 6:00 AM, Thomas Mäder [EMAIL PROTECTED]
 wrote:
  What value are you returning from the model? In CheckBox.java, I find
 this:
 
 
 final String value = getValue();
 if (value != null)
 {
 try
 {
 if (Strings.isTrue(value))
 {
 tag.put(checked, checked);
 }
 
  And Strings.isTrue() only accepts a bunch of well known values (plus
 null)
 
  Thomas
 
 

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




Re: Ajax Only application - ffeedback appriciated

2008-06-12 Thread Thomas Mäder
One thing I find interesting in Wicket is that it makes it easy again to
think about an application as a series of places where the user can be
(+/- versioning). The back/forward buttons navigate between places. Actions
manipulate what you see, you don't necessarily go anywhere else.

Thomas

On Sat, Jun 7, 2008 at 5:03 AM, Eelco Hillenius [EMAIL PROTECTED]
wrote:

  Ive been developing an ajax only application in wicket for a little more
  than 3 months. Users can open windows in a multidocument desktop-style
  fashion for various entities and in these windows/tabs perform
 different
  actions and apply different views. Further they can change views forth
 and
  back, close views, rearrange views. I almost NEVER do a page level
 GET/POST.
  The fun part is that its working really well. But Ive never seen
 something
  like this out on the web really (gmail/gcalendar ok.. but those are quite
  simple apps + they prolly got a big staff to tune every possible metric).
 
  Has anyone done something similar?

 Sure. We (Teachscape) are doing something like that. Not all Ajax
 (though we use that regularly as well), but we pretty much do
 everything in one page and implement navigation through panel swapping
 etc.

 When using Wicket like this, it is best to use the
 SecondLevelCacheSessionStore (the default in Wicket 1.3). Wicket 1.2
 and the HttpSessionStore keep recording deltas - which are smaller
 than serialized pages, but have enough versions and it adds up - as
 long as you stay on one page. At least, that's how it used to be (and
 one of the big refactorings of 1.3).

 Eelco


  Is this a dangerous track? What is most likely to stop me? How can I
 monitor
  the amout o memory a user session consumes? If I find the
  average-request-cpu-cycles *
  average_requests_per_user_during_some_duration.. is it straight forward
 to
  see how many simultaneous users I can accomodate?
 
  /Kalle
  --
  View this message in context:
 http://www.nabble.com/Ajax-Only-application---ffeedback-appriciated-tp17694786p17694786.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: Replace a fragment with AjaxLink

2008-06-12 Thread Thomas Mäder
What's the stack trace?

On Thu, Jun 12, 2008 at 3:01 PM, vkbhaskar [EMAIL PROTECTED] wrote:


 How do I replace a fragment with an AjaxLink ?

 I am trying something like this.

 Fragment orig = new Fragment(container,original,this);
 orig.setOutputMarkupId(true);
 add(orig);
 add(new AjaxLink(link) {
public void onClick(AjaxTarget target) {
   Fragment repl = new Fragment(container,replace,MyPage.this);
   repl.setOutputMarkupId(true);
   MyPage.this.replace(repl);
   target.add(repl);
}
 }
 );

 But I am getting ArrayIndexOutofBoundsExceptions, when the link is clicked.
 --
 View this message in context:
 http://www.nabble.com/Replace-a-fragment-with-AjaxLink-tp17799454p17799454.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: Help to choice a wicket component

2008-06-10 Thread Thomas Mäder
Why not a DataTable?

On Tue, Jun 10, 2008 at 11:24 AM, Fabien D. [EMAIL PROTECTED]
wrote:


 Hi everybody,

 I need your help the choice the best component for managing the users of my
 wicket application.

 I need a Table, with 4 columns : 3 inputtexts to edit first and familly
 name, and email, and 1 DropDownChoice to edit right acces.

 So what is the best wicket component to do this?

 Thank you in advance.
 --
 View this message in context:
 http://www.nabble.com/Help-to-choice-a-wicket-component-tp17751207p17751207.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: ClassCastException with ListView()

2008-05-30 Thread Thomas Mäder
What's the actual class of the returned from item.getModelObject()?

On Fri, May 30, 2008 at 5:16 PM, David Nedrow [EMAIL PROTECTED] wrote:

 I'm getting a cast exception when I attempt to pull a list element from the
 model. I may be mishandling how I'm using the model, but this is basically
 based on several tutorials I've looked at.

 (Note, as people have pointed out here, I use the old fashioned naming
 style for my interfaces and DAOs.)

 Anyone see a problem with the below code?

 public class ShowProtocolsPanel extends Panel {
@SpringBean(name=ProtocolDAO)
private IProtocolDAO dao;

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

IModel protocolsModel = new LoadableDetachableModel() {
protected Object load() {
return dao.findAll();
}
};

add(new PropertyListView(eachItem, protocolsModel) {
@Override
protected void populateItem(ListItem item) {
Protocol protocol = (Protocol) item.getModelObject();

item.add(new Label(keyword, protocol.getKeyword()));
item.add(new Label(description,
 protocol.getDescription()));
}
});
}
 }


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




Re: ClassCastException with ListView()

2008-05-30 Thread Thomas Mäder
There are only two ways I can see that you can get a ClassCastException:

1) There is some class loader magic going on. Highly unlikely.
2) You're being done in by the BoundCompoundPropertyModel you have in the
item. Fire up the debugger and check the values directly (relying on
toString() is bad; some object might be lying to you. Step into the
item.getModelObject().

Thomas


On Fri, May 30, 2008 at 5:38 PM, David Nedrow [EMAIL PROTECTED] wrote:


 On May 30, 2008, at 11:20 AM, James Carman wrote:

  What is the type of item.getModelObject().  Have you run it through a
 debugger (or just simply put in a println)?


 Yes, I had done that first, thinking maybe I didn't understand how ListView
 worked via the Model.

 The object returned by item.getModelObject().toString() is...

 com.vzbi.ncs.argfrp.jpa.netconf.Protocol

 That's what baffles me about the cast exception.



  On Fri, May 30, 2008 at 11:16 AM, David Nedrow [EMAIL PROTECTED] wrote:

 I'm getting a cast exception when I attempt to pull a list element from
 the
 model. I may be mishandling how I'm using the model, but this is
 basically
 based on several tutorials I've looked at.

 (Note, as people have pointed out here, I use the old fashioned naming
 style for my interfaces and DAOs.)

 Anyone see a problem with the below code?

 public class ShowProtocolsPanel extends Panel {
  @SpringBean(name=ProtocolDAO)
  private IProtocolDAO dao;

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

  IModel protocolsModel = new LoadableDetachableModel() {
  protected Object load() {
  return dao.findAll();
  }
  };

  add(new PropertyListView(eachItem, protocolsModel) {
  @Override
  protected void populateItem(ListItem item) {
  Protocol protocol = (Protocol) item.getModelObject();

  item.add(new Label(keyword, protocol.getKeyword()));
  item.add(new Label(description,
 protocol.getDescription()));
  }
  });
  }
 }


 -
 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: missing something: getting AjaxCheckBox to recheck value from model as its redrawn?

2008-05-25 Thread Thomas Mäder
What value are you returning from the model? In CheckBox.java, I find this:


final String value = getValue();
if (value != null)
{
try
{
if (Strings.isTrue(value))
{
tag.put(checked, checked);
}

And Strings.isTrue() only accepts a bunch of well known values (plus null)

Thomas


Re: how can ..

2008-05-23 Thread Thomas Mäder
What are you trying to achieve? Why do you need a text url instead of a link
to a page?

Thomas

On Fri, May 23, 2008 at 9:07 AM, Tomasz Prus [EMAIL PROTECTED] wrote:

 How can i prepare url like this: ../London/9.html

 I need that city and advertNumber parameters be always at the end of url.

 Can You help me?

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




Re: Data Access Design for Pagination

2008-05-23 Thread Thomas Mäder
How long does the query take? How many copies of the DataProvider do you
construct (check with the debugger)?

Thomas

On Thu, May 22, 2008 at 3:51 PM, wfroud [EMAIL PROTECTED] wrote:




 WicketMessage: After 1 minute the Pagemap null is still locked by:
 Thread[http-8080-1,5,main], giving up trying to get the page for path:
 16:entries:topToolbars:1:toolbar:span:navigator:navigation:1:pageLink




Re: missing something: getting AjaxCheckBox to recheck value from model as its redrawn?

2008-05-23 Thread Thomas Mäder
I would think so, too.
I was looking more closely at your code, and this seems fishy:

new PropertyModel(mTargetModel.getManufacturersAsMap(), manufacturerName))

as I understand it, PropertyModel doesn't work with Maps, does it? It works
on Java Beans.

Thomas


On Fri, May 23, 2008 at 3:16 PM, Kirk Israel [EMAIL PROTECTED] wrote:

 the left/right moves ARE being done in the buttons onSubmit, I was
 hoping  calling .setDefaultFormProcessing(false); when adding the
 button to the page would have prevented that?

 On Fri, May 23, 2008 at 4:50 AM, Thomas Mäder [EMAIL PROTECTED]
 wrote:
  Do the move left/move right controls do a submit? If so you might also be
  resubmitting the (old) check box value.
 
  Thomas
 
 
 
  We have a list view that iterates over manufacturers, and each
  manufacturer has a pallet control of devices
  (two list boxes w/ move selection to right list, move selection to
  left list buttons between) along with a all for manufacturer
  checkbox
 
 
 

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




Re: Spring?

2008-05-21 Thread Thomas Mäder
Why would you add a large chunk of code to your project if you're not sure
you're going to need it? My advice: leave Spring out until it's actually
solving a concrete problem for you.

Thomas

PS: but then again I never understood what Spring was for anyway ;-)

On Wed, May 21, 2008 at 2:04 AM, Bruce McGuire [EMAIL PROTECTED] wrote:

 Hello All.



 We are just starting a new version of an existing app, moving toward open
 source technologies. We have decided on using Wicket based on some
 prototypes we have done, and are using Hibernate for the models.



 Our question is this: do you recommend also adding Spring into the mix?



 There are aspects (no pun intended) of Spring that we like, but are unsure
 if the benefits (AOP, IOC) are worth the added effort.



 I appreciate your thoughts on this.



 Thanks,



 Bruce.




Re: Encoding problem when deploying on production server

2008-05-20 Thread Thomas Mäder
Hi Sébastien,

If by resource files you mean .properties files, you cannot encode them in
utf-8. java.util.Properties always assumes ISO 8859-1 encoding when loading
.properties files

Thomas

On Mon, May 19, 2008 at 1:24 PM, Piller Sébastien [EMAIL PROTECTED]
wrote:

 Hello guys,

 I have a problem with the encoding of some text, on my deployment server
 (Unix/Linux). I use wicket to generate the body of emails, with this code:

   StringResponse stringResponse = new StringResponse();
   Response originalResponse = RequestCycle.get().getResponse();

   try {
   RequestCycle.get().setResponse(stringResponse);
   render();
   } finally {
   RequestCycle.get().setResponse(originalResponse);
   }

   return stringResponse.toString();

 All of my resources files are encoded with UTF8.

 When I use it on my development workstation, everything works fine. Every
 chars are properly rendered.

 But on the production server, it seems that the email is converted to
 ISO8859-1 (and special chars are not rendered properly in UTF8). But others
 web pages are properly rendered (I only have a problem when dealing with
 responses)

 Have you guys any idea on how to fix it? Do I have to do someting on the
 server config?

 Thank you vm!

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




Re: Contribution for Wicket

2008-05-20 Thread Thomas Mäder
When I was still writing Open Source software, rounds of beer at conferences
were always welcome ;-)

Thomas

On Tue, May 20, 2008 at 9:12 AM, Johan Compagner [EMAIL PROTECTED]
wrote:

 I think Matej can give you his paypal number ;)

 But kidding aside i dont know if this happens with individual apache
 projects. The thing i could think of is that you sponsor a wicket
 meeting or the apache foundation in general.

 Johan

 On 5/20/08, Mathias P.W Nilsson [EMAIL PROTECTED] wrote:
 
  Hi!
 
  I was wondering how I could make a contribution for wicket. I'm not
 talking
  about a code contribution but rather a small money contribution. I have
 got
  a lot of help here on this forum and in fact I don't think I have ever
  experienced this kind of help elsewhere!
 
 
  --
  View this message in context:
  http://www.nabble.com/Contribution-for-Wicket-tp17330946p17330946.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: CheckGroup and back Button problem

2008-05-08 Thread Thomas Mäder
We seem to have a similar problem with a wizard page. We came across the
following code in Check.onComponentTag(..)

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);


It looks like the Check component is checking for the existence of raw
input, but then using the input from the current request (via
getInputAsArray()) to render. Sounds fishy! I figure this could be related?

Thomas

On Wed, May 7, 2008 at 5:27 PM, Steen Larsen [EMAIL PROTECTED] wrote:

 Hi,

 I have made a CheckGroup vith a ListView of Check's than works fine, except
 that when it is submitted and I'm on the next page and want to go back
 through a Wicket Button (not the browsers back button), all the checks are
 empty even thouch the model behind still contains the selected obejcts.
 Here
 is the example code of the first page:

 public HomePage() {
Order order = ((WicketSession) (Session.get())).getOrder();
if (order.getDigitalPackets() == null)
order.setDigitalPackets(new ArrayListProduct());
System.err.println(LIST1 =  + order.getDigitalPackets());
Form form = new DigitalOrderForm(digitalOrderForm);
form.setModel(new CompoundPropertyModel(order));
add(form);
ListProduct allProducts = new ArrayListProduct();
for (int i = 0; i  10; i++) {
Product p = new Product();
p.setProductKey(i + );
p.setTotalPrice(new BigDecimal(100 + i));
p.setProductName(Product + i);
allProducts.add(p);
}
CheckGroup group = new CheckGroup(digitalPackets);
form.add(group);
ListView products = new ListView(products, allProducts) {
protected void populateItem(ListItem item) {
  item.add(new Check(check,
 item.getModel()).setEscapeModelStrings(false));
  item.add(new Label(productName, new
 PropertyModel(item.getModel(), productName)));
  item.add(new Label(totalPrice, new
 PropertyModel(item.getModel(), totalPrice)));
}
};
group.add(products.setReuseItems(true));
}

class DigitalOrderForm extends Form {
DigitalOrderForm(String s) {
super(s);
}

protected void onSubmit() {
Order order = (Order) getModelObject();
System.err.println(LIST2 =  +
 order.getDigitalPackets());
setResponsePage(PageTwo.class);
}
}

 The second page is just a back button like this:

 public PageTwo() {
add(new Button(back) {
public void onSubmit() {
setResponsePage(HomePage.class);
}
});
}

 Anybody knows how to get the selected objects shown when you go back like
 that ?

 /Steen



Re: Problem with german error messages in feedback panel

2008-05-05 Thread Thomas Mäder
Hi,

properties files are ALWAYS encoded with ISO 8859-1 encoding. Check the
javadoc for java.util.Properties for more info

Thomas

On Sun, Apr 27, 2008 at 11:35 AM, greeklinux [EMAIL PROTECTED] wrote:


 Hello,

 I have problems with german umlauts in a feedback panel.
 I define the error messages in a property file.
 It displays as follows:
 Bitte geben Sie eine gültige E-Mail ein

 In my HTML:
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 ?xml version=1.0 encoding=UTF-8?
 
 meta http-equiv=Content-type content=text/html; charset=utf-8 /
 ...

 My editor is configured to use UTF-8 as encoding.
 I tried to initialize the Wicket Application with
 getRequestCycleSettings().setResponseRequestEncoding(UTF-8);
 but the error is still there.

 Has someone the same problem?
 --
 View this message in context:
 http://www.nabble.com/Problem-with-german-error-messages-in-feedback-panel-tp16921955p16921955.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]