Re: [OT] wicket users around the world

2008-12-12 Thread Martin Sachs
Berlin, Germany



francisco treacy schrieb:
 to know a little bit more of our great (and vast) community, i was
 just wondering if you're keen on sharing where you come from and/or
 where you work with wicket...

 for instance, here argentinian/belgian working with wicket in antibes, france

 francisco

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


   


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



Re: [Announce] wicketstuff-push ported to use wicket 1.4 jetty 6.1.14

2008-12-12 Thread Michael Sparer

AFAIK jquery started something, but I just heard of that and didn't look into
it. If dojo seems too bloated to you you can easily build your own dojo with
just the modules you need - then it isn't bloated at all (except you're
using too many components). There's a post announcing wicketstuff-dojo-1.1.
somewhere on the mailinglist that explained (or at least offered to explain
;-)) how to build your own dojo - on the wiki it's described with 0.4 if I
remember correctly

regards,
michael

Peter Ertl-3 wrote:
 
 concerning the proper javascript client for comet... is there anything  
 reasonable except dojo-cometd-client to use?
 
 The dojo stuff feels really bloated for me
 
 Am 11.12.2008 um 15:00 schrieb Michael Sparer:
 

 Alright, I'll keep an eye on changes of your project. Maybe we can  
 merge some
 useful stuff in the future, but for now I'm of the same opinion as  
 you.
 Let's keep them seperate for now.

 greetings from ice-cold austria,
 Michael


 Rodolfo Hansen-2 wrote:

 Yeah, I think we might just want to separate them, the goals will  
 start
 becoming a bit different as well..

 Especially since push has other options other than cometd / dojo  
 for the
 general notion of getting push to web clients...

 So its better to separate those concerns and have push with its own
 mindset,
 no?


 On Tue, Dec 9, 2008 at 9:40 AM, Michael Sparer
 michael.spa...@gmx.atwrote:


 Rodolfo,

 so you finally decided to stick with your initial idea ;-)

 did you at least have a look at the cometd stuff in the new
 wicketstuff-dojo-1.1. project? I'm still against the idea to split  
 up
 wicketstuff-push completely from the dojo project, but we had the
 discussion
 before without result ...

 regards,
 Michael


 Rodolfo Hansen-2 wrote:

 Hi, a new version of wicketstuff-push was moved to the  
 wicketstuff-core
 group of projects, as push-parent (as was specified in the wiki)

 A couple of new things were done:

 It is no longer compatible with java 1.4, is built for wicket 1.4  
 and
 requires jetty 6.1.14.
 The dependencies on dojo have been reduced even further, so this
 package
 is
 basically just a cometd client/server project for wicket.
 The RemoveListener is now working and is extended with a new type  
 of
 WicketRemoveListener that allows access to the Wicket Application
 Singleton
 and the session that registered the singleton (i thought of a  
 couple of
 ways
 to register them, and decided to choose the one present in the  
 code for
 it)

 Please let me know of any suggestions, ideas for the proj.




 -
 Michael Sparer
 http://talk-on-tech.blogspot.com
 --
 View this message in context:
 http://www.nabble.com/-Announce--wicketstuff-push-ported-to-use-wicket-1.4-jetty-6.1.14-tp20914051p20914877.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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






 -
 Michael Sparer
 http://talk-on-tech.blogspot.com
 -- 
 View this message in context:
 http://www.nabble.com/-Announce--wicketstuff-push-ported-to-use-wicket-1.4-jetty-6.1.14-tp20914051p20955950.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/-Announce--wicketstuff-push-ported-to-use-wicket-1.4-jetty-6.1.14-tp20914051p20971370.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: [OT] wicket users around the world

2008-12-12 Thread Benjamin Linus
Leuven, Belgium

Does Anyone know any belgian companies using Wicket ?

Ben

2008/12/12 Martin Sachs sachs.mar...@gmail.com

 Berlin, Germany



 francisco treacy schrieb:
  to know a little bit more of our great (and vast) community, i was
  just wondering if you're keen on sharing where you come from and/or
  where you work with wicket...
 
  for instance, here argentinian/belgian working with wicket in antibes,
 france
 
  francisco
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 


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




Re: [OT] wicket users around the world

2008-12-12 Thread Michael Sparer

Dornbirn, Austria - note that it's Austria and not Australia - there are no
kangaroos hopping around here ... forgot how often I had to explain that
there exists a country in Europe with that name :-)


francisco treacy-2 wrote:
 
 to know a little bit more of our great (and vast) community, i was
 just wondering if you're keen on sharing where you come from and/or
 where you work with wicket...
 
 for instance, here argentinian/belgian working with wicket in antibes,
 france
 
 francisco
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/-OT--wicket-users-around-the-world-tp20962108p20971372.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: [OT] wicket users around the world

2008-12-12 Thread Martin Sachs

Berlin, Germany



-- 
View this message in context: 
http://www.nabble.com/-OT--wicket-users-around-the-world-tp20962108p20971374.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: [OT] wicket users around the world

2008-12-12 Thread Witold Czaplewski
Cologne (Köln), Germany.

I'm german, but born in Poland. :)

Am Fri, 12 Dec 2008 09:07:57 +0100
schrieb Martin Sachs sachs.mar...@gmail.com:

 Berlin, Germany
 
 
 
 francisco treacy schrieb:
  to know a little bit more of our great (and vast) community, i was
  just wondering if you're keen on sharing where you come from and/or
  where you work with wicket...
 
  for instance, here argentinian/belgian working with wicket in
  antibes, france
 
  francisco
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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

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



Re: [OT] wicket users around the world

2008-12-12 Thread Jason Lea
Christchurch, New Zealand  (which is also not part of Australia)  -- 
working for a German company


Michael Sparer wrote:

Dornbirn, Austria - note that it's Austria and not Australia - there are no
kangaroos hopping around here ... forgot how often I had to explain that
there exists a country in Europe with that name :-)


francisco treacy-2 wrote:
  

to know a little bit more of our great (and vast) community, i was
just wondering if you're keen on sharing where you come from and/or
where you work with wicket...

for instance, here argentinian/belgian working with wicket in antibes,
france

francisco

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







-
Michael Sparer
http://talk-on-tech.blogspot.com
  


--
Jason Lea




RE: [OT] wicket users around the world

2008-12-12 Thread Frank Prins
Hoofddorp, The Netherlands.
But i prefer to say Haarlem, the Netherlands :-)

best regards,
Frank Prins

 -Original Message-
 From: francisco treacy [mailto:francisco.tre...@gmail.com]
 Sent: donderdag 11 december 2008 19:58
 To: users@wicket.apache.org
 Subject: [OT] wicket users around the world
 
 to know a little bit more of our great (and vast) community, i was
 just wondering if you're keen on sharing where you come from and/or
 where you work with wicket...
 
 for instance, here argentinian/belgian working with wicket in antibes,
 france
 
 francisco
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


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



Re: [OT] wicket users around the world

2008-12-12 Thread Francis De Brabandere
near Ghent, Belgium

companies using wicket:

http://www.tvh.com ?
http://www.cropdesign.com (internal statistics/reporting website)

On Fri, Dec 12, 2008 at 9:11 AM, Benjamin Linus
benjamin.d.li...@gmail.com wrote:
 Leuven, Belgium

 Does Anyone know any belgian companies using Wicket ?

 Ben

 2008/12/12 Martin Sachs sachs.mar...@gmail.com

 Berlin, Germany



 francisco treacy schrieb:
  to know a little bit more of our great (and vast) community, i was
  just wondering if you're keen on sharing where you come from and/or
  where you work with wicket...
 
  for instance, here argentinian/belgian working with wicket in antibes,
 france
 
  francisco
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 


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






-- 
http://www.somatik.be
Microsoft gives you windows, Linux gives you the whole house.

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



Re: [OT] wicket users around the world

2008-12-12 Thread Antoine Angenieux

Paris, France.

I'm using Wicket in my company for all our commercial webapps, and it 
fits perfectly our needs !


Cheers,

Antoine.

Francis De Brabandere wrote:

near Ghent, Belgium

companies using wicket:

http://www.tvh.com ?
http://www.cropdesign.com (internal statistics/reporting website)

On Fri, Dec 12, 2008 at 9:11 AM, Benjamin Linus
benjamin.d.li...@gmail.com wrote:

Leuven, Belgium

Does Anyone know any belgian companies using Wicket ?

Ben

2008/12/12 Martin Sachs sachs.mar...@gmail.com


Berlin, Germany



francisco treacy schrieb:

to know a little bit more of our great (and vast) community, i was
just wondering if you're keen on sharing where you come from and/or
where you work with wicket...

for instance, here argentinian/belgian working with wicket in antibes,

france

francisco

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





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








--
Antoine Angénieux
Associé

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



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



Re: [OT] wicket users around the world

2008-12-12 Thread Antony Stubbs

Auckland, New Zealand. 

Currently working in The Netherlands, but currently in Ukraine for a week,
working on portal 2 spec implementation in Wicket. :)


Martin Sachs wrote:
 
 Berlin, Germany
 
 
 
 


-
___

http://stubbisms.wordpress.com http://stubbisms.wordpress.com 
-- 
View this message in context: 
http://www.nabble.com/-OT--wicket-users-around-the-world-tp20962108p20971601.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicket session back button support

2008-12-12 Thread Paolo Di Tommaso
Good, in this way it works.

I'm apply the onBeforeRender trick to propagate the previous state in the
session.


Thank guys, long live to Wicket

Paolo

On Thu, Dec 11, 2008 at 6:27 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 or instead of pages use panels as content. that way you use the same
 menu instance across multiple pages and the menu can keep its own
 state.

 -igor

 On Thu, Dec 11, 2008 at 2:37 AM, Paolo Di Tommaso
 paolo.ditomm...@gmail.com wrote:
  Nice question. Consider the following use case:
 
  You have the main application menu bar. The user chooses an item from it.
 
  What happens is that all the following pages will be related to that
 choice,
  for example the second level menu in the page (that is contextual to the
  above choice) and I would avoid to specify it as a parameter every time I
  create a new page .
 
  Possible solution, store those variables in the page also and initialize
  them taking the values from the session.
 
  When the user clicks on the back button re-sync the session variables -
 if
  changed - overriding the onBeforeRender() method.
 
  Other solution could be to create a custom UrlEncodingStrategy to
 propagate
  the session vars on URL ...
 
 
  What do you think ?
 
  -- Paolo
 
 
  On Thu, Dec 11, 2008 at 12:29 AM, Matej Knopp matej.kn...@gmail.com
 wrote:
 
  No. You have to track the changes yourself. Or use Page as the scope.
  What's the reason to put values in session anyway?
 
  -Matej
 
  On Wed, Dec 10, 2008 at 11:18 PM, Paolo Di Tommaso
  paolo.ditomm...@gmail.com wrote:
   Dear community,
  
   I'm facing with a really ugly problem. In my web app I need to store
 some
   variables in the Wicket session.
  
   But this cause some nasty side-effects when users click on the browser
  back
   button.
  
   The page displays the previous content correctly but some components,
  which
   model is based on session values, do not.
  
   Is there any best practice for Wicket session to support the browser
 back
   button (so that coming back the session is restored to the previous
  state)?
  
   Thank you,
  
   Paolo
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

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




Re: What is your experience on the time of development ?

2008-12-12 Thread Antoine Angenieux
I would not count in how much you gain during your fist devs. with 
Wicket (even though you STILL gain a lot of time), but how much dev time 
you gain when reusing your existing Wicket components and how much time 
you save when you need to maintain your apps ;)


Cheers,

Antoine.


Martin Sachs wrote:

I'm looking for a little comparison of the development-time for Applications
in Wicket against other Technologies. 



I think the development with Wicket is two times faster than Struts. But
what are your experiences on JSF, Rails/Grails, SpringMVC/SpringWebFlow.

Anyone you know the development-time from experience ?


(P.S.: The applications must use AJAX and many custom components or tags in
JSP, not just a hello world sample)


--
Antoine Angénieux
Associé

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



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



Re: [OT] wicket users around the world

2008-12-12 Thread Advanced Technology®
Maputo, Mozambique

Using Wicket to develop all Web based apps on a smal Bank.

-- 
AT(R)


Re: What is your experience on the time of development ?

2008-12-12 Thread Martin Sachs

Your right !

Already I have developed three Wicket apps (12 month of work for a man), I
know how fast i can do thinks with wicket, but i need knowledge of e.g. JSF
to say wicket is THE FRAMEWORK for the next big site. Maybe with JSF all
things will be developed a lot faster, maybe not. Is other technologies also
Maintainable very well, in comparison to wicket ? That questions cant be
answered with looking at a HelloWorld application.

Every application has its own unique requirements on style, architecture, so
we cant reuse only very abstract components. That works fine with wicket. So
if we have a new project we develop the basics components for this project
(very fast).

Maybe you can estimate a factor of time (for development or maintaining) in
comparison with JSP, JSF, ... or whatever you know else.

regards
Martin



Antoine Angénieux wrote:
 
 I would not count in how much you gain during your fist devs. with 
 Wicket (even though you STILL gain a lot of time), but how much dev time 
 you gain when reusing your existing Wicket components and how much time 
 you save when you need to maintain your apps ;)
 
 Cheers,
 
 Antoine.
 
 
 Martin Sachs wrote:
 I'm looking for a little comparison of the development-time for
 Applications
 in Wicket against other Technologies. 
 
 
 I think the development with Wicket is two times faster than Struts. But
 what are your experiences on JSF, Rails/Grails, SpringMVC/SpringWebFlow.
 
 Anyone you know the development-time from experience ?
 
 
 (P.S.: The applications must use AJAX and many custom components or tags
 in
 JSP, not just a hello world sample)
 
 -- 
 Antoine Angénieux
 Associé
 
 Clinigrid
 5, avenue Mozart
 75016 Paris, France
 +336 60 21 09 18
 aangeni...@clinigrid.com
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/What-is-your-experience-on-the-time-of-development---tp20971605p20973394.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: [OT] wicket users around the world

2008-12-12 Thread Steve Swinsburg

First Australian to reply... so um, Australia! Working in the UK.




On 12 Dec 2008, at 11:30, Martin Grigorov wrote:


Sofia, Bulgaria

El jue, 11-12-2008 a las 19:57 +0100, francisco treacy escribió:

to know a little bit more of our great (and vast) community, i was
just wondering if you're keen on sharing where you come from and/or
where you work with wicket...

for instance, here argentinian/belgian working with wicket in  
antibes, france


francisco

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





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





smime.p7s
Description: S/MIME cryptographic signature


Re: how to reuse a label in the same page?

2008-12-12 Thread Martijn Dashorst
The fact that you want to bind a component in two places and complain
that you can't, is a code smell: you should extract that component to
a panel or fragment and reuse the panel (/fragment).

Martijn

On Fri, Dec 12, 2008 at 1:32 PM, Martijn Dashorst
martijn.dasho...@gmail.com wrote:
 ieuw

 On Fri, Dec 12, 2008 at 1:30 PM, Bruno Cesar Borges
 brunobor...@cetip.com.br wrote:
 Martijn, it is possible to create nodes inside a DOM tree refering to 
 another DOM node. What if it was possible to do the same with Wicket?

 div wicket:id=myPanel
  span wicket:id=foolabel/span
  span wicket:ref=fooagain/span
 /div

 span wicket:ref=myPanel.fooagain but outside panel!/span

 Regards,
 Bruno

 -Original Message-
 From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com]
 Sent: Friday, December 12, 2008 5:18 AM
 To: users@wicket.apache.org
 Subject: Re: how to reuse a label in the same page?


 Nope, wicket:id is a 1-1 mapping at the same dom tree level. You can
 reuse id's at different levels or in different branches of the dom
 tree, but not as siblings.

 a href=# wicket:id=foospan wicket:id=foo/span/a works
 but another
 a href=# wicket:id=foo/a will fail (and rightfully so)

 Martijn

 On Fri, Dec 12, 2008 at 6:20 AM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
 I'm pretty sure that you can just add it once in Java and multiple times in
 the HTML, although I've never pondered the (potential) side-effects of
 this.  Give it a shot and let us know how it works for you.  With something
 as stateless / simple as a BookmarkablePageLink, there probably couldn't be
 much in the way of side-effects, although with very complex, stateful
 components, I could see that maybe there would be an issue... (maybe??)
 --
 Jeremy Thomerson
 http://www.wickettraining.com


 On Thu, Dec 11, 2008 at 3:29 PM, novotny novo...@gridsphere.org wrote:



 Basically I need two of the same links on the page, and it looks like I
 have
 to do this which just seems kinda lame...

 add(new BookmarkablePageLinkString(personaldetails,
 PersonalDetailsPage.class));
 add(new BookmarkablePageLinkString(personaldetails2,
 PersonalDetailsPage.class));

 

 Click Here
 Profile page







 jWeekend wrote:
 
  Jason,
 
  What are you trying to achieve?
 
  Here are some ideas that may give the desired effect, depending on what
  that is ...
 
  1 - Make a model for your data and give that to all the Label instances
 as
  required, (but each with their unique id and separate markup).
  2 - Use a repeater (like a ListView) to render several labels (no
  repetition of Java code or markup).
  3 - Write a method that takes a model (or just a String) and an id, that
  returns an appropriately configured Label instance  (saves on repeating
  Java code - still need markup per component and your own unique ids).
 
  Regards - Cemal
   http://www.jWeekend.co.uk http://www.jweekend.co.uk/ jWeekend
 
 
 
  novotny wrote:
 
 
  I have a simple label hello and I want to display it twice in the same
  page, but wicket complains the wicket:id needs to be unique in my
  page what do I need to do, is there an alias or something?
 
  Thanks, Jason
 
 
 

 --
 View this message in context:
 http://www.nabble.com/how-to-reuse-a-label-in-the-same-page--tp20964351p20964551.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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






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

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

 ***
 Atenção: Esta mensagem foi enviada para uso exclusivo do(s) 
 destinatários(s) acima identificado(s),
 podendo conter informações e/ou documentos confidencias/privilegiados e seu 
 sigilo é protegido por
 lei. Caso você tenha recebido por engano, por favor, informe o remetente e 
 apague-a de seu sistema.
 Notificamos que é proibido por lei a sua retenção, disseminação, 
 distribuição, cópia ou uso sem
 expressa autorização do remetente. Opiniões pessoais do remetente não 
 refletem, necessariamente,
 o ponto de vista da CETIP, o qual é divulgado somente por pessoas 
 autorizadas.


 Warning: This message was sent for exclusive use of the addressees above 
 identified, possibly
 containing information and or privileged/confidential documents whose 
 content is protected by law.
 In case you have mistakenly received it, please notify the sender and delete 
 it from your system.
 Be noticed that the law forbids the retention, dissemination, 

Re: [Announce] wicketstuff-push ported to use wicket 1.4 jetty 6.1.14

2008-12-12 Thread Rodolfo Hansen
Yeah, Jquery started something which I tested a couple of months ago with no
luck.

Writing/Finding a leaner comet client is in the TODO right now...

The idea Jesse McConnel has is of making it simpler to marshall data to-from
clients.
To make it, an actual bus for communication.

We haven't had much time to discuss all this though.


On Fri, Dec 12, 2008 at 4:09 AM, Michael Sparer michael.spa...@gmx.atwrote:


 AFAIK jquery started something, but I just heard of that and didn't look
 into
 it. If dojo seems too bloated to you you can easily build your own dojo
 with
 just the modules you need - then it isn't bloated at all (except you're
 using too many components). There's a post announcing wicketstuff-dojo-1.1.
 somewhere on the mailinglist that explained (or at least offered to explain
 ;-)) how to build your own dojo - on the wiki it's described with 0.4 if I
 remember correctly

 regards,
 michael

 Peter Ertl-3 wrote:
 
  concerning the proper javascript client for comet... is there anything
  reasonable except dojo-cometd-client to use?
 
  The dojo stuff feels really bloated for me
 
  Am 11.12.2008 um 15:00 schrieb Michael Sparer:
 
 
  Alright, I'll keep an eye on changes of your project. Maybe we can
  merge some
  useful stuff in the future, but for now I'm of the same opinion as
  you.
  Let's keep them seperate for now.
 
  greetings from ice-cold austria,
  Michael
 
 
  Rodolfo Hansen-2 wrote:
 
  Yeah, I think we might just want to separate them, the goals will
  start
  becoming a bit different as well..
 
  Especially since push has other options other than cometd / dojo
  for the
  general notion of getting push to web clients...
 
  So its better to separate those concerns and have push with its own
  mindset,
  no?
 
 
  On Tue, Dec 9, 2008 at 9:40 AM, Michael Sparer
  michael.spa...@gmx.atwrote:
 
 
  Rodolfo,
 
  so you finally decided to stick with your initial idea ;-)
 
  did you at least have a look at the cometd stuff in the new
  wicketstuff-dojo-1.1. project? I'm still against the idea to split
  up
  wicketstuff-push completely from the dojo project, but we had the
  discussion
  before without result ...
 
  regards,
  Michael
 
 
  Rodolfo Hansen-2 wrote:
 
  Hi, a new version of wicketstuff-push was moved to the
  wicketstuff-core
  group of projects, as push-parent (as was specified in the wiki)
 
  A couple of new things were done:
 
  It is no longer compatible with java 1.4, is built for wicket 1.4
  and
  requires jetty 6.1.14.
  The dependencies on dojo have been reduced even further, so this
  package
  is
  basically just a cometd client/server project for wicket.
  The RemoveListener is now working and is extended with a new type
  of
  WicketRemoveListener that allows access to the Wicket Application
  Singleton
  and the session that registered the singleton (i thought of a
  couple of
  ways
  to register them, and decided to choose the one present in the
  code for
  it)
 
  Please let me know of any suggestions, ideas for the proj.
 
 
 
 
  -
  Michael Sparer
  http://talk-on-tech.blogspot.com
  --
  View this message in context:
 
 http://www.nabble.com/-Announce--wicketstuff-push-ported-to-use-wicket-1.4-jetty-6.1.14-tp20914051p20914877.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 
 
  -
  Michael Sparer
  http://talk-on-tech.blogspot.com
  --
  View this message in context:
 
 http://www.nabble.com/-Announce--wicketstuff-push-ported-to-use-wicket-1.4-jetty-6.1.14-tp20914051p20955950.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 


 -
 Michael Sparer
 http://talk-on-tech.blogspot.com
 --
 View this message in context:
 http://www.nabble.com/-Announce--wicketstuff-push-ported-to-use-wicket-1.4-jetty-6.1.14-tp20914051p20971370.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




RE: how to reuse a label in the same page?

2008-12-12 Thread Bruno Cesar Borges
lol... 

Alright, I agree with you, but think about. There are some cases where creating 
a fragment or a panel to reuse, wouldn't address the main advantage. We could 
save a *lot* of memory usage this way, and I think it would be a cool feature. 
Even with Ajax wouldn't be a problem.

-Original Message-
From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com]
Sent: Friday, December 12, 2008 10:33 AM
To: users@wicket.apache.org
Subject: Re: how to reuse a label in the same page?


The fact that you want to bind a component in two places and complain
that you can't, is a code smell: you should extract that component to
a panel or fragment and reuse the panel (/fragment).

Martijn

