Re: [Wicket-user] WicketTester message resolution

2007-03-08 Thread Juergen Donnerstag
You are using 1.2.x? To me it sounds like a bug that WicketTester or
MockWebApplication does not look into the application properties file
as a normal Application does. We should simply look at the config of
normal application and copy the one line of config into WicketTester.

Juergen

On 3/7/07, Jean-Baptiste Quenot [EMAIL PROTECTED] wrote:
 * Dmitry Kandalov:
 
 
  Jean-Baptiste Quenot-3 wrote:
  
   Nice code snippet, would you  mind opening an issue, and providing
   your sample code as attachment?
 
  Sure, https://issues.apache.org/jira/browse/WICKET-368

 Thanks!

  Could you please also take a look at
  https://issues.apache.org/jira/browse/WICKET-258 :)

 Yes, it's on my TODO list, I'll do it if no one beats me.
 --
 Jean-Baptiste Quenot
 aka  John Banana   Qwerty
 http://caraldi.com/jbq/

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


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


Re: [Wicket-user] XHTML ContentType problem

2007-03-08 Thread Martin Dames

Ok, thank you.

Hmm... I want to embedd into my HTML template some svg graphics. This is
just only for Firefox, or IE users with the adobe plugin. That means, I need
that Firefox turns on its XML parser, so I would need to use XHTML, because
if the file has the file extension html it doesnt render svg graphics.

Any suggestion without entering the world of pain?

Thanks.


Al Maw wrote:
 
 Martin Dames wrote:
 Ok thanks for the tip,
 
 but why is Firefox offering a download instead of rendering it?
 
 See Page#configureResponse()
 This does a:
 response.setContentType(text/ + getMarkupType() + ; charset= + 
 encoding);
 
 You could override this to do what you want, but like I said before, 
 trust me - you don't want to do that.
 
 Al
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/XHTML-ContentType-problem-tf3362030.html#a9370393
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: [Wicket-user] XHTML ContentType problem

2007-03-08 Thread Martin Dames

Ok, I've figured it out!

using xml as Markup Type will do everything I need!

Thank you for the tips! 

Martin.



Martin Dames wrote:
 
 Ok, thank you.
 
 Hmm... I want to embedd into my HTML template some svg graphics. This is
 just only for Firefox, or IE users with the adobe plugin. That means, I
 need that Firefox turns on its XML parser, so I would need to use XHTML,
 because if the file has the file extension html it doesnt render svg
 graphics.
 
 Any suggestion without entering the world of pain?
 
 Thanks.
 
 
 Al Maw wrote:
 
 Martin Dames wrote:
 Ok thanks for the tip,
 
 but why is Firefox offering a download instead of rendering it?
 
 See Page#configureResponse()
 This does a:
 response.setContentType(text/ + getMarkupType() + ; charset= + 
 encoding);
 
 You could override this to do what you want, but like I said before, 
 trust me - you don't want to do that.
 
 Al
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/XHTML-ContentType-problem-tf3362030.html#a9370475
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: [Wicket-user] XHTML ContentType problem

2007-03-08 Thread Al Maw
Martin Dames wrote:
 Hmm... I want to embedd into my HTML template some svg graphics. This is
 just only for Firefox, or IE users with the adobe plugin. That means, I need
 that Firefox turns on its XML parser, so I would need to use XHTML, because
 if the file has the file extension html it doesnt render svg graphics.
 
 Any suggestion without entering the world of pain?

I suggest you revisit this in about three years, when the browsers 
might actually support it properly. In the meantime, use Batik to render 
the SVG to PNG on the fly server-side. If you really must persist, 
override configureResponse in your Page, like I said.

Al

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


[Wicket-user] No type attribute in the html of Button results in TextField

2007-03-08 Thread Shams Mahmood

Hi,

I'm using wicket1.2.jar

Recently I noticed that giving no type attribute inside input tag of a
Wicket Button
results in the Button being displayed as textfield.
The same is true for textfields, but it doesnt really matter in that case
:).

I guess this could be corrected in java code so that if type is not found
for certain input tag components, the correct type attribute is inserted by
the Java code.
components could include buttons, radios, checkboxes, etc.
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] No type attribute in the html of Button results in TextField

2007-03-08 Thread Martijn Dashorst
No, that would mean magic from the Wicket side, which we try to
minimize as much as possible. Wicket doesn't know your intentions with
the markup or the designers intentions. If you look at the html file
in a browser directly you would see the same thing. This
previewability would be lost if we would do this.

Martijn

On 3/8/07, Shams Mahmood [EMAIL PROTECTED] wrote:
 Hi,

 I'm using wicket1.2.jar

 Recently I noticed that giving no type attribute inside input tag of a
 Wicket Button
 results in the Button being displayed as textfield.
 The same is true for textfields, but it doesnt really matter in that case
 :).

 I guess this could be corrected in java code so that if type is not found
 for certain input tag components, the correct type attribute is inserted by
 the Java code.
 components could include buttons, radios, checkboxes, etc.

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




-- 
Learn Wicket at ApacheCon Europe: http://apachecon.com
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.5 will keep your server alive. Download Wicket now!
http://wicketframework.org

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


Re: [Wicket-user] XHTML ContentType problem

2007-03-08 Thread Martin Dames

Hey,

yes I know, but Firefox 1.5 and better 2.0 can do svg quite good. 3.0 even
better. I tried that out, much faster. All non-firefox users are simply not
my problem! Sounds arrogant? Hehe.. its just a study project!

Martin.



Al Maw wrote:
 
 Martin Dames wrote:
 Hmm... I want to embedd into my HTML template some svg graphics. This is
 just only for Firefox, or IE users with the adobe plugin. That means, I
 need
 that Firefox turns on its XML parser, so I would need to use XHTML,
 because
 if the file has the file extension html it doesnt render svg graphics.
 
 Any suggestion without entering the world of pain?
 
 I suggest you revisit this in about three years, when the browsers 
 might actually support it properly. In the meantime, use Batik to render 
 the SVG to PNG on the fly server-side. If you really must persist, 
 override configureResponse in your Page, like I said.
 
 Al
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/XHTML-ContentType-problem-tf3362030.html#a9371116
Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

2007-03-08 Thread Ryan Holmes

On Mar 6, 2007, at 2:12 PM, Eelco Hillenius wrote:
 1) Who uses 2.0 for serious projects?
We're using 1.2.x for now.


 2) What do you think of the constructor change? Do you prefer 1.3's
 add style or 2.0's style of passing in the parent construction time.
Absolutely prefer the 1.3/1.2 style. I've spent a good deal of time  
trying to warm up to the 2.0 style under the assumption that we would  
use it eventually, but I still think the add style is more intuitive  
and readable. As a new user, I'm not accustomed to either one yet --  
I just found the add style immediately more appealing.

I'm also not very excited about the supposed technical benefits of  
the constructor change. It sounds like there are more disadvantages  
(less flexibility, more complexity) than advantages overall.

 3) If we would ever backtrack on the constructor change (*if*, don't
 panic for now) how much trouble would that give you?
Obviously it wouldn't cause me any trouble since I'm not using 2.0,  
and it would actually save me the trouble of having to think about  
whether or not my current code will work in 2.0.

Having said all that, if you guys felt strongly that the 2.0  
constructor style was a major step forward and that the API breakage  
was justified, I would get on board and support it.


-Ryan

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


Re: [Wicket-user] What's the best way of doing menus in Wicket?

2007-03-08 Thread Robert Novotny

