Re: Wicket stuff core, archetypes?

2009-02-09 Thread Jonathan Locke


couldn't sleep tonight, so i did a bit of work on it...

http://cwiki.apache.org/confluence/display/WICKET/Wicket+Component+JAR+Metadata

just a quick first sketch. thoughts?


Jonathan Locke wrote:
 
 
 i don't have time to develop the metadata standard, but i could make time
 to review it. there are a few good things on that wiki page, but i'd say a
 bit more thinking could be applied (anyone want to help francisco?) and
 then get review from me and any other core devs who want to chime in. if
 wicket-user/wicket-dev then goes +1 on it, that's the standard.
 
   jon
 
 
 francisco treacy-2 wrote:
 
 your plan makes sense to me. it seems like moving ahead with a wicket
 component metadata standard would be a good thing to do in parallel
 though.
 
 +1
 
 the problem here though is that for things to work in parallel, well,
 by definition, you need more than 1 person doing stuff :)
 
 i guess the question is... who wants to move ahead with the component
 metadata standard while i develop stuff into wickethub?  it would be
 also nice to have at least one example of wicket component with
 metadata to play with.
 
 for a list of things i plan to do, check the issues tab of the project
 home - and feel free to add.
 
 regards
 
 francisco
 
 
 On Wed, Jan 21, 2009 at 8:07 AM, Jonathan Locke
 jonathan.lo...@gmail.com wrote:


 that's too bad. i was hoping nexus was a centralized index of all known
 public repos.

 your plan makes sense to me. it seems like moving ahead with a wicket
 component metadata standard would be a good thing to do in parallel
 though.

   jon


 francisco treacy-2 wrote:

 hi jon,

 it would be nice to enable other parties to build similar wicket
 component searching technologies that are not linked to wicket hub

 definitely

 my simplistic understanding was that nexus could search for jars with
 certain files in them.

 not unless you extend it

 it ought to be extended so that it can do that. it would be worth
 talking to them about our needs to see if they could help us

 i have contacted them: see the thread
 http://nexus.sonatype.org/mailing-list-user-archives.html#nabble-f34835

 basically it is technically possible to do what we need with nexus.
 the problem is that this wicket-aware extended nexus version has to
 be installed in every single repo we may want to synchronize with.  so
 once we have done the coding we'll have to contact maven central (and
 other) repo owners. so it boils down to diplomacy rather than
 programming =)

 so: for now i will focus on submit jar url support that we will need
 anyway (for non-mavenized wicket components). at the moment this also
 will be useful for components in maven repos. and the day we manage to
 have an automatic 'discovery' process - people won't be required to
 submit wicket-enabled-repo urls anymore.

 how does that sound?

 francisco



 On Sat, Jan 17, 2009 at 10:02 PM, Jonathan Locke
 jonathan.lo...@gmail.com wrote:


 i think maven searching is an ideal way to publish and discover wicket
 components at
 present. i never meant to imply that that should be the only way to do
 this
 or that the
 idea of a wicket component jar should be tied to something like a
 repository
 or a transport.
 i also don't think it should be tied to a specific repo of discovered
 meta
 information like
 wicket hub. that creates a centralized architecture and as much as i
 like
 the idea of wicket
 hub a lot, it would be nice to enable other parties to build similar
 wicket
 component
 searching technologies that are not linked to wicket hub. for example,
 someone could
 gather wicket components for an IDE plugin, to store in some other
 type
 of
 repository
 than maven or to create an index for some future google search plugin.

 my simplistic understanding was that nexus could search for jars with
 certain files in them.
 all we need from nexus is the ability to get a list of jar artifacts
 which
 contain the file
 META-INF/wicket/components.xml because all such files will be wicket
 component jars
 (subject to downloading and parsing, of course). if nexus can't do
 that,
 i
 think that's
 a flaw in nexus and it ought to be extended so that it can do that. it
 would
 be worth
 talking to them about our needs to see if they could help us. i think
 that a
 nexus driven
 wicket component repository would be beneficial advertising for the
 nexus
 project, and
 it should not be too hard to achieve.

  jon


 francisco treacy-2 wrote:

 you're certainly free to go in whatever direction you want,

 to be clear, i fully agree on the decentralized model for:
 - people and the development of this app, and data contributed by
 wicket users: this should be as democratic as possible
 - artifacts / components:

 there may someday be wicket
 components in central or elsewhere, even outside maven repos
 (downloadable via HTTP
 like matej's inmethod stuff was for a while)

 we should support any mavenized or non-mavenized artifacts, wherever
 those 

Re: Using converters properly in Wicket?

2009-02-09 Thread Martin Makundi
 why dont you create your own converter for now and see how that
 improves things. we are talking about something that took 1.4 seconds
 out of at least a 100+ second test...

Ok, I am refactoring my code right now. It is not a 100 second test..
the profiler is running while I am analyzing it so the (idle) server
thread is not related. The test duration can be observed from the
WicketServlet.service -call, which is about 24 seconds. I am concerned
about BigDecimalConverterinit and
BigDecimalConverter.getNumberFormat because they are the only
intrinsic operations that show up on the hotspot list. Everything
else that show's up is more or less 'business logic'. I would prefer
the fundamental intrinsic stuff from the framework not to show up in
the test :)

::: Results after creating my own ParametrizedConverterLocator:

- the profiler does not show any more of those BigDecimalConverters.
Why? Because I cache them in ParametrizedConverterLocator using a
WeakHashMap. Also the NumberFormat instantiations have disappeared
because it is initializede only once and all the later invocations use
the cloned copy. It appears that there is really no need to hassle
with a threadLocal NumberFormat.

I wonder if I should make the ParametrizedConverterLocator converter
map thread-safe? The wicket's ConverterLocator.classToConverter
appears non thread-safe, from what I can see. Can that become a
problem?

**
Martin

 On Sun, Feb 8, 2009 at 11:31 PM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 im not sure how necessary the threadlocal is. yes, it took up 6mb of
 memory, but those instances are not being held on to, so if you run GC
 all that memory will be reclaimed.

 I am more concerned with the cpu hog than the memory hog associated
 with the converter.

 **
 Martin


 On Sun, Feb 8, 2009 at 8:55 PM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 Cool. What is your take on using a ThreaLocal instead of always
 cloning return (NumberFormat)numberFormat.clone(); in
 org.apache.wicket.util.convert.converters.AbstractDecimalConverter#getNumberFormat(java.util.Locale)

 **
 Martin

 2009/2/9 Igor Vaynberg igor.vaynb...@gmail.com:
 On Sun, Feb 8, 2009 at 7:46 PM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 Another thing that came into my mind is, that there is
 newNumberFormat(Locale locale) -method in AbstractDecimalConverter,
 but the method is never used [instead, there is a direct numberFormat
 = NumberFormat.getInstance(locale); -invocation in
 getNumberFormat(Locale locale)].

 fixed

 -igor

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



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



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



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



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



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



Re: Wicket stuff core, archetypes?

2009-02-09 Thread francisco treacy
coincidentally, i started working on that again and i was about to
contact you to suggest a draft.

my perspective are (for the moment) data that is to be mapped to
fields currently supported in wicket hub. i put it in a jar metadata
format.

Site-URL: (maps to website url)
License-Name: (maps to license)
Wicket-Versions: (maps to supported wicket versions)
Search-Keywords: (maps to topics)
Publish-Date: (maps to latest publish date)
Author: (maps to author)

i uploaded a new version that has a minimal infrastructure (a running
batch) to support pinging known components. basically it's yet to be
put together (the download, unzip, parse metadata), but it's all
there.

regarding your metadata proposal, i think it's really fine. also, the
xml format makes sense. however i'm not 100% convinced about

requirements
  library name=wicket version=1.3/
  library name=YUI version=4.0/
/requirements

... cause it's duplicating maven functionality, and i'm  pretty sure
maven handles it better. i know that our components are not
necessarily mavenized, but even then we should pay particular
attention to this one.

as i said, i'm ready to get this done on my side - it would be nice if
somebody else could work on a maven plugin or other post-install step
to generate this metadata within jars.

francisco

--
http://wickethub.org

On Mon, Feb 9, 2009 at 9:45 AM, Jonathan Locke jonathan.lo...@gmail.com wrote:


 couldn't sleep tonight, so i did a bit of work on it...

 http://cwiki.apache.org/confluence/display/WICKET/Wicket+Component+JAR+Metadata

 just a quick first sketch. thoughts?


 Jonathan Locke wrote:


 i don't have time to develop the metadata standard, but i could make time
 to review it. there are a few good things on that wiki page, but i'd say a
 bit more thinking could be applied (anyone want to help francisco?) and
 then get review from me and any other core devs who want to chime in. if
 wicket-user/wicket-dev then goes +1 on it, that's the standard.

   jon


 francisco treacy-2 wrote:

 your plan makes sense to me. it seems like moving ahead with a wicket
 component metadata standard would be a good thing to do in parallel
 though.

 +1

 the problem here though is that for things to work in parallel, well,
 by definition, you need more than 1 person doing stuff :)

 i guess the question is... who wants to move ahead with the component
 metadata standard while i develop stuff into wickethub?  it would be
 also nice to have at least one example of wicket component with
 metadata to play with.

 for a list of things i plan to do, check the issues tab of the project
 home - and feel free to add.

 regards

 francisco


 On Wed, Jan 21, 2009 at 8:07 AM, Jonathan Locke
 jonathan.lo...@gmail.com wrote:


 that's too bad. i was hoping nexus was a centralized index of all known
 public repos.

 your plan makes sense to me. it seems like moving ahead with a wicket
 component metadata standard would be a good thing to do in parallel
 though.

   jon


 francisco treacy-2 wrote:

 hi jon,

 it would be nice to enable other parties to build similar wicket
 component searching technologies that are not linked to wicket hub

 definitely

 my simplistic understanding was that nexus could search for jars with
 certain files in them.

 not unless you extend it

 it ought to be extended so that it can do that. it would be worth
 talking to them about our needs to see if they could help us

 i have contacted them: see the thread
 http://nexus.sonatype.org/mailing-list-user-archives.html#nabble-f34835

 basically it is technically possible to do what we need with nexus.
 the problem is that this wicket-aware extended nexus version has to
 be installed in every single repo we may want to synchronize with.  so
 once we have done the coding we'll have to contact maven central (and
 other) repo owners. so it boils down to diplomacy rather than
 programming =)

 so: for now i will focus on submit jar url support that we will need
 anyway (for non-mavenized wicket components). at the moment this also
 will be useful for components in maven repos. and the day we manage to
 have an automatic 'discovery' process - people won't be required to
 submit wicket-enabled-repo urls anymore.

 how does that sound?

 francisco



 On Sat, Jan 17, 2009 at 10:02 PM, Jonathan Locke
 jonathan.lo...@gmail.com wrote:


 i think maven searching is an ideal way to publish and discover wicket
 components at
 present. i never meant to imply that that should be the only way to do
 this
 or that the
 idea of a wicket component jar should be tied to something like a
 repository
 or a transport.
 i also don't think it should be tied to a specific repo of discovered
 meta
 information like
 wicket hub. that creates a centralized architecture and as much as i
 like
 the idea of wicket
 hub a lot, it would be nice to enable other parties to build similar
 wicket
 component
 searching technologies that are not linked to wicket hub. for 