On Fri, Dec 12, 2008 at 1:32 PM, Martijn Dashorst
martijn.dasho...@gmail.com wrote:
 ieuw

 On Fri, Dec 12, 2008 at 1:30 PM, Bruno Cesar Borges
 brunobor...@cetip.com.br wrote:
 Martijn, it is possible to create nodes inside a DOM tree refering to 
 another DOM node. What if it was possible to do the same with Wicket?

 div wicket:id=myPanel
  span wicket:id=foolabel/span
  span wicket:ref=fooagain/span
 /div

 span wicket:ref=myPanel.fooagain but outside panel!/span

 Regards,
 Bruno

 -Original Message-
 From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com]
 Sent: Friday, December 12, 2008 5:18 AM
 To: users@wicket.apache.org
 Subject: Re: how to reuse a label in the same page?


 Nope, wicket:id is a 1-1 mapping at the same dom tree level. You can
 reuse id's at different levels or in different branches of the dom
 tree, but not as siblings.

 a href=# wicket:id=foospan wicket:id=foo/span/a works
 but another
 a href=# wicket:id=foo/a will fail (and rightfully so)

 Martijn

 On Fri, Dec 12, 2008 at 6:20 AM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
 I'm pretty sure that you can just add it once in Java and multiple times in
 the HTML, although I've never pondered the (potential) side-effects of
 this.  Give it a shot and let us know how it works for you.  With something
 as stateless / simple as a BookmarkablePageLink, there probably couldn't be
 much in the way of side-effects, although with very complex, stateful
 components, I could see that maybe there would be an issue... (maybe??)
 --
 Jeremy Thomerson
 http://www.wickettraining.com


 On Thu, Dec 11, 2008 at 3:29 PM, novotny novo...@gridsphere.org wrote:



 Basically I need two of the same links on the page, and it looks like I
 have
 to do this which just seems kinda lame...

 add(new BookmarkablePageLinkString(personaldetails,
 PersonalDetailsPage.class));
 add(new BookmarkablePageLinkString(personaldetails2,
 PersonalDetailsPage.class));

 

 Click Here
 Profile page







 jWeekend wrote:
 
  Jason,
 
  What are you trying to achieve?
 
  Here are some ideas that may give the desired effect, depending on what
  that is ...
 
  1 - Make a model for your data and give that to all the Label instances
 as
  required, (but each with their unique id and separate markup).
  2 - Use a repeater (like a ListView) to render several labels (no
  repetition of Java code or markup).
  3 - Write a method that takes a model (or just a String) and an id, that
  returns an appropriately configured Label instance  (saves on repeating
  Java code - still need markup per component and your own unique ids).
 
  Regards - Cemal
   http://www.jWeekend.co.uk http://www.jweekend.co.uk/ jWeekend
 
 
 
  novotny wrote:
 
 
  I have a simple label hello and I want to display it twice in the same
  page, but wicket complains the wicket:id needs to be unique in my
  page what do I need to do, is there an alias or something?
 
  Thanks, Jason
 
 
 

 --
 View this message in context:
 http://www.nabble.com/how-to-reuse-a-label-in-the-same-page--tp20964351p20964551.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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






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

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

 ***
 Atenção: Esta mensagem foi enviada para uso exclusivo do(s) 
 destinatários(s) acima identificado(s),
 podendo conter informações e/ou documentos confidencias/privilegiados e seu 
 sigilo é protegido por
 lei. Caso você tenha recebido por engano, por favor, informe o remetente e 
 apague-a de seu sistema.
 Notificamos que é proibido por lei a sua retenção, disseminação, 
 distribuição, cópia ou uso sem
 expressa autorização do remetente. Opiniões pessoais do 

Re: how to reuse a label in the same page?

2008-12-12 Thread Martijn Dashorst
It would get abused and abused and abused and abused. It is a
beginner's mistake. There is no apparent advantage to enabling this.
If some concept is fundamentally wrong, there is no way to make it
right. This is in the category fundamentally wrong.

Martijn

On Fri, Dec 12, 2008 at 1:37 PM, Bruno Cesar Borges
brunobor...@cetip.com.br wrote:
 lol...

 Alright, I agree with you, but think about. There are some cases where 
 creating a fragment or a panel to reuse, wouldn't address the main advantage. 
 We could save a *lot* of memory usage this way, and I think it would be a 
 cool feature. Even with Ajax wouldn't be a problem.

 -Original Message-
 From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com]
 Sent: Friday, December 12, 2008 10:33 AM
 To: users@wicket.apache.org
 Subject: Re: how to reuse a label in the same page?


 The fact that you want to bind a component in two places and complain
 that you can't, is a code smell: you should extract that component to
 a panel or fragment and reuse the panel (/fragment).

 Martijn

 On Fri, Dec 12, 2008 at 1:32 PM, Martijn Dashorst
 martijn.dasho...@gmail.com wrote:
 ieuw

 On Fri, Dec 12, 2008 at 1:30 PM, Bruno Cesar Borges
 brunobor...@cetip.com.br wrote:
 Martijn, it is possible to create nodes inside a DOM tree refering to 
 another DOM node. What if it was possible to do the same with Wicket?

 div wicket:id=myPanel
  span wicket:id=foolabel/span
  span wicket:ref=fooagain/span
 /div

 span wicket:ref=myPanel.fooagain but outside panel!/span

 Regards,
 Bruno

 -Original Message-
 From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com]
 Sent: Friday, December 12, 2008 5:18 AM
 To: users@wicket.apache.org
 Subject: Re: how to reuse a label in the same page?


 Nope, wicket:id is a 1-1 mapping at the same dom tree level. You can
 reuse id's at different levels or in different branches of the dom
 tree, but not as siblings.

 a href=# wicket:id=foospan wicket:id=foo/span/a works
 but another
 a href=# wicket:id=foo/a will fail (and rightfully so)

 Martijn

 On Fri, Dec 12, 2008 at 6:20 AM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
 I'm pretty sure that you can just add it once in Java and multiple times in
 the HTML, although I've never pondered the (potential) side-effects of
 this.  Give it a shot and let us know how it works for you.  With something
 as stateless / simple as a BookmarkablePageLink, there probably couldn't be
 much in the way of side-effects, although with very complex, stateful
 components, I could see that maybe there would be an issue... (maybe??)
 --
 Jeremy Thomerson
 http://www.wickettraining.com


 On Thu, Dec 11, 2008 at 3:29 PM, novotny novo...@gridsphere.org wrote:



 Basically I need two of the same links on the page, and it looks like I
 have
 to do this which just seems kinda lame...

 add(new BookmarkablePageLinkString(personaldetails,
 PersonalDetailsPage.class));
 add(new BookmarkablePageLinkString(personaldetails2,
 PersonalDetailsPage.class));

 

 Click Here
 Profile page







 jWeekend wrote:
 
  Jason,
 
  What are you trying to achieve?
 
  Here are some ideas that may give the desired effect, depending on what
  that is ...
 
  1 - Make a model for your data and give that to all the Label instances
 as
  required, (but each with their unique id and separate markup).
  2 - Use a repeater (like a ListView) to render several labels (no
  repetition of Java code or markup).
  3 - Write a method that takes a model (or just a String) and an id, that
  returns an appropriately configured Label instance  (saves on repeating
  Java code - still need markup per component and your own unique ids).
 
  Regards - Cemal
   http://www.jWeekend.co.uk http://www.jweekend.co.uk/ jWeekend
 
 
 
  novotny wrote:
 
 
  I have a simple label hello and I want to display it twice in the 
  same
  page, but wicket complains the wicket:id needs to be unique in my
  page what do I need to do, is there an alias or something?
 
  Thanks, Jason
 
 
 

 --
 View this message in context:
 http://www.nabble.com/how-to-reuse-a-label-in-the-same-page--tp20964351p20964551.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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






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

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

 ***
 Atenção: Esta mensagem foi enviada para uso exclusivo do(s) 
 destinatários(s) acima identificado(s),
 

RE: how to reuse a label in the same page?

2008-12-12 Thread Bruno Cesar Borges
Sorry. What I did want to say was that There are some cases where creating a 
fragment or a panel to be reused is just... too cumbersome. 

-Original Message-
From: Bruno Cesar Borges [mailto:brunobor...@cetip.com.br]
Sent: Friday, December 12, 2008 10:37 AM
To: users@wicket.apache.org
Subject: RE: how to reuse a label in the same page?


lol... 

Alright, I agree with you, but think about. There are some cases where creating 
a fragment or a panel to reuse, wouldn't address the main advantage. We could 
save a *lot* of memory usage this way, and I think it would be a cool feature. 
Even with Ajax wouldn't be a problem.

-Original Message-
From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com]
Sent: Friday, December 12, 2008 10:33 AM
To: users@wicket.apache.org
Subject: Re: how to reuse a label in the same page?


The fact that you want to bind a component in two places and complain
that you can't, is a code smell: you should extract that component to
a panel or fragment and reuse the panel (/fragment).

Martijn

On Fri, Dec 12, 2008 at 1:32 PM, Martijn Dashorst
martijn.dasho...@gmail.com wrote:
 ieuw

 On Fri, Dec 12, 2008 at 1:30 PM, Bruno Cesar Borges
 brunobor...@cetip.com.br wrote:
 Martijn, it is possible to create nodes inside a DOM tree refering to 
 another DOM node. What if it was possible to do the same with Wicket?

 div wicket:id=myPanel
  span wicket:id=foolabel/span
  span wicket:ref=fooagain/span
 /div

 span wicket:ref=myPanel.fooagain but outside panel!/span

 Regards,
 Bruno

 -Original Message-
 From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com]
 Sent: Friday, December 12, 2008 5:18 AM
 To: users@wicket.apache.org
 Subject: Re: how to reuse a label in the same page?


 Nope, wicket:id is a 1-1 mapping at the same dom tree level. You can
 reuse id's at different levels or in different branches of the dom
 tree, but not as siblings.

 a href=# wicket:id=foospan wicket:id=foo/span/a works
 but another
 a href=# wicket:id=foo/a will fail (and rightfully so)

 Martijn

 On Fri, Dec 12, 2008 at 6:20 AM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
 I'm pretty sure that you can just add it once in Java and multiple times in
 the HTML, although I've never pondered the (potential) side-effects of
 this.  Give it a shot and let us know how it works for you.  With something
 as stateless / simple as a BookmarkablePageLink, there probably couldn't be
 much in the way of side-effects, although with very complex, stateful
 components, I could see that maybe there would be an issue... (maybe??)
 --
 Jeremy Thomerson
 http://www.wickettraining.com


 On Thu, Dec 11, 2008 at 3:29 PM, novotny novo...@gridsphere.org wrote:



 Basically I need two of the same links on the page, and it looks like I
 have
 to do this which just seems kinda lame...

 add(new BookmarkablePageLinkString(personaldetails,
 PersonalDetailsPage.class));
 add(new BookmarkablePageLinkString(personaldetails2,
 PersonalDetailsPage.class));

 

 Click Here
 Profile page







 jWeekend wrote:
 
  Jason,
 
  What are you trying to achieve?
 
  Here are some ideas that may give the desired effect, depending on what
  that is ...
 
  1 - Make a model for your data and give that to all the Label instances
 as
  required, (but each with their unique id and separate markup).
  2 - Use a repeater (like a ListView) to render several labels (no
  repetition of Java code or markup).
  3 - Write a method that takes a model (or just a String) and an id, that
  returns an appropriately configured Label instance  (saves on repeating
  Java code - still need markup per component and your own unique ids).
 
  Regards - Cemal
   http://www.jWeekend.co.uk http://www.jweekend.co.uk/ jWeekend
 
 
 
  novotny wrote:
 
 
  I have a simple label hello and I want to display it twice in the same
  page, but wicket complains the wicket:id needs to be unique in my
  page what do I need to do, is there an alias or something?
 
  Thanks, Jason
 
 
 

 --
 View this message in context:
 http://www.nabble.com/how-to-reuse-a-label-in-the-same-page--tp20964351p20964551.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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






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

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

 ***
 Atenção: Esta mensagem foi enviada para uso exclusivo do(s) 
 destinatários(s) acima identificado(s),
 podendo 

RE: how to reuse a label in the same page?

2008-12-12 Thread Pointbreak
- No you will not save a lot of memory. Wicket components are fairly
small. Memory usage will/should mostly be in the application models, and
they are easy to share between components.
- It will introduce a complexity nightmare with no real benefits (imho)
in the framework though.

On Fri, 12 December 2008 12:37, Bruno Cesar Borges wrote:
 lol... 
 
 Alright, I agree with you, but think about. There are some cases where
 creating a fragment or a panel to reuse, wouldn't address the main
 advantage. We could save a *lot* of memory usage this way, and I think it
 would be a cool feature. Even with Ajax wouldn't be a problem.
 
 -Original Message-
 From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com]
 Sent: Friday, December 12, 2008 10:33 AM
 To: users@wicket.apache.org
 Subject: Re: how to reuse a label in the same page?
 
 
 The fact that you want to bind a component in two places and complain
 that you can't, is a code smell: you should extract that component to
 a panel or fragment and reuse the panel (/fragment).
 
 Martijn
 
 On Fri, Dec 12, 2008 at 1:32 PM, Martijn Dashorst
 martijn.dasho...@gmail.com wrote:
  ieuw
 
  On Fri, Dec 12, 2008 at 1:30 PM, Bruno Cesar Borges
  brunobor...@cetip.com.br wrote:
  Martijn, it is possible to create nodes inside a DOM tree refering to 
  another DOM node. What if it was possible to do the same with Wicket?
 
  div wicket:id=myPanel
   span wicket:id=foolabel/span
   span wicket:ref=fooagain/span
  /div
 
  span wicket:ref=myPanel.fooagain but outside panel!/span
 
  Regards,
  Bruno
 
  -Original Message-
  From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com]
  Sent: Friday, December 12, 2008 5:18 AM
  To: users@wicket.apache.org
  Subject: Re: how to reuse a label in the same page?
 
 
  Nope, wicket:id is a 1-1 mapping at the same dom tree level. You can
  reuse id's at different levels or in different branches of the dom
  tree, but not as siblings.
 
  a href=# wicket:id=foospan wicket:id=foo/span/a works
  but another
  a href=# wicket:id=foo/a will fail (and rightfully so)
 
  Martijn
 
  On Fri, Dec 12, 2008 at 6:20 AM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
  I'm pretty sure that you can just add it once in Java and multiple times 
  in
  the HTML, although I've never pondered the (potential) side-effects of
  this.  Give it a shot and let us know how it works for you.  With 
  something
  as stateless / simple as a BookmarkablePageLink, there probably couldn't 
  be
  much in the way of side-effects, although with very complex, stateful
  components, I could see that maybe there would be an issue... (maybe??)
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
  On Thu, Dec 11, 2008 at 3:29 PM, novotny novo...@gridsphere.org wrote:
 
 
 
  Basically I need two of the same links on the page, and it looks like I
  have
  to do this which just seems kinda lame...
 
  add(new BookmarkablePageLinkString(personaldetails,
  PersonalDetailsPage.class));
  add(new BookmarkablePageLinkString(personaldetails2,
  PersonalDetailsPage.class));
 
  
 
  Click Here
  Profile page
 
 
 
 
 
 
 
  jWeekend wrote:
  
   Jason,
  
   What are you trying to achieve?
  
   Here are some ideas that may give the desired effect, depending on what
   that is ...
  
   1 - Make a model for your data and give that to all the Label instances
  as
   required, (but each with their unique id and separate markup).
   2 - Use a repeater (like a ListView) to render several labels (no
   repetition of Java code or markup).
   3 - Write a method that takes a model (or just a String) and an id, 
   that
   returns an appropriately configured Label instance  (saves on repeating
   Java code - still need markup per component and your own unique ids).
  
   Regards - Cemal
http://www.jWeekend.co.uk http://www.jweekend.co.uk/ jWeekend
  
  
  
   novotny wrote:
  
  
   I have a simple label hello and I want to display it twice in the 
   same
   page, but wicket complains the wicket:id needs to be unique in my
   page what do I need to do, is there an alias or something?
  
   Thanks, Jason
  
  
  
 
  --
  View this message in context:
  http://www.nabble.com/how-to-reuse-a-label-in-the-same-page--tp20964351p20964551.html
   Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 
 
  --
  Become a Wicket expert, learn from the best: http://wicketinaction.com
  Apache Wicket 1.3.4 is released
  Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
  

Re: [OT] wicket users around the world

2008-12-12 Thread Martin Grigorov
Sofia, Bulgaria

El jue, 11-12-2008 a las 19:57 +0100, francisco treacy escribió:
 to know a little bit more of our great (and vast) community, i was
 just wondering if you're keen on sharing where you come from and/or
 where you work with wicket...
 
 for instance, here argentinian/belgian working with wicket in antibes, france
 
 francisco
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



Re: What is your experience on the time of development ?

2008-12-12 Thread Antoine Angenieux


Martin Sachs wrote:

Your right !

Already I have developed three Wicket apps (12 month of work for a man), I
know how fast i can do thinks with wicket, but i need knowledge of e.g. JSF
to say wicket is THE FRAMEWORK for the next big site. Maybe with JSF all
things will be developed a lot faster, maybe not. Is other technologies also
Maintainable very well, in comparison to wicket ? That questions cant be
answered with looking at a HelloWorld application.


Right. Always choose the right tool for the job ;) in my case, a small 
dev team (1 ~ 3 devs), many variants of the same kind of middle-sized 
webapps, and exactly the kind of apps that belong to wicket's comfort zone.




Every application has its own unique requirements on style, architecture, so
we cant reuse only very abstract components. That works fine with wicket. So
if we have a new project we develop the basics components for this project
(very fast).
Agreed. However, I found that when dealing with web applications rather 
than web site, where a simple and effective HTML / CSS / Ajax based UI 
is enough, I could reuse many stuff from previous projects.


Naturally, what I reuse most often as is are the custom components 
(read wicket components) we have already built. The only project 
specific implementation required for those are usualy the IModel implems 
to use, and sometimes a few CSS / HTML tweaks.


As we use Wicket only for the UI layer (classical Spring / Wicket 
stack), I find that most often, when desiging the requirements for the 
UI, I find existing designs and working implementations either in our 
previous projects, in wicket user list or by googling... Thankfully, 
there are still times where I have to come up with some fresh design.




Maybe you can estimate a factor of time (for development or maintaining) in
comparison with JSP, JSF, ... or whatever you know else


As meaningfull as it can be, three years ago we rewrote our base 
applications that were based on a Struts 1.x / JSP / Spring / JDBC stack.


The app was a small / middle sized app at the time (~ 30 struts actions, 
~ 100 jsps) representing a ~5 months of workman. It tooks us 2 months of 
workman to rewrite from scratch with Wicket. Maintenance time on live 
applications has been cut down by a factor 2 on average.


New project developpement time has been cutoff by a factor 3 on average.

Off course, this is not only due to switching to Wicket (event though it 
is the major factor), but also to using other techs. where usefull like 
Hibernate  co, and rewriting from scratch an application with more than 
3 years of feedback on the previous version ;)


I won't talk about JSF as after my first evaluations of the tech. in our 
company context, and continuously ranting inside my head for the 3 days 
investigating it, I decided that the only way I would use JSF was to 
torture me to death :D


Cheers,

Antoine.



regards
Martin



Antoine Angénieux wrote:
I would not count in how much you gain during your fist devs. with 
Wicket (even though you STILL gain a lot of time), but how much dev time 
you gain when reusing your existing Wicket components and how much time 
you save when you need to maintain your apps ;)


Cheers,

Antoine.


Martin Sachs wrote:

I'm looking for a little comparison of the development-time for
Applications
in Wicket against other Technologies. 



I think the development with Wicket is two times faster than Struts. But
what are your experiences on JSF, Rails/Grails, SpringMVC/SpringWebFlow.

Anyone you know the development-time from experience ?


(P.S.: The applications must use AJAX and many custom components or tags
in
JSP, not just a hello world sample)

--
Antoine Angénieux
Associé

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



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







--
Antoine Angénieux
Associé

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



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



Using ajax for generating a pdf

2008-12-12 Thread Emanuele Gesuato

Hi there,

Reading previous posts i have discovered the existence of the yui 
context menu in wicket stuff that now i'm using in a project.


More specifically, i'm using wicket 1.3.4 with wicket-yui-core 1.3.0 
from the wicket 1.3.0 branch of wicketstuff.


I would like to do a non-ajax click in my context menu because i need to 
generate a pdf report and propose to the user the classic download 
window of the browser. Using ajax, the pdf is generated but the ajax 
response is empty and the user doesn't see anything.

This is my actual code in the MenuItem.onClick(AjaxRequestTarget, targetId):


IResourceStream stream = new ByteArrayResource(application/pdf, 
s.toByteArray()).getResourceStream();
		RequestCycle.get().setRequestTarget(new 
ResourceStreamRequestTarget(stream));		



With these lines if i do a normal submit the user could see the 
download window with the pdf generated. Using an ajax-click it doesn't work.


The YuiContextMenuBehaviour in the respond method calls the 
YuiContextMenu.onClick(AjaxRequestTarget, targetId). But in the 
YuiContextMenu there is a method onClick() which seems not called by 
anyone.


For me, it seems that the onClick() could resolve my issue (it doesn't 
use ajax) but i don't know why it is not called by anyone. Is it 
deprecated ?



Thanks,
Emanuele





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



Re: [OT] wicket users around the world

2008-12-12 Thread Emanuele Gesuato

Fabio Fioretti wrote:

Rome, Italy! :)

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




Padua (near Venice), Italy !


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



Is wicket:extend strictly required if including entire html child?

2008-12-12 Thread Antony Stubbs

Is it possible to use markup inheritance without having to use
wicket:extend in the children? I'd like to be able to use MI without the
children html knowing. Just extending the super component should be enough
in a lot of situations. Particularly when extending panels which are naughty
and don't have htmlbody tags, and dont have any html which shouldn't be
in the result. 

I.e. can we have wicket default to simply effectively wrapping the entire
html contents in wicket:extend if there is no extend tag?

-
___

http://stubbisms.wordpress.com http://stubbisms.wordpress.com 
-- 
View this message in context: 
http://www.nabble.com/Is-wicket%3Aextend-strictly-required-if-including-entire-html-child--tp20975395p20975395.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Hot deployment / code swapping

2008-12-12 Thread samk
See Thread at: http://www.techienuggets.com/Detail?tx=51475 Posted on behalf of 
a User

I also have the same problem. Even I added 

getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND); 

to WebApplication class.

I am using wicket 1.3.4.

Before Wicket come to Apache I never have this problem before.



In Response To: 


Hi everybody,

I have read in some older messages of this list that wicket by default takes
care of re-deploying changed classes and HTML files, does that still apply?

It does not work for me, not even with a fresh quickstart project. Neither
HTML files nor Java classes are reloaded when they are changed.

Are there any issues with this under certain circumstances (e.g. having
vista ;-)?

What I just did is this:



mvn archetype:create -DarchetypeGroupId=org.apache.wicket
-DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.3.4
-DgroupId=com.mycompany -DartifactId=myproject

cd myproject

mvn package

mvn jetty:run

[changed HomePage.class and HomePage.html]



The changes do not have any effect until I restart jetty.

Any hints on this issue are highly appreciated, thanks a lot in advance!
-- 
... 
http://www.nabble.com/Hot-deployment---code-swapping-tp19410295p19410295.html
Sent from the Wicket - User mailing list archive at 


-
To unsubscribe, e-mail: users-no...@spam.com
For additional commands, e-mail: users-no...@spam.com



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



Re: Wicket and CoC

2008-12-12 Thread Ricardo Mayerhofer

Very nice indeed. Based on your example I build my own:

public class ConventionalComponentResolver implements IComponentResolver {

public boolean resolve(MarkupContainer markupContainer, MarkupStream
markupStream, ComponentTag componentTag) {  
CharSequence wicketId = componentTag.getString(wicket:id);
if ( submitLink.equals(wicketId) ) {
markupContainer.autoAdd(new SubmitLink( submitLink ),
markupStream);
return true;
}



Nino.Martinez wrote:
 
 COOL!!! :)
 