I have tried to use dropdown menu in one of my projects. NavMenu has been
broken in that time (and I didn't figure out how to patch it) and my effort
in integrating TigraMenu wasn't succesfull either. Finally I have used the
approach which uses a pure CSS menu which is based on the :hover class. The
menu is composed of multiple nested span tags (which are mapped to Wicket
Label-s or Link-s). However, this approach requires you to know the
structure of the menu beforehand and may pose a limitation when you require
menu items which changes at runtime dynamically.

(There was another slight glitch: in IE this approach requires css-hover.htc
script, which may be disabled on some browsers due tu security reasons).

However, this approach has suited me well.


Eelco Hillenius wrote:
 
 The big question there is whether you know all items beforehand or
 not. If yes, integrating with any javascript library is easy. If not,
 you need a tree, and probably can best look at that component or
 navmenu
 (https://svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3/wicket-contrib-navmenu)
 which is deprecated (won't be supported) but nevertheless may give you
 an idea.
 
 The second big question is: what are you going to do with these items:
 component replacements or do links point to bookmarkable pages?
 
 I'd really love to see someone contribute a nice component for this
 based on bookmarkable pages and a tree. navmenu was a step in that
 direction, but the API is't great.
 
 Eelco
 
 
 On 3/7/07, Thomas R. Corbin [EMAIL PROTECTED] wrote:

 We need a menu bar across the top of our pages, with pull down menus.

 We used to use this stuff:
 http://struts-menu.sf.net

 but I'm not sure how to integrate it, since it seems to rely on jsp tags.

 Thanks.

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

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

-- 
View this message in context: 
http://www.nabble.com/What%27s-the-best-way-of-doing-menus-in-Wicket--tf3366440.html#a9371685
Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

2007-03-08 Thread Ryan Holmes

On Mar 7, 2007, at 7:31 AM, Ryan Sonnek wrote:

 Just my 2 cents, but considering the *massive* API changes in other
 opensource projects when releasing a major version, i don't think
 providing users with an easy upgrade path is that important.

 Look at struts for example.  version 2.0 is a *complete* rewrite and
 requires users to do a lot of work to change.
But how many people are actually upgrading from 1.0 to 2.0? I don't  
think the number is very high precisely because of the massive API  
changes.

In general, I think frameworks that provide an easy upgrade path are  
far more successful. For example, Spring's 2.0 release is pretty much  
a drop-in replacement. Hibernate provided a fairly easy upgrade from  
2 to 3. At the other extreme is Tapestry, which has lost a lot of  
users (including me), developers and overall momentum by rewriting  
every major version from scratch.

I'm not saying that (especially open source) developers shouldn't  
make big changes, I'm just saying that the cost shouldn't be  
underestimated.


 I would rather have the wicket developers make these decisions based
 on what's best for the Wicket API rather than what's best for users.
 Just a thought...

Sure, but the developers are users too, so hopefully we all want more  
or less the same things.

-Ryan

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


Re: [Wicket-user] What's the best way of doing menus in Wicket?

2007-03-08 Thread Jonathan Locke


I know this is very low-tech, but I just arrange my links into a nav-looking
structure.  Since they will auto-disable if they link to self (same page),
they form a kind of menu where you can see where you are.  This has been
good enough for most of what I do, without hardly any coding (as a result of
auto-links).

Jon


Robert Novotny wrote:
 
 I have tried to use dropdown menu in one of my projects. NavMenu has been
 broken in that time (and I didn't figure out how to patch it) and my
 effort in integrating TigraMenu wasn't succesfull either. Finally I have
 used the approach which uses a pure CSS menu which is based on the :hover
 class. The menu is composed of multiple nested span tags (which are
 mapped to Wicket Label-s or Link-s). However, this approach requires you
 to know the structure of the menu beforehand and may pose a limitation
 when you require menu items which changes at runtime dynamically.
 
 (There was another slight glitch: in IE this approach requires
 css-hover.htc script, which may be disabled on some browsers due tu
 security reasons).
 
 However, this approach has suited me well.
 
 
 Eelco Hillenius wrote:
 
 The big question there is whether you know all items beforehand or
 not. If yes, integrating with any javascript library is easy. If not,
 you need a tree, and probably can best look at that component or
 navmenu
 (https://svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3/wicket-contrib-navmenu)
 which is deprecated (won't be supported) but nevertheless may give you
 an idea.
 
 The second big question is: what are you going to do with these items:
 component replacements or do links point to bookmarkable pages?
 
 I'd really love to see someone contribute a nice component for this
 based on bookmarkable pages and a tree. navmenu was a step in that
 direction, but the API is't great.
 
 Eelco
 
 
 On 3/7/07, Thomas R. Corbin [EMAIL PROTECTED] wrote:

 We need a menu bar across the top of our pages, with pull down menus.

 We used to use this stuff:
 http://struts-menu.sf.net

 but I'm not sure how to integrate it, since it seems to rely on jsp
 tags.

 Thanks.

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

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

-- 
View this message in context: 
http://www.nabble.com/What%27s-the-best-way-of-doing-menus-in-Wicket--tf3366440.html#a9371865
Sent from the Wicket - User mailing list archive at Nabble.com.


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


[Wicket-user] AJAX validation

2007-03-08 Thread Arnout Engelen
Hello,

We're running into a problem that is probably not in wicket itself, but 
perhaps someone here has also run into it.

We have a form with a TextField which has a validator. When the user 
leaves the field, the validation is of the field is called though AJAX.

On our development/testing setup, this works fine. However, on the 
intended production machine the validation always fails. I replaced the 
validator with:

new AbstractValidator() { public void validate(FormComponent component) {
LOG.info(Validating component:  + component.getInput());
}}

And noticed that the input is filled on the test machine, but 'null' on 
the intended production environment. I added a javax.servlet.Filter that 
prints ServletRequest-ParameterMap, and indeed it seems the field value 
is not passed in, though I inspected the POST request with Fiddler and 
the field does appear to be sent to the webserver. The same server hosts 
a number of other non-Wicket Resin web applications that do not seem to 
trigger the problem.

So far it seems either Apache2, mod_caucho or Resin (2.1.16) is eating 
the POST body parameters. Has anyone ever seen something like this? Any 
idea where to look?


Arnout

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


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

2007-03-08 Thread Jean-Baptiste Quenot
* Eelco Hillenius:

  going the other way 2.0-1.x should be trivial

 This is true. At least it should be a lot easier.

I wouldn't be so confident.  In  1.x very often we need to refrain
doing things in  the constructor, and have  to override onAttach()
to  access the  parent.   So  it's not  just  about reverting  the
constructor change,  it's also dealing with  the delayed hierarchy
setup that 1.x forces you to cope with.
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

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


Re: [Wicket-user] Wicket homepage Lucida Sans font

2007-03-08 Thread Jean-Baptiste Quenot
FWIW there is a JIRA issue for this already:
http://issues.apache.org/jira/browse/WICKET-346

Nathan Hamblen's suggestion to have a fallback font is good:

font-family: 'Lucida Sans', 'Helvetica', 'Sans-serif', 'sans';

Where shall we change that?
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

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


Re: [Wicket-user] IMPORTANT: your opinion on the constructor change in2.0

2007-03-08 Thread Rüdiger Schulz
Same here, having rolled out a 1.2.3 project with no need for updating,
and currently in the final stages of a 1.2.5 project, which will
eventually update to 1.3 if it comes out. Never did any tests beyond 1.2.

Regarding the constructor change:

the 1.x way of compiling the hierarchie via add() methods was very
natural for me, as I have quite some experience in swing. Specifying the
parent in the constructor always seemed odd to me; still I came across
some situations where it would have been useful to have it in the
constructor.

What I once tried was to add all my components in onAttach() but that
didn't work of course (subcomponents were added again next request). But
some common method in Component where that could be done *after* the
constructor would be cool (if that is somehow possible).

What I was looking forward to in 2.x were mostly the Java 5 IModels and
so on, as I think this would make the code a lot more readable.

Well, just my 2 cents here :)


Rüdiger

Dipu schrieb:
 We are still using 1.2.1 and 1.2.5 for our production and near production 
 projects.
 
 
 Thanks
 Dipu
 
 
 - Original Message - 
 From: Eelco Hillenius [EMAIL PROTECTED]
 To: Wicket User List wicket-user@lists.sourceforge.net
 Sent: Tuesday, March 06, 2007 10:12 PM
 Subject: [Wicket-user] IMPORTANT: your opinion on the constructor change 
 in2.0
 
 
 Hi,

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

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

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

 1) Who uses 2.0 for serious projects?

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

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

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

 Regards,

 Eelco

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


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


Re: [Wicket-user] IMPORTANT: your opinion on the constructor change in2.0

2007-03-08 Thread Anders Peterson
I don't care about (understand) the pros and cons regarding the 
constructor change. What Wicket needs is parameterized models 
(generics). I think you should do what ever it takes to support this in 
a released version as soon as possible.

/Anders

Gabor Szokoli wrote:
 On 3/7/07, Korbinian Bachl [EMAIL PROTECTED] wrote:
 Also please if you decide to not use the new constructor go on a JDK1.5 solo
 dev path soon
 
 +1 for this if I understand it right :-)
 We are not committed to either version yet, do basic prototypes in
 1.2, but untyped getModel()  is getting on my nerves already. (How did
 we ever use java without generics?)
 I am on principle against severe API changes unless they bring
 significant benefits, but do not feel myself competent to judge the
 current situation.
 
 
 Gabor Szokoli
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV


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


Re: [Wicket-user] Wicket homepage Lucida Sans font

2007-03-08 Thread remco bos
Yes, that's the problem! But it looks even worse on my computer... I think I 
have installed a bad font or something..

On my laptop it looks fine (yesterday I told it didn't but after I checked 
again it really did!) so I will compare the font list tonight and let you know.

The problem was solved when I changed the font 'Lucida Sans' in the css to 
'Lucida Sans Unicode' 


Remco Bos

- Original Message 
From: Jean-Baptiste Quenot [EMAIL PROTECTED]
To: wicket-user@lists.sourceforge.net
Sent: Thursday, March 8, 2007 11:40:56 AM
Subject: Re: [Wicket-user] Wicket homepage Lucida Sans font


FWIW there is a JIRA issue for this already:
http://issues.apache.org/jira/browse/WICKET-346

Nathan Hamblen's suggestion to have a fallback font is good:

font-family: 'Lucida Sans', 'Helvetica', 'Sans-serif', 'sans';

Where shall we change that?
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

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


 

Expecting? Get great news right away with email Auto-Check. 
Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html -
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] IMPORTANT: your opinion on the constructor change in2.0

2007-03-08 Thread Anders Peterson
...  and having two active development branches seems like a really bad 
idea. /Anders

Anders Peterson wrote:
 I don't care about (understand) the pros and cons regarding the 
 constructor change. What Wicket needs is parameterized models 
 (generics). I think you should do what ever it takes to support this 
 in a released version as soon as possible.

 /Anders

 Gabor Szokoli wrote:
 On 3/7/07, Korbinian Bachl [EMAIL PROTECTED] wrote:
 Also please if you decide to not use the new constructor go on a 
 JDK1.5 solo
 dev path soon

 +1 for this if I understand it right :-)
 We are not committed to either version yet, do basic prototypes in
 1.2, but untyped getModel()  is getting on my nerves already. (How did
 we ever use java without generics?)
 I am on principle against severe API changes unless they bring
 significant benefits, but do not feel myself competent to judge the
 current situation.


 Gabor Szokoli

 - 

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





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


[Wicket-user] Retrieving a value from a PropertyModel

2007-03-08 Thread Tim Squires
Hi,
 
I'm trying to get working a panel containing a TextField and a Label.
The label contains the hex value for the TextField content.  The
TextField is Ajaxed so that it updates the label on each key press.
 
Unfortunalty, I cannot retrieve the value from the TextField, it always
returns a null.  Will someone elighten me to the best way to retrieve
the current TextField value?
 
Code is included below.
 
Thanks for your help,
Tim
 
public class TextFieldWithHexValue extends Panel {

private static final Log logger = LogFactory
.getLog(TextFieldWithHexValue.class);

@SuppressWarnings(serial)
public TextFieldWithHexValue(String id, final PropertyModel
model,
int tabindex) {
super(id);
final TextField textField = new TextField(text field
with hex, model);
textField.setOutputMarkupId(true);
add(textField);

textField.add(new AttributeModifier(tabindex, true,
new Model(
tabindex)));
textField.setOutputMarkupId(true);

// Server Port Hex
Model hexModel = new Model() {
public Object getObject(Component arg0) {
logger.debug(Calculating hex
value...);
String value = model.getObject(null) +
;
logger.debug(Pre hexed value =  +
value);

if (StringUtils.isNotEmpty(value)) {
StringBuffer buffer = new
StringBuffer();
StringTokenizer tokens = new
StringTokenizer(value, .);
while (tokens.hasMoreTokens()) {
String token =
tokens.nextToken();
try {
Integer hex =
new Integer(token);

buffer.append(StringUtils.leftPad(Integer

.toHexString(hex), 2, '0'));
} catch
(NumberFormatException e) {

logger.warn(Unable to format  + token

+  to hex);
}
}
return
buffer.toString().toUpperCase();
} else
return ;
}
};
final Label hexLabel = new Label(hex for text field,
hexModel);
hexLabel.setOutputMarkupId(true);

textField.add(new AjaxEventBehavior(onkeypress) {
protected void onEvent(AjaxRequestTarget target)
{
logger.debug(value has changed,
recalculate hex value);
target.addComponent(hexLabel);
}
});
add(hexLabel);
}
}


The Information contained in this e-mail message is intended only for
the individuals named above. If you are not the intended recipient,
you should be aware that any dissemination, distribution, forwarding
or other duplication of this communication is strictly prohibited.
The views expressed in this e-mail are those of the individual
author and not necessarily those of LINK Interchange Network Ltd.
Prior to taking any action based upon this e-mail message you should
seek appropriate confirmation of its authenticity. If you have
received this e-mail in error, please notify the sender immediately.


LINK Interchange Network Limited
Tel: 01423 356000, Fax: 01423 356356
email: [EMAIL PROTECTED]  http://www.link.co.uk
Registered in ENGLAND Number. 3565766
Registered Office: Arundel House * 1 Liverpool Gardens * Worthing * West 
Sussex* BN11 1SL

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


Re: [Wicket-user] IMPORTANT: your opinion on the constructor change in2.0

2007-03-08 Thread ChuckDeal

I had also hoped that the new Constructor in 2.0 would have been useful. 
But, I have been using the following solution in 1.2 / 1.3 to overcome not
having the parent at Component construction time.  Then, all of my Panels
extend this Panel instead of the core Panel.  It has been working for me for
quite some time.

Chuck

public abstract class InitializablePanel extends Panel {
private boolean initialized;

/**
 * Constructor for InitializablePanel
 * 
 * @param id
 */
public InitializablePanel(String id) {
super(id);

commonInit();
}

/**
 * Constructor for InitializablePanel
 * 
 * @param id
 * @param model
 */
public InitializablePanel(String id, IModel model) {
super(id, model);

commonInit();
}

/**
 * commonInit
 */
private void commonInit() {
initialized = false;
}

/**
 * This method will be called by onAttach, therefore subclasses
 * should override this method to create their components.
 */
protected abstract void createComponents();

/**
 * @see wicket.Component#onAttach()
 */
@Override
protected void onAttach() {
if (!initialized) {
createComponents();
initialized = true;
}
}



Rüdiger Schulz-3 wrote:
 
 Same here, having rolled out a 1.2.3 project with no need for updating,
 and currently in the final stages of a 1.2.5 project, which will
 eventually update to 1.3 if it comes out. Never did any tests beyond 1.2.
 
 Regarding the constructor change:
 
 the 1.x way of compiling the hierarchie via add() methods was very
 natural for me, as I have quite some experience in swing. Specifying the
 parent in the constructor always seemed odd to me; still I came across
 some situations where it would have been useful to have it in the
 constructor.
 
 What I once tried was to add all my components in onAttach() but that
 didn't work of course (subcomponents were added again next request). But
 some common method in Component where that could be done *after* the
 constructor would be cool (if that is somehow possible).
 
 What I was looking forward to in 2.x were mostly the Java 5 IModels and
 so on, as I think this would make the code a lot more readable.
 
 Well, just my 2 cents here :)
 
 
 Rüdiger
 
 Dipu schrieb:
 We are still using 1.2.1 and 1.2.5 for our production and near production 
 projects.
 
 
 Thanks
 Dipu
 
 
 - Original Message - 
 From: Eelco Hillenius [EMAIL PROTECTED]
 To: Wicket User List wicket-user@lists.sourceforge.net
 Sent: Tuesday, March 06, 2007 10:12 PM
 Subject: [Wicket-user] IMPORTANT: your opinion on the constructor change 
 in2.0
 
 
 Hi,

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

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

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

 1) Who uses 2.0 for serious projects?

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

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

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

 Regards,

 Eelco

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