Re: Example for presenting pdf in modal window

2009-02-09 Thread Ernesto Reinaldo Barreiro
Hi,

I just added a page summarizing the discussion on this thread to the Wiki.

http://cwiki.apache.org/confluence/display/WICKET/Displaying+content++(e.g.+PDF%2C+Excel%2C+Word)+in+an+IFRAME

Hope it can be of any help to other people.

Ernesto

On Wed, Jan 28, 2009 at 5:21 PM, Ernesto Reinaldo Barreiro 
reier...@gmail.com wrote:

 Your are welcome! I'll add this to Wiki if I find the time...
 Cheers,

 Ernesto


 On Wed, Jan 28, 2009 at 4:35 PM, Per Newgro per.new...@gmx.ch wrote:

 Great Ernesto,

 this is exactly the solution i was looking for. Thanks alot for sharing
 this with us.
 I would suggest that you add it to the wiki.

 Cheers

 Per

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





Nested forms : don't process inner form when outer form is submitted

2009-02-09 Thread Marieke Vandamme

Hello, 

I've been reading a lot about nested forms and what should happen with the
inner forms when the outer form gets submitted. But I didn't found out how
you can implement what i'm trying:

I have inner form with some RequiredTextFields on it. These are required
when the inner form is processed with an AjaxButton, but not when the outer
form is submitted.

How can I do this? Thanks for any help !!! Marieke.
-- 
View this message in context: 
http://www.nabble.com/Nested-forms-%3A-don%27t-process-inner-form-when-outer-form-is-submitted-tp21910941p21910941.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



Check if file exist?

2009-02-09 Thread dsj

Hi, how to check if one image exists in my app-folder? or in other way: how
to check if any file exist im my Web-app\images? 
I am using wicket 1.3.4 e tomcat v6.0.

Thx.
-- 
View this message in context: 
http://www.nabble.com/Check-if-file-exist--tp21911335p21911335.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: Proper hook for conversational state that also works with tests

2009-02-09 Thread cpopetz

Thanks Igor, I created https://issues.apache.org/jira/browse/WICKET-2090


igor.vaynberg wrote:
 
 the problem is wicket tester doesnt run wicket through the entire
 web-request workflow and you are hooking into a part that is not being
 hit. i have a good idea of where to add an extension point, please
 open a jira issue so i can attach a patch there and you can see if it
 will work for you.
 
 -igor
 
-- 
View this message in context: 
http://www.nabble.com/Proper-hook-for-conversational-state-that-also-works-with-tests-tp21876375p21911364.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



Session Constructor

2009-02-09 Thread Uwe Schäfer

Hi

i just stumbled across this code in 1.4m3:

public Session(Request request){
 locale = request.getLocale();
 if (locale == null){
   throw new IllegalArgumentException(Parameter 'locale' must not be 
null);

 }
}

please don´t call me picky, but am i right to say, that thiss error 
message is slightly wrong?


cu uwe
--

THOMAS DAILY GmbH
Adlerstraße 19
79098 Freiburg
Deutschland
T  + 49 761 3 85 59 0
F  + 49 761 3 85 59 550
E  schae...@thomas-daily.de
www.thomas-daily.de

Geschäftsführer/Managing Directors:
Wendy Thomas, Susanne Larbig
Handelsregister Freiburg i.Br., HRB 3947

Registrieren Sie sich unter http://morningnews.thomas-daily.de für die 
kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages 
morgens um 9:00 in Ihrer Mailbox.


Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 
8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 
16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer 
Redaktion lautet redakt...@thomas-daily.de.



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



final Session.setLocale (1.4m3)

2009-02-09 Thread Uwe Schäfer

hi

why is it, that setLocale(Locale) is final on Session ?
i´d really like to overwirte that in order to be able to hook some 
preference-storing stuff in there, like setting cookies and/or updating 
persistent preference data.


i´d understand it, if Session´s constructor would call it, but that is 
not the case either, as it does an assignment to the private field:


public Session(Request request){
 locale = request.getLocale();

what did i miss?

cu uwe

--

THOMAS DAILY GmbH
Adlerstraße 19
79098 Freiburg
Deutschland
T  + 49 761 3 85 59 0
F  + 49 761 3 85 59 550
E  schae...@thomas-daily.de
www.thomas-daily.de

Geschäftsführer/Managing Directors:
Wendy Thomas, Susanne Larbig
Handelsregister Freiburg i.Br., HRB 3947

Registrieren Sie sich unter http://morningnews.thomas-daily.de für die 
kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages 
morgens um 9:00 in Ihrer Mailbox.


Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 
8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 
16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer 
Redaktion lautet redakt...@thomas-daily.de.



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



Re: Check if file exists?

2009-02-09 Thread Jonas
Not really related to wicket...
Anyway, check javax.servlet.ServletContext#getResourcePaths(String path)


On Mon, Feb 9, 2009 at 12:51 PM, dsj deusd...@gmail.com wrote:

 Hi, how to check if one image exists in my app-folder? or in other way: how
 to check if any file exist im my Web-app\images?
 I am using wicket 1.3.4 e tomcat v6.0.

 Thx.
 --
 View this message in context: 
 http://www.nabble.com/Check-if-file-exists--tp21911335p21911335.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: Check if file exists?

2009-02-09 Thread dsj

I try this. I have put the servlet.api in my build classpath and try, but
wicket claim that not possible cast to servlet anyway. btw, this is a
dependence feature of the container?


Jonas-21 wrote:
 
 Not really related to wicket...
 Anyway, check javax.servlet.ServletContext#getResourcePaths(String path)
 
 
 On Mon, Feb 9, 2009 at 12:51 PM, dsj deusd...@gmail.com wrote:

 Hi, how to check if one image exists in my app-folder? or in other way:
 how
 to check if any file exist im my Web-app\images?
 I am using wicket 1.3.4 e tomcat v6.0.

 Thx.
 --
 View this message in context:
 http://www.nabble.com/Check-if-file-exists--tp21911335p21911335.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/Check-if-file-exists--tp21911335p21911898.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: final Session.setLocale (1.4m3)

2009-02-09 Thread Martijn Dashorst
Why are you doing this with 1.4M3? 1.4RC2 is about to be made available.

Martijn

2009/2/9 Uwe Schäfer schae...@thomas-daily.de:
 hi

 why is it, that setLocale(Locale) is final on Session ?
 i´d really like to overwirte that in order to be able to hook some
 preference-storing stuff in there, like setting cookies and/or updating
 persistent preference data.

 i´d understand it, if Session´s constructor would call it, but that is not
 the case either, as it does an assignment to the private field:

 public Session(Request request){
  locale = request.getLocale();

 what did i miss?

 cu uwe

 --

 THOMAS DAILY GmbH
 Adlerstraße 19
 79098 Freiburg
 Deutschland
 T  + 49 761 3 85 59 0
 F  + 49 761 3 85 59 550
 E  schae...@thomas-daily.de
 www.thomas-daily.de

 Geschäftsführer/Managing Directors:
 Wendy Thomas, Susanne Larbig
 Handelsregister Freiburg i.Br., HRB 3947

 Registrieren Sie sich unter http://morningnews.thomas-daily.de für die
 kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages
 morgens um 9:00 in Ihrer Mailbox.

 Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um
 8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 16:00
 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer Redaktion
 lautet redakt...@thomas-daily.de.


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





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

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



Re: Check if file exists?

2009-02-09 Thread Jonas
I assume you've tried to cast the wicket Request to a servlet request?
Maybe you should try and ask google on how to access the servlet
request from a wicket request:
http://www.google.com/search?q=wicket+HttpServletRequest


On Mon, Feb 9, 2009 at 1:31 PM, dsj deusd...@gmail.com wrote:

 I try this. I have put the servlet.api in my build classpath and try, but
 wicket claim that not possible cast to servlet anyway. btw, this is a
 dependence feature of the container?


 Jonas-21 wrote:

 Not really related to wicket...
 Anyway, check javax.servlet.ServletContext#getResourcePaths(String path)


 On Mon, Feb 9, 2009 at 12:51 PM, dsj deusd...@gmail.com wrote:

 Hi, how to check if one image exists in my app-folder? or in other way:
 how
 to check if any file exist im my Web-app\images?
 I am using wicket 1.3.4 e tomcat v6.0.

 Thx.
 --
 View this message in context:
 http://www.nabble.com/Check-if-file-exists--tp21911335p21911335.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/Check-if-file-exists--tp21911335p21911898.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: Using Eclipse Wicket for Modular Webapps

2009-02-09 Thread Richard Allen
That is very interesting. We have divided our web applications into
modules, which are essentially mini WARs that are merged in the build
process to make the final deployed WAR. This allows us to share these
modules among various web applications, which helps with code reuse and
maintainability. However, the build process and development cycle is
cumbersome, and the modules are not as decoupled as I would like them to
be; meaning they can't be dropped-in as easy as an Eclipse plugin.

I've been looking for a solution, and thought that Wicket plus OSGi would be
the way to go. Unfortunately, solving that problem is not at the top of my
priorities right now. I wonder what, if anything useful, Spring dm Server (
http://www.springsource.com/products/suite/dmserver) brings to the table in
trying to make this work.

Thank you for your contribution!

-Richard

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

 Hi Folks,

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

 enjoy the weekend

 Thomas

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



Re: Check if file exists?

2009-02-09 Thread dsj

Like igor says, 
webapplication.getservletcontext()

thanks, works great! 


Jonas-21 wrote:
 
 I assume you've tried to cast the wicket Request to a servlet request?
 Maybe you should try and ask google on how to access the servlet
 request from a wicket request:
 http://www.google.com/search?q=wicket+HttpServletRequest
 
 
 On Mon, Feb 9, 2009 at 1:31 PM, dsj deusd...@gmail.com wrote:

 I try this. I have put the servlet.api in my build classpath and try, but
 wicket claim that not possible cast to servlet anyway. btw, this is a
 dependence feature of the container?


 Jonas-21 wrote:

 Not really related to wicket...
 Anyway, check javax.servlet.ServletContext#getResourcePaths(String path)


 On Mon, Feb 9, 2009 at 12:51 PM, dsj deusd...@gmail.com wrote:

 Hi, how to check if one image exists in my app-folder? or in other way:
 how
 to check if any file exist im my Web-app\images?
 I am using wicket 1.3.4 e tomcat v6.0.

 Thx.
 --
 View this message in context:
 http://www.nabble.com/Check-if-file-exists--tp21911335p21911335.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/Check-if-file-exists--tp21911335p21911898.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/Check-if-file-exists--tp21911335p21912735.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



[WicketStuff] Progress bar, tasks and feedback messages

2009-02-09 Thread Piller Sébastien

Hello,

I'm using wicketstuff-progressbar and it works very well (great job 
Christopher!). I was wondering how I can add feedbacks messages to the 
process (I need to display some warning informations when some work has 
been done but not completely).


I tried both /Task#warn/ and /Session#warn/. /Task#warn/ doesn't work 
(my feedback panel stays empty, even when I try to refresh it with 
/AjaxRequestTarget#addComponent/), and Session#warn throw an exception 
(/IllegalStateException, you can only locate or create sessions in the 
context of a request cycle/)


I've searched the doc and the example, but couldn't find any example of 
this feature.


Any clue?

Thank you ;)

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



Ajax Example Page Problem

2009-02-09 Thread Daniel Ferreira Castro
I am having some difficulties to understand the example present on
http://www.wicket-library.com/wicket-examples/ajax/todo-list.1

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

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

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

-- 
Two rules to succeed in life:
1 - don´t tell people everything you know.

We shall go on to the end.
We shall fight in France
We shall fightover the seas and oceans.
We shall fight with growing confidence and growing strength in the air.
We shall defend our island whatever the cost may be
We shall fight on beaches, we shall fight on the landing grounds,
We shall fight in the fields and in the streets,
We shall fight on the hills.
We shall never surrender.
Winston Churchill


Re: Ajax Example Page Problem

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

Thomas

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

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

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

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

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

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




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


InMethod DataGrid Localization

2009-02-09 Thread Michal Hybler

Hi,
is there any support for localization in DataGrid? I need to substitute cell
content of explicit column.

For example:

I have row state and it can reach 3 values (created, updated, deleted) in my
database but I want show substitutes for that values in my dataGrid (in
other language).

Is there any examples?

Thnx for any suggestions.

Michal
-- 
View this message in context: 
http://www.nabble.com/InMethod-DataGrid-Localization-tp21913141p21913141.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: Ajax Example Page Problem

2009-02-09 Thread Daniel Ferreira Castro
The errors is not my big problem...because I am assuming that might be
another easiest way then the one I am taking...but here is the problem
because I maanged to solve them...

My problem is that the example has lots of inner classes in orther to make
the AJAX work and I thinking that the number of artifacts seem to be too
high...it makes harder the understand and adapt it.

On Mon, Feb 9, 2009 at 11:41 AM, Thomas Mäder
thomas.mae...@devotek-it.chwrote:

 Actually stating what the errors are might help.

 Thomas

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

  I am having some difficulties to understand the example present on
  http://www.wicket-library.com/wicket-examples/ajax/todo-list.1
 
  The problem as a matter of facts is that the example is full of inner
  classes and I am trying, using Eclipse, to make all of them Top Level
  Classes but everytime I do that I recieve erros on my project.
 
  Why am I tryingo to do this?  I will adapt the example to a form for my
  project, using a DTO to show on a listView, like the example, the
  proprieties of what I have just inserted on the database.
 
  If this way that I am trying to do is not the best way to do this, I will
  accpet any advises to guide me :)
 
  --
  Two rules to succeed in life:
  1 - don´t tell people everything you know.
  
  We shall go on to the end.
  We shall fight in France
  We shall fightover the seas and oceans.
  We shall fight with growing confidence and growing strength in the air.
  We shall defend our island whatever the cost may be
  We shall fight on beaches, we shall fight on the landing grounds,
  We shall fight in the fields and in the streets,
  We shall fight on the hills.
  We shall never surrender.
  Winston Churchill
 



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




-- 
Two rules to succeed in life:
1 - don´t tell people everything you know.

We shall go on to the end.
We shall fight in France
We shall fightover the seas and oceans.
We shall fight with growing confidence and growing strength in the air.
We shall defend our island whatever the cost may be
We shall fight on beaches, we shall fight on the landing grounds,
We shall fight in the fields and in the streets,
We shall fight on the hills.
We shall never surrender.
Winston Churchill


Re: InMethod DataGrid Localization

2009-02-09 Thread Ryan McKinley
Yes -- check the examples.  I think all of them use an external  
properties file to declare the header row display.



On Feb 9, 2009, at 8:50 AM, Michal Hybler wrote:



Hi,
is there any support for localization in DataGrid? I need to  
substitute cell

content of explicit column.

For example:

I have row state and it can reach 3 values (created, updated,  
deleted) in my
database but I want show substitutes for that values in my dataGrid  
(in

other language).

Is there any examples?

Thnx for any suggestions.

Michal
--
View this message in context: 
http://www.nabble.com/InMethod-DataGrid-Localization-tp21913141p21913141.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



SubmitLink only calls form.onsubmit with 1.4-rc2

2009-02-09 Thread Marieke Vandamme

Hello, 

I already use 1.4-rc2 for my projects, and found some error within the
SubmitLink. 

Form form = new Form(webform){
public void onSubmit(){
System.out.println(on form submit);
}
};
add(form);
form.add(new SubmitLink(btnSubmit1){
public void onSubmit(){
System.out.println(on submit link clicked - ON FORM);
}
});
add(new SubmitLink(btnSubmit2, form){
public void onSubmit(){
System.out.println(on submit link clicked - OUTSIDE FORM);
}
});

The submit link that's on the form functions correctly, but the one outside
doesn't. on submit link clicked - OUTSIDE FORM doesn't get printed. I tested
with 1.4-rc1 and that works correctly.

Do I need to report jira for this or is 1.4-rc2 still under massive
construction? Thanks. Marieke.
-- 
View this message in context: 
http://www.nabble.com/SubmitLink-only-calls-form.onsubmit-with-1.4-rc2-tp21913795p21913795.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: InMethod DataGrid Localization

2009-02-09 Thread Michal Hybler

Thanks for your help but I dont need to substitute header but the content of
rows in explicit collumn.

id  |  color  |  state
--
1   |   red   |  created
2   |   blue  |  updated

In this example page which describes database table I need to substitute the
bold strings. Instead of created i want new for example. Is there way to
do this by using *.properties file like in case of state header?


Thnx for help.
Michal


ryantxu wrote:
 
 Yes -- check the examples.  I think all of them use an external  
 properties file to declare the header row display.
 
 
 On Feb 9, 2009, at 8:50 AM, Michal Hybler wrote:
 

 Hi,
 is there any support for localization in DataGrid? I need to  
 substitute cell
 content of explicit column.

 For example:

 I have row state and it can reach 3 values (created, updated,  
 deleted) in my
 database but I want show substitutes for that values in my dataGrid  
 (in
 other language).

 Is there any examples?

 Thnx for any suggestions.

 Michal
 -- 
 View this message in context:
 http://www.nabble.com/InMethod-DataGrid-Localization-tp21913141p21913141.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/InMethod-DataGrid-Localization-tp21913141p21914610.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: final Session.setLocale (1.4m3)

2009-02-09 Thread Uwe Schäfer

Martijn Dashorst schrieb:

Hi Martijn


Why are you doing this with 1.4M3? 1.4RC2 is about to be made available.


thanks for taking the time.

well, we have an essential local patch against 1.4m3 which would not 
make it into the official wicket code, but is necessary for us (related 
to caucho, https and file-uploads, see 
https://issues.apache.org/jira/browse/WICKET-1861).
another idea, why we would like to stick to a certain version we 
released a webapp on, is simply never to change a running system.


besides: it is not like RC1 has any changes regarding that code, has it?
i just took a look at rc1 sources, and setLocale(Locale) is final there too.

cu uwe

--

THOMAS DAILY GmbH
Adlerstraße 19
79098 Freiburg
Deutschland
T  + 49 761 3 85 59 0
F  + 49 761 3 85 59 550
E  schae...@thomas-daily.de
www.thomas-daily.de

Geschäftsführer/Managing Directors:
Wendy Thomas, Susanne Larbig
Handelsregister Freiburg i.Br., HRB 3947

Registrieren Sie sich unter http://morningnews.thomas-daily.de für die 
kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages 
morgens um 9:00 in Ihrer Mailbox.


Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 
8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 
16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer 
Redaktion lautet redakt...@thomas-daily.de.



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



Re: Wicket stuff core, archetypes?

2009-02-09 Thread Jonathan Locke


using the maven deps is fine.  the purpose i had in mind for the
requirements and libraries nodes was just to enable display of the
component's requirements on a page about the component... (whether it's
built with maven or not).  but using the maven deps would be more detailed
and more consistent... and most wicket components will be mavenized.


francisco treacy-2 wrote:
 
 coincidentally, i started working on that again and i was about to
 contact you to suggest a draft.
 
 my perspective are (for the moment) data that is to be mapped to
 fields currently supported in wicket hub. i put it in a jar metadata
 format.
 
 Site-URL: (maps to website url)
 License-Name: (maps to license)
 Wicket-Versions: (maps to supported wicket versions)
 Search-Keywords: (maps to topics)
 Publish-Date: (maps to latest publish date)
 Author: (maps to author)
 
 i uploaded a new version that has a minimal infrastructure (a running
 batch) to support pinging known components. basically it's yet to be
 put together (the download, unzip, parse metadata), but it's all
 there.
 
 regarding your metadata proposal, i think it's really fine. also, the
 xml format makes sense. however i'm not 100% convinced about
 
 requirements
   library name=wicket version=1.3/
   library name=YUI version=4.0/
 /requirements
 
 ... cause it's duplicating maven functionality, and i'm  pretty sure
 maven handles it better. i know that our components are not
 necessarily mavenized, but even then we should pay particular
 attention to this one.
 
 as i said, i'm ready to get this done on my side - it would be nice if
 somebody else could work on a maven plugin or other post-install step
 to generate this metadata within jars.
 
 francisco
 
 --
 http://wickethub.org
 
 On Mon, Feb 9, 2009 at 9:45 AM, Jonathan Locke jonathan.lo...@gmail.com
 wrote:


 couldn't sleep tonight, so i did a bit of work on it...

 http://cwiki.apache.org/confluence/display/WICKET/Wicket+Component+JAR+Metadata

 just a quick first sketch. thoughts?


 Jonathan Locke wrote:


 i don't have time to develop the metadata standard, but i could make
 time
 to review it. there are a few good things on that wiki page, but i'd say
 a
 bit more thinking could be applied (anyone want to help francisco?) and
 then get review from me and any other core devs who want to chime in. if
 wicket-user/wicket-dev then goes +1 on it, that's the standard.

   jon


 francisco treacy-2 wrote:

 your plan makes sense to me. it seems like moving ahead with a wicket
 component metadata standard would be a good thing to do in parallel
 though.

 +1

 the problem here though is that for things to work in parallel, well,
 by definition, you need more than 1 person doing stuff :)

 i guess the question is... who wants to move ahead with the component
 metadata standard while i develop stuff into wickethub?  it would be
 also nice to have at least one example of wicket component with
 metadata to play with.

 for a list of things i plan to do, check the issues tab of the project
 home - and feel free to add.

 regards

 francisco


 On Wed, Jan 21, 2009 at 8:07 AM, Jonathan Locke
 jonathan.lo...@gmail.com wrote:


 that's too bad. i was hoping nexus was a centralized index of all
 known
 public repos.

 your plan makes sense to me. it seems like moving ahead with a wicket
 component metadata standard would be a good thing to do in parallel
 though.

   jon


 francisco treacy-2 wrote:

 hi jon,

 it would be nice to enable other parties to build similar wicket
 component searching technologies that are not linked to wicket hub

 definitely

 my simplistic understanding was that nexus could search for jars
 with
 certain files in them.

 not unless you extend it

 it ought to be extended so that it can do that. it would be worth
 talking to them about our needs to see if they could help us

 i have contacted them: see the thread
 http://nexus.sonatype.org/mailing-list-user-archives.html#nabble-f34835

 basically it is technically possible to do what we need with nexus.
 the problem is that this wicket-aware extended nexus version has to
 be installed in every single repo we may want to synchronize with. 
 so
 once we have done the coding we'll have to contact maven central (and
 other) repo owners. so it boils down to diplomacy rather than
 programming =)

 so: for now i will focus on submit jar url support that we will
 need
 anyway (for non-mavenized wicket components). at the moment this also
 will be useful for components in maven repos. and the day we manage
 to
 have an automatic 'discovery' process - people won't be required to
 submit wicket-enabled-repo urls anymore.

 how does that sound?

 francisco



 On Sat, Jan 17, 2009 at 10:02 PM, Jonathan Locke
 jonathan.lo...@gmail.com wrote:


 i think maven searching is an ideal way to publish and discover
 wicket
 components at
 present. i never meant to imply that that should be the only way to
 do
 this
 or that the
 idea of a 