 Jeremy Thomerson wrote:
 You can do exactly what you asked in less than 40 lines of code - and not
 be
 bound to the class name in the HTML (which you shouldn't do).  Here's
 how:

 IN YOUR APPLICATION CLASS:

 @Override
 protected void init() {
 super.init();
 registerConventionalComponent(feedbackPanel,
 FeedbackPanel.class);
 registerConventionalComponent(submitLink, SubmitLink.class);
 registerConventionalComponent(submitButton, Button.class);
 }
 private void registerConventionalComponent(String id, Class? extends
 Component clazz) {
 getPageSettings().addComponentResolver(new
 ConventionalComponentResolver(id, clazz));
 }
 private static final class ConventionalComponentResolver implements
 IComponentResolver {
 private static final long serialVersionUID = 1L;
 private final String mID;
 private final Class? extends Component mComponentClass;

 public ConventionalComponentResolver(String id, Class? extends
 Component clazz) {
 mID = id;
 mComponentClass = clazz;
 }
 public boolean resolve(MarkupContainer container, MarkupStream
 markupStream, ComponentTag tag) {
 CharSequence wicketId = tag.getString(wicket:id);
 if (mID.equals(wicketId)) {
 container.autoAdd(createInstance(), markupStream);
 // Yes, we handled the tag
 return true;
 }
 // We were not able to handle the tag
 return false;
 }
 private Component createInstance() {
 try {
 return
 mComponentClass.getConstructor(String.class).newInstance(mID);
 } catch (Exception ex) {
 throw new WicketRuntimeException(Error creating
 component
 instance of class:  + mComponentClass.getName(), ex);
 }
 }
 }
 NIFTY!!  I hadn't written any IComponentResolver's before - but wanted to
 try it.  Wicket is AWESOME!!  It makes it so easy to customize the
 framework
 to YOUR needs without imposing one person's ideas on another person.
   
 
 -- 
 -Wicket for love
 
 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Wicket-and-CoC-tp20706881p20975432.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: [OT] wicket users around the world

2008-12-12 Thread shetc

American/Scottish working in Ft Lauderdale, FL on some kickass Wicket code.
-- 
View this message in context: 
http://www.nabble.com/-OT--wicket-users-around-the-world-tp20962108p20975312.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: [OT] wicket users around the world

2008-12-12 Thread dtoffe

Mar del Plata, Argentina.  I'll post again the link provided by jwcarman
since I like it very much:

  http://www.frappr.com/wicket

Daniel



francisco treacy-2 wrote:
 
 to know a little bit more of our great (and vast) community, i was
 just wondering if you're keen on sharing where you come from and/or
 where you work with wicket...
 
 for instance, here argentinian/belgian working with wicket in antibes,
 france
 
 francisco
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-OT--wicket-users-around-the-world-tp20962108p20976116.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



RE: [OT] wicket users around the world

2008-12-12 Thread Wadi Jalil Maluf
Argentinians working on wicket and mobile apps integration
Wadi

-Mensaje original-
De: Nino Saturnino Martinez Vazquez Wael [mailto:nino.marti...@jayway.dk] 
Enviado el: viernes, 12 de diciembre de 2008 5:48
Para: users@wicket.apache.org
Asunto: Re: [OT] wicket users around the world

Work in Denmark pimping wicket at every opportunity i get, lived all my 
life in Denmark, so half from Denmark and half from Spain :)

francisco treacy wrote:
 to know a little bit more of our great (and vast) community, i was
 just wondering if you're keen on sharing where you come from and/or
 where you work with wicket...

 for instance, here argentinian/belgian working with wicket in antibes,
france

 francisco

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

   

-- 
-Wicket for love

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


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


__ Information from ESET NOD32 Antivirus, version of virus signature
database 3686 (20081212) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


 

__ Information from ESET NOD32 Antivirus, version of virus signature
database 3686 (20081212) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 


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



Re: [OT] wicket users around the world

2008-12-12 Thread Stefan Simik

Slovakia, working in Bratislava



francisco treacy-2 wrote:
 
 to know a little bit more of our great (and vast) community, i was
 just wondering if you're keen on sharing where you come from and/or
 where you work with wicket...
 
 for instance, here argentinian/belgian working with wicket in antibes,
 france
 
 francisco
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-OT--wicket-users-around-the-world-tp20962108p20976534.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: [OT] wicket users around the world

2008-12-12 Thread francisco treacy
wow we're three argentinians in the list so far... pretty high in the ranking :)

anyway, thanks for getting back - pretty interesting feedback (btw,
all continents represented but asia!). we should all leave our mark on
http://www.frappr.com/wicket

francisco


On Fri, Dec 12, 2008 at 4:18 PM, Wadi Jalil Maluf wad...@yahoo.com.ar wrote:
 Argentinians working on wicket and mobile apps integration
 Wadi

 -Mensaje original-
 De: Nino Saturnino Martinez Vazquez Wael [mailto:nino.marti...@jayway.dk]
 Enviado el: viernes, 12 de diciembre de 2008 5:48
 Para: users@wicket.apache.org
 Asunto: Re: [OT] wicket users around the world

 Work in Denmark pimping wicket at every opportunity i get, lived all my
 life in Denmark, so half from Denmark and half from Spain :)

 francisco treacy wrote:
 to know a little bit more of our great (and vast) community, i was
 just wondering if you're keen on sharing where you come from and/or
 where you work with wicket...

 for instance, here argentinian/belgian working with wicket in antibes,
 france

 francisco

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



 --
 -Wicket for love

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


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


 __ Information from ESET NOD32 Antivirus, version of virus signature
 database 3686 (20081212) __

 The message was checked by ESET NOD32 Antivirus.

 http://www.eset.com




 __ Information from ESET NOD32 Antivirus, version of virus signature
 database 3686 (20081212) __

 The message was checked by ESET NOD32 Antivirus.

 http://www.eset.com



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



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



Re: [OT] wicket users around the world

2008-12-12 Thread Oleg Taranenko
Hi,

native russian, i'm living and working in Germany. Not working with Wicket
right now, but love and endorse it, and hopefully become soon a wicket-based
project.

Oleg

On Thu, Dec 11, 2008 at 7:57 PM, francisco treacy 
francisco.tre...@gmail.com wrote:

 to know a little bit more of our great (and vast) community, i was
 just wondering if you're keen on sharing where you come from and/or
 where you work with wicket...

 for instance, here argentinian/belgian working with wicket in antibes,
 france

 francisco

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




Re: [OT] wicket users around the world

2008-12-12 Thread Björn Tietjens

Kiel/Hamburg, Germany

francisco treacy schrieb:

to know a little bit more of our great (and vast) community, i was
just wondering if you're keen on sharing where you come from and/or
where you work with wicket...

for instance, here argentinian/belgian working with wicket in antibes, france

francisco

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


  


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



Re: [OT] wicket users around the world

2008-12-12 Thread trames

Toledo, Ohio  USA   Note: This is Toledo in the USA not in Spain!  There is a
city in the USA with that name.  :)

Hey at least I see someone else who works in Ohio with Wicket!

Toledo is nowhere near Australia or Austria although I think there are some
kangaroos hopping around in our great zoo - and a koala bear. Our symphony
orchestra plays a mean Mozart too!  :)

--Tim Ames
-- 
View this message in context: 
http://www.nabble.com/-OT--wicket-users-around-the-world-tp20962108p20976771.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: [OT] wicket users around the world

2008-12-12 Thread francesco dicarlo
Bari,Italy. We're working with wicket since June :D

2008/12/12 trames tim.a...@promedica.org


 Toledo, Ohio  USA   Note: This is Toledo in the USA not in Spain!  There is
 a
 city in the USA with that name.  :)

 Hey at least I see someone else who works in Ohio with Wicket!

 Toledo is nowhere near Australia or Austria although I think there are some
 kangaroos hopping around in our great zoo - and a koala bear. Our symphony
 orchestra plays a mean Mozart too!  :)

 --Tim Ames
 --
 View this message in context:
 http://www.nabble.com/-OT--wicket-users-around-the-world-tp20962108p20976771.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: [OT] wicket users around the world

2008-12-12 Thread Steve Flasby

Brit (actually a Yorkshireman) working in Zürich, Switzerland.

francisco treacy wrote:

to know a little bit more of our great (and vast) community, i was
just wondering if you're keen on sharing where you come from and/or
where you work with wicket...

for instance, here argentinian/belgian working with wicket in antibes, france

francisco

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




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



Re: [OT] wicket users around the world

2008-12-12 Thread Paolo Di Tommaso
Paolo Di Tommaso, Roma - IT

On Fri, Dec 12, 2008 at 3:40 PM, Steve Flasby st...@flasby.org wrote:

 Brit (actually a Yorkshireman) working in Zürich, Switzerland.



Re: [OT] wicket users around the world

2008-12-12 Thread Casper Bang
Work in Denmark, live in Canada (don't you just love technology?) and 
planning my strategy for converting my JSF-masochistic colleagues over 
to try Wicket. ;)


/Casper


Wadi Jalil Maluf wrote:

Argentinians working on wicket and mobile apps integration
Wadi

-Mensaje original-
De: Nino Saturnino Martinez Vazquez Wael [mailto:nino.marti...@jayway.dk] 
Enviado el: viernes, 12 de diciembre de 2008 5:48

Para: users@wicket.apache.org
Asunto: Re: [OT] wicket users around the world

Work in Denmark pimping wicket at every opportunity i get, lived all my 
life in Denmark, so half from Denmark and half from Spain :)


francisco treacy wrote:
  

to know a little bit more of our great (and vast) community, i was
just wondering if you're keen on sharing where you come from and/or
where you work with wicket...

for instance, here argentinian/belgian working with wicket in antibes,


france
  

francisco

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

  



  



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



Re: [OT] wicket users around the world

2008-12-12 Thread Steve Swinsburg

Even more off topic:

Despite popular belief, Koala's are not bears - both are mammals but  
only the Koala is a marsupial ;)


-steve



On 12 Dec 2008, at 14:35, trames wrote:



Toledo is nowhere near Australia or Austria although I think there  
are some
kangaroos hopping around in our great zoo - and a koala bear. Our  
symphony

orchestra plays a mean Mozart too!  :)



smime.p7s
Description: S/MIME cryptographic signature


Re: Modify textfield input before validation

2008-12-12 Thread Peter Ertl
Just because converter can convert 'from' and 'to' doesn't mean you  
can't use it for one direction only


Am 12.12.2008 um 13:01 schrieb pixologe:



seems to be igor's point of view, at least:
http://www.nabble.com/append-a-converter-or-coversion-function-td15921777.html#a15964449


Peter Ertl wrote:


I really wonder why converters are not the right thing to do?



--
View this message in context: 
http://www.nabble.com/Modify-textfield-input-before-validation-tp20952903p20974347.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: [OT] wicket users around the world

2008-12-12 Thread Anton Veretennikov
Krasnoyarsk, Russia
Started http://wicket.ru
Really love wicket

On Fri, Dec 12, 2008 at 1:57 AM, francisco treacy 
francisco.tre...@gmail.com wrote:

 to know a little bit more of our great (and vast) community, i was
 just wondering if you're keen on sharing where you come from and/or
 where you work with wicket...

 for instance, here argentinian/belgian working with wicket in antibes,
 france

 francisco

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




Re: [OT] wicket users around the world

2008-12-12 Thread Kevin Logue

Ireland  :-) . Counting down the minutes until its the weekend

francisco treacy wrote:

to know a little bit more of our great (and vast) community, i was
just wondering if you're keen on sharing where you come from and/or
where you work with wicket...

for instance, here argentinian/belgian working with wicket in antibes, france

francisco

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


__ Information from ESET NOD32 Antivirus, version of virus signature 
database 3685 (20081212) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




  



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



Setting a relevant value for radio buttons without using RadioChoice

2008-12-12 Thread ArchieC

Hi All

Im fairly new to wicket and Im going insane with an issue Im having. Ive
been doing a trawl of many forums, Wicket in action, Pro wicket, nabble,
asking questions of friendly people and trying every option I can think of
to work this out for myself using RadioChoice, RadioGroup and odd
combinations of both.

I promise Ive been trying to avoid asking this question on the forum cause
Im expecting someone to call me an idiot. So here is my question.

RadioChoice has the ability to set a value thats not the standard radio7
type value. As far as we (myself and the java developer I am working with)
can see, we cannot seem to do the same for a Radio component in a
RadioGroup. Are we barking up the wrong tree completely or is there a way to
set a value to an ID from our database (for example).

EG.
Instead of input type=radio name=group value=radio7 /

I get input type=radio name=group value=353 /  (353 being the
user_id of one of the accounts, set in option.getValue() - please see code
snippet below). 


Here is the reason we cant just use a RadioChoice. The list we are making
contains about 1000 User account names, each with a user level denoted by an
icon next to each name and radio button. RadioChoice doesnt give the option
of doing different icons (Label with IMG html in it for Icons) for each name
as setPrefix just sets one for the whole list. The list is basically acting
like a drop down box so that I can select one of the accounts for editing on
the next page.

Im really stumped by this as I cant seem to find any reference to setting
this value on a Radio component and I cant believe the creators of Wicket
would make a pointless component.

Here is my code if that helps

RadioGroup group=new RadioGroup(group, new Model(id));
final ArrayList SelectOptionLevel selectOptionLevel =
getDdcChoices();
ListView persons=new ListView(persons, selectOptionLevel) {
/**
 * 
 */
 private static final long serialVersionUID = 1L;
  

protected void populateItem(ListItem item) {
SelectOptionLevel option = (SelectOptionLevel)
item.getModelObject();

//Exampe of Icon  setting
item.add(new Label(levelImage,  img
src='images/icons/icon1.gif'/).setEscapeModelStrings(false));
 
Radio radio = new Radio(
radio, 
new PropertyModel(modelObject, user)  

~~ Need to set the value of the radio to


my option.getValue() value.
);
item.add(radio);
item.add(new Label(name, option.getLabel()));
}
};
group.add(persons);
add(group);

Apart from not getting a value it all looks great just as I want.
-- 
View this message in context: 
http://www.nabble.com/Setting-a-relevant-value-for-radio-buttons-without-using-RadioChoice-tp20978297p20978297.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: [OT] wicket users around the world

2008-12-12 Thread shetc

M...Bari -- great food! Will program Wicket for delicious Italian
seafood.



Bari,Italy. We're working with wicket since June :D

-- 
View this message in context: 
http://www.nabble.com/-OT--wicket-users-around-the-world-tp20962108p20978365.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Setting a relevant value for radio buttons without using RadioChoice

2008-12-12 Thread Nino Saturnino Martinez Vazquez Wael

Does'nt it use a choice renderer?

ArchieC wrote:

Hi All

Im fairly new to wicket and Im going insane with an issue Im having. Ive
been doing a trawl of many forums, Wicket in action, Pro wicket, nabble,
asking questions of friendly people and trying every option I can think of
to work this out for myself using RadioChoice, RadioGroup and odd
combinations of both.

I promise Ive been trying to avoid asking this question on the forum cause
Im expecting someone to call me an idiot. So here is my question.

RadioChoice has the ability to set a value thats not the standard radio7
type value. As far as we (myself and the java developer I am working with)
can see, we cannot seem to do the same for a Radio component in a
RadioGroup. Are we barking up the wrong tree completely or is there a way to
set a value to an ID from our database (for example).

EG.
Instead of input type=radio name=group value=radio7 /

I get input type=radio name=group value=353 /  (353 being the
user_id of one of the accounts, set in option.getValue() - please see code
snippet below). 



Here is the reason we cant just use a RadioChoice. The list we are making
contains about 1000 User account names, each with a user level denoted by an
icon next to each name and radio button. RadioChoice doesnt give the option
of doing different icons (Label with IMG html in it for Icons) for each name
as setPrefix just sets one for the whole list. The list is basically acting
like a drop down box so that I can select one of the accounts for editing on
the next page.

Im really stumped by this as I cant seem to find any reference to setting
this value on a Radio component and I cant believe the creators of Wicket
would make a pointless component.

Here is my code if that helps

RadioGroup group=new RadioGroup(group, new Model(id));
final ArrayList SelectOptionLevel selectOptionLevel =
getDdcChoices();
ListView persons=new ListView(persons, selectOptionLevel) {
/**
 * 
 */

 private static final long serialVersionUID = 1L;
  


protected void populateItem(ListItem item) {
SelectOptionLevel option = (SelectOptionLevel)
item.getModelObject();

//Exampe of Icon  setting

item.add(new Label(levelImage,  img
src='images/icons/icon1.gif'/).setEscapeModelStrings(false));
 
Radio radio = new Radio(
radio, 
new PropertyModel(modelObject, user)  
~~ Need to set the value of the radio to

my option.getValue() value.

);
item.add(radio);
item.add(new Label(name, option.getLabel()));
}
};
group.add(persons);
add(group);

Apart from not getting a value it all looks great just as I want.
  


--
-Wicket for love

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


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



Re: Setting a relevant value for radio buttons without using RadioChoice

2008-12-12 Thread ArchieC

Erm from looking at the docs, Both Radio and RadioGroup only have an Id and
an IModel in their constructor unlike RadioChoice which has a choice
renderer.


-- 
View this message in context: 
http://www.nabble.com/Setting-a-relevant-value-for-radio-buttons-without-using-RadioChoice-tp20978297p20978462.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Setting a relevant value for radio buttons without using RadioChoice

2008-12-12 Thread Nino Saturnino Martinez Vazquez Wael
Hmm it does'nt.. And you cant even overrride getValue() on radio since 
it's final... :( Come it, I posted something about the fact that radio 
uses autoIndex once regarding jmeter..


But you can override onComponentTag, I guess I'd probably roll my own 
and rip most from Radio, but let it take the optional choicerenderer..


Nino Saturnino Martinez Vazquez Wael wrote:

Does'nt it use a choice renderer?

ArchieC wrote:

Hi All

Im fairly new to wicket and Im going insane with an issue Im having. Ive
been doing a trawl of many forums, Wicket in action, Pro wicket, nabble,
asking questions of friendly people and trying every option I can 
think of

to work this out for myself using RadioChoice, RadioGroup and odd
combinations of both.

I promise Ive been trying to avoid asking this question on the forum 
cause

Im expecting someone to call me an idiot. So here is my question.

RadioChoice has the ability to set a value thats not the standard 
radio7
type value. As far as we (myself and the java developer I am working 
with)

can see, we cannot seem to do the same for a Radio component in a
RadioGroup. Are we barking up the wrong tree completely or is there a 
way to

set a value to an ID from our database (for example).

EG.
Instead of input type=radio name=group value=radio7 /

I get input type=radio name=group value=353 /  (353 being the
user_id of one of the accounts, set in option.getValue() - please see 
code

snippet below).

Here is the reason we cant just use a RadioChoice. The list we are 
making
contains about 1000 User account names, each with a user level 
denoted by an
icon next to each name and radio button. RadioChoice doesnt give the 
option
of doing different icons (Label with IMG html in it for Icons) for 
each name
as setPrefix just sets one for the whole list. The list is basically 
acting
like a drop down box so that I can select one of the accounts for 
editing on

the next page.

Im really stumped by this as I cant seem to find any reference to 
setting
this value on a Radio component and I cant believe the creators of 
Wicket

would make a pointless component.

Here is my code if that helps

RadioGroup group=new RadioGroup(group, new Model(id));
final ArrayList SelectOptionLevel selectOptionLevel =
getDdcChoices();
ListView persons=new ListView(persons, 
selectOptionLevel) {

/**
 *  */
 private static final long serialVersionUID = 1L;
 
protected void populateItem(ListItem item) {

SelectOptionLevel option = (SelectOptionLevel)
item.getModelObject();
//Exampe of Icon  setting
item.add(new Label(levelImage,  img
src='images/icons/icon1.gif'/).setEscapeModelStrings(false));
 Radio radio = new Radio(
radio, new 
PropertyModel(modelObject, user)  ~~ Need 
to set the value of the radio to

my option.getValue() value.

);
item.add(radio);
item.add(new Label(name, option.getLabel()));
}
};
group.add(persons);
add(group);

Apart from not getting a value it all looks great just as I want.
  




--
-Wicket for love

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


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



Re: [OT] wicket users around the world

2008-12-12 Thread Uwe Schäfer

Freiburg (Breisgau), Germany

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



Re: Setting a relevant value for radio buttons without using RadioChoice

2008-12-12 Thread Michael O'Cleirigh

Hi ArchieC,

The way RadioGroup works is that it renders to a hidden field and stores 
the selected value of the selected Radio.


i.e. the rendered markup is not that relevant and the model object for 
the selected radio will be placed into the model for the RadioGroup when 
the form submits.


This is how I've used it:

RadioGroup group = new RadioGroup (group, new Model());


Radio apple = new Radio (apple, new Model (Fruit.APPLE));

Radio orange = new Radio (orange, new Model (Fruit.ORANGE));


group.setModelObject (Fruit.APPLE);

Here by default the first radio is selected.

When the form submits group.getModelObject() will return either 
Fruit.APPLE or Fruit.ORANGE depending on the selected radio button


In your case the RadioGroup will have as its model Object the value of 
the selected radio.getModelObject() so whatever the value of user is 
coming from the PropertyModel() for the selected option.


Regards,

Mike




RadioGroup group=new RadioGroup(group, new Model(id));
final ArrayList SelectOptionLevel selectOptionLevel =
getDdcChoices();
ListView persons=new ListView(persons, selectOptionLevel) {
/**
 * 
 */

 private static final long serialVersionUID = 1L;
  


protected void populateItem(ListItem item) {
SelectOptionLevel option = (SelectOptionLevel)
item.getModelObject();

//Exampe of Icon  setting

item.add(new Label(levelImage,  img
src='images/icons/icon1.gif'/).setEscapeModelStrings(false));
 
Radio radio = new Radio(
radio, 
new PropertyModel(modelObject, user)  
~~ Need to set the value of the radio to

my option.getValue() value.

);
item.add(radio);
item.add(new Label(name, option.getLabel()));
}
};
group.add(persons);
add(group);

Apart from not getting a value it all looks great just as I want.
  



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



Re: SpringBeanLocator and @SpringBean performance issue

2008-12-12 Thread Igor Vaynberg
as far as i can see the problem is on the other side of the fence.
applicationcontext has much better metadata about its beans then we do
so it should be cached there as it can be done so properly.

if this is urgent we can build a temporary cache into
springbeanlocator, but its not the proper thing to do imho. if we
follow this logic then we can actually start caching bean references
as well and essentially build our own applicationcontext


-igor

On Thu, Dec 11, 2008 at 1:33 PM, leok leo...@gmail.com wrote:

 Hello,

 Our Wicket app makes use of the @SpringBean annotation thorughout our code,
 which is a pretty cool feature. While checking some thread stack traces
 during load testing, we found lots of threads bottlenecking in the
 SpringBeanLocator class:

 Object blocked: 145.133 ms, Object wait: 0 ms, CPU wait: 2.118 ms, I/O wait:
 9.017 ms, CPU: 73.847 ms

*
 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
 (DefaultSingletonBeanRegistry.java:180, bci=22, server compiler)
  o blocked on java.util.concurrent.ConcurrentHashMap
 (0x00cd67f9d170)
*
 org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch
 (AbstractBeanFactory.java:415, bci=41, server compiler)
*
 org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType
 (DefaultListableBeanFactory.java:223, bci=142, server compiler)
*
 org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType
 (DefaultListableBeanFactory.java:202, bci=4, server compiler)
*
 org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType
 (AbstractApplicationContext.java:933, bci=5, server compiler)
*
 org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors
 (BeanFactoryUtils.java:143, bci=8, server compiler)
* org.apache.wicket.spring.SpringBeanLocator.getBeanNameOfClass
 (SpringBeanLocator.java:104, bci=2, server compiler)
* org.apache.wicket.spring.SpringBeanLocator.getBeanName
 (SpringBeanLocator.java:192, bci=29, server compiler)
* org.apache.wicket.spring.SpringBeanLocator.isSingletonBean
 (SpringBeanLocator.java:133, bci=13, server compiler)
*
 org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFieldValue
 (AnnotProxyFieldValueFactory.java:90, bci=46, server compiler)
* org.apache.wicket.injection.Injector.inject (Injector.java:108,
 bci=87, server compiler)
* org.apache.wicket.injection.ConfigurableInjector.inject
 (ConfigurableInjector.java:39, bci=6, server compiler)
* org.apache.wicket.injection.ComponentInjector.onInstantiation
 (ComponentInjector.java:52, bci=5, server compiler)
* org.apache.wicket.Application.notifyComponentInstantiationListeners
 (Application.java:974, bci=20, server compiler)