Re: [Wicket-user] IMPORTANT: your opinion on the constructor change in2.0

2007-03-08 Thread cowwoc

How about a hybrid system?

Is there a clear-cut way to know up-front which components have an
immutable parent versus others that might require it to change during
rendering time? If so, couldn't you require the use of constructors that
take a parent for components whose parents are immutable and then for
all other components use the add() paradigm?

It seems to me that any component that knows up-front that its parent
is supposed to change between renderings will not run any operations
that depend on that parent until render time -- hence no need to add a
isInitialized() sanity check from all your methods. All methods that
depend on the parent should only be invoked at render time and if the
component has no parent it will never be rendered in the first place
hence there is no reason to check isInitialized() again.

On the other hand, other components that require an immutable parent
can then require it in their constructor and their methods can
implicitly assume it exists without that isInitialized() check.

Gili



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


[Wicket-user] conditionally include a portion of an HTML document

2007-03-08 Thread David Robison
I have an HTML document where I want to conditionally include (or exclude) 
based on the type of user. For example, I might have a span that contains a 
link to an administrator page that I only want shown of the user is an 
administrator user. Is there a convenient way to only include the span 
containing the link?

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


[Wicket-user] Using AjaxFormSubmitBehavior for radio buttons.

2007-03-08 Thread vivek verma
Hi,
In my form, 
I have provided radio choices r1,r2,r3,etc based on whose selection I have to 
change a panel's(id is p1) model object and display the panel corresponding to 
that in UI.
I have used components RadioGroup, Radio to implement this.


I need to do this using Ajax.
Taking hint from,
http://www.nabble.com/RadioGroup-onchange-event-%28Wicket-1.2%29-tf1862107.html#a5165682
I am using AjaxFormSubmitBehavior for this.

For example, the panel is the user's address. A user can have different 
addresses(a1,a2,a3,etc).
The behaviour I want is that when user selects r1, a1 should be displayed.If he 
selects r2, a2 should be displayed and likewise.
This is working fine.
Also, I want that if user modifies any of the address lines of a1 and goes to 
a2 and comes back to a1, the address lines of a1 should not be the modified 
ones.

This is not happening because I guess, in AjaxFormSubmitBehavior the model is 
updated with the latest values.

To tackle this, I tried to override the
onEvent method of AjaxFormSubmitBehavior 
with 
protected void onEvent(AjaxRequestTarget target)
{

  onSubmit(target);

}

But now  if user selects now r2 the choice remains still at r1, because the 
model for radio choice remains unchanged.

Is there a way to allow selective update of some components' models only. e.g I 
need update of radio choice model here, but not for address panel's model

Regards,
Vivek




 

Don't get soaked.  Take a quick peek at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather

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


Re: [Wicket-user] What's the best way of doing menus in Wicket?

2007-03-08 Thread Thomas R. Corbin
On Thursday, 08 March 2007 01:23 am, Eelco Hillenius escreveu:
 The big question there is whether you know all items beforehand or
 not. If yes, integrating with any javascript library is easy. If not,
 you need a tree, and probably can best look at that component or
 navmenu
 (https://svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3/wicke
t-contrib-navmenu) which is deprecated (won't be supported) but nevertheless
 may give you an idea.

 The second big question is: what are you going to do with these items:
 component replacements or do links point to bookmarkable pages?

 I'd really love to see someone contribute a nice component for this
 based on bookmarkable pages and a tree. navmenu was a step in that
 direction, but the API is't great.

For what we're doing, we'll know all the items beforehand and we'll be 
pointing to bookmarkable pages.

I'm mostly a swing developer and new to wicket and javascript so I'll 
see 
what I can do.   I'll look at navmenu to see a starting point.


 Eelco

 On 3/7/07, Thomas R. Corbin [EMAIL PROTECTED] wrote:
  We need a menu bar across the top of our pages, with pull down menus.
 
  We used to use this stuff:
  http://struts-menu.sf.net
 
  but I'm not sure how to integrate it, since it seems to rely on jsp tags.
 
  Thanks.
 
  -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to share
  your opinions on IT  business topics through brief surveys-and earn cash
  http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user

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


Re: [Wicket-user] What's the best way to change the style for a particular column

2007-03-08 Thread Thomas R. Corbin
On Thursday, 08 March 2007 01:24 am, Eelco Hillenius escreveu:
 Did you look at the examples project? Plenty of examples on repeaters.

Yes, but I don't see one that changes the column style that uses 
PropertyColumn.   That doesn't mean there isn't one, I just haven't seen one.   
I think it would be easier if I used a different repeater.   I'll look at 
doing that, probably.


 Eelco

 On 3/7/07, Thomas R. Corbin [EMAIL PROTECTED] wrote:
  in a DefaultDataTable?
 
  I think some other repeaters may make it easier, but I can't see how to
  do it with a PropertyColumn.
 
  Thanks.
 
  -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to share
  your opinions on IT  business topics through brief surveys-and earn cash
  http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user

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


[Wicket-user] MarkupCache

2007-03-08 Thread Scott Lusebrink

is there a way to tell a markup to not go into the MarkupCache.  I'm
overloading newMarkupResourceStream which will change on every page but it
is being put in the cache and never getting run again.  There is
MarkupCache.clear() but that seems to much just to remove one
markupcontainer.  can i use a ChangeListener or something.
Basically I need to run newMarkupResourceStream for every page request.

for reference this is for use with JDOM if anyone is framiliar:
  public IResourceStream newMarkupResourceStream(Class containerClass)
  {
 CustomXMLOutputter outputter = new CustomXMLOutputter();
 String markup = outputter.outputString(getElement());
 markup = html xmlns:wicketwicket:panel + markup
   + /wicket:panel/html;
 StringResourceStream stream = new StringResourceStream(markup);
 return stream;
  }

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


Re: [Wicket-user] MarkupCache

2007-03-08 Thread Johan Compagner

override the last modified time of the IREsourceStream you make
and return always the System.currentMillis()

johan



On 3/8/07, Scott Lusebrink [EMAIL PROTECTED] wrote:


is there a way to tell a markup to not go into the MarkupCache.  I'm
overloading newMarkupResourceStream which will change on every page but it
is being put in the cache and never getting run again.  There is
MarkupCache.clear () but that seems to much just to remove one
markupcontainer.  can i use a ChangeListener or something.
Basically I need to run newMarkupResourceStream for every page request.

for reference this is for use with JDOM if anyone is framiliar:
   public IResourceStream newMarkupResourceStream(Class containerClass)
   {
  CustomXMLOutputter outputter = new CustomXMLOutputter();
  String markup = outputter.outputString(getElement());
  markup = html xmlns:wicketwicket:panel + markup
+ /wicket:panel/html;
  StringResourceStream stream = new StringResourceStream(markup);
  return stream;
   }

Scott


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


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


Re: [Wicket-user] MarkupCache

2007-03-08 Thread Eelco Hillenius
This only works in 1.3/ 2.0, but let your component implement
IMarkupResourceStreamProvider and IMarkupCacheKeyProvider. Then, let's
getCacheKey return null and your markup will never be cached.

Eelco


On 3/8/07, Scott Lusebrink [EMAIL PROTECTED] wrote:
 is there a way to tell a markup to not go into the MarkupCache.  I'm
 overloading newMarkupResourceStream which will change on every page but it
 is being put in the cache and never getting run again.  There is
 MarkupCache.clear () but that seems to much just to remove one
 markupcontainer.  can i use a ChangeListener or something.
 Basically I need to run newMarkupResourceStream for every page request.

 for reference this is for use with JDOM if anyone is framiliar:
public IResourceStream newMarkupResourceStream(Class containerClass)
{
   CustomXMLOutputter outputter = new CustomXMLOutputter();
   String markup = outputter.outputString(getElement());
   markup = html xmlns:wicketwicket:panel + markup
 + /wicket:panel/html;
   StringResourceStream stream = new StringResourceStream(markup);
   return stream;
}

 Scott


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



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


Re: [Wicket-user] IMPORTANT: your opinion on the constructor change in2.0

2007-03-08 Thread Eelco Hillenius
 How about a hybrid system?

 Is there a clear-cut way to know up-front which components have an
 immutable parent versus others that might require it to change during
 rendering time? If so, couldn't you require the use of constructors that
 take a parent for components whose parents are immutable and then for
 all other components use the add() paradigm?

The largest problem with that would be that it would be inconsistent
for users. So apart from whether this is achievable, I wouldn't like
it as it would be too confusing.

Eelco

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


[Wicket-user] Ajax Indicators for custom components

2007-03-08 Thread Apaar Trivedi
Hey all,

 

I've got a custom component (drop down of AjaxLinks) which extends
Panel.  I would like for this component to be able to use an ajax
indicator.  How can I do this?  Can I just have that component implement
IAjaxIndicatorAware?  When I use the indicatorAppender as part of this,
it does not seem to work.  Any help is appreciated.  Thanks.

 

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


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

2007-03-08 Thread Eelco Hillenius
   going the other way 2.0-1.x should be trivial
 
  This is true. At least it should be a lot easier.

 I wouldn't be so confident.  In  1.x very often we need to refrain
 doing things in  the constructor, and have  to override onAttach()
 to  access the  parent.   So  it's not  just  about reverting  the
 constructor change,  it's also dealing with  the delayed hierarchy
 setup that 1.x forces you to cope with.

True. But the funny thing is it turns out we don't need to as often.
Especially not since the HeaderContributer was refined.

But indeed, YMMV.

Eelco

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


Re: [Wicket-user] IMPORTANT: your opinion on the constructor change in2.0

2007-03-08 Thread cowwoc

Alternatively:

1) Components are POJOs. Users can define whatever constructor they want.

