Setting selected value for DropDownChoice

2010-03-07 Thread Sigmar Muuga
Hello, I am trying to use one of the hardest part in Wicket: DropDownChoice the code looks like this: List countryList = generalDAO.findAllCountries(); Country country = getSelectedCountryByISO3(141, countryList); final DropDownChoice countryId = new DropDownCh

Re: Setting selected value for DropDownChoice

2010-03-07 Thread Sigmar Muuga
ectedCountryByISO3(141, countryList); > inal DropDownChoice countryId = new > DropDownChoice("countryId", > new Model(country), countryList); > add(countryId); > > You must pass the model, which contains the element you want to select. > > Vitek > > &

Re: Setting selected value for DropDownChoice

2010-03-07 Thread Sigmar Muuga
Actually it works even randomly now, when I change the values:S I've read docs and books and still have no idea with that :S DropDownChoice has hard API design problems IMHO... On Sun, Mar 7, 2010 at 7:18 PM, Sigmar Muuga wrote: > Still not working actually, got another problem.

Re: Setting selected value for DropDownChoice

2010-03-07 Thread Sigmar Muuga
I got it working with ISO2. Thanks Vit, I got your idea, I'll investigate later, why it didnt work with ID. On Sun, Mar 7, 2010 at 7:35 PM, Sigmar Muuga wrote: > Actually it works even randomly now, when I change the values:S > > I've read docs and books and still have n

Re: Session expired drives me mad!

2010-03-08 Thread Sigmar Muuga
I have had no problems with @SpringBean Also try to use them like this: @SpringBean(name="yourBeanName") This way you can avoid some mess that may occur in the future :) On Mon, Mar 8, 2010 at 5:46 PM, James Carman wrote: > No, you need to use the @SpringBean annotation: > > http://cwiki.apache

Re: How to dynamically create wicket label and TextField Component?

2010-03-08 Thread Sigmar Muuga
Just make a div or whatever element and add childs to it in page. On Tue, Mar 9, 2010 at 5:53 AM, sravan g wrote: > Hi all, > Any one have idea about How to dynamically create wicket label and > TextField > Component based on other TextField value from Database? > > Thanks, > Sravan. >

Wicket and GNU Gettext

2010-03-16 Thread Sigmar Muuga
Hello, just wanted to ask, if anybody has experiences with combining GNU Gettext and Wicket? Actually I am figuring how to get my project work best with it... what should I do r what should I do not Is it possible to use it also with ? Sigmar

Re: Wicket and GNU Gettext

2010-03-16 Thread Sigmar Muuga
e no reason why should not work as expected if you do > the above. > > Ernesto > > On Wed, Mar 17, 2010 at 6:18 AM, Sigmar Muuga wrote: > > > Hello, just wanted to ask, if anybody has experiences with combining GNU > > Gettext and Wicket? > > > > Actually

Easies way to set custom HTML

2010-03-18 Thread Sigmar Muuga
Hello, which is the easiest way to set custom HTML page for a Page or Panel? For example I have panel called "HelloPanel", conventinally Wicket wants to pair it with "HelloPanel.html" in the same package, but I want to use "HelloMyDearFriends.html" with that panel... Sigmar

Text replace with component

2010-03-21 Thread Sigmar Muuga
Hello, lets say I have something like this: String label = "You may click %destinationLink% to visit our store of %destinationLabel%"; Now I want to replace %destinationLink% with new BookmarkableLink(...); I am using GNU Gettext translations(.po files), thats why such solution... Is it possibl

Links and labels

2010-03-21 Thread Sigmar Muuga
Hello, does anybody know, how to add label to links? I have markup like this: [link label goes here] Now in java I want to do something like this: Link link = new BookmarkablePageLink("link1", HomePage.class, regParams); link.add(new Label(id, "Register here!")); // this must be

Dynamic javascript generation

2010-03-21 Thread Sigmar Muuga
Hello, I have to generate some javascript on the server side and then include it into my page. Which is the best way to do this with current stable wicket release? A the moment I am thinking about extending WebResource Sigmar

Re: Dynamic javascript generation

2010-03-21 Thread Sigmar Muuga
ges. Dealing with resources provides more reliable configuration etc.. Sigmar On Sun, Mar 21, 2010 at 9:19 PM, Stefan Lindner wrote: > Generate some Javasript in response to e.g. a button klick? > Or generate JavaScript when the page is rendered? > > -Ursprüngliche Nachricht

Re: Dynamic javascript generation