* org.apache.wicket.Component.init (Component.java:873, bci=35, server
 compiler)
* org.apache.wicket.MarkupContainer.init (MarkupContainer.java:105,
 bci=2, server compiler)
* org.apache.wicket.markup.html.WebMarkupContainer.init
 (WebMarkupContainer.java:39, bci=2, server compiler)
*
 org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup.init
 (WebMarkupContainerWithAssociatedMarkup.java:42, bci=2, server compiler)
* org.apache.wicket.markup.html.panel.Panel.init (Panel.java:76,
 bci=2, server compiler)
 [...snip...]

 I found that if we specified a name in @SpringBean (e.g. @SpringBean(name =
 foo)), then we would avoid this bottlenecking and our requests per second
 improved 50-75%. It appears that the SpringBeanLocator.isSingletonBean()
 call will do an expensive lookup of the bean name against
 BeanFactoryUtils.beanNamesForTypeIncludingAncestors() if the name isn't
 specified, even if the bean is already cached. By specifying the @SpringBean
 name parameter, you avoid the lookup.

 This feels like a bug, though I don't know who to should address it, Wicket
 or Spring. Specifying a name in @SpringBean is optional, and the performance
 gain of a cache lookup of already-injected beans is consequently defeated by
 the isSingletonBean() call, which is called every single time a SpringBean
 is injected. This implies Wicket should be addressing it. OTOH, Spring
 BeanFactoryUtils.beanNamesForTypeIncludingAncestors() is clearly a
 bottleneck if called too frequently, though when I've found performance
 issues in Spring code (e.g. http://jira.springframework.org/browse/SPR-4505)
 they've implied that Wicket should have better bean caching (though they've
 fixed them anyway).

 So.. how would one go about addressing this problem? It's a big performance
 issue for those deploying a Wicket app using @SpringBean on multi-core
 systems. I'm able to hack around it in our app, but not knowing much about
 how Spring and Wicket should be interacting I'm not sure I can give an
 educated guess.

 Thanks,
 leo
 --
 View this message in context: 
 

Re: [OT] wicket users around the world

2008-12-12 Thread Juan Lagostena
Buenos Aires, Argentina


--- El vie 12-dic-08, Uwe Schäfer u...@thomas-daily.de escribió:

 De: Uwe Schäfer u...@thomas-daily.de
 Asunto: Re: [OT] wicket users around the world
 Para: users@wicket.apache.org
 Fecha: viernes, 12 de diciembre de 2008, 1:23 pm
 Freiburg (Breisgau), Germany
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail:
 users-h...@wicket.apache.org


  Yahoo! Cocina
Recetas prácticas y comida saludable
http://ar.mujer.yahoo.com/cocina/

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



Re: [OT] wicket users around the world

2008-12-12 Thread Tim Squires

Yorkshire, England

In the last year, I've developed Wicket applications for people in

Aurora, Ontario
London, England
Nashville, Tennessee
Almaty, Kazakhstan
and Harrogate, England

Because of this damn interweb thingy I don't actually get to go to these 
places :(


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



Re: Hot deployment / code swapping

2008-12-12 Thread Igor Vaynberg
wicket has never redeployed changes made to class files. this is
accomplished by the jvm when the app is ran in debug mode. changes to
.html and other resources such as .css are reflected if the
application is launched in development mode.

-igor

On Thu, Dec 11, 2008 at 11:03 PM,  s...@twinix.com wrote:
 See Thread at: http://www.techienuggets.com/Detail?tx=51475 Posted on behalf 
 of a User

 I also have the same problem. Even I added

 getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND);

 to WebApplication class.

 I am using wicket 1.3.4.

 Before Wicket come to Apache I never have this problem before.



 In Response To:


 Hi everybody,

 I have read in some older messages of this list that wicket by default takes
 care of re-deploying changed classes and HTML files, does that still apply?

 It does not work for me, not even with a fresh quickstart project. Neither
 HTML files nor Java classes are reloaded when they are changed.

 Are there any issues with this under certain circumstances (e.g. having
 vista ;-)?

 What I just did is this:



 mvn archetype:create -DarchetypeGroupId=org.apache.wicket
 -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.3.4
 -DgroupId=com.mycompany -DartifactId=myproject

 cd myproject

 mvn package

 mvn jetty:run

 [changed HomePage.class and HomePage.html]



 The changes do not have any effect until I restart jetty.

 Any hints on this issue are highly appreciated, thanks a lot in advance!
 --
 ... 
 http://www.nabble.com/Hot-deployment---code-swapping-tp19410295p19410295.html
 Sent from the Wicket - User mailing list archive at 


 -
 To unsubscribe, e-mail: users-no...@spam.com
 For additional commands, e-mail: users-no...@spam.com



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



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



Re: how to reuse a label in the same page?

2008-12-12 Thread Jeremy Thomerson
Martijn,
Actually, what I described does work - try this on any page:

JAVA (added only once - since you couldn't add two with the same ID anyway):
add(new Label(test, this is a test));

HTML:
span wicket:id=test[]/spanbr /
span wicket:id=test[]/spanbr /

OUTPUT:
span wicket:id=testthis is a test/spanbr /
span wicket:id=testthis is a test/spanbr /
Right or wrong, it currently works that way.  (1.4-SNAPSHOT - and I know
I've used it in past versions as well)
-- 
Jeremy Thomerson
http://www.wickettraining.com


On Fri, Dec 12, 2008 at 1:17 AM, Martijn Dashorst 
martijn.dasho...@gmail.com wrote:

 Nope, wicket:id is a 1-1 mapping at the same dom tree level. You can
 reuse id's at different levels or in different branches of the dom
 tree, but not as siblings.

 a href=# wicket:id=foospan wicket:id=foo/span/a works
 but another
 a href=# wicket:id=foo/a will fail (and rightfully so)

 Martijn

 On Fri, Dec 12, 2008 at 6:20 AM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
  I'm pretty sure that you can just add it once in Java and multiple times
 in
  the HTML, although I've never pondered the (potential) side-effects of
  this.  Give it a shot and let us know how it works for you.  With
 something
  as stateless / simple as a BookmarkablePageLink, there probably couldn't
 be
  much in the way of side-effects, although with very complex, stateful
  components, I could see that maybe there would be an issue... (maybe??)
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
  On Thu, Dec 11, 2008 at 3:29 PM, novotny novo...@gridsphere.org wrote:
 
 
 
  Basically I need two of the same links on the page, and it looks like I
  have
  to do this which just seems kinda lame...
 
  add(new BookmarkablePageLinkString(personaldetails,
  PersonalDetailsPage.class));
  add(new BookmarkablePageLinkString(personaldetails2,
  PersonalDetailsPage.class));
 
  
 
  Click Here
  Profile page
 
 
 
 
 
 
 
  jWeekend wrote:
  
   Jason,
  
   What are you trying to achieve?
  
   Here are some ideas that may give the desired effect, depending on
 what
   that is ...
  
   1 - Make a model for your data and give that to all the Label
 instances
  as
   required, (but each with their unique id and separate markup).
   2 - Use a repeater (like a ListView) to render several labels (no
   repetition of Java code or markup).
   3 - Write a method that takes a model (or just a String) and an id,
 that
   returns an appropriately configured Label instance  (saves on
 repeating
   Java code - still need markup per component and your own unique ids).
  
   Regards - Cemal
http://www.jWeekend.co.uk http://www.jweekend.co.uk/ 
 http://www.jweekend.co.uk/ jWeekend
  
  
  
   novotny wrote:
  
  
   I have a simple label hello and I want to display it twice in the
 same
   page, but wicket complains the wicket:id needs to be unique in my
   page what do I need to do, is there an alias or something?
  
   Thanks, Jason
  
  
  
 
  --
  View this message in context:
 
 http://www.nabble.com/how-to-reuse-a-label-in-the-same-page--tp20964351p20964551.html
   Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 



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

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




Re: Is wicket:extend strictly required if including entire html child?

2008-12-12 Thread Igor Vaynberg
no it is not. not including wicket:extend means the child wants to
completely override the markup of the parent.

-igor

On Fri, Dec 12, 2008 at 5:13 AM, Antony Stubbs antony.stu...@gmail.com wrote:

 Is it possible to use markup inheritance without having to use
 wicket:extend in the children? I'd like to be able to use MI without the
 children html knowing. Just extending the super component should be enough
 in a lot of situations. Particularly when extending panels which are naughty
 and don't have htmlbody tags, and dont have any html which shouldn't be
 in the result.

 I.e. can we have wicket default to simply effectively wrapping the entire
 html contents in wicket:extend if there is no extend tag?

 -
 ___

 http://stubbisms.wordpress.com http://stubbisms.wordpress.com
 --
 View this message in context: 
 http://www.nabble.com/Is-wicket%3Aextend-strictly-required-if-including-entire-html-child--tp20975395p20975395.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Case sensitivity and PackageRequestTargetUrlCodingStrategy

2008-12-12 Thread Jeremy Thomerson
One other thing - I think that the contract of IClassResolver would mean
that rather than returning null, you throw a ClassNotFoundException.

On Fri, Dec 12, 2008 at 8:24 AM, Matthew Hanlon mrhan...@gmail.com wrote:

 Great ideas, thanks for the input.  I agree on all points.  My initial
 implementation is certainly the naive approach, basically a proof of
 concept.  I'll look into what you mention in 4 and let you know what I find.



 On Fri, Dec 12, 2008 at 12:44 AM, Jeremy Thomerson 
 jer...@wickettraining.com wrote:

 Sounds like an interesting idea.  Here are a few thoughts I had after
 seeing it.  Hopefully these are helpful.

 1 - Say you had a page CustomerAdminLoginPage - this yields 4,194,304 
 combinations!
 Cache the result - either the class you found or the fact that you could not
 find a class.  (you will have 2 to the nth power, where n equals the length
 of the simple name)
 2 - DON'T use StringBuilder just to split it later - that's not what it's
 for!  It's very slow and is constantly resizing it's internal array.  You
 could use something like the code I pasted below to use a single array,
 initialized ahead of time to the proper size.

 3 - I would suggest not even holding an array of possible combos - longer
 class names take a ton of memory because of all the millions of strings
 created.  If you must go through all combos to try to find a match, just
 look for the match in your loop rather than looping to create an array of
 combos and then re-looping to try to find a match.

 4 - Now - I would suggest seeing if you can avoid looping through all
 possible combos altogether.  Look at how Wicket Annotations (in Wicket
 Stuff) does classpath scanning...  I would think that this would be much
 more efficient - scan the package ahead of time and find all classes in the
 package and cache their names.  Then just do a case-insensitive look into
 your cache - this saves you all the memory and processing trouble of ever
 computing all the combos and trying to load potentially millions of
 non-existent classes.

 5 - If you get this to work and work well, add it to wicketstuff-minis or
 a similar project where others can easily use it - let me know if you need
 help accomplishing that.


 Here's an example of an improved method of finding the combos - probably
 could still be improved considerably, but this is a significant improvement
 over your first rough draft.  (Although see point 4 - I recommend not even
 using this method at all)

 private static int capsCombinations(String[] combos, String word, int
 startIndex, int arrayIndex) {
 if (arrayIndex == 0) {
 word = word.toLowerCase();
 combos[arrayIndex++] = word;
 }
 if (arrayIndex == combos.length) {
 return arrayIndex;
 } else {
 while (startIndex  word.length()) {
 char[] chars = word.toCharArray();
 chars[startIndex] =
 Character.toUpperCase(chars[startIndex]);
 String string = String.valueOf(chars);
 combos[arrayIndex++] = string;
 arrayIndex = capsCombinations(combos, string,
 ++startIndex, arrayIndex);
 }
 return arrayIndex;
 }
 }

 public static void main(String[] args) throws Exception {
 long start = System.currentTimeMillis();
 String name = CustomerAdminLoginPage;
 String[] combos = new String[(int) Math.pow(2, name.length())];
 capsCombinations(combos, name, 0, 0);
 System.out.print(combos.length +  combos - took );
 System.out.print((System.currentTimeMillis() - start) +  millis -
 used );
 Runtime rt = Runtime.getRuntime();
 System.out.println((rt.totalMemory() / 1048576) + MB of memory);
 }

 --
 Jeremy Thomerson
 http://www.wickettraining.com


 On Thu, Dec 11, 2008 at 2:55 PM, Matthew Hanlon mrhan...@gmail.comwrote:

 I am looking for some feedback any may have on this:
 Let's say I've mounted a package com.company.package using
 PackageRequestTargetUrlCodingStrategy
 on /foo. So I have several pages, /foo/Bar, /foo/Baz, etc. Now, I want
 my
 page mounts to be case-insensitive in the case that a user has caps lock
 on
 or types in all lower case or whatever. For
 PackageRequestTargetUrlCodingStrategy this works for the /foo part, but
 not the classname part, obviously.

 So I implemented a CaseInsensitiveClassResolver that delegates to a
 DefaultClassResolver. In the case that the DefaultClassResolver cannot
 find
 the class, the CaseInsensitiveClassResolver tries to load the class by
 trying different combinations of upper/lower case in the classname. So,
 for
 bar it would try to resolve com.company.package.Bar, 
 com.company.package.bAr, com.company.package.baR, etc, obviously
 finding
 com.company.package.Bar and returning that class.

 This works pretty well. Now, obviously it's not the most efficient thing,
 possibly having to catch several
 

Re: [OT] wicket users around the world

2008-12-12 Thread francisco treacy
of course it is not necessary, it's just a bit of fresh air in a
technical mailing list. not a deal for me at all, because i'm using
gmail that groups mails in a conversation.

anyhow, fair point. we may now want to switch to frappr to express all
this information...

francisco


On Fri, Dec 12, 2008 at 5:52 PM, Thies Edeling th...@rrm.net wrote:
 Although it is quite interesting to see where everyone comes from, is this
 thread really necessary on an already busy mailing list ?

 francisco treacy wrote:

 to know a little bit more of our great (and vast) community, i was
 just wondering if you're keen on sharing where you come from and/or
 where you work with wicket...

 for instance, here argentinian/belgian working with wicket in antibes,
 france

 francisco

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




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



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



Re: NPE when wicket:link embedding input type=image src...

2008-12-12 Thread Jeremy Thomerson
Your ticket is already in JIRA as
https://issues.apache.org/jira/browse/WICKET-1513 - reported in April.  I
attached a patch to fix it last month.  Please close the ticket you just
opened, and instead, comment on and vote for WICKET-1513.

You can also apply the patch to a locally-built Wicket if you need to use it
right now.

Thanks!
-- 
Jeremy Thomerson
http://www.wickettraining.com


On Thu, Dec 11, 2008 at 8:00 AM, danielt daniel.te...@web.de wrote:


 okay, ticket is WICKET-1976
 https://issues.apache.org/jira/browse/WICKET-1976
 thanks, Tee


 Bruno Cesar Borges wrote:
 
  Please, submit a JIRA issue. Looks like a simple bug while parsing the
  content.
 
  PS: should now be the time to reconsider the idea of dropping
 wicket:link?
  :-)
 
  -Original Message-
  From: danielt [mailto:daniel.te...@web.de]
  Sent: Thursday, December 11, 2008 11:34 AM
  To: users@wicket.apache.org
  Subject: NPE when wicket:link embedding input type=image src...
 
 
 
  hi at all..
 
  works:
  wicket:link
 lt;img src=resources/prev.png
  /wicket:link
 
  doesn't work:
  wicket:link
 input type=image src=resources/prev.png /
  /wicket:link
 
  ErrorLog:
 
  WicketMessage: Exception in rendering component: [MarkupContainer
  [Component
  id = _link5]]
 
  Root cause:
 
  java.lang.NullPointerException
  at
 
 org.apache.wicket.markup.resolver.AutoLinkResolver$PathInfo.init(AutoLinkResolver.java:249)
  at
 
 org.apache.wicket.markup.resolver.AutoLinkResolver.resolveAutomaticLink(AutoLinkResolver.java:812)
  at
 
 org.apache.wicket.markup.resolver.AutoLinkResolver.resolve(AutoLinkResolver.java:747)
  at
 org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1324)
  at
 
 org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1476)
  at
 
 org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1401)
  at org.apache.wicket.Component.renderComponent(Component.java:2480)
  at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411)
  at org.apache.wicket.Component.render(Component.java:2317)
  at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:223)
  at
 
 org.apache.wicket.markup.resolver.WicketLinkResolver.resolve(WicketLinkResolver.java:73)
  at
 org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1324)
  at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1427)
  at org.apache.wicket.Page.onRender(Page.java:1470)
  at org.apache.wicket.Component.render(Component.java:2317)
  at org.apache.wicket.Page.renderPage(Page.java:904)
  at
 
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231)
  at
 
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
  at
 
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1181)
  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252)
  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
  at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
  at
  org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355)
  at
 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200)
  at
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at
 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
  at
 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  at
 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  at
 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
  at
 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  at
 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
  at
 
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  at
 
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
  at
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  at java.lang.Thread.run(Thread.java:619)
 
  bug or feature?
 
  thanks a lot and best regards,
  Tee
 
  --
  View this message in context:
 
 http://www.nabble.com/NPE-when-%3Cwicket%3Alink%3E-embedding-%3Cinput-type%3D%22image%22-src%22...%22%3E-tp20955539p20955539.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 ***
  Atenção: Esta mensagem foi enviada para uso exclusivo do(s)
  

Re: Modify textfield input before validation

2008-12-12 Thread pixologe

That's right - but if the devs regard this as abuse, there's no guarantee
that this still works in the next version. That's why I wondered what is the
intended way of doing stuff like this.
Obviously there is none :-/



Peter Ertl wrote:
 
 Just because converter can convert 'from' and 'to' doesn't mean you  
 can't use it for one direction only
 
 Am 12.12.2008 um 13:01 schrieb pixologe:
 

 seems to be igor's point of view, at least:
 http://www.nabble.com/append-a-converter-or-coversion-function-td15921777.html#a15964449


 Peter Ertl wrote:

 I really wonder why converters are not the right thing to do?


 -- 
 View this message in context:
 http://www.nabble.com/Modify-textfield-input-before-validation-tp20952903p20974347.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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

-- 
View this message in context: 
http://www.nabble.com/Modify-textfield-input-before-validation-tp20952903p20979572.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: NPE when wicket:link embedding input type=image src...

2008-12-12 Thread James Carman
I would also link the issues

On Fri, Dec 12, 2008 at 12:02 PM, Jeremy Thomerson
jer...@wickettraining.com wrote:
 Your ticket is already in JIRA as
 https://issues.apache.org/jira/browse/WICKET-1513 - reported in April.  I
 attached a patch to fix it last month.  Please close the ticket you just
 opened, and instead, comment on and vote for WICKET-1513.

 You can also apply the patch to a locally-built Wicket if you need to use it
 right now.

 Thanks!
 --
 Jeremy Thomerson
 http://www.wickettraining.com


 On Thu, Dec 11, 2008 at 8:00 AM, danielt daniel.te...@web.de wrote:


 okay, ticket is WICKET-1976
 https://issues.apache.org/jira/browse/WICKET-1976
 thanks, Tee


 Bruno Cesar Borges wrote:
 
  Please, submit a JIRA issue. Looks like a simple bug while parsing the
  content.
 
  PS: should now be the time to reconsider the idea of dropping
 wicket:link?
  :-)
 
  -Original Message-
  From: danielt [mailto:daniel.te...@web.de]
  Sent: Thursday, December 11, 2008 11:34 AM
  To: users@wicket.apache.org
  Subject: NPE when wicket:link embedding input type=image src...
 
 
 
  hi at all..
 
  works:
  wicket:link
 lt;img src=resources/prev.png
  /wicket:link
 
  doesn't work:
  wicket:link
 input type=image src=resources/prev.png /
  /wicket:link
 
  ErrorLog:
 
  WicketMessage: Exception in rendering component: [MarkupContainer
  [Component
  id = _link5]]
 
  Root cause:
 
  java.lang.NullPointerException
  at
 
 org.apache.wicket.markup.resolver.AutoLinkResolver$PathInfo.init(AutoLinkResolver.java:249)
  at
 
 org.apache.wicket.markup.resolver.AutoLinkResolver.resolveAutomaticLink(AutoLinkResolver.java:812)
  at
 
 org.apache.wicket.markup.resolver.AutoLinkResolver.resolve(AutoLinkResolver.java:747)
  at
 org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1324)
  at
 
 org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1476)
  at
 
 org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1401)
  at org.apache.wicket.Component.renderComponent(Component.java:2480)
  at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411)
  at org.apache.wicket.Component.render(Component.java:2317)
  at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:223)
  at
 
 org.apache.wicket.markup.resolver.WicketLinkResolver.resolve(WicketLinkResolver.java:73)
  at
 org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1324)
  at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1427)
  at org.apache.wicket.Page.onRender(Page.java:1470)
  at org.apache.wicket.Component.render(Component.java:2317)
  at org.apache.wicket.Page.renderPage(Page.java:904)
  at
 
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231)
  at
 
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
  at
 
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1181)
  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252)
  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
  at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
  at
  org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355)
  at
 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200)
  at
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at
 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
  at
 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  at
 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  at
 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
  at
 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  at
 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
  at
 
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  at
 
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
  at
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  at java.lang.Thread.run(Thread.java:619)
 
  bug or feature?
 
  thanks a lot and best regards,
  Tee
 
  --
  View this message in context:
 
 http://www.nabble.com/NPE-when-%3Cwicket%3Alink%3E-embedding-%3Cinput-type%3D%22image%22-src%22...%22%3E-tp20955539p20955539.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

Re: SpringBeanLocator and @SpringBean performance issue

2008-12-12 Thread leok

No, there's no rush here. We're able to hack around the problem effectively
in our own code. Thanks for your response!

leo


igor.vaynberg wrote:
 
 as far as i can see the problem is on the other side of the fence.
 applicationcontext has much better metadata about its beans then we do
 so it should be cached there as it can be done so properly.
 
 if this is urgent we can build a temporary cache into
 springbeanlocator, but its not the proper thing to do imho. if we
 follow this logic then we can actually start caching bean references
 as well and essentially build our own applicationcontext
 
 
 -igor
 
 On Thu, Dec 11, 2008 at 1:33 PM, leok leo...@gmail.com wrote:

 Hello,

 Our Wicket app makes use of the @SpringBean annotation thorughout our
 code,
 which is a pretty cool feature. While checking some thread stack traces
 during load testing, we found lots of threads bottlenecking in the
 SpringBeanLocator class:

 Object blocked: 145.133 ms, Object wait: 0 ms, CPU wait: 2.118 ms, I/O
 wait:
 9.017 ms, CPU: 73.847 ms

*
 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
 (DefaultSingletonBeanRegistry.java:180, bci=22, server compiler)
  o blocked on java.util.concurrent.ConcurrentHashMap
 (0x00cd67f9d170)
*
 org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch
 (AbstractBeanFactory.java:415, bci=41, server compiler)
*
 org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType
 (DefaultListableBeanFactory.java:223, bci=142, server compiler)
*
 org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType
 (DefaultListableBeanFactory.java:202, bci=4, server compiler)
*
 org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType
 (AbstractApplicationContext.java:933, bci=5, server compiler)
*
 org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors
 (BeanFactoryUtils.java:143, bci=8, server compiler)
* org.apache.wicket.spring.SpringBeanLocator.getBeanNameOfClass
 (SpringBeanLocator.java:104, bci=2, server compiler)
* org.apache.wicket.spring.SpringBeanLocator.getBeanName
 (SpringBeanLocator.java:192, bci=29, server compiler)
* org.apache.wicket.spring.SpringBeanLocator.isSingletonBean
 (SpringBeanLocator.java:133, bci=13, server compiler)
*
 org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFieldValue
 (AnnotProxyFieldValueFactory.java:90, bci=46, server compiler)
* org.apache.wicket.injection.Injector.inject (Injector.java:108,
 bci=87, server compiler)