2) Users always use add() to associate a parent with a component but you
move the component wiring out of the constructor and into a onWire()
method. Now, whenever the hierarchy/parent changes onWire() gets
invoked. So components with dynamic hierarchies get onWire() once per
rendering whereas components with static hierarchies only have this
method invoked once. Users can then remove isInitialized() so long as
they invoke their methods from inside onWire().

Gili

Eelco Hillenius wrote:
 How about a hybrid system?

 Is there a clear-cut way to know up-front which components have an
 immutable parent versus others that might require it to change during
 rendering time? If so, couldn't you require the use of constructors that
 take a parent for components whose parents are immutable and then for
 all other components use the add() paradigm?
 
 The largest problem with that would be that it would be inconsistent
 for users. So apart from whether this is achievable, I wouldn't like
 it as it would be too confusing.
 
 Eelco
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



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


[Wicket-user] wicket-autocomplete.js bug

2007-03-08 Thread David Robison
When selecting a item from the autocomplete drop down, the onchange event 
handler on the input is not called. The wicket-autocomplete.js needs to be 
modified to call the onchange function explicitly. the changes should include:

case KEY_ENTER:
if(selected-1){
obj.value=getSelectedValue();
if (typeof obj.onchange == function) obj.onchange();
hideAutoComplete();
return killEvent(event);
}
return true;
break;

and

node.onclick = function(event){
wicketGet(elementId).value=getSelectedValue();
if (typeof wicketGet(elementId).onchange == function) 
wicketGet(elementId).onchange();
hideAutoComplete();
   }

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


Re: [Wicket-user] wicket future directions, summary of current discussioin

2007-03-08 Thread Eelco Hillenius
To summarize this: it's really only the constructor change that is in
question here. Whatever happens, the other features including generics
support will be in a version of Wicket, whether we call that 1.4 or
again 2.0.

The constructor change is the main reason why it is difficult to
maintain the two separate branches, and it is also the reason why some
got code nastier (though other pieces of code got better imo).

Eelco


On 3/8/07, Stefan Lindner [EMAIL PROTECTED] wrote:
 Dear wicket users,

 in my opinion the current discussion has 3 core themes
 1. wicket 2 constructors vs. wicket 1.x constructors
 2. generics at java 1.5 at all
 3. the 2.0 model handleing vs. 1.x model handling

 Now i want to summarize the current discussion for each topic

 1. Only one person mentioned possible problems going back to 1.x 
 construkctor. They ware concerning ajax stuff but nearly all others said 
 something like
- I found noch things that I can't do wit 2.0 that can be done with 1.x
- As the new features from 2.0 are backported to 1.x the opposite is true
- The current wicket 2 users will have no big trouble to change the 
 constructor back to 1.x style. It's some work to do but there is no 
 functionality loss in their applicatons
 Conclusion: the constructor change itself seems not to be a problem for all 
 wicket users. But as the constructor change was used as a synonyme for drop 
 wicket 2 at all it seemde to be a big problem. My summary on constructor 
 change is only focuses on the pure constructor change.

 2. As I can see, nearly all wicket 2 users got accustomed to generics and do 
 not want to drop the generics from thier application. The users that start to 
 use annotatioins for wicket-spring integration will also not want to get lost 
 of this. Maybe a java 5 wrapper around the un-generic 1.x classes may help

  package wicket.markaup
  class Component {

 is wrapped by

 package wicket2.markup
 import wicket.markup
 class ComponentT extends Component{

 ore something similar. So the wicket 2.0 users can go on using gnerics. The 
 wicket 2 users and perhaps some contributors of a minoir degree that do only 
 generification of comonents may build such wrapper classes and report 
 inconsistencys they detetct back to the core developers. Just an idea.

 2. If the 2.0 model handling is backported to 1.3 oder 1.4 the same wrappers 
 as for topic 2 may help.

 I like to work with wicket very much and I would do my part for generic 
 wrappers if possible.

 Stefan Lindner

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




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


Re: [Wicket-user] Retrieving a value from a PropertyModel

2007-03-08 Thread Igor Vaynberg

havent looked at your code but here is how i would do it

class mypanel extends panel {

  private String value;
  //getter+setter

  public mypanel() {
   TextField tf=new TextField(tf, new PropertyModel(this, value));
   Label l=new Label(l, new propertyModel(this, value));

   .
}
}


-igor


On 3/8/07, Tim Squires [EMAIL PROTECTED] wrote:


Hi,

I'm trying to get working a panel containing a TextField and a Label.
The label contains the hex value for the TextField content.  The
TextField is Ajaxed so that it updates the label on each key press.

Unfortunalty, I cannot retrieve the value from the TextField, it always
returns a null.  Will someone elighten me to the best way to retrieve
the current TextField value?

Code is included below.

Thanks for your help,
Tim

public class TextFieldWithHexValue extends Panel {

private static final Log logger = LogFactory
.getLog(TextFieldWithHexValue.class);

@SuppressWarnings(serial)
public TextFieldWithHexValue(String id, final PropertyModel
model,
int tabindex) {
super(id);
final TextField textField = new TextField(text field
with hex, model);
textField.setOutputMarkupId(true);
add(textField);

textField.add(new AttributeModifier(tabindex, true,
new Model(
tabindex)));
textField.setOutputMarkupId(true);

// Server Port Hex
Model hexModel = new Model() {
public Object getObject(Component arg0) {
logger.debug(Calculating hex
value...);
String value = model.getObject(null) +
;
logger.debug(Pre hexed value =  +
value);

if (StringUtils.isNotEmpty(value)) {
StringBuffer buffer = new
StringBuffer();
StringTokenizer tokens = new
StringTokenizer(value, .);
while (tokens.hasMoreTokens()) {
String token =
tokens.nextToken();
try {
Integer hex =
new Integer(token);

buffer.append(StringUtils.leftPad(Integer

.toHexString(hex), 2, '0'));
} catch
(NumberFormatException e) {

logger.warn(Unable to format  + token

+  to hex);
}
}
return
buffer.toString().toUpperCase();
} else
return ;
}
};
final Label hexLabel = new Label(hex for text field,
hexModel);
hexLabel.setOutputMarkupId(true);

textField.add(new AjaxEventBehavior(onkeypress) {
protected void onEvent(AjaxRequestTarget target)
{
logger.debug(value has changed,
recalculate hex value);
target.addComponent(hexLabel);
}
});
add(hexLabel);
}
}


The Information contained in this e-mail message is intended only for
the individuals named above. If you are not the intended recipient,
you should be aware that any dissemination, distribution, forwarding
or other duplication of this communication is strictly prohibited.
The views expressed in this e-mail are those of the individual
author and not necessarily those of LINK Interchange Network Ltd.
Prior to taking any action based upon this e-mail message you should
seek appropriate confirmation of its authenticity. If you have
received this e-mail in error, please notify the sender immediately.


LINK Interchange Network Limited
Tel: 01423 356000, Fax: 01423 356356
email: [EMAIL PROTECTED]  http://www.link.co.uk
Registered in ENGLAND Number. 3565766
Registered Office: Arundel House * 1 Liverpool Gardens * Worthing * West
Sussex* BN11 1SL

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


Re: [Wicket-user] Getting value of a text field via Ajax, no form

2007-03-08 Thread Stefan Lindner
Try something like
 
 startDate.getModelObject()
 
or address the form's model 
 
   vacationForm.getModelobject.getTextfield's property name
 
Stefan LIndner
winmail.dat-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Ajax Indicators for custom components

2007-03-08 Thread Apaar Trivedi
Hey all,

 

I've got a custom component (drop down of AjaxLinks) which extends
Panel.  I would like for this component to be able to use an ajax
indicator.  How can I do this?  Can I just have that component implement
IAjaxIndicatorAware?  When I use the indicatorAppender as part of this,
it does not seem to work.  Any help is appreciated.  Thanks.

 

 

Sorry if this is a double post, my previous one did not seem to appear.

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


Re: [Wicket-user] conditionally include a portion of an HTML document

2007-03-08 Thread Igor Vaynberg

WebMarkupContainer adminSpan=new WebMarkupContainer(admin-span) {
  public boolean isVisible() { return getsesion().getuser().isadmin(); }}

if you have a lot of components in that span and you dont want the overhead
of creating them make the span a panel or a fragment and add it or an empty
webmarkupcontainer conditionally

also look at our IAuthorizationStrategy which can enforce these kinds of
rules globally - mainly isActionAuthorized and Component.RENDER

-igor


On 3/8/07, David Robison [EMAIL PROTECTED] wrote:


 I have an HTML document where I want to conditionally include (or
exclude) based on the type of user. For example, I might have a span that
contains a link to an administrator page that I only want shown of the user
is an administrator user. Is there a convenient way to only include the
span containing the link?

Thanks, David


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


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


Re: [Wicket-user] wicket-autocomplete.js bug

2007-03-08 Thread Igor Vaynberg

how about a jira issue with a patch? :)

-igor


On 3/8/07, David Robison [EMAIL PROTECTED] wrote:


 When selecting a item from the autocomplete drop down, the onchange event
handler on the input is not called. The wicket-autocomplete.js needs to be
modified to call the onchange function explicitly. the changes should
include:

case KEY_ENTER:
if(selected-1){
obj.value=getSelectedValue();
if (typeof obj.onchange == function) obj.onchange();
hideAutoComplete();
return killEvent(event);
}
return true;
break;

and

node.onclick = function(event){
wicketGet(elementId).value=getSelectedValue();
if (typeof wicketGet(elementId).onchange ==
function) wicketGet(elementId).onchange();
hideAutoComplete();
   }

Thanks, David

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


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


Re: [Wicket-user] IMPORTANT: your opinion on the constructor change in2.0

2007-03-08 Thread Igor Vaynberg

this wont work.

-igor


On 3/8/07, cowwoc [EMAIL PROTECTED] wrote:



How about a hybrid system?

Is there a clear-cut way to know up-front which components have an
immutable parent versus others that might require it to change during
rendering time? If so, couldn't you require the use of constructors that
take a parent for components whose parents are immutable and then for
all other components use the add() paradigm?

It seems to me that any component that knows up-front that its
parent
is supposed to change between renderings will not run any operations
that depend on that parent until render time -- hence no need to add a
isInitialized() sanity check from all your methods. All methods that
depend on the parent should only be invoked at render time and if the
component has no parent it will never be rendered in the first place
hence there is no reason to check isInitialized() again.

On the other hand, other components that require an immutable
parent
can then require it in their constructor and their methods can
implicitly assume it exists without that isInitialized() check.

Gili


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



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


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

2007-03-08 Thread Igor Vaynberg

the advantage is that the error points you to the place in java code where
the problem is instead of a place in markup.

-igor


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


 I have been using 1.2.4 for some days. I think the current construct
works
 well. If there is no overwhelming reason, I prefer preserve the old
style.
 Why wicket team choose SWT style construct for 2.0? To prevent mistakes
like
 forgetting to add component to component tree?

The reasons are outlined here

http://cwiki.apache.org/WICKET/migrate-20.html#Migrate-2.0-Constructorchange
.

Mainly line precise early error reporting when the component hierarchy
mismatches with the hierarchy in the markup, and to enable users to do
a couple of things at construction time they now have to do
workarounds for (like doing getForm() or getMarkupId in the
constructor).

Eelco

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

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


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

2007-03-08 Thread Eelco Hillenius
We've gathered a lot of opinions by now (more are still welcome
though!) and I think we should let this sink in for a bit.