2010-03-21 Thread Sigmar Muuga
that it is not rendered twice from another > component with thie AbstractBehavior, just add some "uniqueID" in the > renderJavascript call. > > > > -Ursprüngliche Nachricht- > Von: Sigmar Muuga [<a rel="nofollow" href="mailto:meedi...@gmail

Re: Dynamic javascript generation

2010-03-21 Thread Sigmar Muuga
avascript("first", "firstUniqueID"); >response.renderJavascript("second", "firstUniqueID"); > > -Ursprüngliche Nachricht- > Von: Sigmar Muuga [mailto:meedi...@gmail.com] > Gesendet: Sonntag, 21. März 2010 21:36 > An: users@wi

Re: Dynamic javascript generation

2010-03-22 Thread Sigmar Muuga
But I got my problem solved with response.renderJavascript(" second", "firstUniqueID"); AbstractBehaviour didnt help me out... Thanks! On Mon, Mar 22, 2010 at 8:54 AM, Sigmar Muuga wrote: > It cannot be done like this, I got the error: > > WicketMessage: Cann

Re: Links and labels

2010-03-22 Thread Sigmar Muuga
2, 2010 at 3:37 AM, Martin Makundi > wrote: > > Try this: > > > > > > > > ** > > Martin > > > > 2010/3/21 Sigmar Muuga : > >> Hello, does anybody know, how to add label to links? > >> > >> I have markup like this:

Remove pageparameters

2010-03-22 Thread Sigmar Muuga
Hello, another issue with wicket: how to remove page parameters? Lets say I set parameter like this: ?do=something Now I navigate through my site and when I call setResponsePage for that particular page, all these parameters appear also on the address bar. I dont want them there and does anybody k

Re: Remove pageparameters

2010-03-22 Thread Sigmar Muuga
wrote: > Sigmar Muuga skrev: > > Hello, >> another issue with wicket: >> how to remove page parameters? >> Lets say I set parameter like this: ?do=something >> >> Now I navigate through my site and when I call setResponsePage for that >> particular

Weird feedback message formats

2010-03-24 Thread Sigmar Muuga
Hello, how to customize error / feedback messages in wicket? At the moment wicket displays quite stupidly password errors: "mysecret" is too short and so on. I would like to use translated field labels in feedback messages instead of field names, that are not so user friendly. Sigmar

Column filter customize

2010-03-27 Thread Sigmar Muuga
Hello, I have the following code in FilterToolbar for my DefaultDatatable: LoadableDetachableModel> choices = new LoadableDetachableModel>() { private static final long serialVersionUID = 1L; @Override protected List load() { List choices

Memory usage

2010-03-29 Thread Sigmar Muuga
Hello, my app is about 3-4 pages and its running with spring. It has database connection and it uses basic authentication. What should be the maximum memory usage for this? At the moment it takes 422megabytes and this is definately too much for application without any load and traffic. Are there

Re: Memory usage

2010-03-29 Thread Sigmar Muuga
yeah, I have about 20megs of them :) On Mon, Mar 29, 2010 at 5:03 PM, Martin Makundi < martin.maku...@koodaripalvelut.com> wrote: > Do you have a lots of libraries? > > ** > Martin > > 2010/3/29 Sigmar Muuga : > > Hello, > > my app is about 3-4 pages and

Re: Memory usage

2010-03-29 Thread Sigmar Muuga
Seems that it loads all the stuff into the memory from jars.. On Mon, Mar 29, 2010 at 5:14 PM, Martin Makundi < martin.maku...@koodaripalvelut.com> wrote: > So your jit loader is very optimal ;) > > ** > Martin > > 2010/3/29 Sigmar Muuga : > > yeah, I have about 20

Checkboxes and defaultdatatable

2010-04-13 Thread Sigmar Muuga
Hello, can anybody say, which is the most hazzle-free way to do default datatable with multiple selectboxes? I created FilterForm with DefaultDatatable. In that table I have a checkbox column to select items. I followed the PhoneBook example but now I it is acting weirdly and I dont understand, wh

Re: http://cwiki.apache.org/WICKET is down

2010-04-14 Thread Sigmar Muuga
Yeah, same here. Google cache helped me out too :) Sigmar On Thu, Apr 15, 2010 at 2:45 AM, l yeung wrote: > I wasn't able to access the wiki pages since sunday. I had to look at > google > cached pages instead > > On Apr 15, 2010 8:27 AM, "Carl Sziebert" wrote: > > Any updates on when the refe

Re: resources folder / package

2010-04-15 Thread Sigmar Muuga
You can define packages and put all CSS / JS files into them. Note that there must be some class also along with them, it may be an empty class. Then you can reference these resources using that class declaration. Note that if your css uses images, then you have to put correct paths into that css

Re: Wicket + Spring 3 + Hibernate

2010-04-15 Thread Sigmar Muuga
What error? Next time post the stack :) On Thu, Apr 15, 2010 at 5:47 PM, Steven Haines wrote: > Hi, > > I am at a point where I need to upgrade my application from Spring 2.5.6 to > Spring 3.0.1.RELEASE. I have a working application and when I update Spring, > I see the following exception on de

Re: Convention for classes name

2010-06-06 Thread Sigmar Muuga
*Page, *Form and *Panel are the best choices out there! You are on the right way, good luck! Sigmar On Sat, Jun 5, 2010 at 11:52 PM, James Carman wrote: > Are you Hungarian? > > On Sat, Jun 5, 2010 at 4:06 PM, Erdinc wrote: > > I add "PG" prefix to page classes, e.g PGCustomerEditor, and "RC" t