Re: InMethod DataGrid Localization

2009-02-09 Thread Ryan McKinley
For that you may want to try overriding newCell in  
AbstractLightWeightColumn


public IRenderable newCell(IModel rowModel) {
return new IRenderable() {
public void render(IModel rowModel, Response response) {
return your localized text
}
};
}


On Feb 9, 2009, at 10:02 AM, Michal Hybler wrote:



Thanks for your help but I dont need to substitute header but the  
content of

rows in explicit collumn.

id  |  color  |  state
--
1   |   red   |  created
2   |   blue  |  updated

In this example page which describes database table I need to  
substitute the
bold strings. Instead of created i want new for example. Is  
there way to

do this by using *.properties file like in case of state header?


Thnx for help.
Michal


ryantxu wrote:


Yes -- check the examples.  I think all of them use an external
properties file to declare the header row display.


On Feb 9, 2009, at 8:50 AM, Michal Hybler wrote:



Hi,
is there any support for localization in DataGrid? I need to
substitute cell
content of explicit column.

For example:

I have row state and it can reach 3 values (created, updated,
deleted) in my
database but I want show substitutes for that values in my dataGrid
(in
other language).

Is there any examples?

Thnx for any suggestions.

Michal
--
View this message in context:
http://www.nabble.com/InMethod-DataGrid-Localization-tp21913141p21913141.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/InMethod-DataGrid-Localization-tp21913141p21914610.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: Form Components With Built In Feedback

2009-02-09 Thread walnutmon

Igor,

I know this is old, but in a post this morning you reminded me-it got lost
in the shuffle at work lately.  When I tried to implement this, I realized
that IComponentBorder doesn't really extend from anything that can be added
to a component.  It extends IClusterable, which extends Serializeable, so I
didn't know how to link it to a component.

Simply adding it to a form component doesn't work, I also looked at using
behaviors but they have renderBefore, not beforeRender.

Thanks!
Justin


igor.vaynberg wrote:
 
 use IComponentBorder and then simply add it to each form component or
 subclass formcomponents and add it in the constructor,
 eg textfield.add(new fieldborder());
 
 -igor
 
 public class FieldBorder implements IComponentBorder
 {
 public static final IComponentBorder INSTANCE = new FieldBorder();
 
 public void renderAfter(Component component)
 {
 final Response out = component.getResponse();
 
 ListFeedbackMessage errors =
 component.getSession().getFeedbackMessages().messages(
 new ErrorsFilter(component));
 
 if (errors.size()  0)
 {
 out.write(ul class=\errors\);
 for (FeedbackMessage error : errors)
 {
 out.write(li);
 out.write(error.getMessage().toString());
 out.write(/li);
 }
 out.write(/ul);
 }
 
 }
 
 public void renderBefore(Component component)
 {
 component.setOutputMarkupId(true);
 
 final Response out = component.getResponse();
 
 
 
 final boolean required = isRequired(component);
 
 out.write(label for=\);
 out.write(component.getMarkupId());
 out.write(\);
 
 
 if (required)
 {
 out.write(strongem*/em);
 }
 
 String label = null;
 
 if (component instanceof LabeledWebMarkupContainer)
 {
 IModel labelModel =
 ((LabeledWebMarkupContainer)component).getLabel();
 if (labelModel != null)
 {
 label = labelModel.getObject().toString();
 }
 }
 
 if (label == null)
 {
   label = component.getString(component.getId());
 }
 
 if (!Strings.isEmpty(label))
 {
 out.write(label);
 if (separator)
 {
 out.write(getSeparator());
 }
 }
 
 if (required)
 {
 out.write(/strong);
 }
 
 out.write(/label);
 }
 
 protected String getSeparator()
 {
 return :;
 }
 
 private boolean isRequired(Component component)
 {
 if (component instanceof FormComponent)
 {
 return ((FormComponent)component).isRequired();
 }
 return false;
 }
 
 private static class ErrorsFilter implements IFeedbackMessageFilter
 {
 private final Component target;
 
 public ErrorsFilter(Component target)
 {
 this.target = target;
 }
 
 public boolean accept(FeedbackMessage message)
 {
 if (message.isError()  message.getReporter() != null)
 {
 if (target == message.getReporter())
 {
 return true;
 }
 if (target instanceof MarkupContainer)
 {
 if
 (((MarkupContainer)target).contains(message.getReporter(), true))
 {
 return true;
 }
 }
 }
 return false;
 
 }
 }
 
 
 }
 
 
 On Tue, Jan 13, 2009 at 12:20 PM, walnutmon justin.m.boy...@gmail.com
 wrote:

 All,

 I have a page with many form components, nearly all of them have some
 kind
 of validation associated with them.  I have a feedback panel at the top,
 I'd
 like to move feedback next to each component.  I have thought of some
 ways
 to do this without changing a ton of code, however none really work in
 the
 end because I would still need to add some kind of HTML in order to
 display
 messages.

 Also, nearly everything like this that I have developed in wicket is
 usually
 accompanied by the discovery that wicket already has the functionality
 I'm
 looking for out of the box.  Searching has given me surprisingly little
 with
 regard to this topic though.  Can someone point me in the right
 direction?
 --
 View this message in context:
 http://www.nabble.com/Form-Components-With-Built-In-Feedback-tp21443674p21443674.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: InMethod DataGrid Localization

2009-02-09 Thread Michal Hybler

Thnx for help this should be sufficient.



ryantxu wrote:
 
 For that you may want to try overriding newCell in  
 AbstractLightWeightColumn
 
   public IRenderable newCell(IModel rowModel) {
   return new IRenderable() {
   public void render(IModel rowModel, Response response) {
   return your localized text
   }
   };
   }
 
 
 On Feb 9, 2009, at 10:02 AM, Michal Hybler wrote:
 

 Thanks for your help but I dont need to substitute header but the  
 content of
 rows in explicit collumn.

 id  |  color  |  state
 --
 1   |   red   |  created
 2   |   blue  |  updated

 In this example page which describes database table I need to  
 substitute the
 bold strings. Instead of created i want new for example. Is  
 there way to
 do this by using *.properties file like in case of state header?


 Thnx for help.
 Michal


 ryantxu wrote:

 Yes -- check the examples.  I think all of them use an external
 properties file to declare the header row display.


 On Feb 9, 2009, at 8:50 AM, Michal Hybler wrote:


 Hi,
 is there any support for localization in DataGrid? I need to
 substitute cell
 content of explicit column.

 For example:

 I have row state and it can reach 3 values (created, updated,
 deleted) in my
 database but I want show substitutes for that values in my dataGrid
 (in
 other language).

 Is there any examples?

 Thnx for any suggestions.

 Michal
 -- 
 View this message in context:
 http://www.nabble.com/InMethod-DataGrid-Localization-tp21913141p21913141.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/InMethod-DataGrid-Localization-tp21913141p21914610.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/InMethod-DataGrid-Localization-tp21913141p21915240.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



