Re: Accessing web-inf folder
I figured it out on the application init() method i added public String getFolder(){ return this.getServletContext().getResource("/WEB-INF/images").getPath(); } On Sat, Feb 6, 2010 at 9:14 AM, Josh Kamau wrote: > Hi guy; > > Kindly help me. i would like to access the WEB-INF directory so that i can > store some images there. > > > > > Regards. > Josh >
Accessing web-inf folder
Hi guy; Kindly help me. i would like to access the WEB-INF directory so that i can store some images there. Regards. Josh
Re: [announce] better look & modern css for wicket examples contest
I agree. I had a few moments tonight and put this together. It includes the standard wicket label "message" showing that Wicket is parsing properly. It also includes links to: examples, javadoc, books about wicket, and blogs. and will show the version you used to install from archetype. Thoughts? You can click through on the bug and see an attached screenshot https://issues.apache.org/jira/browse/WICKET-2724 On Feb 2, 2010, at 11:26 AM, mbrictson wrote: > > In addition to the examples, I think it would be nice to apply a pleasant CSS > skin to the Wicket quickstart archetype. Instead of an un-styled > "QuickStart" message, how about a nicely formatted short intro with links to > tutorials, reference documentation, etc.? > > As an example, I like the "it worked!" welcome page that Django provides: > > http://i46.tinypic.com/2q025g9.jpg > > > nino martinez wael wrote: >> >> Hi >> >> Someone mentioned that we could have a better look & feel for wicket, >> since >> there are no designers in the core team. I proposed a contest, to make the >> coolest slickest css for wicket. So please feel free to apply. >> >> >> Requirements: >> >> your css should be compatible with the basic browsers, Firefox , IE , >> Safari >> etc. And retain heavy use of embedded js. And it should be a drop on, >> using >> existing id's & hierachy for design. >> >> Practical info: >> >> The contest ends in 2 months April 2nd. >> >> Get the wicket examples here: >> http://svn.apache.org/repos/asf/wicket/trunk/wicket-examples/ >> >> If you need it you can put your css in svn at wicketstuff, write to this >> list for details on howto get commit rights, you should add your css to >> sandbox and sf user name ( >> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/sandbox/ ). >> >> Yes as with all contest there is a prize, you can win the wicket t-shir >> along with the honor if your css are the winner. This >> http://www.cafepress.com/apachewicket.317298148 or this >> http://www.cafepress.com/apachewicket.317298083 depending on your age :) >> >> Just reply to this thread to enter the contest. >> >> Regards Nino on behalf of the Wicket People >> >> > > -- > View this message in context: > http://old.nabble.com/-announce--better-look---modern-css-for-wicket-examples-contest-tp27425107p27426016.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 our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com 2321 E 4th St. Ste C-128, Santa Ana CA 92705 ofc: 714-816-4488 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: http://www.twitter.com/kinabalu Eco-Tip: Printing e-mails is usually a waste. This message is for the named person's use only. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient.
Bug with setResponsePage and PageParameters for wicket 1.4.6?
I noticed something strange, I have a search panel on all pages that contains a single form like so: final Form searchForm = new StatelessForm("searchForm", model) { @Override protected void onSubmit() { String query = getModelObject().getQuery(); setResponsePage(SearchResultsPage.class, new PageParameters( SearchResultsPage.PARAM_QUERY + "=" + query)); setRedirect(true); } }; My SearchResultsPage is mapped to /search, so after a query i get redirected to /search/query/some+query. After the first submit everything works (the submit is happening from a different page), I get the redirect and see the results. But then if I try to use the form from that page, I get redirected with the previous search params in the url, like so: /search/query/search/query/second+query. Im not sure how this is happening since I am passing a class and new page parameters. The String query inside the onSubmit has the correct value, its not appending any of the previous parameters, and besides, this only happens with 1.4.6. I tried it on 1.4.4 and 1.4.5 and it worked fine with the same code. Any ideas? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DataTable : Setting the Column with from Java ?
In my point of view. Thats prettier done/more clean with a dynamic css.. But there's some way for you to get there. regards Nino 2010/2/5 Ashika Umanga Umagiliya > Thanks for the tips, > > I found the solution: > > public void populateItem(Item> cellitem, > String id, IModel model) { > cellitem.add(new > SimpleAttributeModifier("style","width:"+width+"px")); > } > > regards > umanga > > nino martinez wael wrote: > >> I susspect you should add the attribute modifier to your LinkoutColumn >> telling what css class you want to use.. I would have to see the html >> aswell >> to help further.. >> >> 2010/2/4 Ashika Umanga Umagiliya >> >> >> >>> Hi nino, >>> >>> To which component I should add an attribute-modifier. In IColumn ,i >>> should >>> add the 'width' to the headers ,i assume. >>> any tips to do this? >>> >>> >>> nino martinez wael wrote: >>> >>> >>> use a attribute modifier 2010/2/4 Ashika Umanga Umagiliya > Greetings, > > For my DataTable ,I create 'IColumn's using data from an XML file. > > In the code-snippet below, the 'vcol' instance has information about > Column-title,bean property field,visible or not..etc. > Now I want to set the column width using the same way.How can I change > the > CSS property from Java ? > Any tips how I can do this? > > > > List columns; > //For each Column in Table > for (Column vcol : table.getColumns()) { > if (!vcol.isVisible()) { > continue; > } > > if (vcol.getId().equals("id")) { > AbstractColumn linkcolumnModel=null; > if(vcol.isSort()){ > linkcolumnModel=new SortableIdColumn(new > Model(vcol.getTitle()),vcol.getValue()); > }else{ > linkcolumnModel=new SortableIdColumn(new > Model(vcol.getTitle())); > } > > columns.add(linkcolumnModel); > > } else if (vcol.isLinkout()) { > LinkoutColumn linkoutCol = new LinkoutColumn(new Model(vcol > .getTitle()), vcol.getValue()); > columns.add(linkoutCol); > } else { > //Add normal datacolumn > if(vcol.isSort()){ > columns.add(new PropertyColumn(new > Model(vcol.getTitle()), > vcol.getValue(),vcol.getValue())); > }else{ > columns.add(new PropertyColumn(new > Model(vcol.getTitle()), > vcol.getValue())); > } > } > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > >>> >>> >> >> >> > >
Re: wicket enclosure not finding child!?
I might have sounded a bit negative in my replay, but that is actually not the case. I kind of like, that enclosure is consistent with the rest of wicket (where you have to match hierarchies). Also I accept the extra code I have to add in Java class as a "punishment" for being lazy and not extracting the logic I am putting in enclosure in a separate component. Also most of the previous discussion in a list was for keeping the things as they are currently - after the change :) Reason I am not upgrading to newer version is just a lack of time - checking for missing children in enclosures is a bit time consuming ... :( On 02/05/2010 06:04 PM, Igor Vaynberg wrote: why dont you start a vote to have this changed back to pre-1.4.2 behavior. if enough people agree we would have no problem applying the change. -igor On Fri, Feb 5, 2010 at 1:13 AM, Girts Ziemelis wrote: According to the developers this was a "bug" in a the original "enclosure" implementation, which allowed NOT to add all child components (if enclosure is not shown on page). Now since version 1.4.2 it is "corrected". So you have to add both object_title_classification_prefix, and object_title_classification in both cases, when enclosure IS displayed and when it is NOT. For the same reason I am still on 1.4.1, so this is only my guess ... See mailing list archives for enclosure related topics, e.g. http://old.nabble.com/Re:-enclosure-changes-in-1.4.4-p26763772.html Girts Ziemelis On 02/05/2010 12:06 AM, Chris Colman wrote: I've found the problem with any version after 1.4.2. With 1.4.2 I seem to be able to use enclosures just fine - even when the children are supplied by a component resolver - but any 1.4.3, 1.4.4 and 1.4.5 cause problems. I haven't yet tried 1.4.6 but from what you're saying it probably has the same problem. Chris Colman Step Ahead Software http://develop.stepaheadsoftware.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to write a testcase for CheckGroupSelector.
How to write a testcase for CheckGroupSelector. For checkgroup we can use formTester.selectMultiple("group", new int[] { 2 });
Re: How reRender a component from parent page?
What do the tasty HTML bits look like? (wicket:ids and what not) On Fri, Feb 5, 2010 at 12:50 PM, Rangel Preis wrote: > How can I use Ajax to change value from a parent page in my layout. I > try to change values in header using a action from content page. > > I have this: > > |---| > | HEADER | > |---| > | MENU | CONTENT | > | | | > | | | > | | | > |---|---| > | FOOTER | > |---| > > public class MyTemplate{ > public MyTemplate() { > super(); > > this.add(CSSPackageResource.getHeaderContribution(...); > > this.add(AbstractTemplatePage.FEEDBACK); > > this.addOrReplace(new Header()); > > this.add(new Menu()); > > this.add(new Footer()); > . > > > public class MyContetPage extends MyTemplate { > public MyContetPage(final PageParameters _parameters) { > add(new AjaxFallbackLink("rem") { > > �...@override > public void onClick(final AjaxRequestTarget target) { > …... > } > }); > …. > } > } > > How change value in the header when i click on the ajaxlink of my content > page? > > In the onClick i try this; but don't work > > //some function to change the model value... > this.getPage().get("header:component").modelChanged(); > target.addComponent(this.getPage().get("header:component")); > > And in my Header.java I override onModelChanged: > protected void onModelChanged() { > super.onModelChanged(); > this.addOrReplace(component).setOutputMarkupId(true)); > } > > Thanks all. > > - > 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 reRender a component from parent page?
How can I use Ajax to change value from a parent page in my layout. I try to change values in header using a action from content page. I have this: |---| | HEADER | |---| | MENU | CONTENT | | | | | | | | | | |---|---| | FOOTER| |---| public class MyTemplate{ public MyTemplate() { super(); this.add(CSSPackageResource.getHeaderContribution(...); this.add(AbstractTemplatePage.FEEDBACK); this.addOrReplace(new Header()); this.add(new Menu()); this.add(new Footer()); . public class MyContetPage extends MyTemplate { public MyContetPage(final PageParameters _parameters) { add(new AjaxFallbackLink("rem") { �...@override public void onClick(final AjaxRequestTarget target) { …... } }); …. } } How change value in the header when i click on the ajaxlink of my content page? In the onClick i try this; but don't work //some function to change the model value... this.getPage().get("header:component").modelChanged(); target.addComponent(this.getPage().get("header:component")); And in my Header.java I override onModelChanged: protected void onModelChanged() { super.onModelChanged(); this.addOrReplace(component).setOutputMarkupId(true)); } Thanks all. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: wicket enclosure not finding child!?
I think that with this new behavior it might now be impossible to use a component resolver to resolve components within an enclosure (that's my experience at least - they work fine inside enclosures for 1.4.2 but not in later versions): I'm trying to work out how the changed behavior broke code that was working fine in 1.4.2 and have 2 possible theories: 1. As component resolvers are effectively only adding components 'on demand' then maybe the 'demand' is not forthcoming due to some change in the way enclosures are rendered in > 1.4.2. i.e. the container is not visible so no request to resolve other internal components is forthcoming and so 'on demand' results in those other components not being added. Or 2. Perhaps some intermediate but effectively transparent 'parent' container component is explicitly added in > 1.4.2 and the component resolver needs to add its components to that new transparent container instead of where it has traditionally added the components. Just theories at this stage... ;) > -Original Message- > From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] > Sent: Saturday, 6 February 2010 3:04 AM > To: users@wicket.apache.org > Subject: Re: wicket enclosure not finding child!? > > why dont you start a vote to have this changed back to pre-1.4.2 > behavior. if enough people agree we would have no problem applying the > change. > > -igor > > On Fri, Feb 5, 2010 at 1:13 AM, Girts Ziemelis > wrote: > > According to the developers this was a "bug" in a the original > "enclosure" > > implementation, which allowed NOT to add all child components (if > enclosure > > is not shown on page). Now since version 1.4.2 it is "corrected". > > So you have to add both object_title_classification_prefix, and > > object_title_classification in both cases, when enclosure IS displayed > and > > when it is NOT. > > For the same reason I am still on 1.4.1, so this is only my guess ... > > > > See mailing list archives for enclosure related topics, e.g. > > http://old.nabble.com/Re:-enclosure-changes-in-1.4.4-p26763772.html > > > > Girts Ziemelis > > > > On 02/05/2010 12:06 AM, Chris Colman wrote: > >> > >> I've found the problem with any version after 1.4.2. With 1.4.2 I seem > >> to be able to use enclosures just fine - even when the children are > >> supplied by a component resolver - but any 1.4.3, 1.4.4 and 1.4.5 cause > >> problems. I haven't yet tried 1.4.6 but from what you're saying it > >> probably has the same problem. > >> > >> Chris Colman > >> Step Ahead Software > >> http://develop.stepaheadsoftware.com > >> > >> > >>> > >>> -Original Message- > >>> From: Roman Uhlig Maxity.de [mailto:roman.uh...@maxity.de] > >>> Sent: Friday, 5 February 2010 2:23 AM > >>> To: users@wicket.apache.org > >>> Subject: Re: wicket enclosure not finding child!? > >>> > >>> > >>> I just upgraded from 1.4.1 to 1.4.6 and now I'm getting this error too > >>> without changing anything else in my source code: > >>> > >>> 04 Feb 2010 16:01:20,352 ERROR [org.apache.wicket.RequestCycle:1521] > >>> Could not find child with id: object_title_classification_prefix in > >>> > >> > >> the > >> > >>> > >>> wicket:enclosure > >>> org.apache.wicket.WicketRuntimeException: Could not find child with > >>> > >> > >> id: > >> > >>> > >>> object_title_classification_prefix in the wicket:enclosure > >>> at > >>> > >>> > >> > >> > org.apache.wicket.markup.html.internal.Enclosure.checkChildComponent(Enc > >> > >>> > >>> losure.java:220) > >>> at > >>> > >>> > >> > >> > org.apache.wicket.markup.html.internal.Enclosure.ensureAllChildrenPresen > >> > >>> > >>> t(Enclosure.java:262) > >>> at > >>> > >>> > >> > >> > org.apache.wicket.markup.html.internal.Enclosure.onComponentTagBody(Encl > >> > >>> > >>> osure.java:169) > >>> at > >>> org.apache.wicket.Component.renderComponent(Component.java:2619) > >>> at > >>> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) > >>> at org.apache.wicket.Component.render(Component.java:2450) > >>> at > >>> org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229) > >>> at > >>> > >>> > >> > >> > org.apache.wicket.markup.resolver.EnclosureResolver.resolve(EnclosureRes > >> > >>> > >>> olver.java:61) > >>> at > >>> > >>> > >> > >> > org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentRe > >> > >>> > >>> solvers.java:81) > >>> at > >>> > >>> > >> > >> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418) > >> > >>> > >>> at > >>> > >>> > >> > >> > org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer > >> > >>> > >>> .java:1577) > >>> at > >>> > >>> > >> > >> > org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav > >> > >>> > >>> a:1501) > >>> at > >>> org.apache.wicket.Component.renderComponent(Component.java:2619) > >>> at > >>> org.apache.wicket.MarkupContainer.onR
Re: Settings an HTML page as home page?
+1 to what James said: Home.html Yay, static content! Home.java public class Home extends WebPage { // no-op impl } On Fri, Feb 5, 2010 at 3:24 AM, Ashika Umanga Umagiliya < auma...@biggjapan.com> wrote: > Greetings, > > How can I set an static HTML page in webapp folder as my home page in > Application class instead of using Wicket Page ? > > thanks in advance, > umanga > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Fix super(new CompoundPropertyModel(this)) error in the WIA book
As someone working his way through WIA as well, will there be another wiki entry showing differences between book and 1.5? (I'm fairly interested in page mounting and nice URLs as well). -- also I realize the cost to constantly maintain book diffs by the authors is high, but just wanted to ask incase there were plans for it. -R On Fri, Feb 5, 2010 at 5:09 AM, Martijn Dashorst wrote: > On Fri, Feb 5, 2010 at 10:16 AM, Wilhelmsen Tor Iver > wrote: > >> super(new CompoundPropertyModel(this)); > > > > This seems wrong: A call to super() cannot reference "this" directly or > indirectly: > > > > JLS §8.8.7 says: > > "It is a compile-time error for a constructor to directly or indirectly > invoke itself through a series of one or more explicit constructor > invocations involving this." > > Yup, this is a bug in the book's example code. Has nothing to do with > 1.3 or 1.4. > > And yes, the book is still valid apart from the model changes. My > guess is that 1.5 will invalidate a bit more, but not too much. Mostly > the part about page mounting and nice URLs will change. The internal > request processing implementation is completely rewritten, but that > should be transparent to the most of us (and was not covered in the > book). The same goes for Wicket Ajax: completely rewritten, > transparent for most users. > > Martijn > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Application-wide date formate
Doesn't help with your date picker problem, but to set the application-wide format you can call this in your application's init method: ((ConverterLocator)getConverterLocator()).set(Date.class, new PatternDateConverter(DATE_PATTERN, true)) On 5 February 2010 09:25, Josh Kamau wrote: > Hi guys; > > Kindly help me set the application-wide date format independent of the > locale. > > > regards. >
AW: wicket enclosure not finding child!?
It's fine with me and more logical and cleaner than before (tho it generates more Java code). I just didn't notice the change. Roman -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Freitag, 5. Februar 2010 17:04 An: users@wicket.apache.org Betreff: Re: wicket enclosure not finding child!? why dont you start a vote to have this changed back to pre-1.4.2 behavior. if enough people agree we would have no problem applying the change. -igor On Fri, Feb 5, 2010 at 1:13 AM, Girts Ziemelis wrote: > According to the developers this was a "bug" in a the original "enclosure" > implementation, which allowed NOT to add all child components (if enclosure > is not shown on page). Now since version 1.4.2 it is "corrected". > So you have to add both object_title_classification_prefix, and > object_title_classification in both cases, when enclosure IS displayed and > when it is NOT. > For the same reason I am still on 1.4.1, so this is only my guess ... > > See mailing list archives for enclosure related topics, e.g. > http://old.nabble.com/Re:-enclosure-changes-in-1.4.4-p26763772.html > > Girts Ziemelis > > On 02/05/2010 12:06 AM, Chris Colman wrote: >> >> I've found the problem with any version after 1.4.2. With 1.4.2 I seem >> to be able to use enclosures just fine - even when the children are >> supplied by a component resolver - but any 1.4.3, 1.4.4 and 1.4.5 cause >> problems. I haven't yet tried 1.4.6 but from what you're saying it >> probably has the same problem. >> >> Chris Colman >> Step Ahead Software >> http://develop.stepaheadsoftware.com >> >> >>> >>> -Original Message- >>> From: Roman Uhlig Maxity.de [mailto:roman.uh...@maxity.de] >>> Sent: Friday, 5 February 2010 2:23 AM >>> To: users@wicket.apache.org >>> Subject: Re: wicket enclosure not finding child!? >>> >>> >>> I just upgraded from 1.4.1 to 1.4.6 and now I'm getting this error too >>> without changing anything else in my source code: >>> >>> 04 Feb 2010 16:01:20,352 ERROR [org.apache.wicket.RequestCycle:1521] >>> Could not find child with id: object_title_classification_prefix in >>> >> >> the >> >>> >>> wicket:enclosure >>> org.apache.wicket.WicketRuntimeException: Could not find child with >>> >> >> id: >> >>> >>> object_title_classification_prefix in the wicket:enclosure >>> at >>> >>> >> >> org.apache.wicket.markup.html.internal.Enclosure.checkChildComponent(Enc >> >>> >>> losure.java:220) >>> at >>> >>> >> >> org.apache.wicket.markup.html.internal.Enclosure.ensureAllChildrenPresen >> >>> >>> t(Enclosure.java:262) >>> at >>> >>> >> >> org.apache.wicket.markup.html.internal.Enclosure.onComponentTagBody(Encl >> >>> >>> osure.java:169) >>> at >>> org.apache.wicket.Component.renderComponent(Component.java:2619) >>> at >>> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) >>> at org.apache.wicket.Component.render(Component.java:2450) >>> at >>> org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229) >>> at >>> >>> >> >> org.apache.wicket.markup.resolver.EnclosureResolver.resolve(EnclosureRes >> >>> >>> olver.java:61) >>> at >>> >>> >> >> org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentRe >> >>> >>> solvers.java:81) >>> at >>> >>> >> >> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418) >> >>> >>> at >>> >>> >> >> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer >> >>> >>> .java:1577) >>> at >>> >>> >> >> org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav >> >>> >>> a:1501) >>> at >>> org.apache.wicket.Component.renderComponent(Component.java:2619) >>> at >>> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) >>> at org.apache.wicket.Component.render(Component.java:2450) >>> at >>> >>> >> >> org.apache.wicket.markup.repeater.AbstractRepeater.renderChild(AbstractR >> >>> >>> epeater.java:122) >>> at >>> >>> >> >> org.apache.wicket.markup.repeater.AbstractRepeater.onRender(AbstractRepe >> >>> >>> ater.java:103) >>> at org.apache.wicket.Component.render(Component.java:2450) >>> at >>> >>> >> >> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414) >> >>> >>> at >>> >>> >> >> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer >> >>> >>> .java:1577) >>> at >>> >>> >> >> org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav >> >>> >>> a:1501) >>> at >>> org.apache.wicket.Component.renderComponent(Component.java:2619) >>> at >>> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) >>> at org.apache.wicket.Component.render(Component.java:2450) >>> at >>> org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229) >>> at >>> >>> >> >> org.apache.wicket.markup.resolver.Marku
Re: wicket enclosure not finding child!?
why dont you start a vote to have this changed back to pre-1.4.2 behavior. if enough people agree we would have no problem applying the change. -igor On Fri, Feb 5, 2010 at 1:13 AM, Girts Ziemelis wrote: > According to the developers this was a "bug" in a the original "enclosure" > implementation, which allowed NOT to add all child components (if enclosure > is not shown on page). Now since version 1.4.2 it is "corrected". > So you have to add both object_title_classification_prefix, and > object_title_classification in both cases, when enclosure IS displayed and > when it is NOT. > For the same reason I am still on 1.4.1, so this is only my guess ... > > See mailing list archives for enclosure related topics, e.g. > http://old.nabble.com/Re:-enclosure-changes-in-1.4.4-p26763772.html > > Girts Ziemelis > > On 02/05/2010 12:06 AM, Chris Colman wrote: >> >> I've found the problem with any version after 1.4.2. With 1.4.2 I seem >> to be able to use enclosures just fine - even when the children are >> supplied by a component resolver - but any 1.4.3, 1.4.4 and 1.4.5 cause >> problems. I haven't yet tried 1.4.6 but from what you're saying it >> probably has the same problem. >> >> Chris Colman >> Step Ahead Software >> http://develop.stepaheadsoftware.com >> >> >>> >>> -Original Message- >>> From: Roman Uhlig Maxity.de [mailto:roman.uh...@maxity.de] >>> Sent: Friday, 5 February 2010 2:23 AM >>> To: users@wicket.apache.org >>> Subject: Re: wicket enclosure not finding child!? >>> >>> >>> I just upgraded from 1.4.1 to 1.4.6 and now I'm getting this error too >>> without changing anything else in my source code: >>> >>> 04 Feb 2010 16:01:20,352 ERROR [org.apache.wicket.RequestCycle:1521] >>> Could not find child with id: object_title_classification_prefix in >>> >> >> the >> >>> >>> wicket:enclosure >>> org.apache.wicket.WicketRuntimeException: Could not find child with >>> >> >> id: >> >>> >>> object_title_classification_prefix in the wicket:enclosure >>> at >>> >>> >> >> org.apache.wicket.markup.html.internal.Enclosure.checkChildComponent(Enc >> >>> >>> losure.java:220) >>> at >>> >>> >> >> org.apache.wicket.markup.html.internal.Enclosure.ensureAllChildrenPresen >> >>> >>> t(Enclosure.java:262) >>> at >>> >>> >> >> org.apache.wicket.markup.html.internal.Enclosure.onComponentTagBody(Encl >> >>> >>> osure.java:169) >>> at >>> org.apache.wicket.Component.renderComponent(Component.java:2619) >>> at >>> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) >>> at org.apache.wicket.Component.render(Component.java:2450) >>> at >>> org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229) >>> at >>> >>> >> >> org.apache.wicket.markup.resolver.EnclosureResolver.resolve(EnclosureRes >> >>> >>> olver.java:61) >>> at >>> >>> >> >> org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentRe >> >>> >>> solvers.java:81) >>> at >>> >>> >> >> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418) >> >>> >>> at >>> >>> >> >> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer >> >>> >>> .java:1577) >>> at >>> >>> >> >> org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav >> >>> >>> a:1501) >>> at >>> org.apache.wicket.Component.renderComponent(Component.java:2619) >>> at >>> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) >>> at org.apache.wicket.Component.render(Component.java:2450) >>> at >>> >>> >> >> org.apache.wicket.markup.repeater.AbstractRepeater.renderChild(AbstractR >> >>> >>> epeater.java:122) >>> at >>> >>> >> >> org.apache.wicket.markup.repeater.AbstractRepeater.onRender(AbstractRepe >> >>> >>> ater.java:103) >>> at org.apache.wicket.Component.render(Component.java:2450) >>> at >>> >>> >> >> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414) >> >>> >>> at >>> >>> >> >> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer >> >>> >>> .java:1577) >>> at >>> >>> >> >> org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav >> >>> >>> a:1501) >>> at >>> org.apache.wicket.Component.renderComponent(Component.java:2619) >>> at >>> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) >>> at org.apache.wicket.Component.render(Component.java:2450) >>> at >>> org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229) >>> at >>> >>> >> >> org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(Mark >> >>> >>> upInheritanceResolver.java:66) >>> at >>> >>> >> >> org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentRe >> >>> >>> solvers.java:81) >>> at >>> >>> >> >> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418) >> >>> >>> at >>> >>> >> >> or
Re: Settings an HTML page as home page?
Yep. Or more convoluted yet:-) -Create you empty page MyHome.java -Use resource settings IResourceSettings.addResourceFolder("path to webapp") to mount webapp -And place MyHome.html there... Haven't tried this but it might work??? Best, Ernesto On Fri, Feb 5, 2010 at 2:03 PM, James Carman wrote: > Or, just put an "empty" page class in there to control your static > HTML. Then, if you do ever discover that you want some dynamic bits > on your home page, you can easily add it. > > On Fri, Feb 5, 2010 at 5:35 AM, Ernesto Reinaldo Barreiro > wrote: > > Just an idea: > > > > -Mount Wicket filter to something different from /* > > -Add and index.html to webapp folder. > > > > Ernesto > > > > > > On Fri, Feb 5, 2010 at 11:24 AM, Ashika Umanga Umagiliya < > > auma...@biggjapan.com> wrote: > > > >> Greetings, > >> > >> How can I set an static HTML page in webapp folder as my home page in > >> Application class instead of using Wicket Page ? > >> > >> thanks in advance, > >> umanga > >> > >> > >> > >> - > >> 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: Settings an HTML page as home page?
Or, just put an "empty" page class in there to control your static HTML. Then, if you do ever discover that you want some dynamic bits on your home page, you can easily add it. On Fri, Feb 5, 2010 at 5:35 AM, Ernesto Reinaldo Barreiro wrote: > Just an idea: > > -Mount Wicket filter to something different from /* > -Add and index.html to webapp folder. > > Ernesto > > > On Fri, Feb 5, 2010 at 11:24 AM, Ashika Umanga Umagiliya < > auma...@biggjapan.com> wrote: > >> Greetings, >> >> How can I set an static HTML page in webapp folder as my home page in >> Application class instead of using Wicket Page ? >> >> thanks in advance, >> umanga >> >> >> >> - >> 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: Fix super(new CompoundPropertyModel(this)) error in the WIA book
On Fri, Feb 5, 2010 at 10:16 AM, Wilhelmsen Tor Iver wrote: >> super(new CompoundPropertyModel(this)); > > This seems wrong: A call to super() cannot reference "this" directly or > indirectly: > > JLS §8.8.7 says: > "It is a compile-time error for a constructor to directly or indirectly > invoke itself through a series of one or more explicit constructor > invocations involving this." Yup, this is a bug in the book's example code. Has nothing to do with 1.3 or 1.4. And yes, the book is still valid apart from the model changes. My guess is that 1.5 will invalidate a bit more, but not too much. Mostly the part about page mounting and nice URLs will change. The internal request processing implementation is completely rewritten, but that should be transparent to the most of us (and was not covered in the book). The same goes for Wicket Ajax: completely rewritten, transparent for most users. Martijn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: setResponsePage in the beggining of a constructor does not work
I tried that approach of looking around the tree but I must have missed that Exception somehow. Looks like what I was after. In the end the ExpiredPage solution worked out to be a good approach because I got to create an ExpiredPage that's styled to the style of the rest of the site. > In Wicket it usually helps to look at the classes that are near in the > class hierarchy. In this case RestartResponseException extends from > AbstractRestartResponseException. Another subclass of > AbstractRestartResponseException is RedirectToUrlException, which does > exactly what you ask. > > Regards, > Erik. > > Chris Colman wrote: > > Could I use RestartResponseException to redirect to a URL instead of a > bookmarkable page? > > > > My problem is that all of my pages require a parameter (even the home > page but that's fine because the Tomcat container server.xml configures > the appropriate redirection for me - users never have to enter the > parameters in the address bar) but the "Expired Page" page contains a link > that does not contain any parameters. > > > > When a session expires the page that appears attempts to go to the > 'home' page without any parameters. If I could either change the expired > page's link or do a redirect in the home page's constructor that > redirect's to "/" then this would work fine. > > > > Unfortunately the RestartResponseException seems to only want to > redirect to bookmarkable pages. Is there an alternative I could use to > redirect to the "/" URL? > > > > -- > Send from my SMTP compliant software > Erik van Oosten > http://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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: setResponsePage in the beggining of a constructor does not work
Cool, thanks! That works fine. > Just write this in WebApplication#init: > getApplicationSettings().setPageExpiredErrorPage(PageExpiredError.class); > This should solve your problem. > > Regards, > Peter > > 2010-02-05 00:59 keltezéssel, Chris Colman írta: > > Could I use RestartResponseException to redirect to a URL instead of a > bookmarkable page? > > > > My problem is that all of my pages require a parameter (even the home > page but that's fine because the Tomcat container server.xml configures > the appropriate redirection for me - users never have to enter the > parameters in the address bar) but the "Expired Page" page contains a link > that does not contain any parameters. > > > > When a session expires the page that appears attempts to go to the > 'home' page without any parameters. If I could either change the expired > page's link or do a redirect in the home page's constructor that > redirect's to "/" then this would work fine. > > > > Unfortunately the RestartResponseException seems to only want to > redirect to bookmarkable pages. Is there an alternative I could use to > redirect to the "/" URL? > > > >> -Original Message- > >> From: Martin Asenov [mailto:mase...@velti.com] > >> Sent: Friday, 5 February 2010 12:30 AM > >> To: users@wicket.apache.org > >> Subject: RE: setResponsePage in the beggining of a constructor does not > >> work > >> > >> Thanks friend! Works great! You saved me a lot of time! > >> > >> Best regards, > >> Martin > >> > >> -Original Message- > >> From: Major Péter [mailto:majorpe...@sch.bme.hu] > >> Sent: Thursday, February 04, 2010 3:21 PM > >> To: users@wicket.apache.org > >> Subject: Re: setResponsePage in the beggining of a constructor does not > >> work > >> > >> Hi, > >> > >> the setresponsepage only marks, that the pagetarget is something else > on > >> the end of the cycle, but it isn't stopping the execution of the > current > >> page. If you want that, then use: > >> throw new RestartResponseException(getApplication().getHomePage()); > >> > >> Regards, > >> Peter > >> > >> 2010-02-04 14:16 keltezéssel, Martin Asenov írta: > >>> Hello guys! > >>> > >>> I've got three pages, where I do certain check in the beginning and if > >> the criteria is not met, I redirect to home page. I make it that way: > >>> > >>> public MyPageClass { > >>> > >>> if (something) { > >>> system.out.println("mypageclass - we're in"); > >>> > setResponsePage(getApplication().getHomePage()); > >>> } > >>> > >>> page initialization afterwards > >>> } > >>> > >>> The strange thing is that it works for one of the pages, for another > two > >> - it does not - there is no redirection at all; it goes on with further > >> initializing. The criteria check block is the very same one in each of > the > >> pages. > >>> > >>> Appreciate if someone helps! > >>> > >>> Regards, > >>> Martin > >> > >> - > >> 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
AW: wicket enclosure not finding child!?
Thank you Girts for lighting this up. I haven't watched the mailing list for a while and searching didn't turn it up. Roman -Ursprüngliche Nachricht- Von: Girts Ziemelis [mailto:girts.zieme...@gmail.com] Gesendet: Freitag, 5. Februar 2010 10:13 An: users@wicket.apache.org Betreff: Re: wicket enclosure not finding child!? According to the developers this was a "bug" in a the original "enclosure" implementation, which allowed NOT to add all child components (if enclosure is not shown on page). Now since version 1.4.2 it is "corrected". So you have to add both object_title_classification_prefix, and object_title_classification in both cases, when enclosure IS displayed and when it is NOT. For the same reason I am still on 1.4.1, so this is only my guess ... See mailing list archives for enclosure related topics, e.g. http://old.nabble.com/Re:-enclosure-changes-in-1.4.4-p26763772.html Girts Ziemelis On 02/05/2010 12:06 AM, Chris Colman wrote: > I've found the problem with any version after 1.4.2. With 1.4.2 I seem > to be able to use enclosures just fine - even when the children are > supplied by a component resolver - but any 1.4.3, 1.4.4 and 1.4.5 cause > problems. I haven't yet tried 1.4.6 but from what you're saying it > probably has the same problem. > > Chris Colman > Step Ahead Software > http://develop.stepaheadsoftware.com > > >> -Original Message- >> From: Roman Uhlig Maxity.de [mailto:roman.uh...@maxity.de] >> Sent: Friday, 5 February 2010 2:23 AM >> To: users@wicket.apache.org >> Subject: Re: wicket enclosure not finding child!? >> >> >> I just upgraded from 1.4.1 to 1.4.6 and now I'm getting this error too >> without changing anything else in my source code: >> >> 04 Feb 2010 16:01:20,352 ERROR [org.apache.wicket.RequestCycle:1521] >> Could not find child with id: object_title_classification_prefix in >> > the > >> wicket:enclosure >> org.apache.wicket.WicketRuntimeException: Could not find child with >> > id: > >> object_title_classification_prefix in the wicket:enclosure >> at >> >> > org.apache.wicket.markup.html.internal.Enclosure.checkChildComponent(Enc > >> losure.java:220) >> at >> >> > org.apache.wicket.markup.html.internal.Enclosure.ensureAllChildrenPresen > >> t(Enclosure.java:262) >> at >> >> > org.apache.wicket.markup.html.internal.Enclosure.onComponentTagBody(Encl > >> osure.java:169) >> at >> org.apache.wicket.Component.renderComponent(Component.java:2619) >> at >> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) >> at org.apache.wicket.Component.render(Component.java:2450) >> at >> org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229) >> at >> >> > org.apache.wicket.markup.resolver.EnclosureResolver.resolve(EnclosureRes > >> olver.java:61) >> at >> >> > org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentRe > >> solvers.java:81) >> at >> >> > org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418) > >> at >> >> > org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer > >> .java:1577) >> at >> >> > org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav > >> a:1501) >> at >> org.apache.wicket.Component.renderComponent(Component.java:2619) >> at >> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) >> at org.apache.wicket.Component.render(Component.java:2450) >> at >> >> > org.apache.wicket.markup.repeater.AbstractRepeater.renderChild(AbstractR > >> epeater.java:122) >> at >> >> > org.apache.wicket.markup.repeater.AbstractRepeater.onRender(AbstractRepe > >> ater.java:103) >> at org.apache.wicket.Component.render(Component.java:2450) >> at >> >> > org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414) > >> at >> >> > org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer > >> .java:1577) >> at >> >> > org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav > >> a:1501) >> at >> org.apache.wicket.Component.renderComponent(Component.java:2619) >> at >> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) >> at org.apache.wicket.Component.render(Component.java:2450) >> at >> org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229) >> at >> >> > org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(Mark > >> upInheritanceResolver.java:66) >> at >> >> > org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentRe > >> solvers.java:81) >> at >> >> > org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.ja
Re: Settings an HTML page as home page?
Just an idea: -Mount Wicket filter to something different from /* -Add and index.html to webapp folder. Ernesto On Fri, Feb 5, 2010 at 11:24 AM, Ashika Umanga Umagiliya < auma...@biggjapan.com> wrote: > Greetings, > > How can I set an static HTML page in webapp folder as my home page in > Application class instead of using Wicket Page ? > > thanks in advance, > umanga > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Settings an HTML page as home page?
Greetings, How can I set an static HTML page in webapp folder as my home page in Application class instead of using Wicket Page ? thanks in advance, umanga - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Application-wide date formate
I did this and it worked. txtStartDate = new DateTextField("txtStartDate", new Model(startDate.toDate()),"dd-MMM-"); josh. On Fri, Feb 5, 2010 at 12:22 PM, Peter Thomas wrote: > On Fri, Feb 5, 2010 at 2:42 PM, Josh Kamau wrote: > > > Hi guys; > > > > I am getting frustrated trying to display date in the format > "dd-MMM-" > > e.g 05-FEB-2010. > > > > i am using a TextField and a > > org.apache.wicket.extensions.yui.calendar.DatePicker . I have added the > > date > > picker to the textfield as required. > > > > After i pick the date from the datepicker popup, i want to to insert the > > date in the above format. I have tried writting a converter, overriding > the > > get/setModelObject on the textfield among other things but it wont work. > > Anyone suggest a different date picker component that i can use? > > > > You can try roll your own picker using YUI, here's some code I wrote that > does this: > > > http://fisheye3.atlassian.com/browse/j-trac/trunk/jtrac/src/main/java/info/jtrac/wicket/yui/YuiCalendar.java?r=HEAD > > > http://fisheye3.atlassian.com/browse/j-trac/trunk/jtrac/src/main/webapp/resources/yui/calendar/calendar-utils.js?r=HEAD > > I had to use some extra JS (see link above) to set the format on the YUI > side, hope this helps. Disclaimer: code is a little old though, old > version > of YUI, referencing JS from context relative path not really recommended - > prefer relative to java package etc. > > - Peter > > > > > > > regards. > > > > Josh > > > > On Fri, Feb 5, 2010 at 11:25 AM, Josh Kamau > wrote: > > > > > Hi guys; > > > > > > Kindly help me set the application-wide date format independent of the > > > locale. > > > > > > > > > regards. > > > > > >
Re: Application-wide date formate
On Fri, Feb 5, 2010 at 2:42 PM, Josh Kamau wrote: > Hi guys; > > I am getting frustrated trying to display date in the format "dd-MMM-" > e.g 05-FEB-2010. > > i am using a TextField and a > org.apache.wicket.extensions.yui.calendar.DatePicker . I have added the > date > picker to the textfield as required. > > After i pick the date from the datepicker popup, i want to to insert the > date in the above format. I have tried writting a converter, overriding the > get/setModelObject on the textfield among other things but it wont work. > Anyone suggest a different date picker component that i can use? > You can try roll your own picker using YUI, here's some code I wrote that does this: http://fisheye3.atlassian.com/browse/j-trac/trunk/jtrac/src/main/java/info/jtrac/wicket/yui/YuiCalendar.java?r=HEAD http://fisheye3.atlassian.com/browse/j-trac/trunk/jtrac/src/main/webapp/resources/yui/calendar/calendar-utils.js?r=HEAD I had to use some extra JS (see link above) to set the format on the YUI side, hope this helps. Disclaimer: code is a little old though, old version of YUI, referencing JS from context relative path not really recommended - prefer relative to java package etc. - Peter > > regards. > > Josh > > On Fri, Feb 5, 2010 at 11:25 AM, Josh Kamau wrote: > > > Hi guys; > > > > Kindly help me set the application-wide date format independent of the > > locale. > > > > > > regards. > > >
SV: Fix super(new CompoundPropertyModel(this)) error in the WIA book
> super(new CompoundPropertyModel(this)); This seems wrong: A call to super() cannot reference "this" directly or indirectly: JLS §8.8.7 says: "It is a compile-time error for a constructor to directly or indirectly invoke itself through a series of one or more explicit constructor invocations involving this." - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket enclosure not finding child!?
According to the developers this was a "bug" in a the original "enclosure" implementation, which allowed NOT to add all child components (if enclosure is not shown on page). Now since version 1.4.2 it is "corrected". So you have to add both object_title_classification_prefix, and object_title_classification in both cases, when enclosure IS displayed and when it is NOT. For the same reason I am still on 1.4.1, so this is only my guess ... See mailing list archives for enclosure related topics, e.g. http://old.nabble.com/Re:-enclosure-changes-in-1.4.4-p26763772.html Girts Ziemelis On 02/05/2010 12:06 AM, Chris Colman wrote: I've found the problem with any version after 1.4.2. With 1.4.2 I seem to be able to use enclosures just fine - even when the children are supplied by a component resolver - but any 1.4.3, 1.4.4 and 1.4.5 cause problems. I haven't yet tried 1.4.6 but from what you're saying it probably has the same problem. Chris Colman Step Ahead Software http://develop.stepaheadsoftware.com -Original Message- From: Roman Uhlig Maxity.de [mailto:roman.uh...@maxity.de] Sent: Friday, 5 February 2010 2:23 AM To: users@wicket.apache.org Subject: Re: wicket enclosure not finding child!? I just upgraded from 1.4.1 to 1.4.6 and now I'm getting this error too without changing anything else in my source code: 04 Feb 2010 16:01:20,352 ERROR [org.apache.wicket.RequestCycle:1521] Could not find child with id: object_title_classification_prefix in the wicket:enclosure org.apache.wicket.WicketRuntimeException: Could not find child with id: object_title_classification_prefix in the wicket:enclosure at org.apache.wicket.markup.html.internal.Enclosure.checkChildComponent(Enc losure.java:220) at org.apache.wicket.markup.html.internal.Enclosure.ensureAllChildrenPresen t(Enclosure.java:262) at org.apache.wicket.markup.html.internal.Enclosure.onComponentTagBody(Encl osure.java:169) at org.apache.wicket.Component.renderComponent(Component.java:2619) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) at org.apache.wicket.Component.render(Component.java:2450) at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229) at org.apache.wicket.markup.resolver.EnclosureResolver.resolve(EnclosureRes olver.java:61) at org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentRe solvers.java:81) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer .java:1577) at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav a:1501) at org.apache.wicket.Component.renderComponent(Component.java:2619) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) at org.apache.wicket.Component.render(Component.java:2450) at org.apache.wicket.markup.repeater.AbstractRepeater.renderChild(AbstractR epeater.java:122) at org.apache.wicket.markup.repeater.AbstractRepeater.onRender(AbstractRepe ater.java:103) at org.apache.wicket.Component.render(Component.java:2450) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer .java:1577) at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav a:1501) at org.apache.wicket.Component.renderComponent(Component.java:2619) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) at org.apache.wicket.Component.render(Component.java:2450) at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229) at org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(Mark upInheritanceResolver.java:66) at org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentRe solvers.java:81) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer .java:1577) at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav a:1501) at org.apache.wicket.Component.renderComponent(Component.java:2619) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) at org.apache.wicket.Component.render(Component.java:2450) at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229) at org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(Mark upInheritanceResolver.java:73)
Re: Application-wide date formate
Hi guys; I am getting frustrated trying to display date in the format "dd-MMM-" e.g 05-FEB-2010. i am using a TextField and a org.apache.wicket.extensions.yui.calendar.DatePicker . I have added the date picker to the textfield as required. After i pick the date from the datepicker popup, i want to to insert the date in the above format. I have tried writting a converter, overriding the get/setModelObject on the textfield among other things but it wont work. Anyone suggest a different date picker component that i can use? regards. Josh On Fri, Feb 5, 2010 at 11:25 AM, Josh Kamau wrote: > Hi guys; > > Kindly help me set the application-wide date format independent of the > locale. > > > regards. >
Re: How to add and remove css classes the right way?
Ah i did it . but is this the best way? @Override protected void onValidate() { super.onValidate(); visitFormComponents(new FormComponent.IVisitor() { @Override public Object formComponent(IFormVisitorParticipant formComponent) { Component _c = (Component)formComponent; if(formComponent instanceof IValidatingComponent){ if(((IValidatingComponent)_c).getField().hasErrorMessage()){ AttributeAppender _attr = new AttributeAppender("class",new Model("validation_error"), " "){ @Override public boolean isTemporary() {return true; } }; ((IValidatingComponent)_c).getField().add(_attr); } } return _c; } }); } MattyDE wrote: > > Ohhkay.. i see > > indicatorFor.add(new AttributeAppender("class",new > Model("validation_error"), " ")); > indicatorFor.add(new AttributeAppender("class",new Model("test")," > ")); > > did it .. but how can i remove now an attribute from "class" .. or how > could i access the attributes to replace one? > > > > > > MattyDE wrote: >> >> Hello Martin ;) >> >> i tired >> >> indicatorFor.add(new AttributeModifier("class",new >> Model("validation_error"))); >> inicatorFor.add(new AttributeModifier("class",new >> Model("test"))); >> >> but in the markup no "class" attribute appears? >> >> - Martin >> >> >> >> >> Martin Sachs wrote: >>> >>> Hi Martin >>> >>> user the AttributeModifier or AttributeAppender classes. >>> >>> >>> >>> Martin >>> >>> Martin U schrieb: Hi Folks, I'am getting totally confused how to add and remove css classes to and form my text-input-fields on ajax-form-validation. At first i try to add two css classes step by step: Iterator iter = Session.get().getFeedbackMessages().messages(getFeedbackMessageFilter()).iterator(); if(iter.hasNext()){ indicatorFor.add(new SimpleAttributeModifier("class","validation_error")); indicatorFor.add(new SimpleAttributeModifier("class", "test")); } But gets the Markup only with "class='test' " How can i add more than one "value" to "class"? And how can i remove one special css-class from an component if the validation is okay to this field? Thanks in Advance for any help. - Martin >>> >>> >>> - >>> 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://old.nabble.com/How-to-add-and-remove-css-classes-the-right-way--tp27464616p27465079.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: Result of tester.assertResultPage(..) depends on JRE?
active development on 1.3.x has been stopped. if there are security issues those will be fixed and 1.3.8 released -igor On Fri, Feb 5, 2010 at 12:12 AM, Stefan Fussenegger wrote: > Man, that's true. I swear I looked at both versions and didn't find any > difference. Well, maybe I've looked at the same version twice though ... :) > > But in general, what's the state of the 1.3.x branch? Will there ever be a > 1.3.8? > > Cheers, Stefan > > > Igor Vaynberg wrote: >> >> i believe we fixed this in 1.4.x using a linkedhashmap >> >> -igor >> >> On Thu, Feb 4, 2010 at 8:53 AM, Stefan Fussenegger wrote: >>> >>> I've just found out that the outcome of a JUnit test using WicketTester >>> (v1.3.7) depends on the JVM version. This test >>> >>> public void testRender_deployment() throws Exception >>> { >>> WicketTester tester = doRender(DEPLOYMENT); >>> tester.assertResultPage( >>> ResourceMountTest.class, >>> "ResourceMountTestPage-deployment-expected.html" >>> ); >>> } >>> >>> from http://j.mp/ResourceMountTest_java works with Java 1.5.0_22 but >>> fails >>> using 1.6.0_17 as the order of attributes is different: >>> >>> expected: >> action="?wicket:interface=:0:panel:myForm::IFormSubmitListener::" >>> onclick="var wcall=wicketSubmitFormById('id1', >>> >>> '?wicket:interface=:0:panel:myForm::IActivePageBehaviorListener:3:&wicket:ignoreIfNotActive=true', >>> null,null,null, function() {return >>> Wicket.$$(this)&&Wicket.$$('id1')}.bind(this));;" >>> onsubmit="return >>> validateMyForm()" id="id1" method="post"> >>> actual: >> action="?wicket:interface=:0:panel:myForm::IFormSubmitListener::" >>> onclick="var wcall=wicketSubmitFormById('id1', >>> >>> '?wicket:interface=:0:panel:myForm::IActivePageBehaviorListener:3:&wicket:ignoreIfNotActive=true', >>> null,null,null, function() {return >>> Wicket.$$(this)&&Wicket.$$('id1')}.bind(this));;" method="post" >>> onsubmit="return validateMyForm()"> >>> >>> After digging through the code, I've found out that attributes are stored >>> in >>> a ValueMap (i.e. in a HashMap) in org.apache.wicket.markup.parser.XmlTag. >>> The iteration order of HashMaps isn't strictly defined though (HashMap >>> JavaDoc: "This class makes no guarantees as to the order of the map; in >>> particular, it does not guarantee that the order will remain constant >>> over >>> time."). >>> >>> Is there anything I miss here? Or does tester.assertResultPage(..) really >>> depend on the JRE and is therefore (slightly?) flawed? >>> >>> Cheers, Stefan >>> >>> -- >>> >>> Stefan Fußenegger >>> Molindo GmbH >>> http://techblog.molindo.at/ >>> >>> - >>> 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 >> > > -- > > Stefan Fußenegger > Geschäftsführer > s...@molindo.at > > Molindo GmbH > http://www.molindo.at/ > > - > 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
Application-wide date formate
Hi guys; Kindly help me set the application-wide date format independent of the locale. regards.
Re: How to add and remove css classes the right way?
Ohhkay.. i see indicatorFor.add(new AttributeAppender("class",new Model("validation_error"), " ")); indicatorFor.add(new AttributeAppender("class",new Model("test")," ")); did it .. but how can i remove now an attribute from "class" .. or how could i access the attributes to replace one? MattyDE wrote: > > Hello Martin ;) > > i tired > > indicatorFor.add(new AttributeModifier("class",new > Model("validation_error"))); > inicatorFor.add(new AttributeModifier("class",new Model("test"))); > > but in the markup no "class" attribute appears? > > - Martin > > > > > Martin Sachs wrote: >> >> Hi Martin >> >> user the AttributeModifier or AttributeAppender classes. >> >> >> >> Martin >> >> Martin U schrieb: >>> Hi Folks, >>> >>> I'am getting totally confused how to add and remove css classes to and >>> form >>> my text-input-fields on ajax-form-validation. >>> >>> At first i try to add two css classes step by step: >>> >>> Iterator iter = >>> Session.get().getFeedbackMessages().messages(getFeedbackMessageFilter()).iterator(); >>> if(iter.hasNext()){ >>> indicatorFor.add(new >>> SimpleAttributeModifier("class","validation_error")); >>> indicatorFor.add(new SimpleAttributeModifier("class", "test")); >>> } >>> >>> But gets the Markup only with "class='test' " >>> >>> How can i add more than one "value" to "class"? >>> >>> And how can i remove one special css-class from an component if the >>> validation is okay to this field? >>> >>> >>> Thanks in Advance for any help. >>> >>> - Martin >>> >>> >> >> >> - >> 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://old.nabble.com/How-to-add-and-remove-css-classes-the-right-way--tp27464616p27464823.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: [1.4.6] WicketURLDecoder - No current Application found - defaulting encoding to UTF-8
looking at the code its using the Application class logger...strange, i will fix in the branch. private static final Logger log = LoggerFactory.getLogger(Application.class); -igor On Fri, Feb 5, 2010 at 12:02 AM, smallufo wrote: > 2010/2/5 Igor Vaynberg > >> disable it in your logging configuration >> >> -igor >> >> > I tried a lot of configurations , but http.WicketURLDecoder's warning still > pops up... > > log4j.rootLogger=INFO, console > > log4j.appender.console=org.apache.log4j.ConsoleAppender > log4j.appender.console.layout=org.apache.log4j.PatternLayout > log4j.appender.console.layout.ConversionPattern=%d %-5p %C{2} - %m%n > > Then , I tried the following three configurations , but are all invalid , > WicketURLDecoder's warning still pops up : > log4j.logger.org.apache.wicket.protocol.http.WicketURLDecoder=OFF > log4j.org.apache.wicket.protocol.http.WicketURLDecoder=OFF > log4j.logger.org.apache.wicket.protocol.http.WicketURLDecoder=ERROR , > console > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Result of tester.assertResultPage(..) depends on JRE?
Man, that's true. I swear I looked at both versions and didn't find any difference. Well, maybe I've looked at the same version twice though ... :) But in general, what's the state of the 1.3.x branch? Will there ever be a 1.3.8? Cheers, Stefan Igor Vaynberg wrote: i believe we fixed this in 1.4.x using a linkedhashmap -igor On Thu, Feb 4, 2010 at 8:53 AM, Stefan Fussenegger wrote: I've just found out that the outcome of a JUnit test using WicketTester (v1.3.7) depends on the JVM version. This test public void testRender_deployment() throws Exception { WicketTester tester = doRender(DEPLOYMENT); tester.assertResultPage( ResourceMountTest.class, "ResourceMountTestPage-deployment-expected.html" ); } from http://j.mp/ResourceMountTest_java works with Java 1.5.0_22 but fails using 1.6.0_17 as the order of attributes is different: expected: actual: After digging through the code, I've found out that attributes are stored in a ValueMap (i.e. in a HashMap) in org.apache.wicket.markup.parser.XmlTag. The iteration order of HashMaps isn't strictly defined though (HashMap JavaDoc: "This class makes no guarantees as to the order of the map; in particular, it does not guarantee that the order will remain constant over time."). Is there anything I miss here? Or does tester.assertResultPage(..) really depend on the JRE and is therefore (slightly?) flawed? Cheers, Stefan -- Stefan Fußenegger Molindo GmbH http://techblog.molindo.at/ - 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 -- Stefan Fußenegger Geschäftsführer s...@molindo.at Molindo GmbH http://www.molindo.at/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add and remove css classes the right way?
Hello Martin ;) i tired indicatorFor.add(new AttributeModifier("class",new Model("validation_error"))); inicatorFor.add(new AttributeModifier("class",new Model("test"))); but in the markup no "class" attribute appears? - Martin Martin Sachs wrote: > > Hi Martin > > user the AttributeModifier or AttributeAppender classes. > > > > Martin > > Martin U schrieb: >> Hi Folks, >> >> I'am getting totally confused how to add and remove css classes to and >> form >> my text-input-fields on ajax-form-validation. >> >> At first i try to add two css classes step by step: >> >> Iterator iter = >> Session.get().getFeedbackMessages().messages(getFeedbackMessageFilter()).iterator(); >> if(iter.hasNext()){ >> indicatorFor.add(new >> SimpleAttributeModifier("class","validation_error")); >> indicatorFor.add(new SimpleAttributeModifier("class", "test")); >> } >> >> But gets the Markup only with "class='test' " >> >> How can i add more than one "value" to "class"? >> >> And how can i remove one special css-class from an component if the >> validation is okay to this field? >> >> >> Thanks in Advance for any help. >> >> - Martin >> >> > > > - > 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://old.nabble.com/How-to-add-and-remove-css-classes-the-right-way--tp27464616p27464720.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add and remove css classes the right way?
Hi Martin user the AttributeModifier or AttributeAppender classes. Martin Martin U schrieb: > Hi Folks, > > I'am getting totally confused how to add and remove css classes to and form > my text-input-fields on ajax-form-validation. > > At first i try to add two css classes step by step: > > Iterator iter = > Session.get().getFeedbackMessages().messages(getFeedbackMessageFilter()).iterator(); > if(iter.hasNext()){ > indicatorFor.add(new SimpleAttributeModifier("class","validation_error")); > indicatorFor.add(new SimpleAttributeModifier("class", "test")); > } > > But gets the Markup only with "class='test' " > > How can i add more than one "value" to "class"? > > And how can i remove one special css-class from an component if the > validation is okay to this field? > > > Thanks in Advance for any help. > > - Martin > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [1.4.6] WicketURLDecoder - No current Application found - defaulting encoding to UTF-8
2010/2/5 Igor Vaynberg > disable it in your logging configuration > > -igor > > I tried a lot of configurations , but http.WicketURLDecoder's warning still pops up... log4j.rootLogger=INFO, console log4j.appender.console=org.apache.log4j.ConsoleAppender log4j.appender.console.layout=org.apache.log4j.PatternLayout log4j.appender.console.layout.ConversionPattern=%d %-5p %C{2} - %m%n Then , I tried the following three configurations , but are all invalid , WicketURLDecoder's warning still pops up : log4j.logger.org.apache.wicket.protocol.http.WicketURLDecoder=OFF log4j.org.apache.wicket.protocol.http.WicketURLDecoder=OFF log4j.logger.org.apache.wicket.protocol.http.WicketURLDecoder=ERROR , console