static or nonstatic inner classes

2010-06-29 Thread Sigmar Muuga
Hello, while designing pages for my app, I was thinking, if there is some difference, when I use static or nonstatic classes in my page classes? For example: public class MyPage extends Page { some code private /** Should it be static or not? */ class MyForm extends Form { } } Best r

Re: static or nonstatic inner classes

2010-06-29 Thread Sigmar Muuga
rivate variables of the containing class? > > Jeremy Thomerson > -- sent from my smartphone - please excuse formatting and spelling errors > > On Jun 30, 2010 12:56 AM, "Sigmar Muuga" wrote: > > Hello, > while designing pages for my app, I was thinking, if there is

Correct way of setting charset

2010-07-02 Thread Sigmar Muuga
Hello, what is the correct way of setting my pages charset? I did something like this and it didnt have any effect: @Override protected void configureResponse() { super.configureResponse(); final String encoding = "text/" + getMarkupType() + "; charset=UTF-8"; getResponse().setContentType(encoding

Re: Correct way of setting charset

2010-07-04 Thread Sigmar Muuga
in your WebApplication's init method : > > getMarkupSettings().setDefaultMarkupEncoding("UTF-8"); > > > > > On Fri, Jul 2, 2010 at 9:29 AM, Sigmar Muuga wrote: > > > Hello, > > what is the correct way of setting my pages charset? > > > > I did someth

java.lang.IllegalArgumentException: Parameter modelObject cannot be null

2010-07-05 Thread Sigmar Muuga
Hello, I am creating a form, my form has an instance variable: private Organization organisation; Also, organisation is initialized in constructor with new Organisation(). Now I am creating a TextField, that uses the propertyModel: IModel m1 = new PropertyModel(organisation, " entity.name"); Text

Re: java.lang.IllegalArgumentException: Parameter modelObject cannot be null

2010-07-05 Thread Sigmar Muuga
Also "entity" is initalized for that organisation object. On Mon, Jul 5, 2010 at 10:36 AM, Sigmar Muuga wrote: > Hello, > I am creating a form, my form has an instance variable: > private Organization organisation; > > Also, organisation is initialized in construc

Re: java.lang.IllegalArgumentException: Parameter modelObject cannot be null

2010-07-05 Thread Sigmar Muuga
Ok, sorry, my bad. I did the initialization afterwards :( Sometimes such mistakes just happen... On Mon, Jul 5, 2010 at 10:45 AM, Wilhelmsen Tor Iver wrote: > > Also, organisation is initialized in constructor with new > > Organisation(). > > Does this initialization happen before or after you cr

Displaying labels instead of field keynames in error messages

2010-07-05 Thread Sigmar Muuga
Hello, when I validate my form, wicket gives me errors like this: '"someFieldCode" is mandatory' etc. But how to use it like '"Some field" is mandatory'? Is it only the default behaviour of replacing placeholders in wicket-messages and can be customized? Or I have to rename all my forms fields t

Re: Displaying labels instead of field keynames in error messages

2010-07-05 Thread Sigmar Muuga
tin Makundi" < > martin.maku...@koodaripalvelut.com> wrote: > > > Or I have to rename all my forms fields to the same values as their > labels > > are? > Yes, rename. > > ** > Martin > > 2010/7/6 Sigmar Muuga : > > > Hello, > >

Re: Displaying labels instead of field keynames in error messages

2010-07-05 Thread Sigmar Muuga
ected void addLabel(String id, String labelString) { add(new Label(id, labelString + ":")); } Its very simple but maybe somebody is facing the same problem... On Tue, Jul 6, 2010 at 9:13 AM, Sigmar Muuga wrote: > Thanks, it works. > > > On Tue, Jul 6, 2010 at 8

Expire session

2010-08-29 Thread Sigmar Muuga
Hello! Does anybody know, which is the best way to expire wicket session? I have these lines in web.xml and they seem to affecft nothing: 10 Best regards, Sigmar - To u

Re: Expire session

2010-08-29 Thread Sigmar Muuga
Got problem solved. Also made it configurable per-user: http://www.weask.us/entry/page-expiration-wicket Still wondering, how to disable concurrent logins with wicket-auth-roles... On Sun, Aug 29, 2010 at 11:22 PM, Sigmar Muuga wrote: > Hello! > > Does anybody know, which is the be

Re: Scripting language

2010-09-01 Thread Sigmar Muuga
It depends, what do you want to do. If you want to develop your site in some scripting language, then use php or rails instead. I have seen groovy in some projects build scripts. Sigmar On Wed, Sep 1, 2010 at 2:10 PM, james yong wrote: > > Hi all, > > Can anyone recommends a scripting language

DropDownChoice and generics

2010-09-02 Thread Sigmar Muuga
Hello, the generics solution for the DropdownChoice is weird in my opinion. I want to write like this: List genders = getGenderList(); DropdownChoice new DropDownChoice("fieldId", new PropertyModel(currentPerson, "gender"), genders); But the compilation fails because of the mismatch between gene