URL Mapping (Beginner)

2009-02-09 Thread Andreas Balke

Hi guys,

I'm playing around with wicket a bit, but I cannot solve an (probably 
easy) problem: my pages cannot be resolved. The Homepage class is 
reachable, but only be calling the Root URL. Calling an explicit html 
file gives me a Tomcat 404 without useless message...


Am I something missing?

Cheers, Andi


Here is my web.xml

  context-param
  param-namecontextConfigLocation/param-name
  param-value/WEB-INF/Springapp-servlet.xml/param-value
  /context-param
  listener
  
listener-classorg.springframework.web.context.ContextLoaderListener/listener-class 


  /listener

  listener
  
listener-classorg.springframework.web.context.request.RequestContextListener/listener-class 


  /listener

  !-- Wicket example --
  servlet
  servlet-nameWicketApplication/servlet-name
  
servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class 


  init-param
  param-nameapplicationClassName/param-name
  
param-valuede.pansen.wicket.HelloWorldApplication/param-value

  /init-param
  load-on-startup1/load-on-startup
  /servlet
  servlet-mapping
  servlet-nameWicketApplication/servlet-name
  url-pattern/wicket/*/url-pattern
  /servlet-mapping
  !-- dev only... --
  context-param
  param-nameconfiguration/param-name
  param-valuedevelopment/param-value
  /context-param


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



RE: URL Mapping (Beginner)

2009-02-09 Thread Stefan Lindner
You need to do 2 things.

1. Mount your Page in Applicatioin.init() methode like
mountBookmarkablePage(/Login, Login.class);
   As you see, you can give your page any name you want
2. Your e.g. Login.class must have a parameterless constructor or a constructor 
like
  public Login(final PageParameters parameters)

Then you can call your Login-Page directly with URL ../Login

Stefan

-Ursprüngliche Nachricht-
Von: Andreas Balke [mailto:a...@doppelpop.de] 
Gesendet: Montag, 9. Februar 2009 16:59
An: users@wicket.apache.org
Betreff: URL Mapping (Beginner)

Hi guys,

I'm playing around with wicket a bit, but I cannot solve an (probably 
easy) problem: my pages cannot be resolved. The Homepage class is 
reachable, but only be calling the Root URL. Calling an explicit html 
file gives me a Tomcat 404 without useless message...

Am I something missing?

Cheers, Andi


Here is my web.xml

   context-param
   param-namecontextConfigLocation/param-name
   param-value/WEB-INF/Springapp-servlet.xml/param-value
   /context-param
   listener
   
listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
 

   /listener

   listener
   
listener-classorg.springframework.web.context.request.RequestContextListener/listener-class
 

   /listener

   !-- Wicket example --
   servlet
   servlet-nameWicketApplication/servlet-name
   
servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class 

   init-param
   param-nameapplicationClassName/param-name
   
param-valuede.pansen.wicket.HelloWorldApplication/param-value
   /init-param
   load-on-startup1/load-on-startup
   /servlet
   servlet-mapping
   servlet-nameWicketApplication/servlet-name
   url-pattern/wicket/*/url-pattern
   /servlet-mapping
   !-- dev only... --
   context-param
   param-nameconfiguration/param-name
   param-valuedevelopment/param-value
   /context-param


-
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: URL Mapping (Beginner)

2009-02-09 Thread Andreas Balke

Thank you Stefan.

Is there even a more generic way, like telling Wicket: take all in this 
directory? Guess not, since this should be scanned on boot... ?! I just 
would like to skip to register each single class.


Andi

Stefan Lindner wrote:

You need to do 2 things.

1. Mount your Page in Applicatioin.init() methode like
mountBookmarkablePage(/Login, Login.class);
   As you see, you can give your page any name you want
2. Your e.g. Login.class must have a parameterless constructor or a constructor 
like
  public Login(final PageParameters parameters)

Then you can call your Login-Page directly with URL ../Login

Stefan

-Ursprüngliche Nachricht-
Von: Andreas Balke [mailto:a...@doppelpop.de] 
Gesendet: Montag, 9. Februar 2009 16:59

An: users@wicket.apache.org
Betreff: URL Mapping (Beginner)

Hi guys,

I'm playing around with wicket a bit, but I cannot solve an (probably 
easy) problem: my pages cannot be resolved. The Homepage class is 
reachable, but only be calling the Root URL. Calling an explicit html 
file gives me a Tomcat 404 without useless message...


Am I something missing?

Cheers, Andi


Here is my web.xml

   context-param
   param-namecontextConfigLocation/param-name
   param-value/WEB-INF/Springapp-servlet.xml/param-value
   /context-param
   listener
   
listener-classorg.springframework.web.context.ContextLoaderListener/listener-class 


   /listener

   listener
   
listener-classorg.springframework.web.context.request.RequestContextListener/listener-class 


   /listener

   !-- Wicket example --
   servlet
   servlet-nameWicketApplication/servlet-name
   
servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class 


   init-param
   param-nameapplicationClassName/param-name
   
param-valuede.pansen.wicket.HelloWorldApplication/param-value

   /init-param
   load-on-startup1/load-on-startup
   /servlet
   servlet-mapping
   servlet-nameWicketApplication/servlet-name
   url-pattern/wicket/*/url-pattern
   /servlet-mapping
   !-- dev only... --
   context-param
   param-nameconfiguration/param-name
   param-valuedevelopment/param-value
   /context-param


-
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: Using converters properly in Wicket?

2009-02-09 Thread Igor Vaynberg
yes, they need to be threadsafe if you cache them. numberformat itself
is also not threadsafe. another reason i can think of why we clone is
that a code that gets a bigdecimalconverter via getconverter() can
execute setters on it and modify it- which will affect the converter
globally. im not really sure how important the latter is since you
would have to downcast the interface, but still. perhaps some sort of
instance cache is in order.

-igor

On Mon, Feb 9, 2009 at 1:26 AM, Martin Makundi
martin.maku...@koodaripalvelut.com wrote:
 why dont you create your own converter for now and see how that
 improves things. we are talking about something that took 1.4 seconds
 out of at least a 100+ second test...

 Ok, I am refactoring my code right now. It is not a 100 second test..
 the profiler is running while I am analyzing it so the (idle) server
 thread is not related. The test duration can be observed from the
 WicketServlet.service -call, which is about 24 seconds. I am concerned
 about BigDecimalConverterinit and
 BigDecimalConverter.getNumberFormat because they are the only
 intrinsic operations that show up on the hotspot list. Everything
 else that show's up is more or less 'business logic'. I would prefer
 the fundamental intrinsic stuff from the framework not to show up in
 the test :)

 ::: Results after creating my own ParametrizedConverterLocator:

 - the profiler does not show any more of those BigDecimalConverters.
 Why? Because I cache them in ParametrizedConverterLocator using a
 WeakHashMap. Also the NumberFormat instantiations have disappeared
 because it is initializede only once and all the later invocations use
 the cloned copy. It appears that there is really no need to hassle
 with a threadLocal NumberFormat.

 I wonder if I should make the ParametrizedConverterLocator converter
 map thread-safe? The wicket's ConverterLocator.classToConverter
 appears non thread-safe, from what I can see. Can that become a
 problem?

 **
 Martin

 On Sun, Feb 8, 2009 at 11:31 PM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 im not sure how necessary the threadlocal is. yes, it took up 6mb of
 memory, but those instances are not being held on to, so if you run GC
 all that memory will be reclaimed.

 I am more concerned with the cpu hog than the memory hog associated
 with the converter.

 **
 Martin


 On Sun, Feb 8, 2009 at 8:55 PM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 Cool. What is your take on using a ThreaLocal instead of always
 cloning return (NumberFormat)numberFormat.clone(); in
 org.apache.wicket.util.convert.converters.AbstractDecimalConverter#getNumberFormat(java.util.Locale)

 **
 Martin

 2009/2/9 Igor Vaynberg igor.vaynb...@gmail.com:
 On Sun, Feb 8, 2009 at 7:46 PM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 Another thing that came into my mind is, that there is
 newNumberFormat(Locale locale) -method in AbstractDecimalConverter,
 but the method is never used [instead, there is a direct numberFormat
 = NumberFormat.getInstance(locale); -invocation in
 getNumberFormat(Locale locale)].

 fixed

 -igor

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



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



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



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



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



 -
 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: Nested forms : don't process inner form when outer form is submitted

2009-02-09 Thread Igor Vaynberg
try letting your inner form implement IFormVisitorParticipant.

another way is to override isrequired() and check for the submitting component.

-igor

On Mon, Feb 9, 2009 at 3:17 AM, Marieke Vandamme ma...@tvh.be wrote:

 Hello,

 I've been reading a lot about nested forms and what should happen with the
 inner forms when the outer form gets submitted. But I didn't found out how
 you can implement what i'm trying:

 I have inner form with some RequiredTextFields on it. These are required
 when the inner form is processed with an AjaxButton, but not when the outer
 form is submitted.

 How can I do this? Thanks for any help !!! Marieke.
 --
 View this message in context: 
 http://www.nabble.com/Nested-forms-%3A-don%27t-process-inner-form-when-outer-form-is-submitted-tp21910941p21910941.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: SubmitLink only calls form.onsubmit with 1.4-rc2

2009-02-09 Thread Igor Vaynberg
jira it up.

-igor

On Mon, Feb 9, 2009 at 6:27 AM, Marieke Vandamme ma...@tvh.be wrote:

 Hello,

 I already use 1.4-rc2 for my projects, and found some error within the
 SubmitLink.

 Form form = new Form(webform){
public void onSubmit(){
System.out.println(on form submit);
}
};
add(form);
form.add(new SubmitLink(btnSubmit1){
public void onSubmit(){
System.out.println(on submit link clicked - ON FORM);
}
});
add(new SubmitLink(btnSubmit2, form){
public void onSubmit(){
System.out.println(on submit link clicked - OUTSIDE FORM);
}
});

 The submit link that's on the form functions correctly, but the one outside
 doesn't. on submit link clicked - OUTSIDE FORM doesn't get printed. I tested
 with 1.4-rc1 and that works correctly.

 Do I need to report jira for this or is 1.4-rc2 still under massive
 construction? Thanks. Marieke.
 --
 View this message in context: 
 http://www.nabble.com/SubmitLink-only-calls-form.onsubmit-with-1.4-rc2-tp21913795p21913795.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: problem deploying quickstart application on tomcat+apache (mod_jk)

2009-02-09 Thread Vika

I discovered that if in mod_jk.conf i change

JkMount /quickstart/app/* ajp13

to 

JkMount /quickstart/* ajp13

it works. 

Servlet mapping in  web.xml :

servlet-mapping
servlet-namequickstart/servlet-name
url-pattern/app/*/url-pattern
/servlet-mapping