There are a couple of projects being built on 2.0 (see the replies in
this thread, but also
http://www.mail-archive.com/general@lists.ops4j.org/msg00240.html),
but so far, people who reacted seem to be understanding and flexible
to go with us if we would decide to revert the constructor change.

It looks like quite a few people, more than I expected in fact,
weren't that crazy about the constructor refactor in the first place,
though some people like it better in general (me being one of them
though I see disadvantages as well, but also
http://www.mail-archive.com/general@lists.ops4j.org/msg00402.html).
Based on the replies in this thread, it seems that people find add
more intuitive and like the flexibility that gives you over the
tighter model of 2.0

I propose to start a real vote on what to do with the constructor
change somewhere next week. Until then, please feel free to keep
venting your opinions on this thread.

Regards,

Eelco

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


Re: [Wicket-user] Getting value of a text field via Ajax, no form

2007-03-08 Thread Jason Roelofs

Well, the model never actually gets changed. I must be missing something,
the new value of the field never gets back to the server. Anyone know why
this would be or if there's a better way to do this?

Jason

On 3/8/07, Stefan Lindner [EMAIL PROTECTED] wrote:


Try something like

 startDate.getModelObject()

or address the form's model

   vacationForm.getModelobject.getTextfield's property name

Stefan LIndner

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



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


Re: [Wicket-user] Getting value of a text field via Ajax, no form

2007-03-08 Thread Igor Vaynberg

see AjaxFormComponentUpdatingBehavior

AjaxEventBehavior doesnt send over the value of the form component, just
triggers a roundtrip

-igor


On 3/8/07, Jason Roelofs [EMAIL PROTECTED] wrote:


Well, the model never actually gets changed. I must be missing something,
the new value of the field never gets back to the server. Anyone know why
this would be or if there's a better way to do this?

Jason

On 3/8/07, Stefan Lindner [EMAIL PROTECTED] wrote:

 Try something like

  startDate.getModelObject()

 or address the form's model

vacationForm.getModelobject.getTextfield's property name

 Stefan LIndner

 -

 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys-and earn cash

 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




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


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


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

2007-03-08 Thread Marc-Andre Houle

Who will build the first vote engine using wicket so we will not have to
vote in the mailling list directly? :)

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


We've gathered a lot of opinions by now (more are still welcome
though!) and I think we should let this sink in for a bit.

There are a couple of projects being built on 2.0 (see the replies in
this thread, but also
http://www.mail-archive.com/general@lists.ops4j.org/msg00240.html),
but so far, people who reacted seem to be understanding and flexible
to go with us if we would decide to revert the constructor change.

It looks like quite a few people, more than I expected in fact,
weren't that crazy about the constructor refactor in the first place,
though some people like it better in general (me being one of them
though I see disadvantages as well, but also
http://www.mail-archive.com/general@lists.ops4j.org/msg00402.html).
Based on the replies in this thread, it seems that people find add
more intuitive and like the flexibility that gives you over the
tighter model of 2.0

I propose to start a real vote on what to do with the constructor
change somewhere next week. Until then, please feel free to keep
venting your opinions on this thread.

Regards,

Eelco

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

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


Re: [Wicket-user] Ajax Indicators for custom components

2007-03-08 Thread Igor Vaynberg

the behavior checks if it or the component it is attached to implement
IAjaxIndicatorAware. what it then does is display:; to show whatever dom
element has the id returned by IAjaxIndicatorAware when the ajax request is
initiated, and then display:none; when the ajax request is finished.

also see javadoc on IAjaxIndicatorAware

-igor


On 3/8/07, Apaar Trivedi [EMAIL PROTECTED] wrote:


 Hey all,



I've got a custom component (drop down of AjaxLinks) which extends Panel.
I would like for this component to be able to use an ajax indicator.  How
can I do this?  Can I just have that component implement
IAjaxIndicatorAware?  When I use the indicatorAppender as part of this, it
does not seem to work.  Any help is appreciated.  Thanks.





Sorry if this is a double post, my previous one did not seem to appear.

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


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


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

2007-03-08 Thread Scott Swank
All things equal I prefer the 1.x add() syntax, however I don't have a
good feel for the advantages/disadvantages that add() vs. new provide.
 What I really want is generics/models.

Scott

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


Re: [Wicket-user] Getting value of a text field via Ajax, no form

2007-03-08 Thread Jason Roelofs

Ok, that did it. Thanks again Igor.

Jason

On 3/8/07, Igor Vaynberg [EMAIL PROTECTED] wrote:


see AjaxFormComponentUpdatingBehavior

AjaxEventBehavior doesnt send over the value of the form component, just
triggers a roundtrip

-igor


On 3/8/07, Jason Roelofs [EMAIL PROTECTED] wrote:

 Well, the model never actually gets changed. I must be missing
 something, the new value of the field never gets back to the server. Anyone
 know why this would be or if there's a better way to do this?

 Jason

 On 3/8/07, Stefan Lindner  [EMAIL PROTECTED] wrote:

  Try something like
 
   startDate.getModelObject()
 
  or address the form's model
 
 vacationForm.getModelobject.getTextfield's property name
 
  Stefan LIndner
 
  -
 
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to
  share your
  opinions on IT  business topics through brief surveys-and earn cash
  http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 


 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys-and earn cash

 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



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


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


Re: [Wicket-user] Getting value of a text field via Ajax, no form

2007-03-08 Thread Igor Vaynberg

youre welcome

-igor


On 3/8/07, Jason Roelofs [EMAIL PROTECTED] wrote:


Ok, that did it. Thanks again Igor.

Jason

On 3/8/07, Igor Vaynberg [EMAIL PROTECTED] wrote:

 see AjaxFormComponentUpdatingBehavior

 AjaxEventBehavior doesnt send over the value of the form component, just
 triggers a roundtrip

 -igor


 On 3/8/07, Jason Roelofs [EMAIL PROTECTED] wrote:

   Well, the model never actually gets changed. I must be missing
  something, the new value of the field never gets back to the server. Anyone
  know why this would be or if there's a better way to do this?
 
  Jason
 
  On 3/8/07, Stefan Lindner  [EMAIL PROTECTED] wrote:
 
   Try something like
  
startDate.getModelObject()
  
   or address the form's model
  
  vacationForm.getModelobject.getTextfield's property name
  
   Stefan LIndner
  
   -
  
   Take Surveys. Earn Cash. Influence the Future of IT
   Join SourceForge.net's Techsay panel and you'll get the chance to
   share your
   opinions on IT  business topics through brief surveys-and earn cash
   http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
  
 
 
  -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to
  share your
  opinions on IT  business topics through brief surveys-and earn cash
 
  http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 


 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys-and earn cash

 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



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


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


Re: [Wicket-user] Getting value of a text field via Ajax, no form

2007-03-08 Thread Stefan Lindner
In Wicket 2 thete is a thing called AjaxFormComponentUpdatingBehavior
 
A behavior that updates the hosting FormComponent via ajax when an event it is 
attached to is triggered. This behavior encapsulates the entire form-processing 
workflow as relevant only to this component so if validation is successfull the 
component's model will be updated according to the submitted value. 

NOTE: This behavior does not support persisting form component values into 
cookie or other IValuePersister. If this is necessary please add a request for 
enhancement. 

NOTE: This behavior does not validate any IFormValidators attached to this form 
even though they may reference the component being updated

If you want validating too use VAjaxFormValidatingFeedback

Stefan Lindner

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


Re: [Wicket-user] Getting value of a text field via Ajax, no form

2007-03-08 Thread Nathan Hamblen
Speaking of, is AjaxFormSubmitBehavior broken in the current 1.x 
snapshot, or is it just me?

Nathan

Igor Vaynberg wrote:
 see AjaxFormComponentUpdatingBehavior
 
 AjaxEventBehavior doesnt send over the value of the form component, just 
 triggers a roundtrip
 


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


Re: [Wicket-user] Getting value of a text field via Ajax, no form

2007-03-08 Thread Erik van Oosten
Just dropping into the conversation (sorry, if its off topic): if you 
need to get the value of a single cell, you can use (a variation of) the 
code attached to https://issues.apache.org/jira/browse/WICKET-176. I use 
it to validate just one field.

Regards,
 Erik.

Nathan Hamblen wrote:
 Speaking of, is AjaxFormSubmitBehavior broken in the current 1.x 
 snapshot, or is it just me?

 Nathan

 Igor Vaynberg wrote:
   
 see AjaxFormComponentUpdatingBehavior

 AjaxEventBehavior doesnt send over the value of the form component, just 
 triggers a roundtrip
 

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


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


[Wicket-user] When you have tabs and forms, is it ok to have the tabs all inside one form,

2007-03-08 Thread Thomas R. Corbin
or do you need to have each tab have it's own form?

And if each tab has it's own form, does the user need to save their data 
before switching tabs?

Would the submit button be on each form, on each tab, or outside the tabs 
entirely?

Thanks.

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


Re: [Wicket-user] IMPORTANT: your opinion on the constructor change in2.0

2007-03-08 Thread cowwoc

That's why I used the terminology onWire() as opposed to onAdd(). My
point was that you should shift the burden of isInitialized() away from
the end-user over to Wicket. When a component's ancestors (all the way
up to the top-most component) are connected the first time or changed at
some later time Wicket invokes onWire(), at which point the component
modifies its state accordingly. This behavior differs from onAttach() in
that the latter assumes that wiring will always take place at render
time. onWire() allows you to do the wiring either shortly after
construction time or at render-time depending on whether all ancestors
have been defined or not.

It guarantees that errors will be thrown as soon as technically 
possible.

Gili

Eelco Hillenius wrote:
 The problem with that is that the 2.0 constructor actually forced the
 whole parent hierarchy to be in place, while add in 1.x just means it
 is added to the parent without any guarantee the parent is added to
 the parent yet. So even if we would provide onWire (though onAdd would
 be better then) it wouldn't be safe to do things like getMarkupId.
 onAttach is safe for that, as by then the rendering phase is reached.
 
 Eelco
 
 
 On 3/8/07, cowwoc [EMAIL PROTECTED] wrote:
 Alternatively:

 1) Components are POJOs. Users can define whatever constructor they want.

 2) Users always use add() to associate a parent with a component but you
 move the component wiring out of the constructor and into a onWire()
 method. Now, whenever the hierarchy/parent changes onWire() gets
 invoked. So components with dynamic hierarchies get onWire() once per
 rendering whereas components with static hierarchies only have this
 method invoked once. Users can then remove isInitialized() so long as
 they invoke their methods from inside onWire().

 Gili

 Eelco Hillenius wrote:
 How about a hybrid system?

 Is there a clear-cut way to know up-front which components have an
 immutable parent versus others that might require it to change during
 rendering time? If so, couldn't you require the use of constructors that
 take a parent for components whose parents are immutable and then for
 all other components use the add() paradigm?
 The largest problem with that would be that it would be inconsistent
 for users. So apart from whether this is achievable, I wouldn't like
 it as it would be too confusing.

 Eelco

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

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



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



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


