Re: Override ResourceModel

2009-03-17 Thread alexander.elsholz
the translated text, but without the static extra String. if i set a breakpoint in the getObject-method, the breakpoint was never achieved. alex igor.vaynberg wrote: what does the label output? -igor On Mon, Mar 16, 2009 at 2:52 PM, alexander.elsholz alexander.elsh...@widas.de wrote:

Re: I18n and nice URLs

2009-03-17 Thread manu161184
Hi, I have been try to write an url coding strategy class : mount(new LocaleRequestTargetUrlCodingStrategy(fr/accueil,Home.class)); mount(new LocaleRequestTargetUrlCodingStrategy(en/home,Home.class)); class LocaleRequestTargetUrlCodingStrategy extends AbstractRequestTargetUrlCodingStrategy {

Wicket Problems On Ubuntu

2009-03-17 Thread carloc
Hi Everyone, I'm getting this error which causes my application to not work at all. It works perfectly fine on windows but when I transfer to Ubuntu Linux this happens. I am deploying to a websphere 6.1 in both scenarios and I am using Wicket version 1.3.5, PLease help thanks a lot. Thank you

Re: I18n and nice URLs

2009-03-17 Thread Andreas Petersson
matches(IRequestTarget requestTarget) // but here how i can get the current locale to determine if /fr/accueil or /en/home matchs this mounter ??? Session.get().getLocale().getLanguage() decode(RequestParameters requestParameters) { // but here how i can change the current locale

Re: I18n and nice URLs

2009-03-17 Thread manu161184
ahhh yes... Sorry :blush: thanks! Andreas Petersson wrote: matches(IRequestTarget requestTarget) // but here how i can get the current locale to determine if /fr/accueil or /en/home matchs this mounter ??? Session.get().getLocale().getLanguage() decode(RequestParameters

Re: Wicket Problems On Ubuntu

2009-03-17 Thread Pointbreak
Your LoginPage.html has special (non-ascii) characters, and is stored in another encoding than you read it (probably a windows encoding). Save it in e.g. UTF-8, and tell wicket to use UTF-8 as the encoding for reading page templates. Or replace your special characters with HTML codes for those

[NEWBIE] How to do if... else... switch... in wicket html ?

2009-03-17 Thread Ista Pouss
Hi, What is the best technique to do some if else and so on with wicket ? I need a html with something like that (stupid and naïve approch) : wicket:if (something = toto) div do this thing/div wicket:else if (something = foo) pa href=error.htmlIt's not good/a/p wicket:else if (something =

Re: [NEWBIE] How to do if... else... switch... in wicket html ?

2009-03-17 Thread Linda van der Pal
You don't do it in the HTML, but in the java code. So you create a component that takes care of the if-else for you. Linda Ista Pouss wrote: Hi, What is the best technique to do some if else and so on with wicket ? I need a html with something like that (stupid and naïve approch) :

Re: [NEWBIE] How to do if... else... switch... in wicket html ?

2009-03-17 Thread francisco treacy
div wicket:id=text/div String text; if () { text = ... } else text = ... add(new Label(text, text)) if you need different hierarchies (i.e. not just one Label), then use Panels or Fragments instead francisco On Tue, Mar 17, 2009 at 11:21 AM, Ista Pouss ista...@gmail.com wrote: Hi, What is

Re: [NEWBIE] How to do if... else... switch... in wicket html ?

2009-03-17 Thread Martin Makundi
wicket:if (something = toto) div do this thing/div wicket:else if (something = foo) pa href=error.htmlIt's not good/a/p wicket:else if (something = other) divrender other/div Here is one thing you can do: div wicket:id=my_first_optiondadada/div div wicket:id=my_second_optiondududu/div

Re: Wicket Meetup Amsterdam 24th March 2009

2009-03-17 Thread Martijn Dashorst
Updates: An additional sponsor makes this event even better (more free beer?)! - Hippo (http://onehippo.com) - Lucid Imagination (http://lucidimagination.com) - Topicus (http://topicus.nl) - Func (http://func.nl) And another presentation: Daan van Etten is going to give an introduction to

Re: [NEWBIE] How to do if... else... switch... in wicket html ?

2009-03-17 Thread Major Péter
Hi, You can use in your Java code if (something.equals(error) { setResponsePage(ErrorPage.class); return; } commands in the error case to forward the user to the Error page. Peter Ista Pouss írta: Hi, What is the best technique to do some if else and so on with wicket ? I need a

Re: AjaxFallbackDefaultDataTable problem

2009-03-17 Thread Jason Rosenberg
Hello, I'm having the same issue, and so far haven't figured it out... I am doing this, within an ajax click handler: mySortableDataProvider.updateDataList(updatedPersons); myAjaxFallbackDefaultDataTable.modelChanged();

Re: [NEWBIE] How to do if... else... switch... in wicket html ?

2009-03-17 Thread Sébastien Piller
Hi, Use panels, and instantiate either one type or another on the java side. Then your content will change. Cheers, Ista Pouss wrote: Hi, What is the best technique to do some if else and so on with wicket ? I need a html with something like that (stupid and naïve approch) : wicket:if

Re: [NEWBIE] How to do if... else... switch... in wicket html ?

2009-03-17 Thread Linda van der Pal
It sounds like you want something like this: File.html: div wicket:id=labeldadada/div File.java: boolean again = false; // put your logic here if (again) { add(new Label(label, Very well!); } else { add(new Label(label, Very good!); } Ista Pouss wrote: Thanks all. Yes, I see there

Re: [NEWBIE] How to do if... else... switch... in wicket html ?

2009-03-17 Thread Ista Pouss
2009/3/17 Linda van der Pal lvd...@heritageagenturen.nl: It sounds like you want something like this: File.html: div wicket:id=labeldadada/div File.java: boolean again = false; // put your logic here if (again) {   add(new Label(label, Very well!); } else {   add(new Label(label, Very

Re: [NEWBIE] How to do if... else... switch... in wicket html ?

2009-03-17 Thread Linda van der Pal
Then you do indeed have to work with the visibility. Ista Pouss wrote: 2009/3/17 Linda van der Pal lvd...@heritageagenturen.nl: It sounds like you want something like this: File.html: div wicket:id=labeldadada/div File.java: boolean again = false; // put your logic here if (again) {

Re: [NEWBIE] How to do if... else... switch... in wicket html ?

2009-03-17 Thread Martin Makundi
Yes, I see there is planty solutions, but I am a little losted. I understand very well the WebMarkupContainer and the setVisible mecanism. But I don't undestand very well where is the markup in WebMarkupContainer... There is no difference whether the div's are visible or not. If you insert

Re: [NEWBIE] How to do if... else... switch... in wicket html ?

2009-03-17 Thread Ista Pouss
Thanks all. Yes, I see there is planty solutions, but I am a little losted. I understand very well the WebMarkupContainer and the setVisible mecanism. But I don't undestand very well where is the markup in WebMarkupContainer... for instance, I have : div wicket:id=my_first_optiondadada/div div

Re: [NEWBIE] How to do if... else... switch... in wicket html ?

2009-03-17 Thread James Carman
On Tue, Mar 17, 2009 at 7:14 AM, Ista Pouss ista...@gmail.com wrote: I should prefer than Very well and Very good are in a html file, or part of html file with some wicket mark inside. So, use Fragments. - To unsubscribe,

Re: Wicket Problems On Ubuntu

2009-03-17 Thread Brill Pappin
Now that I've switch my editors and compilers to use utf8 encoding, I see this all the time (I just fixed something like this in the Maxmind java API). Likely it's a malformed unicode char in the html for LoginPage (in fact it lists LoginPage.html). You can do two things. File a report in

Re: [NEWBIE] How to do if... else... switch... in wicket html ?

2009-03-17 Thread Brill Pappin
Ok, I an see where this would help if you have separate designers and programers. Try this way then: Label veryGood = new Label(my_first_option, Very Good!); Label veryWell = new Label(my_second_option, Very Well!); Label again = new Label(my_second_option, ?); add(veryGood); add(veryWell);

Re: [NEWBIE] How to do if... else... switch... in wicket html ?

2009-03-17 Thread Ista Pouss
2009/3/17 James Carman jcar...@carmanconsulting.com: So, use Fragments. It's work ! (I hope). I do that : body div wicket:id=copie?/div /body wicket:fragment wicket:id=frag-diap Diapositive /wicket:fragment wicket:fragment wicket:id=frag-expo Exposé /wicket:fragment

SV: Correct use of RangeValidator

2009-03-17 Thread Wilhelmsen Tor Iver
WicketMessage: Exception 'java.lang.ClassCastException: java.lang.Integer' occurred during validation org.apache.wicket.validation.validator.RangeValidator on component 2:body:recvAnalisysForm:intField Root cause:java.lang.ClassCastException: java.lang.Integer at

Mocking input data while testing Panel

2009-03-17 Thread nitinkc
Input data can easily be set while testing wicket pages using FormTester. However, I am having difficulty mocking input data input when testing Panels. The panels can be started using the TestPanelSource as follows : wicketTester.startPanel(new TestPanelSource(){ private static

Re: Correct use of RangeValidator

2009-03-17 Thread Igor Vaynberg
to construct a textfield that works with integer you either have to pass Integer.class as a constructor arg, or call setType(Integer.class); -igor On Tue, Mar 17, 2009 at 8:21 AM, Wilhelmsen Tor Iver toriv...@arrive.no wrote: WicketMessage: Exception 'java.lang.ClassCastException:

wicket tests enabled

2009-03-17 Thread alexander.elsholz
hi, what's the best way to test enabling/disabling of components? i tried: assertFalse(tester.getComponentFromLastRenderedPage(PATH_XYZ).isEnabled()); and it seems work. is it the right way to test java-changed-attributes? thanks alex -- View this message in context:

Increasing DiskPageStore.maxSizePerPageMap

2009-03-17 Thread jbonham
Hello I have a Wicket application (1.3.3) presenting a DataTable where each row contains a link to open a ModalWindow. It works fine when the DataTable has a few lines, but when more lines are added (say 40), the ModalWindow only opens one; the second time we click on any of the ModalWindow

Re: Increasing DiskPageStore.maxSizePerPageMap

2009-03-17 Thread Matej Knopp
It can be increased (look at DiskPageStore constructor), but it's likely that your problem is somewhere else. Default size should be plenty. Do you get any error in log? -Matej On Tue, Mar 17, 2009 at 6:21 PM, jbonham andre.zelenko...@nokia.com wrote: Hello I have a Wicket application

Re: Increasing DiskPageStore.maxSizePerPageMap

2009-03-17 Thread jbonham
No errors in log. The page simply disappears from the cache. I can see the parameter it in the constructor, but I don't have access to it from my Page class. How do I get to construct the DiskPageStore myself? -- View this message in context:

Re: Increasing DiskPageStore.maxSizePerPageMap

2009-03-17 Thread jbonham
Matej Knopp-2 wrote: Look at webapplication#newsessionstore. it is possible that you are serializing something huge, that's why it doesn't fit in the store. Is there a simple way of finding out what's in the store? How do I control what gets put in there? Thanks Andre -- View this

Re: Increasing DiskPageStore.maxSizePerPageMap

2009-03-17 Thread Matej Knopp
What gets there depends on what references you have in your page. All non-transient references will be serialized. -Matej On Tue, Mar 17, 2009 at 7:29 PM, jbonham andre.zelenko...@nokia.com wrote: Matej Knopp-2 wrote: Look at webapplication#newsessionstore. it is possible that you are

Re: Correct use of RangeValidator

2009-03-17 Thread Warren Bell
I thought that I was telling the TextField, by the type Integer, that it's model object is an integer. And I thought that it would retrieve its value from the model I set on it's form. super(name, new CompoundPropertyModelValueMap(valueMap) valueMap is an existing ValueMap with a value with

Re: Correct use of RangeValidator

2009-03-17 Thread Igor Vaynberg
textfield doesnt know that it has been declared as textfieldinteger at runtime unless it is an anonymous class. welcome to java generics. lookup type erasure. -igor On Tue, Mar 17, 2009 at 11:44 AM, Warren Bell warrenbe...@gmail.com wrote: I thought that I was telling the TextField, by the type

using jquery with wicket

2009-03-17 Thread fachhoch
I want to use jquery block pluginto block my page for ajax requests , please help me with some tutorials how to integrate wicket and jquery. url for jquery block plugin http://www.malsup.com/jquery/block/#demos the script provided by jquery to block page is $.blockUI(); now

Re: Increasing DiskPageStore.maxSizePerPageMap

2009-03-17 Thread jbonham
Matej Knopp-2 wrote: What gets there depends on what references you have in your page. All non-transient references will be serialized. If the same object is referenced twice, is it serialized twice? Thanks for the tip on newSessionStore, it worked like a charm. Andre -- View this

Re: Correct use of RangeValidator

2009-03-17 Thread Adriano dos Santos Fernandes
Igor Vaynberg escreveu: textfield doesnt know that it has been declared as textfieldinteger at runtime unless it is an anonymous class. welcome to java generics. lookup type erasure. Hmm... And what about work done using IObjectClassAwareModel? It seems to work for me, I never need to pass

Re: using jquery with wicket

2009-03-17 Thread Igor Vaynberg
see the Veil component in wicketstuff-minis project, that should give you all the clues you need. -ig On Tue, Mar 17, 2009 at 12:57 PM, fachhoch fachh...@gmail.com wrote: I want to use jquery block  plugin    to block my page for ajax requests  , please help me with some tutorials   how to

Re: Increasing DiskPageStore.maxSizePerPageMap

2009-03-17 Thread Matej Knopp
Hi, if you serialize object tree java serialization takes care of duplicate or circular references. -Matej On Tue, Mar 17, 2009 at 9:16 PM, jbonham andre.zelenko...@nokia.com wrote: Matej Knopp-2 wrote: What gets there depends on what references you have in your page. All non-transient

Re: Correct use of RangeValidator

2009-03-17 Thread Igor Vaynberg
if you use a propertymodel alongside a formcomponent then yes, but it is not the generic you declare that is used, it is the model performing a runtime reflection check on the type of getter/field it is using. -igor On Tue, Mar 17, 2009 at 12:08 PM, Adriano dos Santos Fernandes

Re: Correct use of RangeValidator

2009-03-17 Thread Matej Knopp
If you are using a map TextField can't determine the type. -Matej On Tue, Mar 17, 2009 at 9:27 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: if you use a propertymodel alongside a formcomponent then yes, but it is not the generic you declare that is used, it is the model performing a

Re: IMarkupCacheKeyProvider - getCacheKey Problem

2009-03-17 Thread Johan Compagner
thats the whole point that getMarkupResourceStream is called over and over again i guess... Because you dont cache it.. the MarkupCache is called through MarkupContainer.getAssociatedMarkupStream(final boolean throwException) and that one is called now and then. So if it is never cached then it

DataTable testability - RepeatingView.childIdCounter not reset after a page refresh

2009-03-17 Thread Guido Helmers
Hi, (Wicket 1.3.5 / Java 1.6) I have a page with a DefaultDataTable containing an AjaxFallbackLink in one of its columns. When the page is rendered for the first time, the link in row 1 has component id path table:rows:1:cells:3:cell. When I click this link while Ajax is disabled, the page is

Re: Set the HTML id programmatically

2009-03-17 Thread OjO
I had run into the same situation even I setOutputMarkupId(true), the setMarkupId just wouldn't work for me. What worked for me is SimpleAttributeModifier. You may try: description.add ( new SimpleAttributeModifier (id, myDescription)); Martin Letendre wrote: I am usign this version of

Re: Extensible wicket application

2009-03-17 Thread Daniel Dominik Holúbek
Ok, so I finally managed to get it working :) I installed the http-console bundle an it works, but when I try to run your demo application, when trying to start the demo bundle I get this error: java.lang.LinkageError: loader constraints violated when linking javax/servlet/Servlet class My

Re: Set the HTML id programmatically

2009-03-17 Thread Stephen Swinsburg
Wouldn't it be best to change the ID that the YUI is looking for to be the dynamic ID of your textarea? Or set it in HTML and don't set outputMarkupId(true) so that the HTML one is used instead. ie textarea wicket:id=somefield id=mytextarea rows=10 cols=10default content/textarea That

Re: Set the HTML id programmatically

2009-03-17 Thread Jeremy Thomerson
Yes - this is the proper way to do it. You should not be trying so hard to override the ID generated by Wicket. Lest, you will fail and then write back to the list in a month and ask why such and such behavior or ajax feature is not working, and it will be because of the messed up IDs. See the

Wicket based social apps, forums, wall-to-wall (facebook-style), live chat, etc.

2009-03-17 Thread Tauren Mills
Are there any existing open source projects that could help reduce the effort of integrating social communication features into a site? I've read through the archives and noticed several conversations about building a wicket-based forum. I believe Uwe started a google code project, but it looks

optional link

2009-03-17 Thread gaoxm
Hello everyone, I am working on a page which needs a feature of optional link. for example, I have a html file as shown blew: div wicket:id=profile a wicket:id=residenceCityLink span wicket:id=residenceCItyLabel /a /div What I want is: if a user's profile has a valid residence city

Re: optional link

2009-03-17 Thread Igor Vaynberg
add the link as if they do have a proper city set, and override its visible to return false if they dont. -igor On Tue, Mar 17, 2009 at 6:19 PM, gaoxm gaoxm2...@gmail.com wrote: Hello everyone, I am working on a page which needs a feature of optional link. for example, I have a html file as

RE: optional link

2009-03-17 Thread Jeremy Thomerson
For any component, simply override isVisible. Jeremy Thomerson http://www.wickettraining.com -- sent from a wireless device -Original Message- From: gaoxm gaoxm2...@gmail.com Sent: Tuesday, March 17, 2009 8:19 PM To: users@wicket.apache.org Subject: optional link Hello everyone, I am

Re: setRowsPerPage with AjaxFallbackDefaultDataTable

2009-03-17 Thread Anton Veretennikov
Replacing onBeforeRender() in NavigationToolbar to @Override public boolean isVisible() { return table.getPageCount()1; } works well. Do I need to open issue? On Mon, Mar 16, 2009 at 4:57 PM, Anton Veretennikov anton.veretenni...@gmail.com wrote: It is AjaxFallbackDefaultDataTable

Re: DataTable testability - RepeatingView.childIdCounter not reset after a page refresh

2009-03-17 Thread Igor Vaynberg
in the test you can always associate metadata with any component you want to identify it later. or for simple scenarios you can call setoutputmarkupid(some unique string) -igor On Tue, Mar 17, 2009 at 2:40 PM, Guido Helmers guido.helm...@gmail.com wrote: Hi, (Wicket 1.3.5 / Java 1.6) I have