Any idea how I can solve this problem ? I wouldn't want all requests to be
directed to tomcat.

Thanks

Vicky









-- 
View this message in context: 
http://www.nabble.com/problem-deploying-quickstart-application-on-tomcat%2Bapache-%28mod_jk%29-tp21882831p21916488.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



Bug modal.js when wicket in production mode / setStripJavascriptCommentsAndWhitespace(true)

2009-02-09 Thread Antoine Angenieux

Hi all,

I can't tell you from which version it started, but in wicket-1.3 (as 
from the latest version on SVN), as soon as I do a 
setStripJavascriptCommentsAndWhitespace(true) or set the wicket mode to 
production, I get javascript errors in modal.js : (line 64 / 65 of the 
received javascript)


e.clientX = evt.clientX + Wicket.Iframe.findPosX(iframe) - dx;
e.clientY = evt.clientY + Wicket.Iframe.findPosY(iframe) - dy; 
doc.onmousemove(e); } idoc.old_onmouseup = idoc.old_onmousemove;

idoc.onmouseup = function(evt) {

Both IE (67) and firefox (1.5+,2+) complain about the } right before 
idoc.old_onmouseoup =...


Did anyone else encounter this ? Should I oppen a JIRA ticket ?

Thanks in advance,

Cheers,

Antoine.

PS: I did not have enough time to check if the behavior was the same in 
1.4 trunk.


--
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: URL Mapping (Beginner)

2009-02-09 Thread Matthew Hanlon
You can use PackageRequestTargetUrlCodingStrategy to mount an entire
package.  E.g., if you have a package com.company.pages with classes Page1,
Page2, etc., you can mount the package
mount(new PackageRequestTargetUrlCodingStrategy(/pages,
PackageName.forClass(Page1.class))).
 This will mount your pages as /pages/Page1, pages/Page2, etc.
Regards,
Matt.

On Mon, Feb 9, 2009 at 10:12 AM, Andreas Balke a...@doppelpop.de wrote:

 Thank you Stefan.

 Is there even a more generic way, like telling Wicket: take all in this
 directory? Guess not, since this should be scanned on boot... ?! I just
 would like to skip to register each single class.

 Andi


 Stefan Lindner wrote:

 You need to do 2 things.

 1. Mount your Page in Applicatioin.init() methode like
mountBookmarkablePage(/Login, Login.class);
   As you see, you can give your page any name you want
 2. Your e.g. Login.class must have a parameterless constructor or a
 constructor like
  public Login(final PageParameters parameters)

 Then you can call your Login-Page directly with URL ../Login

 Stefan

 -Ursprüngliche Nachricht-
 Von: Andreas Balke [mailto:a...@doppelpop.de] Gesendet: Montag, 9.
 Februar 2009 16:59
 An: users@wicket.apache.org
 Betreff: URL Mapping (Beginner)

 Hi guys,

 I'm playing around with wicket a bit, but I cannot solve an (probably
 easy) problem: my pages cannot be resolved. The Homepage class is reachable,
 but only be calling the Root URL. Calling an explicit html file gives me a
 Tomcat 404 without useless message...

 Am I something missing?

 Cheers, Andi


 Here is my web.xml

   context-param
   param-namecontextConfigLocation/param-name
   param-value/WEB-INF/Springapp-servlet.xml/param-value
   /context-param
   listener

 listener-classorg.springframework.web.context.ContextLoaderListener/listener-class

   /listener

   listener

 listener-classorg.springframework.web.context.request.RequestContextListener/listener-class

   /listener

   !-- Wicket example --
   servlet
   servlet-nameWicketApplication/servlet-name

 servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class

   init-param
   param-nameapplicationClassName/param-name

 param-valuede.pansen.wicket.HelloWorldApplication/param-value
   /init-param
   load-on-startup1/load-on-startup
   /servlet
   servlet-mapping
   servlet-nameWicketApplication/servlet-name
   url-pattern/wicket/*/url-pattern
   /servlet-mapping
   !-- dev only... --
   context-param
   param-nameconfiguration/param-name
   param-valuedevelopment/param-value
   /context-param


 -
 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




-- 
Matthew Rollins Hanlon
http://squareoftwo.org
_
Hanlon's Razor:
Never attribute to malice that which can be adequately explained by
stupidity.
http://wikipedia.org/wiki/Hanlon's_razor


Re: SubmitLink only calls form.onsubmit with 1.4-rc2

2009-02-09 Thread Igor Vaynberg
nevermind, fixed: WICKET-2093

-igor

On Mon, Feb 9, 2009 at 8:30 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 jira it up.

 -igor

 On Mon, Feb 9, 2009 at 6:27 AM, Marieke Vandamme ma...@tvh.be wrote:

 Hello,

 I already use 1.4-rc2 for my projects, and found some error within the
 SubmitLink.

 Form form = new Form(webform){
public void onSubmit(){
System.out.println(on form submit);
}
};
add(form);
form.add(new SubmitLink(btnSubmit1){
public void onSubmit(){
System.out.println(on submit link clicked - ON FORM);
}
});
add(new SubmitLink(btnSubmit2, form){
public void onSubmit(){
System.out.println(on submit link clicked - OUTSIDE FORM);
}
});

 The submit link that's on the form functions correctly, but the one outside
 doesn't. on submit link clicked - OUTSIDE FORM doesn't get printed. I tested
 with 1.4-rc1 and that works correctly.

 Do I need to report jira for this or is 1.4-rc2 still under massive
 construction? Thanks. Marieke.
 --
 View this message in context: 
 http://www.nabble.com/SubmitLink-only-calls-form.onsubmit-with-1.4-rc2-tp21913795p21913795.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: Session Constructor

2009-02-09 Thread Igor Vaynberg
fixed.

-igor

2009/2/9 Uwe Schäfer schae...@thomas-daily.de:
 Hi

 i just stumbled across this code in 1.4m3:

 public Session(Request request){
  locale = request.getLocale();
  if (locale == null){
   throw new IllegalArgumentException(Parameter 'locale' must not be null);
  }
 }

 please don´t call me picky, but am i right to say, that thiss error message
 is slightly wrong?

 cu uwe
 --

 THOMAS DAILY GmbH
 Adlerstraße 19
 79098 Freiburg
 Deutschland
 T  + 49 761 3 85 59 0
 F  + 49 761 3 85 59 550
 E  schae...@thomas-daily.de
 www.thomas-daily.de

 Geschäftsführer/Managing Directors:
 Wendy Thomas, Susanne Larbig
 Handelsregister Freiburg i.Br., HRB 3947

 Registrieren Sie sich unter http://morningnews.thomas-daily.de für die
 kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages
 morgens um 9:00 in Ihrer Mailbox.

 Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um
 8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 16:00
 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer Redaktion
 lautet redakt...@thomas-daily.de.


 -
 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: final Session.setLocale (1.4m3)

2009-02-09 Thread Igor Vaynberg
2009/2/9 Uwe Schäfer schae...@thomas-daily.de:
 hi

 why is it, that setLocale(Locale) is final on Session ?
 i´d really like to overwirte that in order to be able to hook some
 preference-storing stuff in there, like setting cookies and/or updating
 persistent preference data.

it is no longer final in rc3

 i´d understand it, if Session´s constructor would call it, but that is not
 the case either, as it does an assignment to the private field:

 public Session(Request request){
  locale = request.getLocale();

 what did i miss?

yes, you missed the fact that #setLocale() marks session object as
dirty - the constructor does not have to do this because the initial
locale is not a change so no need to mark session as dirty.

-igor



 cu uwe

 --

 THOMAS DAILY GmbH
 Adlerstraße 19
 79098 Freiburg
 Deutschland
 T  + 49 761 3 85 59 0
 F  + 49 761 3 85 59 550
 E  schae...@thomas-daily.de
 www.thomas-daily.de

 Geschäftsführer/Managing Directors:
 Wendy Thomas, Susanne Larbig
 Handelsregister Freiburg i.Br., HRB 3947

 Registrieren Sie sich unter http://morningnews.thomas-daily.de für die
 kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages
 morgens um 9:00 in Ihrer Mailbox.

 Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um
 8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 16:00
 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer Redaktion
 lautet redakt...@thomas-daily.de.


 -
 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: URL Mapping (Beginner)

2009-02-09 Thread Andreas Balke

excellent :)


Matthew Hanlon wrote:

You can use PackageRequestTargetUrlCodingStrategy to mount an entire
package.  E.g., if you have a package com.company.pages with classes Page1,
Page2, etc., you can mount the package
mount(new PackageRequestTargetUrlCodingStrategy(/pages,
PackageName.forClass(Page1.class))).
 This will mount your pages as /pages/Page1, pages/Page2, etc.
Regards,
Matt.

On Mon, Feb 9, 2009 at 10:12 AM, Andreas Balke a...@doppelpop.de wrote:

  

Thank you Stefan.

Is there even a more generic way, like telling Wicket: take all in this
directory? Guess not, since this should be scanned on boot... ?! I just
would like to skip to register each single class.

Andi


Stefan Lindner wrote:



You need to do 2 things.

1. Mount your Page in Applicatioin.init() methode like
   mountBookmarkablePage(/Login, Login.class);
  As you see, you can give your page any name you want
2. Your e.g. Login.class must have a parameterless constructor or a
constructor like
 public Login(final PageParameters parameters)

Then you can call your Login-Page directly with URL ../Login

Stefan

-Ursprüngliche Nachricht-
Von: Andreas Balke [mailto:a...@doppelpop.de] Gesendet: Montag, 9.
Februar 2009 16:59
An: users@wicket.apache.org
Betreff: URL Mapping (Beginner)

Hi guys,

I'm playing around with wicket a bit, but I cannot solve an (probably
easy) problem: my pages cannot be resolved. The Homepage class is reachable,
but only be calling the Root URL. Calling an explicit html file gives me a
Tomcat 404 without useless message...

Am I something missing?

Cheers, Andi


Here is my web.xml

  context-param
  param-namecontextConfigLocation/param-name
  param-value/WEB-INF/Springapp-servlet.xml/param-value
  /context-param
  listener

listener-classorg.springframework.web.context.ContextLoaderListener/listener-class

  /listener

  listener

listener-classorg.springframework.web.context.request.RequestContextListener/listener-class

  /listener

  !-- Wicket example --
  servlet
  servlet-nameWicketApplication/servlet-name

servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class

  init-param
  param-nameapplicationClassName/param-name

param-valuede.pansen.wicket.HelloWorldApplication/param-value
  /init-param
  load-on-startup1/load-on-startup
  /servlet
  servlet-mapping
  servlet-nameWicketApplication/servlet-name
  url-pattern/wicket/*/url-pattern
  /servlet-mapping
  !-- dev only... --
  context-param
  param-nameconfiguration/param-name
  param-valuedevelopment/param-value
  /context-param


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


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



  

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






  


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