Re: [Wicket-user] IMPORTANT: your opinion on the constructor change in2.0

2007-03-08 Thread Igor Vaynberg

what happens when you move the component to another parent? will onWire be
called again? and if not can we have a method that will please? and then
another method if the component's hierarchy changes - a components ancestor
is moved.

point being only a small percentage of wicket components care about this,
and we provide a general solution which is onattach and ondetach, and will
not provide ten thousand other solutions that cover ten thousand esoteric
usecases users can come up with.

just my 2c.

-igor


On 3/8/07, cowwoc [EMAIL PROTECTED] wrote:



That's why I used the terminology onWire() as opposed to onAdd().
My
point was that you should shift the burden of isInitialized() away from
the end-user over to Wicket. When a component's ancestors (all the way
up to the top-most component) are connected the first time or changed at
some later time Wicket invokes onWire(), at which point the component
modifies its state accordingly. This behavior differs from onAttach() in
that the latter assumes that wiring will always take place at render
time. onWire() allows you to do the wiring either shortly after
construction time or at render-time depending on whether all ancestors
have been defined or not.

It guarantees that errors will be thrown as soon as technically
possible.

Gili

Eelco Hillenius wrote:
 The problem with that is that the 2.0 constructor actually forced the
 whole parent hierarchy to be in place, while add in 1.x just means it
 is added to the parent without any guarantee the parent is added to
 the parent yet. So even if we would provide onWire (though onAdd would
 be better then) it wouldn't be safe to do things like getMarkupId.
 onAttach is safe for that, as by then the rendering phase is reached.

 Eelco


 On 3/8/07, cowwoc [EMAIL PROTECTED] wrote:
 Alternatively:

 1) Components are POJOs. Users can define whatever constructor they
want.

 2) Users always use add() to associate a parent with a component but
you
 move the component wiring out of the constructor and into a onWire()
 method. Now, whenever the hierarchy/parent changes onWire() gets
 invoked. So components with dynamic hierarchies get onWire() once per
 rendering whereas components with static hierarchies only have this
 method invoked once. Users can then remove isInitialized() so long as
 they invoke their methods from inside onWire().

 Gili

 Eelco Hillenius wrote:
 How about a hybrid system?

 Is there a clear-cut way to know up-front which components
have an
 immutable parent versus others that might require it to change during
 rendering time? If so, couldn't you require the use of constructors
that
 take a parent for components whose parents are immutable and then for
 all other components use the add() paradigm?
 The largest problem with that would be that it would be inconsistent
 for users. So apart from whether this is achievable, I wouldn't like
 it as it would be too confusing.

 Eelco


-
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to
share your
 opinions on IT  business topics through brief surveys-and earn cash

http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
your
 opinions on IT  business topics through brief surveys-and earn cash

http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user





-
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
your
 opinions on IT  business topics through brief surveys-and earn cash

http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


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

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

2007-03-08 Thread Edward Yakop
 It looks like quite a few people, more than I expected in fact,
 weren't that crazy about the constructor refactor in the first place,
 though some people like it better in general (me being one of them
 though I see disadvantages as well, but also
 http://www.mail-archive.com/general@lists.ops4j.org/msg00402.html).
 Based on the replies in this thread, it seems that people find add
 more intuitive and like the flexibility that gives you over the
 tighter model of 2.0
Personally I prefer the tighter model. What we did on pax-wicket 1.0
examples if I'm not mistaken will cause a higher penalty during
serialization/deserialization compared to pax-wicket 2.0.

However, If wicket-1.0 style .add() voted, please add generic support
to wicket 1.x.

Regards,
Edward Yakop

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


[Wicket-user] Design questions: Use of controllers and wicket models

2007-03-08 Thread David Leangen

Hi!

Two design questions for experienced wicket users... Mail is a bit long.
I apologise for this, but I wanted to explain the situation well.

We have been using wicket now for a while, and I think it's time to try
to finally clean up our code a little. With that in mind, I have two
questions for more experienced users. First is about where to put logic,
second is about use of compound wicket models.


Background
--

Let me begin by describing our model briefly.

We have a search engine that allows certain controlled queries, and we
have a model/controller to accompany the wicket component(s) for this. 

Our idea is:

 - extract the state only into a very simple, serializable bean
 - use a controller to validate and control what state the
   bean can be in
 - write the state of the bean (query) in various formats
   through the use of a QueryWriter object
 - obviously use wicket component to allow user to set state


Our reasoning is:

1. Having a very simple and serializable bean will make it easy 
   to save the state either in a wicket session or in the backend. 
   The object should therefore be very lightweight.

2. Ideally NO logic should be in the wicket component. This is because:

   a. Logic should not be in the view
   b. Encapsulated logic can be reused (for example if we implement 
  in Swing)

3. Having a separate writer is a nice way to decouple the rendering
   of the state of the bean and seems to work very well.


Our model ends up being a complex bean that looks something like this:


public class QueryObject
implements Serializable
{
private ChildQueryObject m_colors;
private ChildQueryObject m_dates;
...

// Getters and setters here
// No logic! Very simple
}

And each child query object above can look something like this:

public class ColorQueryObject
implements Serializable
{
private boolean m_isBlueSelected;
private boolean m_isRedSelected;
...

public void setBlueSelected( boolean isSelected)
{
m_isBlueSelected = isSelected;
}

...
}

... you get the idea.


As stated above, the idea is that these beans hold only the state, and
nothing more. The query is printed by the user of a QueryWriter, which
I won't get into here.


This all looks fine at first glance, but when we get into the details,
we are scratching our heads about a few issues, wondering which would be
the best way to move forward.



First Question: Controller Logic


The idea of the controller is to control which states are valid, and
which are not. The original idea is that the wicket ui components can
only put the beans into a given state by using this controller. The
reason is that I don't like having too much logic in the ui classes.

If we do this, it looks like it means a lot of duplication of code,
since wicket will simply be delegating to the controller. For example:

In the wicket page, we'd have something like:

  controller.setBlueChecked( isBlueChecked );

And in the controller:

  public void setBlueChecked( boolean isChecked )
  {
  // validate if blue can be checked in this state
  // set the value, and adjust state of other
  //   properties if necessary

  // If it can't, what do we do? Throw an exception?
  }  


The idea sounds good, but I'm wondering if this is even necessary. It
was suggested to me that cleanly separating stuff into a controller is
not worth the effort, since we'd be duplicating so much code for no
good reason.



What do most people do to achieve clean code in this type of situation?

Also, say if we wanted to make the component compatible with
bookmarkability, would it be a good idea to have a setter or
constructor in the controller that accepts something similar to
PageParameters, so wicket can just pass through that object to the
controller?



Second Question: Mapping Above Model to Wicket Models
-

Since the model above is already established, I presume that we should
just be able to do something like:

  IModel model = new Model( bean );

So now, the above bean is wicketized.

However, two things I do not understand about this are:

1. How do we connect the wicket model with our controller 
   above when validating the state and delegating to the 
   state-holder bean?

2. How do we associate parts of the state-holder bean
   with the wicket controls? For example, the blue 
   above needs a checkbox, so how do we associate the
   value of blue in our bean above to the blue checkbox?


Hope my ramblings make some sense.



Cheers,
Dave





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

Re: [Wicket-user] Design questions: Use of controllers and wicket models

2007-03-08 Thread Igor Vaynberg

here are my short answers :) ask more if you need something explained in
detail

On 3/8/07, David Leangen [EMAIL PROTECTED] wrote:



First Question: Controller Logic


The idea sounds good, but I'm wondering if this is even necessary. It
was suggested to me that cleanly separating stuff into a controller is
not worth the effort, since we'd be duplicating so much code for no
good reason.



you have to decide what is clearly business logic vs ui logic. the
business logic should go into a separate service/controller/whatchamaggicit.
the ui logic is best embedded in wicket components because each component is
a full implementation of MVC already.



Also, say if we wanted to make the component compatible with
bookmarkability, would it be a good idea to have a setter or
constructor in the controller that accepts something similar to
PageParameters, so wicket can just pass through that object to the
controller?



it would be a good idea if you can initialize some state off the
pageparameters, be that business state or ui state or both. that way you can
retain bookmarkability.

Second Question: Mapping Above Model to Wicket Models

-

1. How do we connect the wicket model with our controller
   above when validating the state and delegating to the
   state-holder bean?



i think a lot of users underestimate the power of IModel when you implement
it directly. you  dont have to use the default Model or PropertyModel, you
are just boxing yourself in. implement the interface yourself for most
flexibility - that way you can achieve any kind of mapping.

also do not underestimate the power of decorator/adapter pattern when it
comes to models.

2. How do we associate parts of the state-holder bean

   with the wicket controls? For example, the blue
   above needs a checkbox, so how do we associate the
   value of blue in our bean above to the blue checkbox?



see above. take a simple example where you have a list of checkboxes and you
want all selected objects to end up in a collection. how do you do it?
sounds like a complex mapping? the most elegant way is to write a custom
model.

class mypage extends page {
 private SetPerson selected=new HashSet();

 private class PersonCheckboxModel implements IModelBoolean {
   private final IModelPerson person;
   public final PersonCheckBoxModel(IModelPerson person) {
this.person=person; }

  public Boolean getObject() {
 return selected.contains(person.getObject());
   }

   public void setObject(Boolean b) {
   if (Boolean.TRUE.equals(b)) {
  selected.put(person.getObject());
} else {
   selected.remove(person.getObject());
 }
  }

   public void detach() { person.detach(); }
  }

   }

now all you have to do is

LoadableDetachableModel person=new LoadalbeDetachableModel(id);
new CheckBox(this, cb, new PersonCheckBoxModel(person));

and everything magically works, hope it gives you some ideas.

-igor



Hope my ramblings make some sense.




Cheers,
Dave





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

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


[Wicket-user] @SpringBean and Model objects

2007-03-08 Thread Jonathan Cone

Using Wicket 1.2.5 / Spring 2.0.2

Is it possible (or reasonable) to inject Page model implementations with the
@SpringBean annotation?  I've tried this with prototype-scoped beans.  The
problem is that if I submit a form with an injected model object and leave
the page, then come back later, the form data is still present.  That is to
say, a new model doesn't seem to be created every time I hit the page.