* org.apache.wicket.injection.ConfigurableInjector.inject
 (ConfigurableInjector.java:39, bci=6, server compiler)
* org.apache.wicket.injection.ComponentInjector.onInstantiation
 (ComponentInjector.java:52, bci=5, server compiler)
* org.apache.wicket.Application.notifyComponentInstantiationListeners
 (Application.java:974, bci=20, server compiler)
* org.apache.wicket.Component.init (Component.java:873, bci=35,
 server
 compiler)
* org.apache.wicket.MarkupContainer.init (MarkupContainer.java:105,
 bci=2, server compiler)
* org.apache.wicket.markup.html.WebMarkupContainer.init
 (WebMarkupContainer.java:39, bci=2, server compiler)
*
 org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup.init
 (WebMarkupContainerWithAssociatedMarkup.java:42, bci=2, server compiler)
* org.apache.wicket.markup.html.panel.Panel.init (Panel.java:76,
 bci=2, server compiler)
 [...snip...]

 I found that if we specified a name in @SpringBean (e.g. @SpringBean(name
 =
 foo)), then we would avoid this bottlenecking and our requests per
 second
 improved 50-75%. It appears that the SpringBeanLocator.isSingletonBean()
 call will do an expensive lookup of the bean name against
 BeanFactoryUtils.beanNamesForTypeIncludingAncestors() if the name isn't
 specified, even if the bean is already cached. By specifying the
 @SpringBean
 name parameter, you avoid the lookup.

 This feels like a bug, though I don't know who to should address it,
 Wicket
 or Spring. Specifying a name in @SpringBean is optional, and the
 performance
 gain of a cache lookup of already-injected beans is consequently defeated
 by
 the isSingletonBean() call, which is called every single time a
 SpringBean
 is injected. This implies Wicket should be addressing it. OTOH, Spring
 BeanFactoryUtils.beanNamesForTypeIncludingAncestors() is clearly a
 bottleneck if called too frequently, though when I've found performance
 issues in Spring code (e.g.
 http://jira.springframework.org/browse/SPR-4505)
 they've implied that Wicket should have better bean caching (though
 they've
 fixed them anyway).

 So.. how would one go about addressing this problem? It's a big
 performance
 issue for those deploying a Wicket app using @SpringBean on multi-core
 systems. I'm able to hack around it in our app, but not knowing much
 about
 how Spring 

Re: NPE when wicket:link embedding input type=image src...

2008-12-12 Thread Jeremy Thomerson
Good catch - I just did it since I still had them open.

On Fri, Dec 12, 2008 at 11:07 AM, James Carman jcar...@carmanconsulting.com
 wrote:

 I would also link the issues

 On Fri, Dec 12, 2008 at 12:02 PM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
  Your ticket is already in JIRA as
  https://issues.apache.org/jira/browse/WICKET-1513 - reported in April.
  I
  attached a patch to fix it last month.  Please close the ticket you just
  opened, and instead, comment on and vote for WICKET-1513.
 
  You can also apply the patch to a locally-built Wicket if you need to use
 it
  right now.
 
  Thanks!
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
  On Thu, Dec 11, 2008 at 8:00 AM, danielt daniel.te...@web.de wrote:
 
 
  okay, ticket is WICKET-1976
  https://issues.apache.org/jira/browse/WICKET-1976
  thanks, Tee
 
 
  Bruno Cesar Borges wrote:
  
   Please, submit a JIRA issue. Looks like a simple bug while parsing the
   content.
  
   PS: should now be the time to reconsider the idea of dropping
  wicket:link?
   :-)
  
   -Original Message-
   From: danielt [mailto:daniel.te...@web.de]
   Sent: Thursday, December 11, 2008 11:34 AM
   To: users@wicket.apache.org
   Subject: NPE when wicket:link embedding input type=image
 src...
  
  
  
   hi at all..
  
   works:
   wicket:link
  lt;img src=resources/prev.png
   /wicket:link
  
   doesn't work:
   wicket:link
  input type=image src=resources/prev.png /
   /wicket:link
  
   ErrorLog:
  
   WicketMessage: Exception in rendering component: [MarkupContainer
   [Component
   id = _link5]]
  
   Root cause:
  
   java.lang.NullPointerException
   at
  
 
 org.apache.wicket.markup.resolver.AutoLinkResolver$PathInfo.init(AutoLinkResolver.java:249)
   at
  
 
 org.apache.wicket.markup.resolver.AutoLinkResolver.resolveAutomaticLink(AutoLinkResolver.java:812)
   at
  
 
 org.apache.wicket.markup.resolver.AutoLinkResolver.resolve(AutoLinkResolver.java:747)
   at
  org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1324)
   at
  
 
 org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1476)
   at
  
 
 org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1401)
   at org.apache.wicket.Component.renderComponent(Component.java:2480)
   at
 org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411)
   at org.apache.wicket.Component.render(Component.java:2317)
   at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:223)
   at
  
 
 org.apache.wicket.markup.resolver.WicketLinkResolver.resolve(WicketLinkResolver.java:73)
   at
  org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1324)
   at
 org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1427)
   at org.apache.wicket.Page.onRender(Page.java:1470)
   at org.apache.wicket.Component.render(Component.java:2317)
   at org.apache.wicket.Page.renderPage(Page.java:904)
   at
  
 
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231)
   at
  
 
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
   at
  
 
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1181)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
   at
  
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355)
   at
  
 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200)
   at
  
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at
  
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at
  
 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
   at
  
 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
   at
  
 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   at
  
 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
   at
  
 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at
  
 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
   at
  
 
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
   at
  
 
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
   at
  org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   at java.lang.Thread.run(Thread.java:619)
  
   bug or feature?
  
   thanks a lot and best regards,
   Tee
  
   --
   View this message in context:
  
 
 http://www.nabble.com/NPE-when-%3Cwicket%3Alink%3E-embedding-%3Cinput-type%3D%22image%22-src%22...%22%3E-tp20955539p20955539.html
   

Re: CryptedUrlWebRequestCodingStrategy/Session invalidate with Wicket 1.3.5

2008-12-12 Thread francisco treacy
have a look and see if Problem with Crypted URL thread helps.

francisco

On Fri, Dec 12, 2008 at 12:12 AM, Timm Helbig
timm.hel...@th-hosting.net wrote:
 Hello everyone,

 For logout from the Application I use the following Code.

getSession().invalidate();
setResponsePage(LoginPage.class);
getRequestCycle().setRedirect(true);

 When using CryptedUrlWebRequestCodingStrategy the above will not work and runs
 into a RuntimeException (WicketMessage: Invalid URL Root cause: Invalid URL).

 The Log says:

org.apache.wicket.WicketRuntimeException: Unable to decrypt the text 
 'garbled
 text here'
 at
 org.apache.wicket.util.crypt.AbstractCrypt.decryptByteArray(AbstractCrypt.java:145)
at
 org.apache.wicket.util.crypt.AbstractCrypt.decryptUrlSafe(AbstractCrypt.java:67)
at
 org.apache.wicket.protocol.http.request.CryptedUrlWebRequestCodingStrategy.decodeURL(CryptedUrlWebRequestCodingStrategy.java:250)
at
 org.apache.wicket.protocol.http.request.CryptedUrlWebRequestCodingStrategy.decode(CryptedUrlWebRequestCodingStrategy.java:98)
at org.apache.wicket.Request.getRequestParameters(Request.java:171)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1233)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
 ... many more.

 This worked fine with any Wicket 1.3.x release, but not 1.3.5.

 Did I missed a change here?

 Regards,
 Timm

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



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



Ajax response not completed

2008-12-12 Thread Emanuele Gesuato

Hi there,

I'm sorry for sending two email the same day, but i've got a problem 
that is very strange for me. I'm using wicket 1.3.4 with the patch 
WICKET-1838 provided by Matej Knopp and i'm testing the page on firefox 
3.0.4.


When i click on an ajax link that generates a pdf, the file correctly 
shows to the user but the mouse is in waiting state and in the ajax 
debug window i've got ajax blocked in invoking pre-call handler.

Here the log:

INFO: Using XMLHttpRequest transport
INFO:
INFO: Initiating Ajax GET request on 
?wicket:interface=:3:table::IActivePageBehaviorListener:3:amp;wicket:ignoreIfNotActive=trueaction=StampatargetId=tablecontextMenuId=menurandom=0.7506497972643358

INFO: Invoking pre-call handler(s)...


When i click on the ajax link the following code is executed:
...

PageParameters params = new PageParameters();
params.add(file, /home/eg/test.pdf);
setResponsePage(FakePageForAjaxPrint.class, params);
...


The FakePageForAjaxPrint is an empty page mounted on a specific 
QueryStringUrlCodingStrategy that in the decode method does the following:



public IRequestTarget decode(RequestParameters requestParameters) {
	String filename = ((String[]) 
requestParameters.getParameters().get(file))[0];


final File file = new File(filename);
IResourceStream resourceStream = new FileResourceStream(file);

	ResourceStreamRequestTarget rsrt = new 
ResourceStreamRequestTarget(resourceStream) {

@Override
public String getFileName() {
return file.getName();
}
};
try {
resourceStream.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return rsrt;
}


So, when the link is clicked the pdf is showed in the download window of 
the browser, but the ajax is blocked in Invoking pre-call 
handler(s)... and the mouse pointer is in loading state.
I can click as many times i want in the ajax link and the pdf is always 
showed to the user.


How can i complete the ajax response ?


Sorry for the long email,
Thanks,
Emanuele



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



Re: how to reuse a label in the same page?

2008-12-12 Thread Martijn Dashorst
Now run your application in virgin development mode. The fact that we
disable the component use check in production mode doesn't make it
less evil.

Martijn

On Fri, Dec 12, 2008 at 5:56 PM, Jeremy Thomerson
jer...@wickettraining.com wrote:
 Martijn,
 Actually, what I described does work - try this on any page:

 JAVA (added only once - since you couldn't add two with the same ID anyway):
 add(new Label(test, this is a test));

 HTML:
 span wicket:id=test[]/spanbr /
 span wicket:id=test[]/spanbr /

 OUTPUT:
 span wicket:id=testthis is a test/spanbr /
 span wicket:id=testthis is a test/spanbr /
 Right or wrong, it currently works that way.  (1.4-SNAPSHOT - and I know
 I've used it in past versions as well)
 --
 Jeremy Thomerson
 http://www.wickettraining.com


 On Fri, Dec 12, 2008 at 1:17 AM, Martijn Dashorst 
 martijn.dasho...@gmail.com wrote:

 Nope, wicket:id is a 1-1 mapping at the same dom tree level. You can
 reuse id's at different levels or in different branches of the dom
 tree, but not as siblings.

 a href=# wicket:id=foospan wicket:id=foo/span/a works
 but another
 a href=# wicket:id=foo/a will fail (and rightfully so)

 Martijn

 On Fri, Dec 12, 2008 at 6:20 AM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
  I'm pretty sure that you can just add it once in Java and multiple times
 in
  the HTML, although I've never pondered the (potential) side-effects of
  this.  Give it a shot and let us know how it works for you.  With
 something
  as stateless / simple as a BookmarkablePageLink, there probably couldn't
 be
  much in the way of side-effects, although with very complex, stateful
  components, I could see that maybe there would be an issue... (maybe??)
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
  On Thu, Dec 11, 2008 at 3:29 PM, novotny novo...@gridsphere.org wrote:
 
 
 
  Basically I need two of the same links on the page, and it looks like I
  have
  to do this which just seems kinda lame...
 
  add(new BookmarkablePageLinkString(personaldetails,
  PersonalDetailsPage.class));
  add(new BookmarkablePageLinkString(personaldetails2,
  PersonalDetailsPage.class));
 
  
 
  Click Here
  Profile page
 
 
 
 
 
 
 
  jWeekend wrote:
  
   Jason,
  
   What are you trying to achieve?
  
   Here are some ideas that may give the desired effect, depending on
 what
   that is ...
  
   1 - Make a model for your data and give that to all the Label
 instances
  as
   required, (but each with their unique id and separate markup).
   2 - Use a repeater (like a ListView) to render several labels (no
   repetition of Java code or markup).
   3 - Write a method that takes a model (or just a String) and an id,
 that
   returns an appropriately configured Label instance  (saves on
 repeating
   Java code - still need markup per component and your own unique ids).
  
   Regards - Cemal
http://www.jWeekend.co.uk http://www.jweekend.co.uk/ 
 http://www.jweekend.co.uk/ jWeekend
  
  
  
   novotny wrote:
  
  
   I have a simple label hello and I want to display it twice in the
 same
   page, but wicket complains the wicket:id needs to be unique in my
   page what do I need to do, is there an alias or something?
  
   Thanks, Jason
  
  
  
 
  --
  View this message in context:
 
 http://www.nabble.com/how-to-reuse-a-label-in-the-same-page--tp20964351p20964551.html
   Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 



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

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






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

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



Re: how to reuse a label in the same page?

2008-12-12 Thread Jeremy Thomerson
Oops - you are right there - the component use check was turned off in this
app (I just threw the example into an existing app to test it).

While I don't typically use this, or have this use case, I'm not clear on
what is fundamentally wrong with this - you have a component you want two
places in a page or panel, etc...  So, why mustyou create two duplicate
components?  That seems more wrong than the former.

-- 
Jeremy Thomerson
http://www.wickettraining.com


On Fri, Dec 12, 2008 at 11:23 AM, Martijn Dashorst 
martijn.dasho...@gmail.com wrote:

 Now run your application in virgin development mode. The fact that we
 disable the component use check in production mode doesn't make it
 less evil.

 Martijn

 On Fri, Dec 12, 2008 at 5:56 PM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
  Martijn,
  Actually, what I described does work - try this on any page:
 
  JAVA (added only once - since you couldn't add two with the same ID
 anyway):
  add(new Label(test, this is a test));
 
  HTML:
  span wicket:id=test[]/spanbr /
  span wicket:id=test[]/spanbr /
 
  OUTPUT:
  span wicket:id=testthis is a test/spanbr /
  span wicket:id=testthis is a test/spanbr /
  Right or wrong, it currently works that way.  (1.4-SNAPSHOT - and I know
  I've used it in past versions as well)
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
  On Fri, Dec 12, 2008 at 1:17 AM, Martijn Dashorst 
  martijn.dasho...@gmail.com wrote:
 
  Nope, wicket:id is a 1-1 mapping at the same dom tree level. You can
  reuse id's at different levels or in different branches of the dom
  tree, but not as siblings.
 
  a href=# wicket:id=foospan wicket:id=foo/span/a works
  but another
  a href=# wicket:id=foo/a will fail (and rightfully so)
 
  Martijn
 
  On Fri, Dec 12, 2008 at 6:20 AM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
   I'm pretty sure that you can just add it once in Java and multiple
 times
  in
   the HTML, although I've never pondered the (potential) side-effects of
   this.  Give it a shot and let us know how it works for you.  With
  something
   as stateless / simple as a BookmarkablePageLink, there probably
 couldn't
  be
   much in the way of side-effects, although with very complex, stateful
   components, I could see that maybe there would be an issue...
 (maybe??)
   --
   Jeremy Thomerson
   http://www.wickettraining.com
  
  
   On Thu, Dec 11, 2008 at 3:29 PM, novotny novo...@gridsphere.org
 wrote:
  
  
  
   Basically I need two of the same links on the page, and it looks like
 I
   have
   to do this which just seems kinda lame...
  
   add(new BookmarkablePageLinkString(personaldetails,
   PersonalDetailsPage.class));
   add(new BookmarkablePageLinkString(personaldetails2,
   PersonalDetailsPage.class));
  
   
  
   Click Here
   Profile page
  
  
  
  
  
  
  
   jWeekend wrote:
   
Jason,
   
What are you trying to achieve?
   
Here are some ideas that may give the desired effect, depending on
  what
that is ...
   
1 - Make a model for your data and give that to all the Label
  instances
   as
required, (but each with their unique id and separate markup).
2 - Use a repeater (like a ListView) to render several labels (no
repetition of Java code or markup).
3 - Write a method that takes a model (or just a String) and an id,
  that
returns an appropriately configured Label instance  (saves on
  repeating
Java code - still need markup per component and your own unique
 ids).
   
Regards - Cemal
 http://www.jWeekend.co.uk http://www.jweekend.co.uk/ 
 http://www.jweekend.co.uk/ 
  http://www.jweekend.co.uk/ jWeekend
   
   
   
novotny wrote:
   
   
I have a simple label hello and I want to display it twice in
 the
  same
page, but wicket complains the wicket:id needs to be unique in my
page what do I need to do, is there an alias or something?
   
Thanks, Jason
   
   
   
  
   --
   View this message in context:
  
 
 http://www.nabble.com/how-to-reuse-a-label-in-the-same-page--tp20964351p20964551.html
Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
 
 
 
  --
  Become a Wicket expert, learn from the best: http://wicketinaction.com
  Apache Wicket 1.3.4 is released
  Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 



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

 -
 To 

RE: how to reuse a label in the same page?

2008-12-12 Thread Bruno Cesar Borges
Really, if we think about the DOM tree and XMLs, we'll see that it is possible 
to put some information in different places, but that information is declared 
only once.

Wicket works with XHTML (XML over HTML). So why not support this? If one 
decides to refer to a component declared in another piece of the html, and 
duplicate that (html) code, it is possible to do it anyway, with Javascript. 

-Original Message-
From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
Sent: Friday, December 12, 2008 3:35 PM
To: users@wicket.apache.org
Subject: Re: how to reuse a label in the same page?


Oops - you are right there - the component use check was turned off in this
app (I just threw the example into an existing app to test it).

While I don't typically use this, or have this use case, I'm not clear on
what is fundamentally wrong with this - you have a component you want two
places in a page or panel, etc...  So, why mustyou create two duplicate
components?  That seems more wrong than the former.

-- 
Jeremy Thomerson
http://www.wickettraining.com


On Fri, Dec 12, 2008 at 11:23 AM, Martijn Dashorst 
martijn.dasho...@gmail.com wrote:

 Now run your application in virgin development mode. The fact that we
 disable the component use check in production mode doesn't make it
 less evil.

 Martijn

 On Fri, Dec 12, 2008 at 5:56 PM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
  Martijn,
  Actually, what I described does work - try this on any page:
 
  JAVA (added only once - since you couldn't add two with the same ID
 anyway):
  add(new Label(test, this is a test));
 
  HTML:
  span wicket:id=test[]/spanbr /
  span wicket:id=test[]/spanbr /
 
  OUTPUT:
  span wicket:id=testthis is a test/spanbr /
  span wicket:id=testthis is a test/spanbr /
  Right or wrong, it currently works that way.  (1.4-SNAPSHOT - and I know
  I've used it in past versions as well)
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
  On Fri, Dec 12, 2008 at 1:17 AM, Martijn Dashorst 
  martijn.dasho...@gmail.com wrote:
 
  Nope, wicket:id is a 1-1 mapping at the same dom tree level. You can
  reuse id's at different levels or in different branches of the dom
  tree, but not as siblings.
 
  a href=# wicket:id=foospan wicket:id=foo/span/a works
  but another
  a href=# wicket:id=foo/a will fail (and rightfully so)
 
  Martijn
 
  On Fri, Dec 12, 2008 at 6:20 AM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
   I'm pretty sure that you can just add it once in Java and multiple
 times
  in
   the HTML, although I've never pondered the (potential) side-effects of
   this.  Give it a shot and let us know how it works for you.  With
  something
   as stateless / simple as a BookmarkablePageLink, there probably
 couldn't
  be
   much in the way of side-effects, although with very complex, stateful
   components, I could see that maybe there would be an issue...
 (maybe??)
   --
   Jeremy Thomerson
   http://www.wickettraining.com
  
  
   On Thu, Dec 11, 2008 at 3:29 PM, novotny novo...@gridsphere.org
 wrote:
  
  
  
   Basically I need two of the same links on the page, and it looks like
 I
   have
   to do this which just seems kinda lame...
  
   add(new BookmarkablePageLinkString(personaldetails,
   PersonalDetailsPage.class));
   add(new BookmarkablePageLinkString(personaldetails2,
   PersonalDetailsPage.class));
  
   
  
   Click Here
   Profile page
  
  
  
  
  
  
  
   jWeekend wrote:
   
Jason,
   
What are you trying to achieve?
   
Here are some ideas that may give the desired effect, depending on
  what
that is ...
   
1 - Make a model for your data and give that to all the Label
  instances
   as
required, (but each with their unique id and separate markup).
2 - Use a repeater (like a ListView) to render several labels (no
repetition of Java code or markup).
3 - Write a method that takes a model (or just a String) and an id,
  that
returns an appropriately configured Label instance  (saves on
  repeating
Java code - still need markup per component and your own unique
 ids).
   
Regards - Cemal
 http://www.jWeekend.co.uk http://www.jweekend.co.uk/ 
 http://www.jweekend.co.uk/ 
  http://www.jweekend.co.uk/ jWeekend
   
   
   
novotny wrote:
   
   
I have a simple label hello and I want to display it twice in
 the
  same
page, but wicket complains the wicket:id needs to be unique in my
page what do I need to do, is there an alias or something?
   
Thanks, Jason
   
   
   
  
   --
   View this message in context:
  
 
 http://www.nabble.com/how-to-reuse-a-label-in-the-same-page--tp20964351p20964551.html
Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
 
 
 
  --
  Become a Wicket 

DropDownChoice with Model for data and HashMap of key/values

2008-12-12 Thread Steve Swinsburg


Hi all,

I've been over all the DDC examples but am still stumped by this one.  
I have a model (pojo) which holds user preferences, the preference for  
each item being an Integer.

ie

public class UserPreferences {

int preferenceOne;
int preferenceTwo

constructor

getters and setters for the ints above

}

I now want to render a form that has a DDC for each of the preferences  
in my model. The list of choices that needs to go into the DDC should  
come from a HashMap or similar (in reality it will come from a  
database) because I want to store the number attached to the item  
selected, not the display string.


ie
LinkedHashMap choices = new LinkedHashMap()
choices.put(43, Something);
choices.put(64, Something else);
choices.put(87, blah);

which should render the select list as:

select name=preferenceOne
option value=43Choice Something/option
option value=64Choice Something else/option
option value=87blah/option
select

When clicking submit, the value (ie 43) should be attached to the  
relevant item in the Model (ie preferenceOne would be 43), then I can  
save it to the database.


Everything I've tried with ChoiceRenderer etc seems to get mixed up  
with the different data models etc.


Can someone please present a snippet of code on how to do this, I'm at  
my wits end. I cannot for the life of me find any explicit info  
separating the models/data as above.




thanks,
Steve



smime.p7s
Description: S/MIME cryptographic signature


Re: Setting a relevant value for radio buttons without using RadioChoice

2008-12-12 Thread Nino Saturnino Martinez Vazquez Wael

Hi Michael

I believe that this is not what Archie asked about, he wanted to place 
database id's in the value of the radios.. Dont know why he wanted to 
though... I might have gotten it wrongly though..


regards Nino

Michael O'Cleirigh wrote:

Hi ArchieC,

The way RadioGroup works is that it renders to a hidden field and 
stores the selected value of the selected Radio.


i.e. the rendered markup is not that relevant and the model object for 
the selected radio will be placed into the model for the RadioGroup 
when the form submits.


This is how I've used it:

RadioGroup group = new RadioGroup (group, new Model());


Radio apple = new Radio (apple, new Model (Fruit.APPLE));

Radio orange = new Radio (orange, new Model (Fruit.ORANGE));


group.setModelObject (Fruit.APPLE);

Here by default the first radio is selected.

When the form submits group.getModelObject() will return either 
Fruit.APPLE or Fruit.ORANGE depending on the selected radio button


In your case the RadioGroup will have as its model Object the value of 
the selected radio.getModelObject() so whatever the value of user is 
coming from the PropertyModel() for the selected option.


Regards,

Mike




RadioGroup group=new RadioGroup(group, new Model(id));
final ArrayList SelectOptionLevel selectOptionLevel =
getDdcChoices();
ListView persons=new ListView(persons, 
selectOptionLevel) {

/**
 *  */
 private static final long serialVersionUID = 1L;
 
protected void populateItem(ListItem item) {

SelectOptionLevel option = (SelectOptionLevel)
item.getModelObject();
//Exampe of Icon  setting
item.add(new Label(levelImage,  img
src='images/icons/icon1.gif'/).setEscapeModelStrings(false));
 Radio radio = new Radio(
radio, new 
PropertyModel(modelObject, user)  ~~ Need 
to set the value of the radio to

my option.getValue() value.

);
item.add(radio);
item.add(new Label(name, option.getLabel()));
}
};
group.add(persons);
add(group);

Apart from not getting a value it all looks great just as I want.
  



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



--
-Wicket for love

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


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



Re: how to reuse a label in the same page?

2008-12-12 Thread Igor Vaynberg
what happens once you add a behavior that uses markup id? or even call
setoutputmarkupid(true) on that component?

-igor

On Fri, Dec 12, 2008 at 9:35 AM, Jeremy Thomerson
jer...@wickettraining.com wrote:
 Oops - you are right there - the component use check was turned off in this
 app (I just threw the example into an existing app to test it).

 While I don't typically use this, or have this use case, I'm not clear on
 what is fundamentally wrong with this - you have a component you want two
 places in a page or panel, etc...  So, why mustyou create two duplicate
 components?  That seems more wrong than the former.

 --
 Jeremy Thomerson
 http://www.wickettraining.com


 On Fri, Dec 12, 2008 at 11:23 AM, Martijn Dashorst 
 martijn.dasho...@gmail.com wrote:

 Now run your application in virgin development mode. The fact that we
 disable the component use check in production mode doesn't make it
 less evil.

 Martijn

 On Fri, Dec 12, 2008 at 5:56 PM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
  Martijn,
  Actually, what I described does work - try this on any page:
 
  JAVA (added only once - since you couldn't add two with the same ID
 anyway):
  add(new Label(test, this is a test));
 
  HTML:
  span wicket:id=test[]/spanbr /
  span wicket:id=test[]/spanbr /
 
  OUTPUT:
  span wicket:id=testthis is a test/spanbr /
  span wicket:id=testthis is a test/spanbr /
  Right or wrong, it currently works that way.  (1.4-SNAPSHOT - and I know
  I've used it in past versions as well)
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
  On Fri, Dec 12, 2008 at 1:17 AM, Martijn Dashorst 
  martijn.dasho...@gmail.com wrote:
 
  Nope, wicket:id is a 1-1 mapping at the same dom tree level. You can
  reuse id's at different levels or in different branches of the dom
  tree, but not as siblings.
 
  a href=# wicket:id=foospan wicket:id=foo/span/a works
  but another
  a href=# wicket:id=foo/a will fail (and rightfully so)
 
  Martijn
 
  On Fri, Dec 12, 2008 at 6:20 AM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
   I'm pretty sure that you can just add it once in Java and multiple
 times
  in
   the HTML, although I've never pondered the (potential) side-effects of
   this.  Give it a shot and let us know how it works for you.  With
  something
   as stateless / simple as a BookmarkablePageLink, there probably
 couldn't
  be
   much in the way of side-effects, although with very complex, stateful
   components, I could see that maybe there would be an issue...
 (maybe??)
   --
   Jeremy Thomerson
   http://www.wickettraining.com
  
  
   On Thu, Dec 11, 2008 at 3:29 PM, novotny novo...@gridsphere.org
 wrote:
  
  
  
   Basically I need two of the same links on the page, and it looks like
 I
   have
   to do this which just seems kinda lame...
  
   add(new BookmarkablePageLinkString(personaldetails,
   PersonalDetailsPage.class));
   add(new BookmarkablePageLinkString(personaldetails2,
   PersonalDetailsPage.class));
  
   
  
   Click Here
   Profile page
  
  
  
  
  
  
  
   jWeekend wrote:
   
Jason,
   
What are you trying to achieve?
   
Here are some ideas that may give the desired effect, depending on
  what
that is ...
   
1 - Make a model for your data and give that to all the Label
  instances
   as
required, (but each with their unique id and separate markup).
2 - Use a repeater (like a ListView) to render several labels (no
repetition of Java code or markup).
3 - Write a method that takes a model (or just a String) and an id,
  that
returns an appropriately configured Label instance  (saves on
  repeating
Java code - still need markup per component and your own unique
 ids).
   
Regards - Cemal
 http://www.jWeekend.co.uk http://www.jweekend.co.uk/ 
 http://www.jweekend.co.uk/ 
  http://www.jweekend.co.uk/ jWeekend
   
   
   
novotny wrote:
   
   
I have a simple label hello and I want to display it twice in
 the
  same
page, but wicket complains the wicket:id needs to be unique in my
page what do I need to do, is there an alias or something?
   
Thanks, Jason
   
   
   
  
   --
   View this message in context:
  
 
 http://www.nabble.com/how-to-reuse-a-label-in-the-same-page--tp20964351p20964551.html
Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
 
 
 
  --
  Become a Wicket expert, learn from the best: http://wicketinaction.com
  Apache Wicket 1.3.4 is released
  Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 



 --
  Become a Wicket expert, 

Re: DropDownChoice with Model for data and HashMap of key/values

2008-12-12 Thread Igor Vaynberg
new ichoicerendererinteger() {
Object getDisplayValue(integer object) {
  return choices.get((integer)object);
}

String getIdValue(integer object, int index) {
  return object.tostring();
}
}

-igor


On Fri, Dec 12, 2008 at 9:46 AM, Steve Swinsburg
s.swinsb...@lancaster.ac.uk wrote:

 Hi all,

 I've been over all the DDC examples but am still stumped by this one. I have
 a model (pojo) which holds user preferences, the preference for each item
 being an Integer.
 ie

 public class UserPreferences {

 int preferenceOne;
 int preferenceTwo

 constructor

 getters and setters for the ints above

 }

 I now want to render a form that has a DDC for each of the preferences in my
 model. The list of choices that needs to go into the DDC should come from a
 HashMap or similar (in reality it will come from a database) because I want
 to store the number attached to the item selected, not the display string.

 ie
 LinkedHashMap choices = new LinkedHashMap()
 choices.put(43, Something);
 choices.put(64, Something else);
 choices.put(87, blah);

 which should render the select list as:

 select name=preferenceOne
 option value=43Choice Something/option
 option value=64Choice Something else/option
 option value=87blah/option
 select

 When clicking submit, the value (ie 43) should be attached to the relevant
 item in the Model (ie preferenceOne would be 43), then I can save it to the
 database.

 Everything I've tried with ChoiceRenderer etc seems to get mixed up with the
 different data models etc.

 Can someone please present a snippet of code on how to do this, I'm at my
 wits end. I cannot for the life of me find any explicit info separating the
 models/data as above.



 thanks,
 Steve



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



extra 'onclick' is generated for an image wrapped by a link

2008-12-12 Thread Trent Larson
I have the following plain HTML where I want an image to be a link to
another Wicket-managed page:

wicket:linka href=ProductPage.htmlimg
src=../images/products_welcome.jpg border=0/a/wicket:link


The link for that page is generated fine, but then Wicket adds an 'onclick'
event to the 'img' tag that takes the user directly to the image:

wicket:linka
href=?wicket:bookmarkablePage=:com.max.web.page.ProductPageimg
src=../images/products_welcome.jpg border=0
onclick=window.location.href='../images/products_welcome.jpg';return
false;/a/wicket:link

This seems absolutely wrong.  The result is that a click on the image will
take users to directly to that image; sometimes it will then continue on to
the right (ProductPage) page, so users see the image by itself before going
to the right page, but often it just stops at the image.

There is no Java code associated with this.  I get it in 1.4-rc1 (as well as
1.4-m3).

What is happening, and how can I stop it from generating the 'onclick'
javascript?  Thanks!

Trent


Re: how to reuse a label in the same page?

2008-12-12 Thread Igor Vaynberg
what do we return from getmarkupid() because that is what the code
uses to output that markupid for the javascript that needs to
manipulate the dom nodes.

-igor

On Fri, Dec 12, 2008 at 10:28 AM, Bruno Cesar Borges
brunobor...@cetip.com.br wrote:
 I'm pretty sure it is possible to register all markup IDs generated to 
 referenced nodes.

 new Label(foo, Foo);

 div wicket:id=fooddd/div
 div wicket:ref=fooagain/div

 outputs:
 div id=foo0Foo/div
 div id=foo1Foo/div

 Then it would be possible to do, for instance, an Ajax update over all nodes.



 -Original Message-
 From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
 Sent: Friday, December 12, 2008 4:11 PM
 To: users@wicket.apache.org
 Subject: Re: how to reuse a label in the same page?


 what happens once you add a behavior that uses markup id? or even call
 setoutputmarkupid(true) on that component?

 -igor

 On Fri, Dec 12, 2008 at 9:35 AM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
 Oops - you are right there - the component use check was turned off in this
 app (I just threw the example into an existing app to test it).

 While I don't typically use this, or have this use case, I'm not clear on
 what is fundamentally wrong with this - you have a component you want two
 places in a page or panel, etc...  So, why mustyou create two duplicate
 components?  That seems more wrong than the former.

 --
 Jeremy Thomerson
 http://www.wickettraining.com


 On Fri, Dec 12, 2008 at 11:23 AM, Martijn Dashorst 
 martijn.dasho...@gmail.com wrote:

 Now run your application in virgin development mode. The fact that we
 disable the component use check in production mode doesn't make it
 less evil.

 Martijn

 On Fri, Dec 12, 2008 at 5:56 PM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
  Martijn,
  Actually, what I described does work - try this on any page:
 
  JAVA (added only once - since you couldn't add two with the same ID
 anyway):
  add(new Label(test, this is a test));
 
  HTML:
  span wicket:id=test[]/spanbr /
  span wicket:id=test[]/spanbr /
 
  OUTPUT:
  span wicket:id=testthis is a test/spanbr /
  span wicket:id=testthis is a test/spanbr /
  Right or wrong, it currently works that way.  (1.4-SNAPSHOT - and I know
  I've used it in past versions as well)
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
  On Fri, Dec 12, 2008 at 1:17 AM, Martijn Dashorst 
  martijn.dasho...@gmail.com wrote:
 
  Nope, wicket:id is a 1-1 mapping at the same dom tree level. You can
  reuse id's at different levels or in different branches of the dom
  tree, but not as siblings.
 
  a href=# wicket:id=foospan wicket:id=foo/span/a works
  but another
  a href=# wicket:id=foo/a will fail (and rightfully so)
 
  Martijn
 
  On Fri, Dec 12, 2008 at 6:20 AM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
   I'm pretty sure that you can just add it once in Java and multiple
 times
  in
   the HTML, although I've never pondered the (potential) side-effects of
   this.  Give it a shot and let us know how it works for you.  With
  something
   as stateless / simple as a BookmarkablePageLink, there probably
 couldn't
  be
   much in the way of side-effects, although with very complex, stateful
   components, I could see that maybe there would be an issue...
 (maybe??)
   --
   Jeremy Thomerson
   http://www.wickettraining.com
  
  
   On Thu, Dec 11, 2008 at 3:29 PM, novotny novo...@gridsphere.org
 wrote:
  
  
  
   Basically I need two of the same links on the page, and it looks like
 I
   have
   to do this which just seems kinda lame...
  
   add(new BookmarkablePageLinkString(personaldetails,
   PersonalDetailsPage.class));
   add(new BookmarkablePageLinkString(personaldetails2,
   PersonalDetailsPage.class));
  
   
  
   Click Here
   Profile page
  
  
  
  
  
  
  
   jWeekend wrote:
   
Jason,
   
What are you trying to achieve?
   
Here are some ideas that may give the desired effect, depending on
  what
that is ...
   
1 - Make a model for your data and give that to all the Label
  instances
   as
required, (but each with their unique id and separate markup).
2 - Use a repeater (like a ListView) to render several labels (no
repetition of Java code or markup).
3 - Write a method that takes a model (or just a String) and an id,
  that
returns an appropriately configured Label instance  (saves on
  repeating
Java code - still need markup per component and your own unique
 ids).
   
Regards - Cemal
 http://www.jWeekend.co.uk http://www.jweekend.co.uk/ 
 http://www.jweekend.co.uk/ 
  http://www.jweekend.co.uk/ jWeekend
   
   
   
novotny wrote:
   
   
I have a simple label hello and I want to display it twice in
 the
  same
page, but wicket complains the wicket:id needs to be unique in my
page what do I need to do, is there an alias or something?
   
Thanks, Jason
   
   
   
  
   --
   View this message in context:
  
 
 

Re: DropDownChoice with Model for data and HashMap of key/values

2008-12-12 Thread Steve Swinsburg

Thanks.

I now have this:


IModel dropDownModel = new Model() {

protected Object load() {

preferences.put(0, some choice);
preferences.put(1, some other choice);
preferences.put(2, and another choice);

return  preferences; //get the HashMap
}
};


DropDownChoice profileChoice = new DropDownChoice(profile,  
dropDownModel, new IChoiceRenderer() {


public String getDisplayValue(Object object) {
return  preferences.get(object);
}

public String getIdValue(Object object, int index) {
return object.toString();
}

});

where my Form is given a CompoundPropertyModel with one of the  
parameters being profile. But, I'm getting an error about my choices  
being null.


java.lang.NullPointerException: List of choices is null - Was the  
supplied 'Choices' model empty?



I can feel I'm close but what have I missed?




cheers,
Steve






On 12 Dec 2008, at 18:14, Igor Vaynberg wrote:


new ichoicerendererinteger() {
Object getDisplayValue(integer object) {
 return choices.get((integer)object);
}

String getIdValue(integer object, int index) {
 return object.tostring();
}
}

-igor


On Fri, Dec 12, 2008 at 9:46 AM, Steve Swinsburg
s.swinsb...@lancaster.ac.uk wrote:


Hi all,

I've been over all the DDC examples but am still stumped by this  
one. I have
a model (pojo) which holds user preferences, the preference for  
each item

being an Integer.
ie

public class UserPreferences {

int preferenceOne;
int preferenceTwo

constructor

getters and setters for the ints above

}

I now want to render a form that has a DDC for each of the  
preferences in my
model. The list of choices that needs to go into the DDC should  
come from a
HashMap or similar (in reality it will come from a database)  
because I want
to store the number attached to the item selected, not the display  
string.


ie
LinkedHashMap choices = new LinkedHashMap()
choices.put(43, Something);
choices.put(64, Something else);
choices.put(87, blah);

which should render the select list as:

select name=preferenceOne
option value=43Choice Something/option
option value=64Choice Something else/option
option value=87blah/option
select

When clicking submit, the value (ie 43) should be attached to the  
relevant
item in the Model (ie preferenceOne would be 43), then I can save  
it to the

database.

Everything I've tried with ChoiceRenderer etc seems to get mixed up  
with the

different data models etc.

Can someone please present a snippet of code on how to do this, I'm  
at my
wits end. I cannot for the life of me find any explicit info  
separating the

models/data as above.



thanks,
Steve




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





smime.p7s
Description: S/MIME cryptographic signature


IOptionRenderer vs IChioceRenderer in Wicket 1.4M1

2008-12-12 Thread Stefan Lindner
The definition of IOptionRenderer is

Interface IOptionRendererT
java.lang.String getDisplayValue(java.lang.Object
object)  

the definition of IChoiceRenderer is

Interface IChoiceRendererT
java.lang.Object getDisplayValue(T object)  

Why is the parameter getDisplayValue method of IOptionRenderer and
Object and not of Type T? Will this change until 1.4.0?

Stefan

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



RE: how to reuse a label in the same page?

2008-12-12 Thread Bruno Cesar Borges
It could continue to return foo. But when processing ajax responses, 
wicket:ref will register, through Javascript, the references to foo, somehow. 
So this approach wouldn't break any code.

-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
Sent: Friday, December 12, 2008 4:35 PM
To: users@wicket.apache.org
Subject: Re: how to reuse a label in the same page?


what do we return from getmarkupid() because that is what the code
uses to output that markupid for the javascript that needs to
manipulate the dom nodes.

-igor

On Fri, Dec 12, 2008 at 10:28 AM, Bruno Cesar Borges
brunobor...@cetip.com.br wrote:
 I'm pretty sure it is possible to register all markup IDs generated to 
 referenced nodes.

 new Label(foo, Foo);

 div wicket:id=fooddd/div
 div wicket:ref=fooagain/div

 outputs:
 div id=foo0Foo/div
 div id=foo1Foo/div

 Then it would be possible to do, for instance, an Ajax update over all nodes.



 -Original Message-
 From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
 Sent: Friday, December 12, 2008 4:11 PM
 To: users@wicket.apache.org
 Subject: Re: how to reuse a label in the same page?


 what happens once you add a behavior that uses markup id? or even call
 setoutputmarkupid(true) on that component?

 -igor

 On Fri, Dec 12, 2008 at 9:35 AM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
 Oops - you are right there - the component use check was turned off in this
 app (I just threw the example into an existing app to test it).

 While I don't typically use this, or have this use case, I'm not clear on
 what is fundamentally wrong with this - you have a component you want two
 places in a page or panel, etc...  So, why mustyou create two duplicate
 components?  That seems more wrong than the former.

 --
 Jeremy Thomerson
 http://www.wickettraining.com


 On Fri, Dec 12, 2008 at 11:23 AM, Martijn Dashorst 
 martijn.dasho...@gmail.com wrote:

 Now run your application in virgin development mode. The fact that we
 disable the component use check in production mode doesn't make it
 less evil.

 Martijn

 On Fri, Dec 12, 2008 at 5:56 PM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
  Martijn,
  Actually, what I described does work - try this on any page:
 
  JAVA (added only once - since you couldn't add two with the same ID
 anyway):
  add(new Label(test, this is a test));
 
  HTML:
  span wicket:id=test[]/spanbr /
  span wicket:id=test[]/spanbr /
 
  OUTPUT:
  span wicket:id=testthis is a test/spanbr /
  span wicket:id=testthis is a test/spanbr /
  Right or wrong, it currently works that way.  (1.4-SNAPSHOT - and I know
  I've used it in past versions as well)
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
  On Fri, Dec 12, 2008 at 1:17 AM, Martijn Dashorst 
  martijn.dasho...@gmail.com wrote:
 
  Nope, wicket:id is a 1-1 mapping at the same dom tree level. You can
  reuse id's at different levels or in different branches of the dom
  tree, but not as siblings.
 
  a href=# wicket:id=foospan wicket:id=foo/span/a works
  but another
  a href=# wicket:id=foo/a will fail (and rightfully so)
 
  Martijn
 
  On Fri, Dec 12, 2008 at 6:20 AM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
   I'm pretty sure that you can just add it once in Java and multiple
 times
  in
   the HTML, although I've never pondered the (potential) side-effects of
   this.  Give it a shot and let us know how it works for you.  With
  something
   as stateless / simple as a BookmarkablePageLink, there probably
 couldn't
  be
   much in the way of side-effects, although with very complex, stateful
   components, I could see that maybe there would be an issue...
 (maybe??)
   --
   Jeremy Thomerson
   http://www.wickettraining.com
  
  
   On Thu, Dec 11, 2008 at 3:29 PM, novotny novo...@gridsphere.org
 wrote:
  
  
  
   Basically I need two of the same links on the page, and it looks like
 I
   have
   to do this which just seems kinda lame...
  
   add(new BookmarkablePageLinkString(personaldetails,
   PersonalDetailsPage.class));
   add(new BookmarkablePageLinkString(personaldetails2,
   PersonalDetailsPage.class));
  
   
  
   Click Here
   Profile page
  
  
  
  
  
  
  
   jWeekend wrote:
   
Jason,
   
What are you trying to achieve?
   
Here are some ideas that may give the desired effect, depending on
  what
that is ...
   
1 - Make a model for your data and give that to all the Label
  instances
   as
required, (but each with their unique id and separate markup).
2 - Use a repeater (like a ListView) to render several labels (no
repetition of Java code or markup).
3 - Write a method that takes a model (or just a String) and an id,
  that
returns an appropriately configured Label instance  (saves on
  repeating
Java code - still need markup per component and your own unique
 ids).
   
Regards - Cemal
 http://www.jWeekend.co.uk http://www.jweekend.co.uk/ 
 http://www.jweekend.co.uk/ 
  

RE: how to reuse a label in the same page?

2008-12-12 Thread Bruno Cesar Borges
One more thing: the Server-side will not know about foo1 (references to 
'foo'). Instead, this would be controled from the javascript, client-side.

-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
Sent: Friday, December 12, 2008 4:35 PM
To: users@wicket.apache.org
Subject: Re: how to reuse a label in the same page?


what do we return from getmarkupid() because that is what the code
uses to output that markupid for the javascript that needs to
manipulate the dom nodes.

-igor

On Fri, Dec 12, 2008 at 10:28 AM, Bruno Cesar Borges
brunobor...@cetip.com.br wrote:
 I'm pretty sure it is possible to register all markup IDs generated to 
 referenced nodes.

 new Label(foo, Foo);

 div wicket:id=fooddd/div
 div wicket:ref=fooagain/div

 outputs:
 div id=foo0Foo/div
 div id=foo1Foo/div

 Then it would be possible to do, for instance, an Ajax update over all nodes.



 -Original Message-
 From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
 Sent: Friday, December 12, 2008 4:11 PM
 To: users@wicket.apache.org
 Subject: Re: how to reuse a label in the same page?


 what happens once you add a behavior that uses markup id? or even call
 setoutputmarkupid(true) on that component?

 -igor

 On Fri, Dec 12, 2008 at 9:35 AM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
 Oops - you are right there - the component use check was turned off in this
 app (I just threw the example into an existing app to test it).

 While I don't typically use this, or have this use case, I'm not clear on
 what is fundamentally wrong with this - you have a component you want two
 places in a page or panel, etc...  So, why mustyou create two duplicate
 components?  That seems more wrong than the former.

 --
 Jeremy Thomerson
 http://www.wickettraining.com


 On Fri, Dec 12, 2008 at 11:23 AM, Martijn Dashorst 
 martijn.dasho...@gmail.com wrote:

 Now run your application in virgin development mode. The fact that we
 disable the component use check in production mode doesn't make it
 less evil.

 Martijn

 On Fri, Dec 12, 2008 at 5:56 PM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
  Martijn,
  Actually, what I described does work - try this on any page:
 
  JAVA (added only once - since you couldn't add two with the same ID
 anyway):
  add(new Label(test, this is a test));
 
  HTML:
  span wicket:id=test[]/spanbr /
  span wicket:id=test[]/spanbr /
 
  OUTPUT:
  span wicket:id=testthis is a test/spanbr /
  span wicket:id=testthis is a test/spanbr /
  Right or wrong, it currently works that way.  (1.4-SNAPSHOT - and I know
  I've used it in past versions as well)
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
  On Fri, Dec 12, 2008 at 1:17 AM, Martijn Dashorst 
  martijn.dasho...@gmail.com wrote:
 
  Nope, wicket:id is a 1-1 mapping at the same dom tree level. You can
  reuse id's at different levels or in different branches of the dom
  tree, but not as siblings.
 
  a href=# wicket:id=foospan wicket:id=foo/span/a works
  but another
  a href=# wicket:id=foo/a will fail (and rightfully so)
 
  Martijn
 
  On Fri, Dec 12, 2008 at 6:20 AM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
   I'm pretty sure that you can just add it once in Java and multiple
 times
  in
   the HTML, although I've never pondered the (potential) side-effects of
   this.  Give it a shot and let us know how it works for you.  With
  something
   as stateless / simple as a BookmarkablePageLink, there probably
 couldn't
  be
   much in the way of side-effects, although with very complex, stateful
   components, I could see that maybe there would be an issue...
 (maybe??)
   --
   Jeremy Thomerson
   http://www.wickettraining.com
  
  
   On Thu, Dec 11, 2008 at 3:29 PM, novotny novo...@gridsphere.org
 wrote:
  
  
  
   Basically I need two of the same links on the page, and it looks like
 I
   have
   to do this which just seems kinda lame...
  
   add(new BookmarkablePageLinkString(personaldetails,
   PersonalDetailsPage.class));
   add(new BookmarkablePageLinkString(personaldetails2,
   PersonalDetailsPage.class));
  
   
  
   Click Here
   Profile page
  
  
  
  
  
  
  
   jWeekend wrote:
   
Jason,
   
What are you trying to achieve?
   
Here are some ideas that may give the desired effect, depending on
  what
that is ...
   
1 - Make a model for your data and give that to all the Label
  instances
   as
required, (but each with their unique id and separate markup).
2 - Use a repeater (like a ListView) to render several labels (no
repetition of Java code or markup).
3 - Write a method that takes a model (or just a String) and an id,
  that
returns an appropriately configured Label instance  (saves on
  repeating
Java code - still need markup per component and your own unique
 ids).
   
Regards - Cemal
 http://www.jWeekend.co.uk http://www.jweekend.co.uk/ 
 http://www.jweekend.co.uk/ 
  http://www.jweekend.co.uk/ jWeekend
   
   
   
  

Re: DropDownChoice with Model for data and HashMap of key/values

2008-12-12 Thread Igor Vaynberg
that map needs to be in the choicerenderer. your domain model type is
integer, ddcinteger looks like this:

dropdownchoice(string id, imodelinteger model, imodellistinteger
choices, ichoicerendererinteger renderer)

-igor

On Fri, Dec 12, 2008 at 10:36 AM, Steve Swinsburg
s.swinsb...@lancaster.ac.uk wrote:
 Thanks.
 I now have this:

 IModel dropDownModel = new Model() {

 protected Object load() {

 preferences.put(0, some choice);
 preferences.put(1, some other choice);
 preferences.put(2, and another choice);

 return  preferences; //get the HashMap
 }
 };

 DropDownChoice profileChoice = new DropDownChoice(profile, dropDownModel,
 new IChoiceRenderer() {



 public String getDisplayValue(Object object) {
 return  preferences.get(object);
 }
 public String getIdValue(Object object, int index) {
 return object.toString();
 }
 });
 where my Form is given a CompoundPropertyModel with one of the parameters
 being profile. But, I'm getting an error about my choices being null.
 java.lang.NullPointerException: List of choices is null - Was the supplied
 'Choices' model empty?


 I can feel I'm close but what have I missed?



 cheers,
 Steve





 On 12 Dec 2008, at 18:14, Igor Vaynberg wrote:

 new ichoicerendererinteger() {
 Object getDisplayValue(integer object) {
  return choices.get((integer)object);
 }

 String getIdValue(integer object, int index) {
  return object.tostring();
 }
 }

 -igor


 On Fri, Dec 12, 2008 at 9:46 AM, Steve Swinsburg
 s.swinsb...@lancaster.ac.uk wrote:

 Hi all,

 I've been over all the DDC examples but am still stumped by this one. I have

 a model (pojo) which holds user preferences, the preference for each item

 being an Integer.

 ie

 public class UserPreferences {

 int preferenceOne;

 int preferenceTwo

 constructor

 getters and setters for the ints above

 }

 I now want to render a form that has a DDC for each of the preferences in my

 model. The list of choices that needs to go into the DDC should come from a

 HashMap or similar (in reality it will come from a database) because I want

 to store the number attached to the item selected, not the display string.

 ie

 LinkedHashMap choices = new LinkedHashMap()

 choices.put(43, Something);

 choices.put(64, Something else);

 choices.put(87, blah);

 which should render the select list as:

 select name=preferenceOne

 option value=43Choice Something/option

 option value=64Choice Something else/option

 option value=87blah/option

 select

 When clicking submit, the value (ie 43) should be attached to the relevant

 item in the Model (ie preferenceOne would be 43), then I can save it to the

 database.

 Everything I've tried with ChoiceRenderer etc seems to get mixed up with the

 different data models etc.

 Can someone please present a snippet of code on how to do this, I'm at my

 wits end. I cannot for the life of me find any explicit info separating the

 models/data as above.



 thanks,

 Steve



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




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



Re: how to reuse a label in the same page?

2008-12-12 Thread Igor Vaynberg
huh? so if i have a behavior that does:

response.write(getElementById('+getMarkupId()+').style.display='none';);

how does that work???

-igor

On Fri, Dec 12, 2008 at 10:38 AM, Bruno Cesar Borges
brunobor...@cetip.com.br wrote:
 It could continue to return foo. But when processing ajax responses, 
 wicket:ref will register, through Javascript, the references to foo, 
 somehow. So this approach wouldn't break any code.

 -Original Message-
 From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
 Sent: Friday, December 12, 2008 4:35 PM
 To: users@wicket.apache.org
 Subject: Re: how to reuse a label in the same page?


 what do we return from getmarkupid() because that is what the code
 uses to output that markupid for the javascript that needs to
 manipulate the dom nodes.

 -igor

 On Fri, Dec 12, 2008 at 10:28 AM, Bruno Cesar Borges
 brunobor...@cetip.com.br wrote:
 I'm pretty sure it is possible to register all markup IDs generated to 
 referenced nodes.

 new Label(foo, Foo);

 div wicket:id=fooddd/div
 div wicket:ref=fooagain/div

 outputs:
 div id=foo0Foo/div
 div id=foo1Foo/div

 Then it would be possible to do, for instance, an Ajax update over all nodes.



 -Original Message-
 From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
 Sent: Friday, December 12, 2008 4:11 PM
 To: users@wicket.apache.org
 Subject: Re: how to reuse a label in the same page?


 what happens once you add a behavior that uses markup id? or even call
 setoutputmarkupid(true) on that component?

 -igor

 On Fri, Dec 12, 2008 at 9:35 AM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
 Oops - you are right there - the component use check was turned off in this
 app (I just threw the example into an existing app to test it).

 While I don't typically use this, or have this use case, I'm not clear on
 what is fundamentally wrong with this - you have a component you want two
 places in a page or panel, etc...  So, why mustyou create two duplicate
 components?  That seems more wrong than the former.

 --
 Jeremy Thomerson
 http://www.wickettraining.com


 On Fri, Dec 12, 2008 at 11:23 AM, Martijn Dashorst 
 martijn.dasho...@gmail.com wrote:

 Now run your application in virgin development mode. The fact that we
 disable the component use check in production mode doesn't make it
 less evil.

 Martijn

 On Fri, Dec 12, 2008 at 5:56 PM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
  Martijn,
  Actually, what I described does work - try this on any page:
 
  JAVA (added only once - since you couldn't add two with the same ID
 anyway):
  add(new Label(test, this is a test));
 
  HTML:
  span wicket:id=test[]/spanbr /
  span wicket:id=test[]/spanbr /
 
  OUTPUT:
  span wicket:id=testthis is a test/spanbr /
  span wicket:id=testthis is a test/spanbr /
  Right or wrong, it currently works that way.  (1.4-SNAPSHOT - and I know
  I've used it in past versions as well)
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
  On Fri, Dec 12, 2008 at 1:17 AM, Martijn Dashorst 
  martijn.dasho...@gmail.com wrote:
 
  Nope, wicket:id is a 1-1 mapping at the same dom tree level. You can
  reuse id's at different levels or in different branches of the dom
  tree, but not as siblings.
 
  a href=# wicket:id=foospan wicket:id=foo/span/a works
  but another
  a href=# wicket:id=foo/a will fail (and rightfully so)
 
  Martijn
 
  On Fri, Dec 12, 2008 at 6:20 AM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
   I'm pretty sure that you can just add it once in Java and multiple
 times
  in
   the HTML, although I've never pondered the (potential) side-effects of
   this.  Give it a shot and let us know how it works for you.  With
  something
   as stateless / simple as a BookmarkablePageLink, there probably
 couldn't
  be
   much in the way of side-effects, although with very complex, stateful
   components, I could see that maybe there would be an issue...
 (maybe??)
   --
   Jeremy Thomerson
   http://www.wickettraining.com
  
  
   On Thu, Dec 11, 2008 at 3:29 PM, novotny novo...@gridsphere.org
 wrote:
  
  
  
   Basically I need two of the same links on the page, and it looks like
 I
   have
   to do this which just seems kinda lame...
  
   add(new BookmarkablePageLinkString(personaldetails,
   PersonalDetailsPage.class));
   add(new BookmarkablePageLinkString(personaldetails2,
   PersonalDetailsPage.class));
  
   
  
   Click Here
   Profile page
  
  
  
  
  
  
  
   jWeekend wrote:
   
Jason,
   
What are you trying to achieve?
   
Here are some ideas that may give the desired effect, depending on
  what
that is ...
   
1 - Make a model for your data and give that to all the Label
  instances
   as
required, (but each with their unique id and separate markup).
2 - Use a repeater (like a ListView) to render several labels (no
repetition of Java code or markup).
3 - Write a method that takes a model (or just a String) and an id,
  that
returns an appropriately 

Re: What is your experience on the time of development ?

2008-12-12 Thread Marcelo Morales
Hello

I worked on a JSF project last year. This year I worked on a wicket
project. Both were approximately the same size and complexity.

Granted. You learn from experience. The second time around you do
something (or something quite similar), you do it much, much better.
AND I had previous experience with JSF (Nearly two years worth) and
not with Wicket.
AND I had good expertise on HTML/JavaScript, which I could leverage on
Wicket, but not on JSF.

It took half the time.

I truly believe that JSF was meant to sell tools to developers,
whereas wicket seems more from programmer to programmer you
know... pragmatic. I am yet to see how the new application performs on
production. But, as far as I see, I am about to become a Wicket
advocate.

I think I am seeing the light.

On Fri, Dec 12, 2008 at 5:55 AM, Martin Sachs sachs.mar...@gmail.com wrote:

 I'm looking for a little comparison of the development-time for Applications
 in Wicket against other Technologies.


 I think the development with Wicket is two times faster than Struts. But
 what are your experiences on JSF, Rails/Grails, SpringMVC/SpringWebFlow.

 Anyone you know the development-time from experience ?


 (P.S.: The applications must use AJAX and many custom components or tags in
 JSP, not just a hello world sample)
 --
 View this message in context: 
 http://www.nabble.com/What-is-your-experience-on-the-time-of-development---tp20971605p20971605.html
 Sent from the Wicket - User mailing list archive at Nabble.com.




-- 
Marcelo Morales

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



Re: Setting a relevant value for radio buttons without using RadioChoice

2008-12-12 Thread Michael O'Cleirigh

Hi Nino,



I believe that this is not what Archie asked about, he wanted to place 
database id's in the value of the radios.. Dont know why he wanted to 
though... I might have gotten it wrongly though..


You're right that he wanted to use the database id but from his example 
there didn't seem to be any client side use of this information.   My 
thinking is that he renders a list of users denoted by radio buttons and 
he want to encode the user id (for a LDM?) as the value for use on the 
form submission processing (i.e. which user to work with in the next stage).


Because there is no requirement for the user id on the client side there 
is no reason to care about the value used by the Radio as it is just 
used internally by RadioGroup to know which model object to use when the 
form is submitted.


There is no need for an IChoiceRenderer in this case because the Model 
object of each Radio is never rendered.


He should just encode what he needs in the Model of each Radio and 
expect to find it in the model of the RadioGroup when the form submits.


In his example:

RadioGroup group=new RadioGroup(group, new Model(id));
   final ArrayList SelectOptionLevel selectOptionLevel =
getDdcChoices();
   ListView persons=new ListView(persons, selectOptionLevel) {
   /**
*  */
private static final long serialVersionUID = 1L;
protected void populateItem(ListItem item) {
   SelectOptionLevel option = (SelectOptionLevel)
item.getModelObject();
   //Exampe of Icon  setting
   item.add(new Label(levelImage,  img
src='images/icons/icon1.gif'/).setEscapeModelStrings(false));
Radio radio = new Radio(
   radio, new 
Model(option.getValue())  // -- this is how to wire the Radio Model

   item.add(radio);
   item.add(new Label(name, option.getLabel()));
   }
   };
   group.add(persons);
   add(group);


This will make group.getModelObject() return the option.getValue() (i.e 
the user id) for the selected view item and allow him to proceed to the 
next step.


Regards,

Mike


RE: how to reuse a label in the same page?

2008-12-12 Thread Bruno Cesar Borges
Javascript could get all child references to that component (markupId), and 
apply that code to them as well.

In this case you submitted, the problem would be only with reaaally hacked 
code, like doing weird stuff with 'response' instead of using Behaviours. 

-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
Sent: Friday, December 12, 2008 4:41 PM
To: users@wicket.apache.org
Subject: Re: how to reuse a label in the same page?


huh? so if i have a behavior that does:

response.write(getElementById('+getMarkupId()+').style.display='none';);

how does that work???

-igor

On Fri, Dec 12, 2008 at 10:38 AM, Bruno Cesar Borges
brunobor...@cetip.com.br wrote:
 It could continue to return foo. But when processing ajax responses, 
 wicket:ref will register, through Javascript, the references to foo, 
 somehow. So this approach wouldn't break any code.

 -Original Message-
 From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
 Sent: Friday, December 12, 2008 4:35 PM
 To: users@wicket.apache.org
 Subject: Re: how to reuse a label in the same page?


 what do we return from getmarkupid() because that is what the code
 uses to output that markupid for the javascript that needs to
 manipulate the dom nodes.

 -igor

 On Fri, Dec 12, 2008 at 10:28 AM, Bruno Cesar Borges
 brunobor...@cetip.com.br wrote:
 I'm pretty sure it is possible to register all markup IDs generated to 
 referenced nodes.

 new Label(foo, Foo);

 div wicket:id=fooddd/div
 div wicket:ref=fooagain/div

 outputs:
 div id=foo0Foo/div
 div id=foo1Foo/div

 Then it would be possible to do, for instance, an Ajax update over all nodes.



 -Original Message-
 From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
 Sent: Friday, December 12, 2008 4:11 PM
 To: users@wicket.apache.org
 Subject: Re: how to reuse a label in the same page?


 what happens once you add a behavior that uses markup id? or even call
 setoutputmarkupid(true) on that component?

 -igor

 On Fri, Dec 12, 2008 at 9:35 AM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
 Oops - you are right there - the component use check was turned off in this
 app (I just threw the example into an existing app to test it).

 While I don't typically use this, or have this use case, I'm not clear on
 what is fundamentally wrong with this - you have a component you want two
 places in a page or panel, etc...  So, why mustyou create two duplicate
 components?  That seems more wrong than the former.

 --
 Jeremy Thomerson
 http://www.wickettraining.com


 On Fri, Dec 12, 2008 at 11:23 AM, Martijn Dashorst 
 martijn.dasho...@gmail.com wrote:

 Now run your application in virgin development mode. The fact that we
 disable the component use check in production mode doesn't make it
 less evil.

 Martijn

 On Fri, Dec 12, 2008 at 5:56 PM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
  Martijn,
  Actually, what I described does work - try this on any page:
 
  JAVA (added only once - since you couldn't add two with the same ID
 anyway):
  add(new Label(test, this is a test));
 
  HTML:
  span wicket:id=test[]/spanbr /
  span wicket:id=test[]/spanbr /
 
  OUTPUT:
  span wicket:id=testthis is a test/spanbr /
  span wicket:id=testthis is a test/spanbr /
  Right or wrong, it currently works that way.  (1.4-SNAPSHOT - and I know
  I've used it in past versions as well)
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
  On Fri, Dec 12, 2008 at 1:17 AM, Martijn Dashorst 
  martijn.dasho...@gmail.com wrote:
 
  Nope, wicket:id is a 1-1 mapping at the same dom tree level. You can
  reuse id's at different levels or in different branches of the dom
  tree, but not as siblings.
 
  a href=# wicket:id=foospan wicket:id=foo/span/a works
  but another
  a href=# wicket:id=foo/a will fail (and rightfully so)
 
  Martijn
 
  On Fri, Dec 12, 2008 at 6:20 AM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
   I'm pretty sure that you can just add it once in Java and multiple
 times
  in
   the HTML, although I've never pondered the (potential) side-effects of
   this.  Give it a shot and let us know how it works for you.  With
  something
   as stateless / simple as a BookmarkablePageLink, there probably
 couldn't
  be
   much in the way of side-effects, although with very complex, stateful
   components, I could see that maybe there would be an issue...
 (maybe??)
   --
   Jeremy Thomerson
   http://www.wickettraining.com
  
  
   On Thu, Dec 11, 2008 at 3:29 PM, novotny novo...@gridsphere.org
 wrote:
  
  
  
   Basically I need two of the same links on the page, and it looks like
 I
   have
   to do this which just seems kinda lame...
  
   add(new BookmarkablePageLinkString(personaldetails,
   PersonalDetailsPage.class));
   add(new BookmarkablePageLinkString(personaldetails2,
   PersonalDetailsPage.class));
  
   
  
   Click Here
   Profile page
  
  
  
  
  
  
  
   jWeekend wrote:
   
Jason,
   
What are you trying to achieve?
   
   

Re: IOptionRenderer vs IChioceRenderer in Wicket 1.4M1

2008-12-12 Thread Igor Vaynberg
open a jira issue please

-igor

On Fri, Dec 12, 2008 at 10:37 AM, Stefan Lindner lind...@visionet.de wrote:
 The definition of IOptionRenderer is

Interface IOptionRendererT
java.lang.String getDisplayValue(java.lang.Object
 object)

 the definition of IChoiceRenderer is

Interface IChoiceRendererT
java.lang.Object getDisplayValue(T object)

 Why is the parameter getDisplayValue method of IOptionRenderer and
 Object and not of Type T? Will this change until 1.4.0?

 Stefan

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



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



Re: how to reuse a label in the same page?

2008-12-12 Thread Igor Vaynberg
really? and here i thought i was using the response from
iheadercontributor which is the preferred way of writing out
javascript.

and no we cannot get all references because we do not know the markup
until after first render.

-igor

On Fri, Dec 12, 2008 at 11:06 AM, Bruno Cesar Borges
brunobor...@cetip.com.br wrote:
 Javascript could get all child references to that component (markupId), and 
 apply that code to them as well.

 In this case you submitted, the problem would be only with reaaally hacked 
 code, like doing weird stuff with 'response' instead of using Behaviours.

 -Original Message-
 From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
 Sent: Friday, December 12, 2008 4:41 PM
 To: users@wicket.apache.org
 Subject: Re: how to reuse a label in the same page?


 huh? so if i have a behavior that does:

 response.write(getElementById('+getMarkupId()+').style.display='none';);

 how does that work???

 -igor

 On Fri, Dec 12, 2008 at 10:38 AM, Bruno Cesar Borges
 brunobor...@cetip.com.br wrote:
 It could continue to return foo. But when processing ajax responses, 
 wicket:ref will register, through Javascript, the references to foo, 
 somehow. So this approach wouldn't break any code.

 -Original Message-
 From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
 Sent: Friday, December 12, 2008 4:35 PM
 To: users@wicket.apache.org
 Subject: Re: how to reuse a label in the same page?


 what do we return from getmarkupid() because that is what the code
 uses to output that markupid for the javascript that needs to
 manipulate the dom nodes.

 -igor

 On Fri, Dec 12, 2008 at 10:28 AM, Bruno Cesar Borges
 brunobor...@cetip.com.br wrote:
 I'm pretty sure it is possible to register all markup IDs generated to 
 referenced nodes.

 new Label(foo, Foo);

 div wicket:id=fooddd/div
 div wicket:ref=fooagain/div

 outputs:
 div id=foo0Foo/div
 div id=foo1Foo/div

 Then it would be possible to do, for instance, an Ajax update over all 
 nodes.



 -Original Message-
 From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
 Sent: Friday, December 12, 2008 4:11 PM
 To: users@wicket.apache.org
 Subject: Re: how to reuse a label in the same page?


 what happens once you add a behavior that uses markup id? or even call
 setoutputmarkupid(true) on that component?

 -igor

 On Fri, Dec 12, 2008 at 9:35 AM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
 Oops - you are right there - the component use check was turned off in this
 app (I just threw the example into an existing app to test it).

 While I don't typically use this, or have this use case, I'm not clear on
 what is fundamentally wrong with this - you have a component you want two
 places in a page or panel, etc...  So, why mustyou create two duplicate
 components?  That seems more wrong than the former.

 --
 Jeremy Thomerson
 http://www.wickettraining.com


 On Fri, Dec 12, 2008 at 11:23 AM, Martijn Dashorst 
 martijn.dasho...@gmail.com wrote:

 Now run your application in virgin development mode. The fact that we
 disable the component use check in production mode doesn't make it
 less evil.

 Martijn

 On Fri, Dec 12, 2008 at 5:56 PM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
  Martijn,
  Actually, what I described does work - try this on any page:
 
  JAVA (added only once - since you couldn't add two with the same ID
 anyway):
  add(new Label(test, this is a test));
 
  HTML:
  span wicket:id=test[]/spanbr /
  span wicket:id=test[]/spanbr /
 
  OUTPUT:
  span wicket:id=testthis is a test/spanbr /
  span wicket:id=testthis is a test/spanbr /
  Right or wrong, it currently works that way.  (1.4-SNAPSHOT - and I know
  I've used it in past versions as well)
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
  On Fri, Dec 12, 2008 at 1:17 AM, Martijn Dashorst 
  martijn.dasho...@gmail.com wrote:
 
  Nope, wicket:id is a 1-1 mapping at the same dom tree level. You can
  reuse id's at different levels or in different branches of the dom
  tree, but not as siblings.
 
  a href=# wicket:id=foospan wicket:id=foo/span/a works
  but another
  a href=# wicket:id=foo/a will fail (and rightfully so)
 
  Martijn
 
  On Fri, Dec 12, 2008 at 6:20 AM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
   I'm pretty sure that you can just add it once in Java and multiple
 times
  in
   the HTML, although I've never pondered the (potential) side-effects 
   of
   this.  Give it a shot and let us know how it works for you.  With
  something
   as stateless / simple as a BookmarkablePageLink, there probably
 couldn't
  be
   much in the way of side-effects, although with very complex, stateful
   components, I could see that maybe there would be an issue...
 (maybe??)
   --
   Jeremy Thomerson
   http://www.wickettraining.com
  
  
   On Thu, Dec 11, 2008 at 3:29 PM, novotny novo...@gridsphere.org
 wrote:
  
  
  
   Basically I need two of the same links on the page, and it looks 
   like
 I
   have
   to do this which just 

Re: wicket pages as spring beans to utilize spring aop

2008-12-12 Thread miro

Yes its   the same problem I resolved it with the suggestion you pointed
aspectJ.I am using aspectJ compiler to   introduce some meta information to
my pages, the only reason I donot want to have super class   is the ability
to swap a class use it or not with least changes and in my case just an
annotation.
By the way If I set some an object in threadlocal in onClick method and call
setResponsePage() and setRediret(true)  will I  have this object in thread
in the new page ?

jWeekend wrote:
 
 Miro,
 
 Is this related to the CGLIB problem you were having? Did the Spring guys
 find an answer on their forum? If you did solve it, what did your fix
 entail? 
 
 In terms of introducing stuff to your pages, given that the framework
 will never be aware and able to utilise any such introduction there seems
 to be little benefit in making introductions directly to the page; why not
 make a base class for the pages you have in mind that can hold a reference
 to an object which is the target of the introduction (it can be an inner
 class if you need to access your page instance's state)? Is that not a
 simpler design (ie you don't have to design your own custom page
 resolution for Wicket).
 
 If you really want to add a new way for Wicket to locate pages (ie as
 Spring managed beans as you say), I'd start by looking at how the
 IRequestTarget,  RequestCycle and general mount strategy implementations
 interact but I'm sure one of the core developers will be able to give you
 a good steer - it's an interesting question (albeit, possibly academic).
 
 By the way, I guess you know that you can use AspectJ type configuration
 for Spring AOP, so you could write your aspects in a way applicable to
 both, but include an aop.xml in your MATA-INF and add the AspectJ agent to
 your command line to enable introduction to unmanaged beans whilst
 avoiding the self problem.
 
 Regards - Cemal
  http://www.jWeekend.co.uk jWeekend 
 
  
 
 miro wrote:
 
 I want to use spring aop on my pages , so was wondering if it is possible
 to make pages as proxy scoped spring beansand wicket will  use spring
 application context to retrieve page instance  , I actually wanted to add
 introduction to some of my pages   and  for  whcih  I cannot use spring
 aop and must use some aop like aspectJ or something  else .
 
 
 

-- 
View this message in context: 
http://www.nabble.com/wicket-pages-as---spring-beans--to-utilize-spring-aop-tp20964746p20981833.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: What is your experience on the time of development ?

2008-12-12 Thread Jason Lea
Our company started with Tapestry 5 last year.  Early this year we had 
the chance for the team to try Wicket after getting frustrated with 
Tapestry.
I wrote a small comment here about it:  
http://www.theserverside.com/news/thread.tss?thread_id=50634#268364


Tapestry 5 seemed to be fast due to the live class reloading.  So you 
would code a bit, check the page in your browser, and then code a bit 
more.  But as soon as you hit a problem it seemed to take hours to get 
around it.  We had to write lots of custom ajax and javascript for all 
sorts of simple cases.  This left us with pages that generally worked 
but without any tests to confirm behaviour.  It think the java classes 
looked ugly too, with various public getters for anything that should 
appear on the page.  It made it hard to estimate how long a page would 
take because we would hit tricky problems quite often.


When we changed to Wicket, the speed tended to be the same at first 
which was surprising.  We decided to do Test Driven Development because 
we could use the WicketTester to help in development of our 
pages/components.  We finished the 2 month project in the same time as 
we estimated for doing it in Tapestry 5, but were were also writing unit 
tests and 3/4 of the team were learning Wicket.  Also our estimates for 
doing the project in Tapestry involved sharing components from our 
existing application.


We are much faster now, our estimates are very accurate now, we have 
lots of tests so we are happy to refactor/maintain code.  The style of 
coding is quite different now.  We set up the basic html + wicket class, 
write a test to make sure the page renders, then start adding more tests 
and components.  After an hour of writing tests/code we might check it 
once in the browser.  It gives you a great feeling to spend that much 
time in the IDE, getting lots of green bars as the tests pass then 
launch it in the browser and it just works.


We are now rewriting  the existing application in Wicket, page by page, 
moving components+tests we wrote into a shared module so we can use them 
in both projects.  Re-use yay!


So I guess we could say our development time might be 1.5 - 2 times 
faster.  Our maintenance is faster again,  maybe 4-6 times, because we 
can just write a new test to show the behaviour we want, fix the code 
and we can be confident we haven't broken anything else.  With our old 
application we would have to test the page/ajax/javascript by hand.


Martin Sachs wrote:

I'm looking for a little comparison of the development-time for Applications
in Wicket against other Technologies. 



I think the development with Wicket is two times faster than Struts. But
what are your experiences on JSF, Rails/Grails, SpringMVC/SpringWebFlow.

Anyone you know the development-time from experience ?


(P.S.: The applications must use AJAX and many custom components or tags in
JSP, not just a hello world sample)
  


--
Jason Lea



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



Re: extra 'onclick' is generated for an image wrapped by a link

2008-12-12 Thread Trent Larson
OK.  Thanks.

And thanks for the quick response!  I appreciate how responsive this mailing
list has been.



On Fri, Dec 12, 2008 at 11:23 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 dont use wicket:link, use bookmarkablepagelink component instead.

 -igor

 On Fri, Dec 12, 2008 at 10:19 AM, Trent Larson larsontr...@gmail.com
 wrote:
  I have the following plain HTML where I want an image to be a link to
  another Wicket-managed page:
 
  wicket:linka href=ProductPage.htmlimg
  src=../images/products_welcome.jpg border=0/a/wicket:link
 
 
  The link for that page is generated fine, but then Wicket adds an
 'onclick'
  event to the 'img' tag that takes the user directly to the image:
 
  wicket:linka
  href=?wicket:bookmarkablePage=:com.max.web.page.ProductPageimg
  src=../images/products_welcome.jpg border=0
  onclick=window.location.href='../images/products_welcome.jpg';return
  false;/a/wicket:link
 
  This seems absolutely wrong.  The result is that a click on the image
 will
  take users to directly to that image; sometimes it will then continue on
 to
  the right (ProductPage) page, so users see the image by itself before
 going
  to the right page, but often it just stops at the image.
 
  There is no Java code associated with this.  I get it in 1.4-rc1 (as well
 as
  1.4-m3).
 
  What is happening, and how can I stop it from generating the 'onclick'
  javascript?  Thanks!
 
  Trent
 

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




No WebApplicationContext found: no ContextLoaderListener registered?

2008-12-12 Thread wicketworker

I am getting the following exception while starting my jetty server : 

java.lang.IllegalStateException: No WebApplicationContext found: no
ContextLoaderListener registered?
at
org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:70)
at
org.apache.wicket.spring.SpringWebApplicationFactory.createApplication(SpringWebApplicationFactory.java:83)
at 
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:543)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:620)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)

Basically i was able to get @SpringBean annotation working, now i am trying
to append scope=session to one of my bean in the spring config.. Following
is what i have done:

In Web.xml
-
filter
 filter-namewicket.uti-webapp/filter-name
 filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
  init-param
  param-nameapplicationFactoryClassName/param-name
 
param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value
  /init-param
  init-param
param-nameapplicationBean/param-name
param-valuewicketApplication/param-value
  /init-param
/filter

listener
   
listener-classorg.springframework.web.context.request.RequestContextListener/listener-class
/listener

In Spring-Config

 bean id=wicketApplication 
class=com.uprr.app.uti.webapp.UtiWebApplication
 /bean


Can someone please tell me whats wrong?












-- 
View this message in context: 
http://www.nabble.com/No-WebApplicationContext-found%3A-no-ContextLoaderListener-registered--tp20984524p20984524.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



What are your suggestions to ease separation of UI and dev teams?

2008-12-12 Thread Trent Larson
Please help (documentation references, etc) with good ways to work with
Wicket where we have separate UI and dev teams.  I'm looking for any
practices people have found helpful because of the UI surprises we keep
hitting.

For example, our UI group has been inserting graphics and regular links
between parts of our site.  We're able to work through things fairly well,
but there's a case where Wicket adds behavior and/or styling in unexpected
ways:

http://www.nabble.com/extra-%27onclick%27-is-generated-for-an-image-wrapped-by-a-link-td20980894.html

This is something where I would like the UI people to be able to create
graphics and internal links at will without creating Java components or
involving developers.  (We'll try avoiding wicket:link.)  Another example of
surprise is when UI team creates links and Wicket changes the styling (eg.
disabling self-referential link and adding the em tag).  Thankfully we
figured how to turn that off, but it took effort; I'd love to be able to
turn off all special rules like that, or somehow tell Wicket minimize
intervention!

I'm trying to maximize our UI team's ability to work independently on
look-and-feel and only involve developers when the functionality is
obviously dynamic.  Maybe it'll take a few more months of trial and error,
but we appreciate any suggestions to ease this process.  Thanks!

Trent


My first cut at such a list:

   - Emphasize and re-emphasize to UI people NOT to play with wicket:id
   values.  Ever.  :-)
   - Avoid wicket:link.  Try full url ?wicket:bookmarkablePage=:Page
   instead.  (Other options?)
   -
  
http://www.nabble.com/extra-%27onclick%27-is-generated-for-an-image-wrapped-by-a-link-td20980894.html
   - Disable automatic self-referential link styling, or understand it:
   - http://www.nabble.com/%3Cem%3E-tag-in-Link-td16589772.html#a16589772


Re: What are your suggestions to ease separation of UI and dev teams?

2008-12-12 Thread James Carman
I wouldn't use the bookmarkablePage= syntax.  I'd mount my pages.

On Fri, Dec 12, 2008 at 5:48 PM, Trent Larson tr...@trentlarson.com wrote:
 Please help (documentation references, etc) with good ways to work with
 Wicket where we have separate UI and dev teams.  I'm looking for any
 practices people have found helpful because of the UI surprises we keep
 hitting.

 For example, our UI group has been inserting graphics and regular links
 between parts of our site.  We're able to work through things fairly well,
 but there's a case where Wicket adds behavior and/or styling in unexpected
 ways:

 http://www.nabble.com/extra-%27onclick%27-is-generated-for-an-image-wrapped-by-a-link-td20980894.html

 This is something where I would like the UI people to be able to create
 graphics and internal links at will without creating Java components or
 involving developers.  (We'll try avoiding wicket:link.)  Another example of
 surprise is when UI team creates links and Wicket changes the styling (eg.
 disabling self-referential link and adding the em tag).  Thankfully we
 figured how to turn that off, but it took effort; I'd love to be able to
 turn off all special rules like that, or somehow tell Wicket minimize
 intervention!

 I'm trying to maximize our UI team's ability to work independently on
 look-and-feel and only involve developers when the functionality is
 obviously dynamic.  Maybe it'll take a few more months of trial and error,
 but we appreciate any suggestions to ease this process.  Thanks!

 Trent


 My first cut at such a list:

   - Emphasize and re-emphasize to UI people NOT to play with wicket:id
   values.  Ever.  :-)
   - Avoid wicket:link.  Try full url ?wicket:bookmarkablePage=:Page
   instead.  (Other options?)
   -
  
 http://www.nabble.com/extra-%27onclick%27-is-generated-for-an-image-wrapped-by-a-link-td20980894.html
   - Disable automatic self-referential link styling, or understand it:
   - http://www.nabble.com/%3Cem%3E-tag-in-Link-td16589772.html#a16589772


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



Re: extra 'onclick' is generated for an image wrapped by a link

2008-12-12 Thread Trent Larson
BTW, I don't want our UI team to have to add a component every time they add
a link, so I'll try to avoid Wicket links altogether and have them use raw
links like ?wicket:bookmarkablePage=:Page (or maybe play with URL
mounting).




On Fri, Dec 12, 2008 at 11:23 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 dont use wicket:link, use bookmarkablepagelink component instead.

 -igor

 On Fri, Dec 12, 2008 at 10:19 AM, Trent Larson larsontr...@gmail.com
 wrote:
  I have the following plain HTML where I want an image to be a link to
  another Wicket-managed page:
 
  wicket:linka href=ProductPage.htmlimg
  src=../images/products_welcome.jpg border=0/a/wicket:link
 
 
  The link for that page is generated fine, but then Wicket adds an
 'onclick'
  event to the 'img' tag that takes the user directly to the image:
 
  wicket:linka
  href=?wicket:bookmarkablePage=:com.max.web.page.ProductPageimg
  src=../images/products_welcome.jpg border=0
  onclick=window.location.href='../images/products_welcome.jpg';return
  false;/a/wicket:link
 
  This seems absolutely wrong.  The result is that a click on the image
 will
  take users to directly to that image; sometimes it will then continue on
 to
  the right (ProductPage) page, so users see the image by itself before
 going
  to the right page, but often it just stops at the image.
 
  There is no Java code associated with this.  I get it in 1.4-rc1 (as well
 as
  1.4-m3).
 
  What is happening, and how can I stop it from generating the 'onclick'
  javascript?  Thanks!
 
  Trent
 

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




Re: extra 'onclick' is generated for an image wrapped by a link

2008-12-12 Thread Igor Vaynberg
see page mounting

-igor

On Fri, Dec 12, 2008 at 3:12 PM, Trent Larson tr...@trentlarson.com wrote:
 BTW, I don't want our UI team to have to add a component every time they add
 a link, so I'll try to avoid Wicket links altogether and have them use raw
 links like ?wicket:bookmarkablePage=:Page (or maybe play with URL
 mounting).




 On Fri, Dec 12, 2008 at 11:23 AM, Igor Vaynberg 
 igor.vaynb...@gmail.comwrote:

 dont use wicket:link, use bookmarkablepagelink component instead.

 -igor

 On Fri, Dec 12, 2008 at 10:19 AM, Trent Larson larsontr...@gmail.com
 wrote:
  I have the following plain HTML where I want an image to be a link to
  another Wicket-managed page:
 
  wicket:linka href=ProductPage.htmlimg
  src=../images/products_welcome.jpg border=0/a/wicket:link
 
 
  The link for that page is generated fine, but then Wicket adds an
 'onclick'
  event to the 'img' tag that takes the user directly to the image:
 
  wicket:linka
  href=?wicket:bookmarkablePage=:com.max.web.page.ProductPageimg
  src=../images/products_welcome.jpg border=0
  onclick=window.location.href='../images/products_welcome.jpg';return
  false;/a/wicket:link
 
  This seems absolutely wrong.  The result is that a click on the image
 will
  take users to directly to that image; sometimes it will then continue on
 to
  the right (ProductPage) page, so users see the image by itself before
 going
  to the right page, but often it just stops at the image.
 
  There is no Java code associated with this.  I get it in 1.4-rc1 (as well
 as
  1.4-m3).
 
  What is happening, and how can I stop it from generating the 'onclick'
  javascript?  Thanks!
 
  Trent
 

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




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



Re: SpringBeanLocator and @SpringBean performance issue

2008-12-12 Thread leok

I went ahead and filed a bug with the Spring people:
http://jira.springframework.org/browse/SPR-5360


igor.vaynberg wrote:
 
 as far as i can see the problem is on the other side of the fence.
 applicationcontext has much better metadata about its beans then we do
 so it should be cached there as it can be done so properly.
 
 if this is urgent we can build a temporary cache into
 springbeanlocator, but its not the proper thing to do imho. if we
 follow this logic then we can actually start caching bean references
 as well and essentially build our own applicationcontext
 
 
 -igor
 
 On Thu, Dec 11, 2008 at 1:33 PM, leok leo...@gmail.com wrote:

 Hello,

 Our Wicket app makes use of the @SpringBean annotation thorughout our
 code,
 which is a pretty cool feature. While checking some thread stack traces
 during load testing, we found lots of threads bottlenecking in the
 SpringBeanLocator class:

 Object blocked: 145.133 ms, Object wait: 0 ms, CPU wait: 2.118 ms, I/O
 wait:
 9.017 ms, CPU: 73.847 ms

*
 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
 (DefaultSingletonBeanRegistry.java:180, bci=22, server compiler)
  o blocked on java.util.concurrent.ConcurrentHashMap
 (0x00cd67f9d170)
*
 org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch
 (AbstractBeanFactory.java:415, bci=41, server compiler)
*
 org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType
 (DefaultListableBeanFactory.java:223, bci=142, server compiler)
*
 org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType
 (DefaultListableBeanFactory.java:202, bci=4, server compiler)
*
 org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType
 (AbstractApplicationContext.java:933, bci=5, server compiler)
*
 org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors
 (BeanFactoryUtils.java:143, bci=8, server compiler)
* org.apache.wicket.spring.SpringBeanLocator.getBeanNameOfClass
 (SpringBeanLocator.java:104, bci=2, server compiler)
* org.apache.wicket.spring.SpringBeanLocator.getBeanName
 (SpringBeanLocator.java:192, bci=29, server compiler)
* org.apache.wicket.spring.SpringBeanLocator.isSingletonBean
 (SpringBeanLocator.java:133, bci=13, server compiler)
*
 org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFieldValue
 (AnnotProxyFieldValueFactory.java:90, bci=46, server compiler)
* org.apache.wicket.injection.Injector.inject (Injector.java:108,
 bci=87, server compiler)
* org.apache.wicket.injection.ConfigurableInjector.inject
 (ConfigurableInjector.java:39, bci=6, server compiler)
* org.apache.wicket.injection.ComponentInjector.onInstantiation
 (ComponentInjector.java:52, bci=5, server compiler)
* org.apache.wicket.Application.notifyComponentInstantiationListeners
 (Application.java:974, bci=20, server compiler)
* org.apache.wicket.Component.init (Component.java:873, bci=35,
 server
 compiler)
* org.apache.wicket.MarkupContainer.init (MarkupContainer.java:105,
 bci=2, server compiler)
* org.apache.wicket.markup.html.WebMarkupContainer.init
 (WebMarkupContainer.java:39, bci=2, server compiler)
*
 org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup.init
 (WebMarkupContainerWithAssociatedMarkup.java:42, bci=2, server compiler)
* org.apache.wicket.markup.html.panel.Panel.init (Panel.java:76,
 bci=2, server compiler)
 [...snip...]

 I found that if we specified a name in @SpringBean (e.g. @SpringBean(name
 =
 foo)), then we would avoid this bottlenecking and our requests per
 second
 improved 50-75%. It appears that the SpringBeanLocator.isSingletonBean()
 call will do an expensive lookup of the bean name against
 BeanFactoryUtils.beanNamesForTypeIncludingAncestors() if the name isn't
 specified, even if the bean is already cached. By specifying the
 @SpringBean
 name parameter, you avoid the lookup.

 This feels like a bug, though I don't know who to should address it,
 Wicket
 or Spring. Specifying a name in @SpringBean is optional, and the
 performance
 gain of a cache lookup of already-injected beans is consequently defeated
 by
 the isSingletonBean() call, which is called every single time a
 SpringBean
 is injected. This implies Wicket should be addressing it. OTOH, Spring
 BeanFactoryUtils.beanNamesForTypeIncludingAncestors() is clearly a
 bottleneck if called too frequently, though when I've found performance
 issues in Spring code (e.g.
 http://jira.springframework.org/browse/SPR-4505)
 they've implied that Wicket should have better bean caching (though
 they've
 fixed them anyway).

 So.. how would one go about addressing this problem? It's a big
 performance
 issue for those deploying a Wicket app using @SpringBean on multi-core
 systems. I'm able to hack around it in our app, but not knowing much
 about
 how Spring and Wicket should be 

Re: SpringBeanLocator and @SpringBean performance issue

2008-12-12 Thread Igor Vaynberg
thanks for keeping us informed. like i said, if it takes too long we
can build a temp cache into wicket.

-igor

On Fri, Dec 12, 2008 at 4:21 PM, leok leo...@gmail.com wrote:

 I went ahead and filed a bug with the Spring people:
 http://jira.springframework.org/browse/SPR-5360


 igor.vaynberg wrote:

 as far as i can see the problem is on the other side of the fence.
 applicationcontext has much better metadata about its beans then we do
 so it should be cached there as it can be done so properly.

 if this is urgent we can build a temporary cache into
 springbeanlocator, but its not the proper thing to do imho. if we
 follow this logic then we can actually start caching bean references
 as well and essentially build our own applicationcontext


 -igor

 On Thu, Dec 11, 2008 at 1:33 PM, leok leo...@gmail.com wrote:

 Hello,

 Our Wicket app makes use of the @SpringBean annotation thorughout our
 code,
 which is a pretty cool feature. While checking some thread stack traces
 during load testing, we found lots of threads bottlenecking in the
 SpringBeanLocator class:

 Object blocked: 145.133 ms, Object wait: 0 ms, CPU wait: 2.118 ms, I/O
 wait:
 9.017 ms, CPU: 73.847 ms

*
 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
 (DefaultSingletonBeanRegistry.java:180, bci=22, server compiler)
  o blocked on java.util.concurrent.ConcurrentHashMap
 (0x00cd67f9d170)
*
 org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch
 (AbstractBeanFactory.java:415, bci=41, server compiler)
*
 org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType
 (DefaultListableBeanFactory.java:223, bci=142, server compiler)
*
 org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType
 (DefaultListableBeanFactory.java:202, bci=4, server compiler)
*
 org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType
 (AbstractApplicationContext.java:933, bci=5, server compiler)
*
 org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors
 (BeanFactoryUtils.java:143, bci=8, server compiler)
* org.apache.wicket.spring.SpringBeanLocator.getBeanNameOfClass
 (SpringBeanLocator.java:104, bci=2, server compiler)
* org.apache.wicket.spring.SpringBeanLocator.getBeanName
 (SpringBeanLocator.java:192, bci=29, server compiler)
* org.apache.wicket.spring.SpringBeanLocator.isSingletonBean
 (SpringBeanLocator.java:133, bci=13, server compiler)
*
 org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFieldValue
 (AnnotProxyFieldValueFactory.java:90, bci=46, server compiler)
* org.apache.wicket.injection.Injector.inject (Injector.java:108,
 bci=87, server compiler)
* org.apache.wicket.injection.ConfigurableInjector.inject
 (ConfigurableInjector.java:39, bci=6, server compiler)
* org.apache.wicket.injection.ComponentInjector.onInstantiation
 (ComponentInjector.java:52, bci=5, server compiler)
* org.apache.wicket.Application.notifyComponentInstantiationListeners
 (Application.java:974, bci=20, server compiler)
* org.apache.wicket.Component.init (Component.java:873, bci=35,
 server
 compiler)
* org.apache.wicket.MarkupContainer.init (MarkupContainer.java:105,
 bci=2, server compiler)
* org.apache.wicket.markup.html.WebMarkupContainer.init
 (WebMarkupContainer.java:39, bci=2, server compiler)
*
 org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup.init
 (WebMarkupContainerWithAssociatedMarkup.java:42, bci=2, server compiler)
* org.apache.wicket.markup.html.panel.Panel.init (Panel.java:76,
 bci=2, server compiler)
 [...snip...]

 I found that if we specified a name in @SpringBean (e.g. @SpringBean(name
 =
 foo)), then we would avoid this bottlenecking and our requests per
 second
 improved 50-75%. It appears that the SpringBeanLocator.isSingletonBean()
 call will do an expensive lookup of the bean name against
 BeanFactoryUtils.beanNamesForTypeIncludingAncestors() if the name isn't
 specified, even if the bean is already cached. By specifying the
 @SpringBean
 name parameter, you avoid the lookup.

 This feels like a bug, though I don't know who to should address it,
 Wicket
 or Spring. Specifying a name in @SpringBean is optional, and the
 performance
 gain of a cache lookup of already-injected beans is consequently defeated
 by
 the isSingletonBean() call, which is called every single time a
 SpringBean
 is injected. This implies Wicket should be addressing it. OTOH, Spring
 BeanFactoryUtils.beanNamesForTypeIncludingAncestors() is clearly a
 bottleneck if called too frequently, though when I've found performance
 issues in Spring code (e.g.
 http://jira.springframework.org/browse/SPR-4505)
 they've implied that Wicket should have better bean caching (though
 they've
 fixed them anyway).

 So.. how would one go about addressing this problem? It's a big
 performance
 issue for 

RE: [OT] wicket users around the world

2008-12-12 Thread Anirban Basak
1st Indian to reply so um, Kolkata, India! Hope I'm not the only one
using Wicket in India :)


Warm Regards,
Anirban Basak
Ph : 91 33 2357 7177 Extn: 277


-Original Message-
From: francisco treacy [mailto:francisco.tre...@gmail.com] 
Sent: Friday, December 12, 2008 12:28 AM
To: users@wicket.apache.org
Subject: [OT] wicket users around the world

to know a little bit more of our great (and vast) community, i was
just wondering if you're keen on sharing where you come from and/or
where you work with wicket...

for instance, here argentinian/belgian working with wicket in antibes,
france

francisco

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


No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.176 / Virus Database: 270.9.16/1843 - Release Date: 12/11/2008
8:36 AM

No virus found in this outgoing message.
Checked by AVG - http://www.avg.com 
Version: 8.0.176 / Virus Database: 270.9.16/1843 - Release Date: 12/11/2008
8:36 AM


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



Stateless form action in Wicket

2008-12-12 Thread Vinayak Borkar

Hello,

I am creating a page (say Page A) that contains a stateless form. The 
stateless form's action leads to page B.


I observe that in Wicket, the form action is created so that the request 
is sent back to Page A (An instance of Page A is created when the form 
is submitted) and then it redirects to Page B. Is that correct ?


If so, what is the reason for that?

How do I get Wicket to create the form so that the action goes directly 
to Page B. i.e. Page A is NOT instantiated on the submission of the form.


Thanks,
Vinayak

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