Re: final Session.setLocale (1.4m3)

2009-02-09 Thread Uwe Schäfer

Igor Vaynberg schrieb:

Hi Igor,


it is no longer final in rc3


*g*


what did i miss?

yes, you missed the fact that #setLocale() marks session object as
dirty - 


damn right. thx.

cu uwe

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



Re: final Session.setLocale (1.4m3)

2009-02-09 Thread Martijn Dashorst
If you want better merge support you should try the apache git mirrors
provided by Jukka Zitting. Git's merging support is pretty solid
compared to svn's. And much faster :)

It would make keeping your own local fork up to date with main wicket
much easier I guess.

Martijn

(note: I'm not a experienced git user, but enjoy the local branches
and revision control it provides)

On Mon, Feb 9, 2009 at 4:03 PM, Uwe Schäfer schae...@thomas-daily.de wrote:
 Martijn Dashorst schrieb:

 Hi Martijn

 Why are you doing this with 1.4M3? 1.4RC2 is about to be made available.

 thanks for taking the time.

 well, we have an essential local patch against 1.4m3 which would not make it
 into the official wicket code, but is necessary for us (related to caucho,
 https and file-uploads, see
 https://issues.apache.org/jira/browse/WICKET-1861).
 another idea, why we would like to stick to a certain version we released a
 webapp on, is simply never to change a running system.

 besides: it is not like RC1 has any changes regarding that code, has it?
 i just took a look at rc1 sources, and setLocale(Locale) is final there too.

 cu uwe

 --

 THOMAS DAILY GmbH
 Adlerstraße 19
 79098 Freiburg
 Deutschland
 T  + 49 761 3 85 59 0
 F  + 49 761 3 85 59 550
 E  schae...@thomas-daily.de
 www.thomas-daily.de

 Geschäftsführer/Managing Directors:
 Wendy Thomas, Susanne Larbig
 Handelsregister Freiburg i.Br., HRB 3947

 Registrieren Sie sich unter http://morningnews.thomas-daily.de für die
 kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages
 morgens um 9:00 in Ihrer Mailbox.

 Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um
 8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 16:00
 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer Redaktion
 lautet redakt...@thomas-daily.de.


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





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

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



Re: Using converters properly in Wicket?

2009-02-09 Thread Martin Makundi
Ok, then why Wicket's ConverterLocator is not thread safe? Or is it?

**
Martin

2009/2/9 Igor Vaynberg igor.vaynb...@gmail.com:
 yes, they need to be threadsafe if you cache them. numberformat itself
 is also not threadsafe. another reason i can think of why we clone is
 that a code that gets a bigdecimalconverter via getconverter() can
 execute setters on it and modify it- which will affect the converter
 globally. im not really sure how important the latter is since you
 would have to downcast the interface, but still. perhaps some sort of
 instance cache is in order.

 -igor

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



Re: Bug modal.js when wicket in production mode / setStripJavascriptCommentsAndWhitespace(true)

2009-02-09 Thread Matej Knopp
Hi,

thanks for the report. Should be fixed in SVN.

-Matej

On Mon, Feb 9, 2009 at 5:35 PM, Antoine Angenieux
aangeni...@clinigrid.com wrote:
 Hi all,

 I can't tell you from which version it started, but in wicket-1.3 (as from
 the latest version on SVN), as soon as I do a
 setStripJavascriptCommentsAndWhitespace(true) or set the wicket mode to
 production, I get javascript errors in modal.js : (line 64 / 65 of the
 received javascript)

 e.clientX = evt.clientX + Wicket.Iframe.findPosX(iframe) - dx;
 e.clientY = evt.clientY + Wicket.Iframe.findPosY(iframe) - dy;
 doc.onmousemove(e); } idoc.old_onmouseup = idoc.old_onmousemove;
 idoc.onmouseup = function(evt) {

 Both IE (67) and firefox (1.5+,2+) complain about the } right before
 idoc.old_onmouseoup =...

 Did anyone else encounter this ? Should I oppen a JIRA ticket ?

 Thanks in advance,

 Cheers,

 Antoine.

 PS: I did not have enough time to check if the behavior was the same in 1.4
 trunk.

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



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



Re: URL Mapping (Beginner)

2009-02-09 Thread Maarten Bosteels
Or you can specify the mount path on the Page class itself:

http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-annotation

regards,
Maarten

On Mon, Feb 9, 2009 at 5:49 PM, Andreas Balke a...@doppelpop.de wrote:

 excellent :)



 Matthew Hanlon wrote:

 You can use PackageRequestTargetUrlCodingStrategy to mount an entire
 package.  E.g., if you have a package com.company.pages with classes
 Page1,
 Page2, etc., you can mount the package
 mount(new PackageRequestTargetUrlCodingStrategy(/pages,
 PackageName.forClass(Page1.class))).
  This will mount your pages as /pages/Page1, pages/Page2, etc.
 Regards,
 Matt.

 On Mon, Feb 9, 2009 at 10:12 AM, Andreas Balke a...@doppelpop.de wrote:



 Thank you Stefan.

 Is there even a more generic way, like telling Wicket: take all in this
 directory? Guess not, since this should be scanned on boot... ?! I just
 would like to skip to register each single class.

 Andi


 Stefan Lindner wrote:



 You need to do 2 things.

 1. Mount your Page in Applicatioin.init() methode like
   mountBookmarkablePage(/Login, Login.class);
  As you see, you can give your page any name you want
 2. Your e.g. Login.class must have a parameterless constructor or a
 constructor like
 public Login(final PageParameters parameters)

 Then you can call your Login-Page directly with URL ../Login

 Stefan

 -Ursprüngliche Nachricht-
 Von: Andreas Balke [mailto:a...@doppelpop.de] Gesendet: Montag, 9.
 Februar 2009 16:59
 An: users@wicket.apache.org
 Betreff: URL Mapping (Beginner)

 Hi guys,

 I'm playing around with wicket a bit, but I cannot solve an (probably
 easy) problem: my pages cannot be resolved. The Homepage class is
 reachable,
 but only be calling the Root URL. Calling an explicit html file gives
 me a
 Tomcat 404 without useless message...

 Am I something missing?

 Cheers, Andi


 Here is my web.xml

  context-param
  param-namecontextConfigLocation/param-name
  param-value/WEB-INF/Springapp-servlet.xml/param-value
  /context-param
  listener


 listener-classorg.springframework.web.context.ContextLoaderListener/listener-class

  /listener

  listener


 listener-classorg.springframework.web.context.request.RequestContextListener/listener-class

  /listener

  !-- Wicket example --
  servlet
  servlet-nameWicketApplication/servlet-name


 servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class

  init-param
  param-nameapplicationClassName/param-name

 param-valuede.pansen.wicket.HelloWorldApplication/param-value
  /init-param
  load-on-startup1/load-on-startup
  /servlet
  servlet-mapping
  servlet-nameWicketApplication/servlet-name
  url-pattern/wicket/*/url-pattern
  /servlet-mapping
  !-- dev only... --
  context-param
  param-nameconfiguration/param-name
  param-valuedevelopment/param-value
  /context-param


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


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





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









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




Re: Using converters properly in Wicket?

2009-02-09 Thread Igor Vaynberg
which part of it is not threadsafe?

-igor

On Mon, Feb 9, 2009 at 9:32 AM, Martin Makundi
martin.maku...@koodaripalvelut.com wrote:
 Ok, then why Wicket's ConverterLocator is not thread safe? Or is it?

 **
 Martin

 2009/2/9 Igor Vaynberg igor.vaynb...@gmail.com:
 yes, they need to be threadsafe if you cache them. numberformat itself
 is also not threadsafe. another reason i can think of why we clone is
 that a code that gets a bigdecimalconverter via getconverter() can
 execute setters on it and modify it- which will affect the converter
 globally. im not really sure how important the latter is since you
 would have to downcast the interface, but still. perhaps some sort of
 instance cache is in order.

 -igor

 -
 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: Bug modal.js when wicket in production mode / setStripJavascriptCommentsAndWhitespace(true)

2009-02-09 Thread Antoine Angenieux

Fantastic Matej, you're the man ;)

Cheers,

Antoine.

Matej Knopp wrote:

Hi,

thanks for the report. Should be fixed in SVN.

-Matej

On Mon, Feb 9, 2009 at 5:35 PM, Antoine Angenieux
aangeni...@clinigrid.com wrote:

Hi all,

I can't tell you from which version it started, but in wicket-1.3 (as from
the latest version on SVN), as soon as I do a
setStripJavascriptCommentsAndWhitespace(true) or set the wicket mode to
production, I get javascript errors in modal.js : (line 64 / 65 of the
received javascript)

e.clientX = evt.clientX + Wicket.Iframe.findPosX(iframe) - dx;
e.clientY = evt.clientY + Wicket.Iframe.findPosY(iframe) - dy;
doc.onmousemove(e); } idoc.old_onmouseup = idoc.old_onmousemove;
idoc.onmouseup = function(evt) {

Both IE (67) and firefox (1.5+,2+) complain about the } right before
idoc.old_onmouseoup =...

Did anyone else encounter this ? Should I oppen a JIRA ticket ?

Thanks in advance,

Cheers,

Antoine.

PS: I did not have enough time to check if the behavior was the same in 1.4
trunk.

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




-
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: static pages dynamic pages. How to have the same layout

2009-02-09 Thread Vika

Thank you for the responses!

I am trying to add a static link (equivalent to Hello World as a Static
Page in the example) to my test page but running into problems. Is there a
way for me to get a complete .war file for this example? 

If not,  could  anyone clarify where on the file system docs/hello.html
should be located ?

My link points to http://poema2.gsfc.nasa.gov/quickstart/app/docs/hello.html

i tried these variations
1) ~tomcat/webapps/quickstart/docs/hello.html
2) ~tomcat/webapps/quickstart/classes/docs/hello.html
3) ~tomcat/webapps/quickstart/WEB-INF/docs/hello.html

but I keep getting 404 error.

servlet mapping in my web.hml:
   servlet-mapping
servlet-namequickstart/servlet-name
url-pattern/app/*/url-pattern
/servlet-mapping