-Jon
-- 
View this message in context: 
http://www.nabble.com/%40SpringBean-and-Model-objects-tf3373381.html#a9387404
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: [Wicket-user] @SpringBean and Model objects

2007-03-08 Thread Igor Vaynberg

prototype beans are not supported just yet, there is a patch for that and a
vote to apply to 1.2.x

-igor


On 3/8/07, Jonathan Cone [EMAIL PROTECTED] wrote:



Using Wicket 1.2.5 / Spring 2.0.2

Is it possible (or reasonable) to inject Page model implementations with
the
@SpringBean annotation?  I've tried this with prototype-scoped beans.  The
problem is that if I submit a form with an injected model object and leave
the page, then come back later, the form data is still present.  That is
to
say, a new model doesn't seem to be created every time I hit the page.

-Jon
--
View this message in context:
http://www.nabble.com/%40SpringBean-and-Model-objects-tf3373381.html#a9387404
Sent from the Wicket - User mailing list archive at Nabble.com.


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

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


Re: [Wicket-user] Design questions: Use of controllers and wicket models

2007-03-08 Thread David Leangen

Great! Thanks for this. Very helpful!

This does give a lot of ideas, indeed. If my understanding is correct,
this would indeed provide a very elegant solution to what we're trying
to do.

One precision:


 you have to decide what is clearly business logic vs ui logic. the
 business logic should go into a separate
 service/controller/whatchamaggicit. the ui logic is best embedded in
 wicket components because each component is a full implementation of
 MVC already. 

This is actually something I'm kinda struggling with.

In our model, the biz logic is the query. So, for instance, if I have
two radios and a group of checkboxes:

( ) Any colour
( ) Choose colours
  [ ] Blue
  [ ] Red
  ...

If Any colour is chosen, then this produces one kind of query (where
choosing colours is irrelevant). In that case, the checkboxes must be
disabled. However, if Choose colours is chosen, colours become
relevant, so the checkboxes are activated.

So, is this biz or ui logic?

Or, worded differently, does this go into the controller or directly
into the wicket component?


 it would be a good idea if you can initialize some state off the
 pageparameters, be that business state or ui state or both. that way
 you can retain bookmarkability. 

Just to confirm:

We would not be _required_ to use PageParameters. Having a lightweight
bean would allow us to save the state of the bean in the model, and
therefore to the PageMap, right?

But, using PageParameters would give us the option of making pages
bookmarkable, right?


In either case, this approach is still valid, so it seems.


Another question:

Say we do want to keep our pages bookmarkable, but we don't want to have
to encode everything in the URL. Say also we don't want to use a db on
the backend. Would it be appropriate to save the beans to the wicket
session?

If so:

  1. What is an elegant way of doing this? Just a Map(id, object)
 that is accessed by the controller?

  2. Is there anything to watch out for? (Such as the map growing to
 an incredible size, for example)



 
 i think a lot of users underestimate the power of IModel when you
 implement it directly.

snip


 now all you have to do is
 
 LoadableDetachableModel person=new LoadalbeDetachableModel(id);
 new CheckBox(this, cb, new PersonCheckBoxModel(person)); 
 
 and everything magically works, hope it gives you some ideas.

Very interesting!

I'll have to give this a try.


Thanks again!
Dave





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


Re: [Wicket-user] IMPORTANT: your opinion on the constructor change in2.0

2007-03-08 Thread cowwoc

The point *was* that onWire should get called whenever the parent
changes (i.e. when moving a component to another parent). If one wishes
to listen for hierarchy changes one could implement some event listener
mechanism to that effect by overriding onWire() of the ancestor nodes
and have them fire an event down to interested descendants when onWire()
gets fired on them.

I don't claim to solve all theoretical use-cases that users might come
up with, I am simply commenting on the existing use-cases that have been
brought up.

Gili

Igor Vaynberg wrote:
 what happens when you move the component to another parent? will onWire
 be called again? and if not can we have a method that will please? and
 then another method if the component's hierarchy changes - a components
 ancestor is moved.
 
 point being only a small percentage of wicket components care about
 this, and we provide a general solution which is onattach and ondetach,
 and will not provide ten thousand other solutions that cover ten
 thousand esoteric usecases users can come up with.
 
 just my 2c.
 
 -igor
 
 
 On 3/8/07, *cowwoc* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:
 
 
 That's why I used the terminology onWire() as opposed to
 onAdd(). My
 point was that you should shift the burden of isInitialized() away from
 the end-user over to Wicket. When a component's ancestors (all the way
 up to the top-most component) are connected the first time or changed at
 some later time Wicket invokes onWire(), at which point the component
 modifies its state accordingly. This behavior differs from
 onAttach() in
 that the latter assumes that wiring will always take place at render
 time. onWire() allows you to do the wiring either shortly after
 construction time or at render-time depending on whether all ancestors
 have been defined or not.
 
 It guarantees that errors will be thrown as soon as
 technically possible.
 
 Gili
 
 Eelco Hillenius wrote:
  The problem with that is that the 2.0 constructor actually forced the
  whole parent hierarchy to be in place, while add in 1.x just means it
  is added to the parent without any guarantee the parent is added to
  the parent yet. So even if we would provide onWire (though onAdd would
  be better then) it wouldn't be safe to do things like getMarkupId.
  onAttach is safe for that, as by then the rendering phase is reached.
 
  Eelco
 
 
  On 3/8/07, cowwoc [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:
  Alternatively:
 
  1) Components are POJOs. Users can define whatever constructor
 they want.
 
  2) Users always use add() to associate a parent with a component
 but you
  move the component wiring out of the constructor and into a onWire()
  method. Now, whenever the hierarchy/parent changes onWire() gets
  invoked. So components with dynamic hierarchies get onWire() once
 per
  rendering whereas components with static hierarchies only have this
  method invoked once. Users can then remove isInitialized() so long as
  they invoke their methods from inside onWire().
 
  Gili
 
  Eelco Hillenius wrote:
  How about a hybrid system?
 
  Is there a clear-cut way to know up-front which
 components have an
  immutable parent versus others that might require it to change
 during
  rendering time? If so, couldn't you require the use of
 constructors that
  take a parent for components whose parents are immutable and
 then for
  all other components use the add() paradigm?
  The largest problem with that would be that it would be inconsistent
  for users. So apart from whether this is achievable, I wouldn't
 like
  it as it would be too confusing.
 
  Eelco
 
 
 -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance
 to share your
  opinions on IT  business topics through brief surveys-and earn cash
 
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 -
 
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to
 share your
  opinions on IT  business topics through brief surveys-and earn cash
 
 

Re: [Wicket-user] IMPORTANT: your opinion on the constructor change in2.0

2007-03-08 Thread Igor Vaynberg

my point is that we are a framework and we already provide what is needed to
make this and the entire superset of these kinds of things possible. our job
is to provide functionality needed for 90% of usecases and leave the other
10% possible. this falls into the 10%.

-igor


On 3/8/07, cowwoc [EMAIL PROTECTED] wrote:



The point *was* that onWire should get called whenever the parent
changes (i.e. when moving a component to another parent). If one wishes
to listen for hierarchy changes one could implement some event listener
mechanism to that effect by overriding onWire() of the ancestor nodes
and have them fire an event down to interested descendants when onWire()
gets fired on them.

I don't claim to solve all theoretical use-cases that users might
come
up with, I am simply commenting on the existing use-cases that have been
brought up.

Gili

Igor Vaynberg wrote:
 what happens when you move the component to another parent? will onWire
 be called again? and if not can we have a method that will please? and
 then another method if the component's hierarchy changes - a components
 ancestor is moved.

 point being only a small percentage of wicket components care about
 this, and we provide a general solution which is onattach and ondetach,
 and will not provide ten thousand other solutions that cover ten
 thousand esoteric usecases users can come up with.

 just my 2c.

 -igor


 On 3/8/07, *cowwoc* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:


 That's why I used the terminology onWire() as opposed to
 onAdd(). My
 point was that you should shift the burden of isInitialized() away
from
 the end-user over to Wicket. When a component's ancestors (all the
way
 up to the top-most component) are connected the first time or
changed at
 some later time Wicket invokes onWire(), at which point the
component
 modifies its state accordingly. This behavior differs from
 onAttach() in
 that the latter assumes that wiring will always take place at render
 time. onWire() allows you to do the wiring either shortly after
 construction time or at render-time depending on whether all
ancestors
 have been defined or not.

 It guarantees that errors will be thrown as soon as
 technically possible.

 Gili

 Eelco Hillenius wrote:
  The problem with that is that the 2.0 constructor actually forced
the
  whole parent hierarchy to be in place, while add in 1.x just means
it
  is added to the parent without any guarantee the parent is added
to
  the parent yet. So even if we would provide onWire (though onAdd
would
  be better then) it wouldn't be safe to do things like getMarkupId.
  onAttach is safe for that, as by then the rendering phase is
reached.
 
  Eelco
 
 
  On 3/8/07, cowwoc [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:
  Alternatively:
 
  1) Components are POJOs. Users can define whatever constructor
 they want.
 
  2) Users always use add() to associate a parent with a component
 but you
  move the component wiring out of the constructor and into a
onWire()
  method. Now, whenever the hierarchy/parent changes onWire() gets
  invoked. So components with dynamic hierarchies get onWire() once
 per
  rendering whereas components with static hierarchies only have
this
  method invoked once. Users can then remove isInitialized() so
long as
  they invoke their methods from inside onWire().
 
  Gili
 
  Eelco Hillenius wrote:
  How about a hybrid system?
 
  Is there a clear-cut way to know up-front which
 components have an
  immutable parent versus others that might require it to change
 during
  rendering time? If so, couldn't you require the use of
 constructors that
  take a parent for components whose parents are immutable and
 then for
  all other components use the add() paradigm?
  The largest problem with that would be that it would be
inconsistent
  for users. So apart from whether this is achievable, I wouldn't
 like
  it as it would be too confusing.
 
  Eelco
 
 

-
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance
 to share your
  opinions on IT  business topics through brief surveys-and earn
cash
 

http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 


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

2007-03-08 Thread aozster

-- before voting we should compare them by given usecases and construct it
with 1.x and 2.x constructors.
I prefer 
1 rich internet application
2 highly personalized user interfaces for portal 
3 CMS
to be our usecases.


Eelco Hillenius wrote:
 
 We've gathered a lot of opinions by now (more are still welcome
 though!) and I think we should let this sink in for a bit.
 
 There are a couple of projects being built on 2.0 (see the replies in
 this thread, but also
 http://www.mail-archive.com/general@lists.ops4j.org/msg00240.html),
 but so far, people who reacted seem to be understanding and flexible
 to go with us if we would decide to revert the constructor change.
 
 It looks like quite a few people, more than I expected in fact,
 weren't that crazy about the constructor refactor in the first place,
 though some people like it better in general (me being one of them
 though I see disadvantages as well, but also
 http://www.mail-archive.com/general@lists.ops4j.org/msg00402.html).
 Based on the replies in this thread, it seems that people find add
 more intuitive and like the flexibility that gives you over the
 tighter model of 2.0
 
 I propose to start a real vote on what to do with the constructor
 change somewhere next week. Until then, please feel free to keep
 venting your opinions on this thread.
 
 Regards,
 
 Eelco
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/IMPORTANT%3A-your-opinion-on-the-constructor-change-in-2.0-tf3358738.html#a9388671
Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

2007-03-08 Thread Igor Vaynberg

feel free to go ahead and do that. looking forward to your analysis.

-igor


On 3/8/07, aozster [EMAIL PROTECTED] wrote:



-- before voting we should compare them by given usecases and construct
it
with 1.x and 2.x constructors.
I prefer
1 rich internet application
2 highly personalized user interfaces for portal
3 CMS
to be our usecases.


Eelco Hillenius wrote:

 We've gathered a lot of opinions by now (more are still welcome
 though!) and I think we should let this sink in for a bit.

 There are a couple of projects being built on 2.0 (see the replies in
 this thread, but also
 http://www.mail-archive.com/general@lists.ops4j.org/msg00240.html),
 but so far, people who reacted seem to be understanding and flexible
 to go with us if we would decide to revert the constructor change.

 It looks like quite a few people, more than I expected in fact,
 weren't that crazy about the constructor refactor in the first place,
 though some people like it better in general (me being one of them
 though I see disadvantages as well, but also
 http://www.mail-archive.com/general@lists.ops4j.org/msg00402.html).
 Based on the replies in this thread, it seems that people find add
 more intuitive and like the flexibility that gives you over the
 tighter model of 2.0

 I propose to start a real vote on what to do with the constructor
 change somewhere next week. Until then, please feel free to keep
 venting your opinions on this thread.

 Regards,

 Eelco


-
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys-and earn cash

http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



--
View this message in context:
http://www.nabble.com/IMPORTANT%3A-your-opinion-on-the-constructor-change-in-2.0-tf3358738.html#a9388671
Sent from the Wicket - User mailing list archive at Nabble.com.


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

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


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

2007-03-08 Thread aozster

I know how to do it with 1.x (actually already done some of  them in previous
project) , but I don't know how to do it with 2.x constructors, can you give
me a clue if I want to create something like that?.


igor.vaynberg wrote:
 
 feel free to go ahead and do that. looking forward to your analysis.
 
 -igor
 
 
 On 3/8/07, aozster [EMAIL PROTECTED] wrote:


 -- before voting we should compare them by given usecases and construct
 it
 with 1.x and 2.x constructors.
 I prefer
 1 rich internet application
 2 highly personalized user interfaces for portal
 3 CMS
 to be our usecases.


 Eelco Hillenius wrote:
 
  We've gathered a lot of opinions by now (more are still welcome
  though!) and I think we should let this sink in for a bit.
 
  There are a couple of projects being built on 2.0 (see the replies in
  this thread, but also
  http://www.mail-archive.com/general@lists.ops4j.org/msg00240.html),
  but so far, people who reacted seem to be understanding and flexible
  to go with us if we would decide to revert the constructor change.
 
  It looks like quite a few people, more than I expected in fact,
  weren't that crazy about the constructor refactor in the first place,
  though some people like it better in general (me being one of them
  though I see disadvantages as well, but also
  http://www.mail-archive.com/general@lists.ops4j.org/msg00402.html).
  Based on the replies in this thread, it seems that people find add
  more intuitive and like the flexibility that gives you over the
  tighter model of 2.0
 
  I propose to start a real vote on what to do with the constructor
  change somewhere next week. Until then, please feel free to keep
  venting your opinions on this thread.
 
  Regards,
 
  Eelco
 
 
 -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to share
  your
  opinions on IT  business topics through brief surveys-and earn cash
 
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

 --
 View this message in context:
 http://www.nabble.com/IMPORTANT%3A-your-opinion-on-the-constructor-change-in-2.0-tf3358738.html#a9388671
 Sent from the Wicket - User mailing list archive at Nabble.com.


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

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

-- 
View this message in context: 
http://www.nabble.com/IMPORTANT%3A-your-opinion-on-the-constructor-change-in-2.0-tf3358738.html#a9388757
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: [Wicket-user] Design questions: Use of controllers and wicket models

2007-03-08 Thread Igor Vaynberg

On 3/8/07, David Leangen [EMAIL PROTECTED] wrote:



This is actually something I'm kinda struggling with.

In our model, the biz logic is the query. So, for instance, if I have
two radios and a group of checkboxes:

( ) Any colour
( ) Choose colours
  [ ] Blue
  [ ] Red
  ...



If Any colour is chosen, then this produces one kind of query (where

choosing colours is irrelevant). In that case, the checkboxes must be
disabled. However, if Choose colours is chosen, colours become
relevant, so the checkboxes are activated.

So, is this biz or ui logic?



the part that enables and disables components is ui logic. there is no need
to break that out into somewhere else.

the logic that validates the bean constructed by the ui is business logic.
but there are aguments to keep validation as close to the ui as possible
because its easier to map and is closest to the input - so that one is up
for grabs i suppose. this is why i decoupled validators in 2.0 - so
potentially you can use the exact same validator in your service layer and
in the ui layer.

Or, worded differently, does this go into the controller or directly

into the wicket component?



i would put this into the wicket component and call it a day. if you are
planning on having some other interface these beans can be constructed from
then i would consider some sort of validation in the controller.


it would be a good idea if you can initialize some state off the
 pageparameters, be that business state or ui state or both. that way
 you can retain bookmarkability.

Just to confirm:

We would not be _required_ to use PageParameters. Having a lightweight
bean would allow us to save the state of the bean in the model, and
therefore to the PageMap, right?



s/PageMap/session/

But, using PageParameters would give us the option of making pages

bookmarkable, right?



bookmarkable pages serve as entry points into the workflow, so if you need
that then yes, but it doesnt mean every page makes sense as an entry point.

In either case, this approach is still valid, so it seems.



Another question:

Say we do want to keep our pages bookmarkable, but we don't want to have
to encode everything in the URL. Say also we don't want to use a db on
the backend. Would it be appropriate to save the beans to the wicket
session?



if its not encoded in the url then where would it be encoded? as i said
bookmarkable pages are entry points so they need to contain all the
necessary state to initiate the workflow. and the only place for that is the
url.


If so:


  1. What is an elegant way of doing this? Just a Map(id, object)
 that is accessed by the controller?



i would write a converter that can do bean-pageparameters

 2. Is there anything to watch out for? (Such as the map growing to

 an incredible size, for example)



if you keep things  scoped at a page and pass them from page to page you can
take advantage of wicket's state management so your state wont get too big.

-igor








 i think a lot of users underestimate the power of IModel when you
 implement it directly.

snip


 now all you have to do is

 LoadableDetachableModel person=new LoadalbeDetachableModel(id);
 new CheckBox(this, cb, new PersonCheckBoxModel(person));

 and everything magically works, hope it gives you some ideas.

Very interesting!

I'll have to give this a try.


Thanks again!
Dave





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

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


[Wicket-user] Spring design in Wicket

2007-03-08 Thread ZedroS Schwart
Hi all

As said earlier, I'm beginning with Spring and I find it a bit hard to
know how to design my application with it.

Let me give an example : in order for the end user to register, I've a
registration form. Up to now, I've a registrationBean which isn't
managed by Spring. On the form submit, I do a Spring bean and save it
as needed.

Is it the best way to proceed ? Or all objects used should be managed
by Spring excepted for my pages, session and forms ?

BTW, do you have a reference source dealing with Spring design in
general ? I fear XML hell and I've seen so many different designs that
I'm looking for the good way. For example, I'm hesitating between :
- implementing somes Managers for each kind of objects
- setting both the interfaces and the implementations in the
ApplicationContext file
- setting only the implementations in the ApplicationContext file and
using only interfaces in my code
-...

My goals are to be able to unit test my work as well as avoid xml hell
and the like...

Thanks in advance
ZedroS

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


Re: [Wicket-user] Spring design in Wicket

2007-03-08 Thread Erik van Oosten
Hello ZedroS,

You ask very difficult questions which are not easy to answer. The 
ability to answer comes with years of practice and learning. I can 
recommend reading some books on design patterns.

I /can/ provide some very rough guidelines:
- put similar things in the same place (do not construct one service 
object from Spring, another from code)
- 'Managers for each kind of object' are usually called services (you 
can read more for example in Domain Driven Design from Edwards), 
normally you would instantiate services from a Spring configuration. For 
getting services in your Wicket components: see the Wicket wiki on 
Spring integration.
- about: 'Setting only the implementations in the ApplicationContext 
file and using only interfaces in my code', this is the recommend way to 
work with Spring.

Regards,
 Erik.


ZedroS Schwart wrote:
 Hi all

 As said earlier, I'm beginning with Spring and I find it a bit hard to
 know how to design my application with it.

 Let me give an example : in order for the end user to register, I've a
 registration form. Up to now, I've a registrationBean which isn't
 managed by Spring. On the form submit, I do a Spring bean and save it
 as needed.

 Is it the best way to proceed ? Or all objects used should be managed
 by Spring excepted for my pages, session and forms ?

 BTW, do you have a reference source dealing with Spring design in
 general ? I fear XML hell and I've seen so many different designs that
 I'm looking for the good way. For example, I'm hesitating between :
 - implementing somes Managers for each kind of objects
 - setting both the interfaces and the implementations in the
 ApplicationContext file
 - setting only the implementations in the ApplicationContext file and
 using only interfaces in my code
 -...

 My goals are to be able to unit test my work as well as avoid xml hell
 and the like...

 Thanks in advance
 ZedroS

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

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


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


Re: [Wicket-user] Spring design in Wicket

2007-03-08 Thread Roland Kaercher
Hi ZedroS,

you could check out the wicket pastebin at
http://developer.berlios.de/projects/wicketpastebin/ which uses wicket
and spring.
I personally think using only the interfaces in your code is usually a
good idea. If you want to avoid XML and don't mind dabbling with
experimental code then you could take a look at
http://www.springframework.org/javaconfig which aims to configure
spring in java code.

regards,

roland

On 3/9/07, ZedroS Schwart [EMAIL PROTECTED] wrote:
 Hi all

 As said earlier, I'm beginning with Spring and I find it a bit hard to
 know how to design my application with it.

 Let me give an example : in order for the end user to register, I've a
 registration form. Up to now, I've a registrationBean which isn't
 managed by Spring. On the form submit, I do a Spring bean and save it
 as needed.

 Is it the best way to proceed ? Or all objects used should be managed
 by Spring excepted for my pages, session and forms ?

 BTW, do you have a reference source dealing with Spring design in
 general ? I fear XML hell and I've seen so many different designs that
 I'm looking for the good way. For example, I'm hesitating between :
 - implementing somes Managers for each kind of objects
 - setting both the interfaces and the implementations in the
 ApplicationContext file
 - setting only the implementations in the ApplicationContext file and
 using only interfaces in my code
 -...

 My goals are to be able to unit test my work as well as avoid xml hell
 and the like...

 Thanks in advance
 ZedroS

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


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