thanks

Vicky


jWeekend wrote:
 
 Vicky,
 
 Take a look at  http://www.wicket-library.com/wicket-examples/staticpages/
 too.
 
 Regards - Cemal
  http://www.jWeekend.co.uk jWeekend 
 
 
 Vika wrote:
 
 
 kinabalu wrote:
 
  Can you elaborate  
 on your current architecture so we can let you know how Wicket can  
 achieve this?
 
 
 There are two categories pages on the site.
 1) dynamic content - jsp/servlet
 2) static content - html
 
 Both categories of pages only display the content. Navigation bar,
 header and footer are added  to both categories of pages using sitemesh
 (servlet filter).  So what should happen to the static html pages if i
 want to switch from using jsp/servlet to wicket ? Static content html
 pages are edited by someone who is not a programmer and  I would not want
 to put them together with java classes. It sounds like i could keep using
 sitemesh and it should still work. However is there a better way of doing
 it ?
 
 thanks
 
 Vicky
 
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/static-pages---dynamic--pages.-How-to-have-the-same-layout-tp21840098p21919005.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: problem deploying quickstart application on tomcat+apache (mod_jk)

2009-02-09 Thread Erik van Oosten

Only requests that start with /quickstart are directed to Tomcat.
Only requests that start with /quickstart/app are directed to Wicket.

BTW, it is recommended to use Wicket from a Filter instead of a Servlet.

Regards,
   Erik.


Vika wrote

I discovered that if in mod_jk.conf i change

JkMount /quickstart/app/* ajp13

to 


JkMount /quickstart/* ajp13

it works. 


Servlet mapping in  web.xml :

servlet-mapping
servlet-namequickstart/servlet-name
url-pattern/app/*/url-pattern
/servlet-mapping

Any idea how I can solve this problem ? I wouldn't want all requests to be
directed to tomcat.

Thanks

Vicky

  



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


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



Problem with WebRequestCodingStrategy's and mobile phones

2009-02-09 Thread Jeremy Levy
We figured out something very interesting with the default URL coding
strategy's that Wicket uses when using mobile phones / devices.

We run a fairly heavily trafficked mobile site, and having been using
CryptedUrlWebRequestCodingStrategy for sometime.  While attempting to debug
some page timeout issues we switched to UrlCompressingWebCodingStrategy and
we started getting compaints from users that they were getting HTTP error
400's.

We were able to repeat the error locally, it happened only when using some
specific phones and mobile browsers.  Specifically on the Motorola V3
(useragent: MOT-V3re/0E.40.29R MIB/2.2.1 Profile/MIDP-2.0
Configuration/CLDC-1.1 UP.Link/6.3.1.20.06.3.1.20.0) and other UP.Link
browser moble phones.  We noticed that when the user got the 400 error there
was nothing in our tomcat logs, or even in our apache logs.

Switching to standard WebRequestCodingStrategy had the same issue.  I
suspect that there are some characters in the form submit url ( :'s ?) that
this crappy browser can't figure out to post to.  Swiching back to
CryptedUrlWebRequestCodingStrategy fixed the problem.

We tested this on several other handsets that we have available and can
confirm that it breaks all form submits.

This is a some what obsecure case, and perhaps irrelvant if you don't run a
mobile site, but we saw our number's drop by about 20% - 50% until we
figured this out.

Hope this helps someone else.

Jeremy

-- 
Jeremy Levy

See my location in real-time:
http://seemywhere.com/jeremy


Re: problem deploying quickstart application on tomcat+apache (mod_jk)

2009-02-09 Thread Vika

Thank you!

 I switched to Filter and the problem is gone - Now it works with JkMount
/quickstart/app/* ajp13

Vicky


Erik van Oosten wrote:
 
 Only requests that start with /quickstart are directed to Tomcat.
 Only requests that start with /quickstart/app are directed to Wicket.
 
 BTW, it is recommended to use Wicket from a Filter instead of a Servlet.
 
 Regards,
 Erik.
 
 
 Vika wrote
 I discovered that if in mod_jk.conf i change

 JkMount /quickstart/app/* ajp13

 to 

 JkMount /quickstart/* ajp13

 it works. 

 Servlet mapping in  web.xml :

 servlet-mapping
 servlet-namequickstart/servlet-name
 url-pattern/app/*/url-pattern
 /servlet-mapping

 Any idea how I can solve this problem ? I wouldn't want all requests to
 be
 directed to tomcat.

 Thanks

 Vicky

   
 
 
 -- 
 Erik van Oosten
 http://www.day-to-day-stuff.blogspot.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/problem-deploying-quickstart-application-on-tomcat%2Bapache-%28mod_jk%29-tp21882831p21922299.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



Building and using TinyMCE in Wicket

2009-02-09 Thread ashtek

Hey all,
  
  I am trying to use TinyMCE, and I downloaded all the source from here - 

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/tinymce-parent/

This creates a folder called tinymce-parent which in turn has two subfolders
tinymce and tinymce-examples.

Whatever I do, I am not able to build using maven. When I say mvn clean
compile or mvn install, i just get a empty jar file in my repo. 

Can someone help?

Thanks!
-- 
View this message in context: 
http://www.nabble.com/Building-and-using-TinyMCE-in-Wicket-tp21924857p21924857.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: Using converters properly in Wicket?

2009-02-09 Thread Martin Makundi
 which part of it is not threadsafe?

/** Maps Classes to ITypeConverters. */
private final MapString, IConverter classToConverter = new
HashMapString, IConverter();

The ConverterLocator.get(XX) can be used from multiple threads, can it
not? In that case, the HashMap would not be thread-safe..?

public final IConverter get(Class? c)
{
return classToConverter.get(c.getName());
}

**
Martin

 On Mon, Feb 9, 2009 at 9:32 AM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 Ok, then why Wicket's ConverterLocator is not thread safe? Or is it?

 **
 Martin

 2009/2/9 Igor Vaynberg igor.vaynb...@gmail.com:
 yes, they need to be threadsafe if you cache them. numberformat itself
 is also not threadsafe. another reason i can think of why we clone is
 that a code that gets a bigdecimalconverter via getconverter() can
 execute setters on it and modify it- which will affect the converter
 globally. im not really sure how important the latter is since you
 would have to downcast the interface, but still. perhaps some sort of
 instance cache is in order.

 -igor

 -
 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: Using converters properly in Wicket?

2009-02-09 Thread Igor Vaynberg
as long as there are no sets you can run concurrent reads on the
hashmap. and since the setters are only called when the application is
initialized we are ok.

-igor

On Mon, Feb 9, 2009 at 9:36 PM, Martin Makundi
martin.maku...@koodaripalvelut.com wrote:
 which part of it is not threadsafe?

/** Maps Classes to ITypeConverters. */
private final MapString, IConverter classToConverter = new
 HashMapString, IConverter();

 The ConverterLocator.get(XX) can be used from multiple threads, can it
 not? In that case, the HashMap would not be thread-safe..?

 public final IConverter get(Class? c)
{
return classToConverter.get(c.getName());
}

 **
 Martin

 On Mon, Feb 9, 2009 at 9:32 AM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 Ok, then why Wicket's ConverterLocator is not thread safe? Or is it?

 **
 Martin

 2009/2/9 Igor Vaynberg igor.vaynb...@gmail.com:
 yes, they need to be threadsafe if you cache them. numberformat itself
 is also not threadsafe. another reason i can think of why we clone is
 that a code that gets a bigdecimalconverter via getconverter() can
 execute setters on it and modify it- which will affect the converter
 globally. im not really sure how important the latter is since you
 would have to downcast the interface, but still. perhaps some sort of
 instance cache is in order.

 -igor

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



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



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



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



How to handle this exception properly

2009-02-09 Thread Anton Veretennikov
Hello, all wicket users!

I receive HTTP Status 500 error in this situation:

I have a page with empty html-file and page's onRender() looks like:

OutputStreamWriter writer = null;
try {
  writer = new OutputStreamWriter(getResponse().getOutputStream(),
encoding);
  String enc = getRequestCycle().getResponse().getCharacterEncoding();
  writer.append(!-- + enc + --\n);
  writer.append(.);
} catch (UnsupportedEncodingException ex) {
  throw new WicketRuntimeException(Invalid charset:  + ex.getMessage());
} catch (IOException ex) {
  throw new WicketRuntimeException(IOException:  + ex.getMessage());
} finally {
  if (writer != null) {
try {
  writer.close();
} catch (IOException ex) {
}
  }
}


The problem is when this first catch is reached (because encoding
desired is sent as a parameter that could be errouneous) and

  new WicketRuntimeException(Invalid charset:  + ex.getMessage());

is thrown I see HTTP Status 500 error with this:

ERROR - WicketFilter   - closing the buffer error
java.lang.IllegalStateException: getOutputStream() has already been
called for this response
at org.apache.catalina.connector.Response.getWriter(Response.java:610)
at 
org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)
at 
org.apache.wicket.protocol.http.WebResponse.write(WebResponse.java:365)
at 
org.apache.wicket.protocol.http.BufferedWebResponse.close(BufferedWebResponse.java:73)
at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:471)
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:288)

I would like to know is it proper to throw WicketRuntimeException in
such situation.
For example I want to show standart Wicket Error page.

Thank you very much.

-- Tony

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