[Announce] Apache Wicket 6.5.0 is released
This is the fifth maintenance release of the Wicket 6.x series. This release brings over 32 bug fixes and improvements. Git tag: release/wicket-6.5.0 Changelog: https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310561version=12323540 Maven: dependency groupIdorg.apache.wicket/groupId artifactIdwicket-core/artifactId version6.5.0/version /dependency Download the full distribution (including source): http://www.apache.org/dyn/closer.cgi/wicket/6.5.0 The Wicket team
Re: [Announce] Apache Wicket 6.5.0 is released
hi, i can't see any tag related to 6.5.0 :| On Wed, Jan 23, 2013 at 2:12 PM, Martin Grigorov mgrigo...@apache.org wrote: This is the fifth maintenance release of the Wicket 6.x series. This release brings over 32 bug fixes and improvements. Git tag: release/wicket-6.5.0 Changelog: https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310561version=12323540 Maven: dependency groupIdorg.apache.wicket/groupId artifactIdwicket-core/artifactId version6.5.0/version /dependency Download the full distribution (including source): http://www.apache.org/dyn/closer.cgi/wicket/6.5.0 The Wicket team -- regards, Vineet Semwal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [Announce] Apache Wicket 6.5.0 is released
https://git-wip-us.apache.org/repos/asf/wicket/repo?p=wicket.git;a=tag;h=b28d1e9a94a63d178e0600881671d8e978ef12d0 This commit made the tag. On Wed, Jan 23, 2013 at 11:27 AM, vineet semwal vineetsemwa...@gmail.comwrote: hi, i can't see any tag related to 6.5.0 :| On Wed, Jan 23, 2013 at 2:12 PM, Martin Grigorov mgrigo...@apache.org wrote: This is the fifth maintenance release of the Wicket 6.x series. This release brings over 32 bug fixes and improvements. Git tag: release/wicket-6.5.0 Changelog: https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310561version=12323540 Maven: dependency groupIdorg.apache.wicket/groupId artifactIdwicket-core/artifactId version6.5.0/version /dependency Download the full distribution (including source): http://www.apache.org/dyn/closer.cgi/wicket/6.5.0 The Wicket team -- regards, Vineet Semwal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
RE: jqwicket questions
Point 2 is connected with this issue http://code.google.com/p/jqwicket/issues/detail?id=38 I've downloaded sources and applied patch (it seems that project is no more developed) and it helped, but framework did not work correctly due to conflicts with my custom jQuery. Switching back to non-conflict mode helped. Best regards, Michał -Original Message- From: Michal Wegrzyn [mailto:michal.wegr...@onior.com] Sent: Friday, January 18, 2013 9:49 To: users@wicket.apache.org Subject: jqwicket questions Hi, Jqwicket has several components that I would like to use (CKEditor, MaskedInput, maybe later other), but I see some issues: 1. Is there an option to use jqwicket components (maybe other project?) without incorporating/integrating jqwicket jquery? If not, then: 2. When I want to use jqwicket with custom jQuery (local copy) using constructor with JS resource reference I get url cannot be empty or null exception. See http://code.google.com/p/jqwicket/issues/detail?id=29 In fact when you use JS resource reference constructor core jquery url var is left null. Is is possible to use jqwicket with custom jquery without problems? I saw on the home page that newest 0.8 version supports Wicket 1.5.3. Maybe it is connected, as I use newer Wicket version (1.5.9). 3. I cannot use custom jquery so I configure non-conflicting alias with JQContributionConfig().enableNonConflictMode( jq ).withDefaultJQueryUi(); It seems that components are working, but I see in wicket debug window JS error saying that jq is not defined. For Jqwicket behavior I see no error. Best regards, Michal Wegrzyn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket:for attribute definition in xsd
I've created https://issues.apache.org/jira/browse/WICKET-5003 and attached a patch. Any improvements are welcome! On Tue, Jan 22, 2013 at 7:25 PM, Dan Retzlaff dretzl...@gmail.com wrote: I think taking it to that level gets into the realm of xs:redefine as described here: http://www.w3.org/TR/xhtml-modularization/schema_developing.html On Tue, Jan 22, 2013 at 7:41 AM, Martin Grigorov mgrigo...@apache.org wrote: Hi Jim, You are correct! I've missed those the other day. Do you know what XSD restriction I should use to allow the usage of wicket:for attribute *only* in HTML label elements ? On Tue, Jan 22, 2013 at 5:14 PM, Olson, Jim (US SSA) jim.ol...@baesystems.com wrote: Hello Martin, Unless I'm not understanding it correctly, wicket-1.5.xsd under wicket-core/src/main/resources/META-INF defines wicket attributes as well as elements. If defines attributes wicket:id, wicket:enclosure, and wicket:message attributes but not the wicket:for attribute. https://cwiki.apache.org/WICKET/wickets-xhtml-tags.html#Wicket%2527sXHTMLtags-Attributewicket says there are 6 attributes but it looks like wicket:unknown and wicket:scope have gone away. Thanks, and please explain if I'm misunderstanding this. Jim Olson -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Monday, January 21, 2013 3:37 AM To: users@wicket.apache.org Subject: Re: wicket:for attribute definition in xsd Hi, wicket-1.5.xsd defines only the elements - wicket:something. wicket:for is an attribute to label element which is part of HTML spec. Is there a way to define attributes to elements from a different namespace ? If it is possible then please file a ticket with a patch. The same is valid for wicket:message when used as an attribute. On Fri, Jan 18, 2013 at 9:23 PM, Jim Olson jimo...@gmail.com wrote: There’s no attribute definition for wicket:for in the xsd of wicket 6.4.0. Shouldn’t it define this attribute? Thank you -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: How to add the key in properties file for DateTimeField component
Hi, I think adding hours.DateTimeField$HoursValidator=Some nice error message in MyApplication.properties should be OK. On Tue, Jan 22, 2013 at 8:33 PM, wicket_new_user murthy.m...@gmail.comwrote: Hi, i'm getting the below error when adding the hours greater than 12 for DateTimeField Component. ◦Could not locate error message for component: TextField@report:wicket:dateField:dateValue:hours and error: [ValidationError message=[null], keys=[DateTimeField$HoursValidator], variables=[[minimum=1],[maximum=12]]]. Tried keys: hours.DateTimeField$HoursValidator, DateTimeField$HoursValidator. i've tried the various keys in my properties file, but none of them worked Thanks in advance WNU -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-the-key-in-properties-file-for-DateTimeField-component-tp4655654.html Sent from the Users forum 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: documentation
If I had your knowledge and more time (project manager), I wish I could help. Best regards Philippe 2013/1/22 Thies Edeling th...@rrm.net Wicket is open source, if you feel that the documentation is lacking - feel free to contribute. On Jan 22, 2013 5:54 PM, Philippe Demaison ph.demai...@gmail.com wrote: Hi Ondra and Kees, Are you kidding ? Are you saying that I need to - read a book released in 2009 covering wicket 1.3 ? - read http://www.wicket-library.com/wicket-examples/index.html (for which wicket version ? ) - read the Wicket Cookbook - read the migration from 1.x to 1.5 https://cwiki.apache.org/WICKET/migration-to-wicket-15.html - read the migration from 1.5 to 1.6 https://cwiki.apache.org/WICKET/migration-to-wicket-60.html to understand what are the Wicket's benefits and write a POC ? Are you saying that I need to google to read the best practices ? You know that framework adoption is linked to good documentation. Not only of course (quality are community are equally important) but documentation is essential. For example, I find these documentations much more appealing http://www.playframework.org/documentation/2.0.4/Home http://tapestry.apache.org/documentation.html https://developers.google.com/web-toolkit/doc/latest/DevGuide http://www.springsource.org/spring-framework#documentation Don't you ? Philippe 2013/1/22 Ondrej Zizka ozi...@redhat.com Hi Phillipe, you're right, the documentation deserves improvements. I would recommend you to start with the Wicket in Action book. That will give you the basic concepts of Wicket. Then continue with the examples from http://www.wicket-library.com/** wicket-examples/index.html http://www.wicket-library.com/wicket-examples/index.html. That will enforce what you learned in the book, and show more tricks. Then go through the Wicket Cookbook. That is a collection of solutions and best practices for common tasks. Then skim through https://cwiki.apache.org/** WICKET/migration-to-wicket-15.**html https://cwiki.apache.org/WICKET/migration-to-wicket-15.html and https://cwiki.apache.org/**WICKET/migration-to-wicket-60.**html https://cwiki.apache.org/WICKET/migration-to-wicket-60.html. It is quite easy to create non-ajax websites. I only have dificulties once it gets to Ajax. In such cases, this mailing list is very useful, and also stackoverflow and the multitude of blogs. Not sure what are your other options, but e.g. I prefer Wicket over JSF. Even big JSF fans claim that JSF is marginally better. And last thing, I would recommend to try Wicket in combination with JBoss AS 7, which made my development quick and easy - redeployment in 3 seconds, restart in 5 seconds, CDI, JPA and JAAS at hand, the Infinispan cache, easy management, ... my2c, Ondra On 01/22/2013 11:24 AM, Philippe Demaison wrote: Hi All, As Gabor Friedrich from the FAO, we are in my company, L'Oreal, comparing different web frameworks. Apache Wicket may be the best framework, may be usefull for my company, I don't know. I don't know because there is no clear documentation for a good evaluation. In fact the documentation is not good. The documentation is not up to date, not to say obsolete, not well organized and definitely not sexy. Sorry to being rude, I know this is difficult to do, but this is a major drawback when company and people evaluate Wicket. Some articles are for 1.4 or 1.5, not many for 6 Some articles are redundant. I am sure the folowing structure could be improved : https://cwiki.apache.org/**WICKET/framework-**documentation.html https://cwiki.apache.org/WICKET/framework-documentation.htmlis https://cwiki.apache.org/**WICKET/index.html https://cwiki.apache.org/WICKET/index.html https://cwiki.apache.org/**WICKET/documentation-index.**html https://cwiki.apache.org/WICKET/documentation-index.html The http://wicket.apache.org/ layout is good. Why not reorganize the documentation with this layout ? Managers want to see benefits, developpers want to learn fast(and have fun). I tested the mentionned blogs on http://wicket.apache.org/meet/** blogs.html http://wicket.apache.org/meet/blogs.html Here is what I found : Chillenious! - Eelco Hillenius - http://chillenious.wordpress.**com/ http://chillenious.wordpress.com/ last update : 2008 Here be beasties - Al Maw - http://herebebeasties.com/ last update : 2009 Codierspiel - Nathan Hamblen (runs on Wicket) - http://code.technically.us/ no a single wicket post Antwerkz - Justin Lee - http://antwerkz.com/wp/ empty Geertjan - Geertjan Wielenga - http://blogs.sun.com/geertjan http 404 ! Mystic Coders - Andrew Lombardi and Wicket by Example - Community driven are pointing to
Re: documentation
Hi, On Wed, Jan 23, 2013 at 12:36 PM, Philippe Demaison ph.demai...@gmail.comwrote: If I had your knowledge and more time (project manager), I wish I could help. Many people have said this... But I know exactly what you mean about the missing reference. I have an idea to start writing a reference guide that will explain the topics I'm most acquaint with. I'll use http://sphinx-doc.org/ because it supports an easy way to embed code snippets from other Maven modules - wicket-examples. So the code examples will evolve with the framework. Stay tuned! Best regards Philippe 2013/1/22 Thies Edeling th...@rrm.net Wicket is open source, if you feel that the documentation is lacking - feel free to contribute. On Jan 22, 2013 5:54 PM, Philippe Demaison ph.demai...@gmail.com wrote: Hi Ondra and Kees, Are you kidding ? Are you saying that I need to - read a book released in 2009 covering wicket 1.3 ? - read http://www.wicket-library.com/wicket-examples/index.html (for which wicket version ? ) - read the Wicket Cookbook - read the migration from 1.x to 1.5 https://cwiki.apache.org/WICKET/migration-to-wicket-15.html - read the migration from 1.5 to 1.6 https://cwiki.apache.org/WICKET/migration-to-wicket-60.html to understand what are the Wicket's benefits and write a POC ? Are you saying that I need to google to read the best practices ? You know that framework adoption is linked to good documentation. Not only of course (quality are community are equally important) but documentation is essential. For example, I find these documentations much more appealing http://www.playframework.org/documentation/2.0.4/Home http://tapestry.apache.org/documentation.html https://developers.google.com/web-toolkit/doc/latest/DevGuide http://www.springsource.org/spring-framework#documentation Don't you ? Philippe 2013/1/22 Ondrej Zizka ozi...@redhat.com Hi Phillipe, you're right, the documentation deserves improvements. I would recommend you to start with the Wicket in Action book. That will give you the basic concepts of Wicket. Then continue with the examples from http://www.wicket-library.com/** wicket-examples/index.html http://www.wicket-library.com/wicket-examples/index.html. That will enforce what you learned in the book, and show more tricks. Then go through the Wicket Cookbook. That is a collection of solutions and best practices for common tasks. Then skim through https://cwiki.apache.org/** WICKET/migration-to-wicket-15.**html https://cwiki.apache.org/WICKET/migration-to-wicket-15.html and https://cwiki.apache.org/**WICKET/migration-to-wicket-60.**html https://cwiki.apache.org/WICKET/migration-to-wicket-60.html. It is quite easy to create non-ajax websites. I only have dificulties once it gets to Ajax. In such cases, this mailing list is very useful, and also stackoverflow and the multitude of blogs. Not sure what are your other options, but e.g. I prefer Wicket over JSF. Even big JSF fans claim that JSF is marginally better. And last thing, I would recommend to try Wicket in combination with JBoss AS 7, which made my development quick and easy - redeployment in 3 seconds, restart in 5 seconds, CDI, JPA and JAAS at hand, the Infinispan cache, easy management, ... my2c, Ondra On 01/22/2013 11:24 AM, Philippe Demaison wrote: Hi All, As Gabor Friedrich from the FAO, we are in my company, L'Oreal, comparing different web frameworks. Apache Wicket may be the best framework, may be usefull for my company, I don't know. I don't know because there is no clear documentation for a good evaluation. In fact the documentation is not good. The documentation is not up to date, not to say obsolete, not well organized and definitely not sexy. Sorry to being rude, I know this is difficult to do, but this is a major drawback when company and people evaluate Wicket. Some articles are for 1.4 or 1.5, not many for 6 Some articles are redundant. I am sure the folowing structure could be improved : https://cwiki.apache.org/**WICKET/framework-**documentation.html https://cwiki.apache.org/WICKET/framework-documentation.htmlis https://cwiki.apache.org/**WICKET/index.html https://cwiki.apache.org/WICKET/index.html https://cwiki.apache.org/**WICKET/documentation-index.**html https://cwiki.apache.org/WICKET/documentation-index.html The http://wicket.apache.org/ layout is good. Why not reorganize the documentation with this layout ? Managers want to see benefits, developpers want to learn fast(and have fun). I tested the mentionned blogs on http://wicket.apache.org/meet/** blogs.html
Problem with RuntimeConfigurationType.DEPLOYMENT.
Hello, I have a problem and Deployment Mode is that some of my templates are not working properly, I use AjaxFormComponentUpdatingBehavior specifically to hide or show some components of templates. I have succeeded recreate the development mode error, adding the application init, this line. getMarkupSettings (). setStripWicketTags (true); In this case the debug ajax returns that can not find the component. Note.I use the setOutpuMarkupId (true), and also correctly in development mode without the line, it works fine, I use wicket 6.5.0 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-RuntimeConfigurationType-DEPLOYMENT-tp4655679.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Problem with RuntimeConfigurationType.DEPLOYMENT.
What markup do you use for the components which you update ? You cannot update wicket:container for example. You need to use div, span, ... On Wed, Jan 23, 2013 at 1:30 PM, Raul ralva...@netwie.com wrote: Hello, I have a problem and Deployment Mode is that some of my templates are not working properly, I use AjaxFormComponentUpdatingBehavior specifically to hide or show some components of templates. I have succeeded recreate the development mode error, adding the application init, this line. getMarkupSettings (). setStripWicketTags (true); In this case the debug ajax returns that can not find the component. Note.I use the setOutpuMarkupId (true), and also correctly in development mode without the line, it works fine, I use wicket 6.5.0 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-RuntimeConfigurationType-DEPLOYMENT-tp4655679.html Sent from the Users forum 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: Problem with RuntimeConfigurationType.DEPLOYMENT.
Was using wicket:container/ using div has fixed the problem. Thank you. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-RuntimeConfigurationType-DEPLOYMENT-tp4655679p4655681.html Sent from the Users forum 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: AjaxDownload file download example - how to delete serverside file after download
Hi, Looking at RequestHandlerStack reveals that only a single next request handler can be scheduled. So your code results in only the last request handler to actually be scheduled and executed. Since you do create two request handlers, I suspect you create your temporary file before it is actually requested. Since both handlers are constructed, that would explain why you see two temporary files. Instead of trying to schedule multiple request handlers, I'd try to find out why your file is not deleted. Set some breakpoints and find out why it is happening. Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 15:26, schreef RichLiv: I followed the example of this snippet https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.html which very neatly shows how to download a file using AJAX. However, I can't seem to get the server file to delete after download - I added a nested class to handle the download and added it in the onRequest but it actually seems to add another server side file (so I suspect it triggers another temporary file create, as that is how I do my downloads) rather than delete the one just downloaded. Anyone spot the mistake ? private class MyDeleteFileHandler extends ResourceStreamRequestHandler { public MyDeleteFileHandler(IResourceStream resourceStream) { super(resourceStream); } @Override public void respond(IRequestCycle requestCycle) { super.respond(requestCycle); Files.remove(new File(AjaxDownload.this.getFileName())); } } . public void onRequest() { ResourceStreamRequestHandler handler = new ResourceStreamRequestHandler(getResourceStream(),getFileName()); handler.setContentDisposition(ContentDisposition.ATTACHMENT); getComponent().getRequestCycle().scheduleRequestHandlerAfterCurrent(handler); ResourceStreamRequestHandler deleteHandler = new MyDeleteFileHandler(getResourceStream()); getComponent().getRequestCycle().scheduleRequestHandlerAfterCurrent(deleteHandler); } Can there be only one handler scheduled and if so, can I chain them together somehow ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxDownload-file-download-example-how-to-delete-serverside-file-after-download-tp4655682.html Sent from the Users forum 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: AjaxDownload file download example - how to delete serverside file after download
Exactly right, many thanks, that worked really well. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxDownload-file-download-example-how-to-delete-serverside-file-after-download-tp4655682p4655685.html Sent from the Users forum 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: documentation
Projects like Springframework use docbook. It's really nice, You put all documentation in xml files which are in the scm and when you release it, you have documentation per release. On Wed, Jan 23, 2013 at 12:26 PM, Martin Grigorov mgrigo...@apache.orgwrote: Hi, On Wed, Jan 23, 2013 at 12:36 PM, Philippe Demaison ph.demai...@gmail.comwrote: If I had your knowledge and more time (project manager), I wish I could help. Many people have said this... But I know exactly what you mean about the missing reference. I have an idea to start writing a reference guide that will explain the topics I'm most acquaint with. I'll use http://sphinx-doc.org/ because it supports an easy way to embed code snippets from other Maven modules - wicket-examples. So the code examples will evolve with the framework. Stay tuned! Best regards Philippe 2013/1/22 Thies Edeling th...@rrm.net Wicket is open source, if you feel that the documentation is lacking - feel free to contribute. On Jan 22, 2013 5:54 PM, Philippe Demaison ph.demai...@gmail.com wrote: Hi Ondra and Kees, Are you kidding ? Are you saying that I need to - read a book released in 2009 covering wicket 1.3 ? - read http://www.wicket-library.com/wicket-examples/index.html (for which wicket version ? ) - read the Wicket Cookbook - read the migration from 1.x to 1.5 https://cwiki.apache.org/WICKET/migration-to-wicket-15.html - read the migration from 1.5 to 1.6 https://cwiki.apache.org/WICKET/migration-to-wicket-60.html to understand what are the Wicket's benefits and write a POC ? Are you saying that I need to google to read the best practices ? You know that framework adoption is linked to good documentation. Not only of course (quality are community are equally important) but documentation is essential. For example, I find these documentations much more appealing http://www.playframework.org/documentation/2.0.4/Home http://tapestry.apache.org/documentation.html https://developers.google.com/web-toolkit/doc/latest/DevGuide http://www.springsource.org/spring-framework#documentation Don't you ? Philippe 2013/1/22 Ondrej Zizka ozi...@redhat.com Hi Phillipe, you're right, the documentation deserves improvements. I would recommend you to start with the Wicket in Action book. That will give you the basic concepts of Wicket. Then continue with the examples from http://www.wicket-library.com/** wicket-examples/index.html http://www.wicket-library.com/wicket-examples/index.html. That will enforce what you learned in the book, and show more tricks. Then go through the Wicket Cookbook. That is a collection of solutions and best practices for common tasks. Then skim through https://cwiki.apache.org/** WICKET/migration-to-wicket-15.**html https://cwiki.apache.org/WICKET/migration-to-wicket-15.html and https://cwiki.apache.org/**WICKET/migration-to-wicket-60.**html https://cwiki.apache.org/WICKET/migration-to-wicket-60.html. It is quite easy to create non-ajax websites. I only have dificulties once it gets to Ajax. In such cases, this mailing list is very useful, and also stackoverflow and the multitude of blogs. Not sure what are your other options, but e.g. I prefer Wicket over JSF. Even big JSF fans claim that JSF is marginally better. And last thing, I would recommend to try Wicket in combination with JBoss AS 7, which made my development quick and easy - redeployment in 3 seconds, restart in 5 seconds, CDI, JPA and JAAS at hand, the Infinispan cache, easy management, ... my2c, Ondra On 01/22/2013 11:24 AM, Philippe Demaison wrote: Hi All, As Gabor Friedrich from the FAO, we are in my company, L'Oreal, comparing different web frameworks. Apache Wicket may be the best framework, may be usefull for my company, I don't know. I don't know because there is no clear documentation for a good evaluation. In fact the documentation is not good. The documentation is not up to date, not to say obsolete, not well organized and definitely not sexy. Sorry to being rude, I know this is difficult to do, but this is a major drawback when company and people evaluate Wicket. Some articles are for 1.4 or 1.5, not many for 6 Some articles are redundant. I am sure the folowing structure could be improved : https://cwiki.apache.org/**WICKET/framework-**documentation.html https://cwiki.apache.org/WICKET/framework-documentation.htmlis https://cwiki.apache.org/**WICKET/index.html https://cwiki.apache.org/WICKET/index.html
Re: documentation
Hi all, On Tue, 22 Jan 2013 18:25:41 +0100, Guillaume Smet wrote: On Tue, Jan 22, 2013 at 5:53 PM, Philippe Demaison ph.demai...@gmail.com wrote: Are you kidding ? First thing first, while everyone agrees that a good documentation is a good thing, you should consider that you don't pay anyone to write it. On Tue, 22 Jan 2013 19:08:35 +0100, Thies Edeling wrote: Wicket is open source, if you feel that the documentation is lacking - feel free to contribute. don't mean to offend anyone, but things like those are the least helpful kind of answers possible. We all know Wicket is open source, we all know what open source means, an we all know that we aren't paying anyone. It's just that if someone had the resources to pay anyone or significantly contribute to the documentation himself (*after* having learned everything he'd need, and after doing so *without* a complete reference), he'd probably not complain in the first place. More probable is that he's already got a job to do himself and is just looking for the best tool to do so. Of course, shouting abuse (not that I'd think anyone here did) at maybe even unsalaried developers who are doing what they can doesn't help, either. To add my experience to the subject, I bought the 'Wicket in Action' book some time ago, and for my first steps with Wicket 6 I tried to extract what I could from it and the Net. The problem is, just as Philippe said, much has changed between versions, and it's not only that things I find sometimes don't apply anymore, but, what's possibly worse, I can't even know whether code examples I find still work until I tried them myself, as the changes aren't really exhaustively documented and because, well, there is no such thing as a Wicket 6 reference. As far as I am concerned, I'll keep trying to get into Wicket 6, though - but that's something I'll be doing in my spare time, because I probably won't ever see Wicket used at my main job, and so I can take my time. Cheers, Robert - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Close tag not found while it's there
With Wicket 6.5.0 I get a close tag not found error in one of my panels (worked for 1.4.x). Looking at the markup I don't see any obvious problems. Unexpected RuntimeException Last cause: Close tag not found for tag: wicket:container wicket:id=projectStatus id=id012. For PlaceholderPanel Components only raw markup is allow in between the tags but not other Wicket Component. Component: [PlaceholderPanel [Component id = 0]] Markup The problem is in file:/data/thies/projects/ehour/src/ehour_w15/eHour-wicketweb/target/classes/net/rrm/ehour/ui/timesheet/panel/ProjectOverviewPanel.html: wicket:container wicket:id=projectStatus div class=AggregateRow div class=foldCella wicket:id=foldLinkimg border=0 src=img/icon_up_off.gif wicket:id=foldImg//a/div div class=textCell style=width: 22% wicket:id=customerName[customerName]/div div class=textCell style=width:15% wicket:id=projectCode[projectCode]/div div class=textCell style=overflow:hidden;cursor:pointer wicket:id=projectNameContainerspan wicket:id=projectName[project name]/span/div div class=numbCell style=width:10% wicket:id=rate/div div class=numbCell style=width:8% wicket:id=monthHours24.50/div div class=numbCell style=width: 19% wicket:id=turnovereuro; 16.000/div /div span wicket:id=summaryRow/span /wicket:container
Re: Close tag not found while it's there
Is PlaceholderPanel a component defined by your application? It does not allow nested wicket components. Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 20:03, schreef Thies Edeling: With Wicket 6.5.0 I get a close tag not found error in one of my panels (worked for 1.4.x). Looking at the markup I don't see any obvious problems. Unexpected RuntimeException Last cause: Close tag not found for tag: wicket:container wicket:id=projectStatus id=id012. For PlaceholderPanel Components only raw markup is allow in between the tags but not other Wicket Component. Component: [PlaceholderPanel [Component id = 0]] Markup The problem is in file:/data/thies/projects/ehour/src/ehour_w15/eHour-wicketweb/target/classes/net/rrm/ehour/ui/timesheet/panel/ProjectOverviewPanel.html: wicket:container wicket:id=projectStatus div class=AggregateRow div class=foldCella wicket:id=foldLinkimg border=0 src=img/icon_up_off.gif wicket:id=foldImg//a/div div class=textCell style=width: 22% wicket:id=customerName[customerName]/div div class=textCell style=width:15% wicket:id=projectCode[projectCode]/div div class=textCell style=overflow:hidden;cursor:pointer wicket:id=projectNameContainerspan wicket:id=projectName[project name]/span/div div class=numbCell style=width:10% wicket:id=rate/div div class=numbCell style=width:8% wicket:id=monthHours24.50/div div class=numbCell style=width: 19% wicket:id=turnovereuro; 16.000/div /div span wicket:id=summaryRow/span /wicket:container
Re: Close tag not found while it's there
Thanks, I passed in the wrong component for replacement :) On 01/23/2013 08:15 PM, Bas Gooren wrote: Is PlaceholderPanel a component defined by your application? It does not allow nested wicket components. Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 20:03, schreef Thies Edeling: With Wicket 6.5.0 I get a close tag not found error in one of my panels (worked for 1.4.x). Looking at the markup I don't see any obvious problems. Unexpected RuntimeException Last cause: Close tag not found for tag: wicket:container wicket:id=projectStatus id=id012. For PlaceholderPanel Components only raw markup is allow in between the tags but not other Wicket Component. Component: [PlaceholderPanel [Component id = 0]] Markup The problem is in file:/data/thies/projects/ehour/src/ehour_w15/eHour-wicketweb/target/classes/net/rrm/ehour/ui/timesheet/panel/ProjectOverviewPanel.html: wicket:container wicket:id=projectStatus div class=AggregateRow div class=foldCella wicket:id=foldLinkimg border=0 src=img/icon_up_off.gif wicket:id=foldImg//a/div div class=textCell style=width: 22% wicket:id=customerName[customerName]/div div class=textCell style=width:15% wicket:id=projectCode[projectCode]/div div class=textCell style=overflow:hidden;cursor:pointer wicket:id=projectNameContainerspan wicket:id=projectName[project name]/span/div div class=numbCell style=width:10% wicket:id=rate/div div class=numbCell style=width:8% wicket:id=monthHours24.50/div div class=numbCell style=width: 19% wicket:id=turnovereuro; 16.000/div /div span wicket:id=summaryRow/span /wicket:container - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
find html tag
Hi, is there a way I can find specific html tag in markup? I have this html structure: ul class=mymenu li a href=./mypage.html?cid=menumenu/a ul li a href=./mypage.html?cid=menu/submenusubmenu/a ul li a href=./mypage.html?cid=menu/submenu/subsubmenu1subsubmenu1/a /li li a href=./mypage.html?cid=menu/submenu/subsubmenu2subsubmenu2/a /li li a href=./mypage.html?cid=menu/submenu/subsubmenu3subsubmenu3/a /li /ul /ul /ul I'm processing clicks on anchors with my page: public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); ... } Now I need some way I can add atribute into parent li tag of a tag on which I do click. Somethink like (pseudocode): public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); //find corresponding a tag Tag anchorTag = go_from_top_ul_tag_and_find_a_tag_by_category(category) //have corresponding anchor tag, get parrent tag of the anchor tag Tag anchorParentTag = anchorTag.getParent(); //and now I can do my mysterious things with menu... } But I don't know where to start my search and I totaly don't know whot to look for in docu. Please, help :-) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: find html tag
Hi! What you want to accomplish (e.g. changing some html attributes) can be done by adding an attributemodifier to each li component. In pseudocode: RepeatingView uls = ... for_every_li: WebMarkupContainer li = ... uls.add(li); now, you can do something like this: li.add(new AttributeAppender(...) { isEnabled() { return true if you want to append a html attribute; } }); Or alternatively: WebMarkupContainer li = new WMC() { onComponentTag(ComponentTag tag) { super(tag); tag.put(my-html-attribute, value); } } Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 20:45, schreef Michael Jaruska: Hi, is there a way I can find specific html tag in markup? I have this html structure: ul class=mymenu li a href=./mypage.html?cid=menumenu/a ul li a href=./mypage.html?cid=menu/submenusubmenu/a ul li a href=./mypage.html?cid=menu/submenu/subsubmenu1subsubmenu1/a /li li a href=./mypage.html?cid=menu/submenu/subsubmenu2subsubmenu2/a /li li a href=./mypage.html?cid=menu/submenu/subsubmenu3subsubmenu3/a /li /ul /ul /ul I'm processing clicks on anchors with my page: public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); ... } Now I need some way I can add atribute into parent li tag of a tag on which I do click. Somethink like (pseudocode): public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); //find corresponding a tag Tag anchorTag = go_from_top_ul_tag_and_find_a_tag_by_category(category) //have corresponding anchor tag, get parrent tag of the anchor tag Tag anchorParentTag = anchorTag.getParent(); //and now I can do my mysterious things with menu... } But I don't know where to start my search and I totaly don't know whot to look for in docu. Please, help :-) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: find html tag
Problem is that uls and lis (let's call whole structure menu) is static html code. On 23.1.2013 20:50, Bas Gooren wrote: Hi! What you want to accomplish (e.g. changing some html attributes) can be done by adding an attributemodifier to each li component. In pseudocode: RepeatingView uls = ... for_every_li: WebMarkupContainer li = ... uls.add(li); now, you can do something like this: li.add(new AttributeAppender(...) { isEnabled() { return true if you want to append a html attribute; } }); Or alternatively: WebMarkupContainer li = new WMC() { onComponentTag(ComponentTag tag) { super(tag); tag.put(my-html-attribute, value); } } Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 20:45, schreef Michael Jaruska: Hi, is there a way I can find specific html tag in markup? I have this html structure: ul class=mymenu li a href=./mypage.html?cid=menumenu/a ul li a href=./mypage.html?cid=menu/submenusubmenu/a ul li a href=./mypage.html?cid=menu/submenu/subsubmenu1subsubmenu1/a /li li a href=./mypage.html?cid=menu/submenu/subsubmenu2subsubmenu2/a /li li a href=./mypage.html?cid=menu/submenu/subsubmenu3subsubmenu3/a /li /ul /ul /ul I'm processing clicks on anchors with my page: public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); ... } Now I need some way I can add atribute into parent li tag of a tag on which I do click. Somethink like (pseudocode): public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); //find corresponding a tag Tag anchorTag = go_from_top_ul_tag_and_find_a_tag_by_category(category) //have corresponding anchor tag, get parrent tag of the anchor tag Tag anchorParentTag = anchorTag.getParent(); //and now I can do my mysterious things with menu... } But I don't know where to start my search and I totaly don't know whot to look for in docu. Please, help :-) - 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: DataPicker replaced
hi, why i don't find DataPiker class in wicket 6.0? was this class replaced? if yes, with what? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DataPicker-replaced-tp4655689p4655690.html Sent from the Users forum 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
DataPicker replaced
hi, why i don't find DataPiker class in wicket 6.0? was this class replaced? if yes, with what? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DataPicker-replaced-tp4655689.html Sent from the Users forum 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: find html tag
And question is not how can I change html attribute but how can I go through html structure and find html tag with specific attribute :-) On 23.1.2013 20:50, Bas Gooren wrote: Hi! What you want to accomplish (e.g. changing some html attributes) can be done by adding an attributemodifier to each li component. In pseudocode: RepeatingView uls = ... for_every_li: WebMarkupContainer li = ... uls.add(li); now, you can do something like this: li.add(new AttributeAppender(...) { isEnabled() { return true if you want to append a html attribute; } }); Or alternatively: WebMarkupContainer li = new WMC() { onComponentTag(ComponentTag tag) { super(tag); tag.put(my-html-attribute, value); } } Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 20:45, schreef Michael Jaruska: Hi, is there a way I can find specific html tag in markup? I have this html structure: ul class=mymenu li a href=./mypage.html?cid=menumenu/a ul li a href=./mypage.html?cid=menu/submenusubmenu/a ul li a href=./mypage.html?cid=menu/submenu/subsubmenu1subsubmenu1/a /li li a href=./mypage.html?cid=menu/submenu/subsubmenu2subsubmenu2/a /li li a href=./mypage.html?cid=menu/submenu/subsubmenu3subsubmenu3/a /li /ul /ul /ul I'm processing clicks on anchors with my page: public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); ... } Now I need some way I can add atribute into parent li tag of a tag on which I do click. Somethink like (pseudocode): public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); //find corresponding a tag Tag anchorTag = go_from_top_ul_tag_and_find_a_tag_by_category(category) //have corresponding anchor tag, get parrent tag of the anchor tag Tag anchorParentTag = anchorTag.getParent(); //and now I can do my mysterious things with menu... } But I don't know where to start my search and I totaly don't know whot to look for in docu. Please, help :-) - 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: find html tag
In that case I wouldn't bother trying this at the serverside. Theoretically you can access the html markup and fiddle with it, but that's generally not how wicket is meant to be used. (Trust me, we've been doing quite some advanced stuff with wicket over the years). If all you want to do is change the html code, you can also do that with some javascript code. E.g. override renderHead() in your page and contribute some javascript code for onLoad. But before doing such things: is there a particular reason why you are using static html instead of a component tree? Are you able and willing to switch to a component tree? Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 20:53, schreef Michael Jaruska: Problem is that uls and lis (let's call whole structure menu) is static html code. On 23.1.2013 20:50, Bas Gooren wrote: Hi! What you want to accomplish (e.g. changing some html attributes) can be done by adding an attributemodifier to each li component. In pseudocode: RepeatingView uls = ... for_every_li: WebMarkupContainer li = ... uls.add(li); now, you can do something like this: li.add(new AttributeAppender(...) { isEnabled() { return true if you want to append a html attribute; } }); Or alternatively: WebMarkupContainer li = new WMC() { onComponentTag(ComponentTag tag) { super(tag); tag.put(my-html-attribute, value); } } Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 20:45, schreef Michael Jaruska: Hi, is there a way I can find specific html tag in markup? I have this html structure: ul class=mymenu li a href=./mypage.html?cid=menumenu/a ul li a href=./mypage.html?cid=menu/submenusubmenu/a ul li a href=./mypage.html?cid=menu/submenu/subsubmenu1subsubmenu1/a /li li a href=./mypage.html?cid=menu/submenu/subsubmenu2subsubmenu2/a /li li a href=./mypage.html?cid=menu/submenu/subsubmenu3subsubmenu3/a /li /ul /ul /ul I'm processing clicks on anchors with my page: public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); ... } Now I need some way I can add atribute into parent li tag of a tag on which I do click. Somethink like (pseudocode): public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); //find corresponding a tag Tag anchorTag = go_from_top_ul_tag_and_find_a_tag_by_category(category) //have corresponding anchor tag, get parrent tag of the anchor tag Tag anchorParentTag = anchorTag.getParent(); //and now I can do my mysterious things with menu... } But I don't know where to start my search and I totaly don't know whot to look for in docu. Please, help :-) - 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: find html tag
Sorry, I read too quickly. What are you trying to accomplish? Let's say you are able to find the appropriate html tag, what do you want to do with it? Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 21:01, schreef Michael Jaruska: And question is not how can I change html attribute but how can I go through html structure and find html tag with specific attribute :-) On 23.1.2013 20:50, Bas Gooren wrote: Hi! What you want to accomplish (e.g. changing some html attributes) can be done by adding an attributemodifier to each li component. In pseudocode: RepeatingView uls = ... for_every_li: WebMarkupContainer li = ... uls.add(li); now, you can do something like this: li.add(new AttributeAppender(...) { isEnabled() { return true if you want to append a html attribute; } }); Or alternatively: WebMarkupContainer li = new WMC() { onComponentTag(ComponentTag tag) { super(tag); tag.put(my-html-attribute, value); } } Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 20:45, schreef Michael Jaruska: Hi, is there a way I can find specific html tag in markup? I have this html structure: ul class=mymenu li a href=./mypage.html?cid=menumenu/a ul li a href=./mypage.html?cid=menu/submenusubmenu/a ul li a href=./mypage.html?cid=menu/submenu/subsubmenu1subsubmenu1/a /li li a href=./mypage.html?cid=menu/submenu/subsubmenu2subsubmenu2/a /li li a href=./mypage.html?cid=menu/submenu/subsubmenu3subsubmenu3/a /li /ul /ul /ul I'm processing clicks on anchors with my page: public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); ... } Now I need some way I can add atribute into parent li tag of a tag on which I do click. Somethink like (pseudocode): public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); //find corresponding a tag Tag anchorTag = go_from_top_ul_tag_and_find_a_tag_by_category(category) //have corresponding anchor tag, get parrent tag of the anchor tag Tag anchorParentTag = anchorTag.getParent(); //and now I can do my mysterious things with menu... } But I don't know where to start my search and I totaly don't know whot to look for in docu. Please, help :-) - 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: find html tag
I need to find the parent li tag of the anchor user clicks - I now from PageParameters which anchor has been clicked. Then I will put into this parent li specific atribute (id=something). This attribute will be then processed by JavaScript on the page. On 23.1.2013 21:04, Bas Gooren wrote: Sorry, I read too quickly. What are you trying to accomplish? Let's say you are able to find the appropriate html tag, what do you want to do with it? Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 21:01, schreef Michael Jaruska: And question is not how can I change html attribute but how can I go through html structure and find html tag with specific attribute :-) On 23.1.2013 20:50, Bas Gooren wrote: Hi! What you want to accomplish (e.g. changing some html attributes) can be done by adding an attributemodifier to each li component. In pseudocode: RepeatingView uls = ... for_every_li: WebMarkupContainer li = ... uls.add(li); now, you can do something like this: li.add(new AttributeAppender(...) { isEnabled() { return true if you want to append a html attribute; } }); Or alternatively: WebMarkupContainer li = new WMC() { onComponentTag(ComponentTag tag) { super(tag); tag.put(my-html-attribute, value); } } Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 20:45, schreef Michael Jaruska: Hi, is there a way I can find specific html tag in markup? I have this html structure: ul class=mymenu li a href=./mypage.html?cid=menumenu/a ul li a href=./mypage.html?cid=menu/submenusubmenu/a ul li a href=./mypage.html?cid=menu/submenu/subsubmenu1subsubmenu1/a /li li a href=./mypage.html?cid=menu/submenu/subsubmenu2subsubmenu2/a /li li a href=./mypage.html?cid=menu/submenu/subsubmenu3subsubmenu3/a /li /ul /ul /ul I'm processing clicks on anchors with my page: public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); ... } Now I need some way I can add atribute into parent li tag of a tag on which I do click. Somethink like (pseudocode): public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); //find corresponding a tag Tag anchorTag = go_from_top_ul_tag_and_find_a_tag_by_category(category) //have corresponding anchor tag, get parrent tag of the anchor tag Tag anchorParentTag = anchorTag.getParent(); //and now I can do my mysterious things with menu... } But I don't know where to start my search and I totaly don't know whot to look for in docu. Please, help :-) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: find html tag
Structure is static and I can't (management decision) generate it dynamically. Everythink I have is static html and category user has been clicked. On 23.1.2013 21:03, Bas Gooren wrote: In that case I wouldn't bother trying this at the serverside. Theoretically you can access the html markup and fiddle with it, but that's generally not how wicket is meant to be used. (Trust me, we've been doing quite some advanced stuff with wicket over the years). If all you want to do is change the html code, you can also do that with some javascript code. E.g. override renderHead() in your page and contribute some javascript code for onLoad. But before doing such things: is there a particular reason why you are using static html instead of a component tree? Are you able and willing to switch to a component tree? Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 20:53, schreef Michael Jaruska: Problem is that uls and lis (let's call whole structure menu) is static html code. On 23.1.2013 20:50, Bas Gooren wrote: Hi! What you want to accomplish (e.g. changing some html attributes) can be done by adding an attributemodifier to each li component. In pseudocode: RepeatingView uls = ... for_every_li: WebMarkupContainer li = ... uls.add(li); now, you can do something like this: li.add(new AttributeAppender(...) { isEnabled() { return true if you want to append a html attribute; } }); Or alternatively: WebMarkupContainer li = new WMC() { onComponentTag(ComponentTag tag) { super(tag); tag.put(my-html-attribute, value); } } Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 20:45, schreef Michael Jaruska: Hi, is there a way I can find specific html tag in markup? I have this html structure: ul class=mymenu li a href=./mypage.html?cid=menumenu/a ul li a href=./mypage.html?cid=menu/submenusubmenu/a ul li a href=./mypage.html?cid=menu/submenu/subsubmenu1subsubmenu1/a /li li a href=./mypage.html?cid=menu/submenu/subsubmenu2subsubmenu2/a /li li a href=./mypage.html?cid=menu/submenu/subsubmenu3subsubmenu3/a /li /ul /ul /ul I'm processing clicks on anchors with my page: public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); ... } Now I need some way I can add atribute into parent li tag of a tag on which I do click. Somethink like (pseudocode): public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); //find corresponding a tag Tag anchorTag = go_from_top_ul_tag_and_find_a_tag_by_category(category) //have corresponding anchor tag, get parrent tag of the anchor tag Tag anchorParentTag = anchorTag.getParent(); //and now I can do my mysterious things with menu... } But I don't know where to start my search and I totaly don't know whot to look for in docu. Please, help :-) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: find html tag
Ok, so you are indeed looking for a way to change a html attribute ;-) Since you wrote (in your folluw-up e-mail) that you cannot generate the html, there are some ways, but they mostly work outside of the normal wicket way. 1) In the component which actually renders your static html override onComponentTagBody and fiddle with the markup stream (e.g. look at replaceComponentTagBody) 2) store the static html somewhere by itself, and create a custom model. The model can then load the html and perform string replacement. You can then add a label component which uses the model and has setEscapeModelStrings(false) set. Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 21:11, schreef Michael Jaruska: I need to find the parent li tag of the anchor user clicks - I now from PageParameters which anchor has been clicked. Then I will put into this parent li specific atribute (id=something). This attribute will be then processed by JavaScript on the page. On 23.1.2013 21:04, Bas Gooren wrote: Sorry, I read too quickly. What are you trying to accomplish? Let's say you are able to find the appropriate html tag, what do you want to do with it? Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 21:01, schreef Michael Jaruska: And question is not how can I change html attribute but how can I go through html structure and find html tag with specific attribute :-) On 23.1.2013 20:50, Bas Gooren wrote: Hi! What you want to accomplish (e.g. changing some html attributes) can be done by adding an attributemodifier to each li component. In pseudocode: RepeatingView uls = ... for_every_li: WebMarkupContainer li = ... uls.add(li); now, you can do something like this: li.add(new AttributeAppender(...) { isEnabled() { return true if you want to append a html attribute; } }); Or alternatively: WebMarkupContainer li = new WMC() { onComponentTag(ComponentTag tag) { super(tag); tag.put(my-html-attribute, value); } } Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 20:45, schreef Michael Jaruska: Hi, is there a way I can find specific html tag in markup? I have this html structure: ul class=mymenu li a href=./mypage.html?cid=menumenu/a ul li a href=./mypage.html?cid=menu/submenusubmenu/a ul li a href=./mypage.html?cid=menu/submenu/subsubmenu1subsubmenu1/a /li li a href=./mypage.html?cid=menu/submenu/subsubmenu2subsubmenu2/a /li li a href=./mypage.html?cid=menu/submenu/subsubmenu3subsubmenu3/a /li /ul /ul /ul I'm processing clicks on anchors with my page: public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); ... } Now I need some way I can add atribute into parent li tag of a tag on which I do click. Somethink like (pseudocode): public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); //find corresponding a tag Tag anchorTag = go_from_top_ul_tag_and_find_a_tag_by_category(category) //have corresponding anchor tag, get parrent tag of the anchor tag Tag anchorParentTag = anchorTag.getParent(); //and now I can do my mysterious things with menu... } But I don't know where to start my search and I totaly don't know whot to look for in docu. Please, help :-) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DataPicker replaced
I presume you mean DatePicker and that you made a typo. What you're looking for was never part of the core project but instead of the Wicket Extensions. Those are the maven coordinates for up to Wicket 1.5.x: dependency groupIdorg.apache.wicket/groupId artifactIdwicket-extensions/artifactId version${wicketVersion}/version /dependency Package and class name: org.apache.wicket.extensions.yui.calendar.DatePicker With Wicket 6.x jQuery took over. I haven't yet upgraded to Wicket 6.x and I suppose your change should be covered in the Migration to Wicket 6 wiki page at: https://cwiki.apache.org/WICKET/migration-to-wicket-60.html Since Wicket 6.x now uses jQuery you get to benefit all of the nice UI components jQuery provides including the missing DatePicker. See it action at: http://jqueryui.com/datepicker/ ~ Thank you, Paul Bors On Wed, Jan 23, 2013 at 12:32 PM, lc991 lorenzoc...@live.it wrote: hi, why i don't find DataPiker class in wicket 6.0? was this class replaced? if yes, with what? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DataPicker-replaced-tp4655689p4655690.html Sent from the Users forum 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: DataPicker replaced
thanks Paul -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DataPicker-replaced-tp4655689p4655711.html Sent from the Users forum 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
AjaxEventBehavior that catch only some keypresses
Hi! I want write an AjaxEventBehavior that calls the server if an function key is pressed. Im also need to know on serverside which key is pressed. I'd tried it with this code: public HomePage(final PageParameters parameters) { super(parameters); add(new AjaxEventBehavior(keydown){ @Override protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { super.updateAjaxAttributes(attributes); IAjaxCallListener listener = new AjaxCallListener(){ @Override public CharSequence getPrecondition(Component component) { //this javascript code evaluates wether an //ajaxcall is necessary. //Here only by keyocdes for F9 and F10 return var keycode = Wicket.Event.keyCode(attrs.event); + if ((keycode == 120) || (keycode == 121)) + return true; + else + return false;; } }; attributes.getAjaxCallListeners().add(listener); //Append the pressed keycode to the ajaxrequest attributes.getDynamicExtraParameters() .add(var eventKeycode = Wicket.Event.keyCode(attrs.event); + return {keycode: eventKeycode};); } @Override protected void onEvent(AjaxRequestTarget target) { //Extract the keycode parameter from RequestCycle final Request request = RequestCycle.get().getRequest(); final String jsKeycode = request.getRequestParameters() .getParameterValue(keycode).toString(); target.appendJavaScript(alert('from wicket ajax. you pressed +jsKeycode+')); } }); My Problem is, that this blocking all Inputevents on all Inputfields on the page. I find out, that the result false in the Preconditionscript cause in a stopping of Eventhandling. What can I do, that only the keys 120 and 121 result in an ajaxcallback and leave all other keyevents untouched? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to convert joda DateTime to TimeField ?
new TimeField(myWicketId, new ModelDate(DateTime.now().toDate())) ~ Thank you, Paul Bors On Wed, Jan 23, 2013 at 1:49 PM, grazia grazia.russolass...@gmail.comwrote: I am trying to figure out what it the cleanest way to convert org.joda.time.DateTime to org.apache.wicket.extensions.yui.calendar.TimeField. I hope somebody can help. Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-convert-joda-DateTime-to-TimeField-tp4655694.html Sent from the Users forum 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 remove the file icons from the editable tree table ?
You can: 1) Extend the java class and override its HTML mark-up by preserving the wicket:id component tree in your own markup Then in your own java you can call setVisible(false) or replace it with an empty panel 2) Analyze the HTML for the component: span class=icon style=background-image: url(../../wicket/resource/org.apache.wicket.extensions.markup.html.tree.DefaultAbstractTree/res/folder-closed-ver-EA16980AB437FA6BA4ABA3D480E83E9E.gif);/ Notice is using CSS w/ a icon class so override that. ~ Thank you, Paul Bors On Wed, Jan 23, 2013 at 3:25 PM, grazia grazia.russolass...@gmail.comwrote: http://apache-wicket.1842946.n4.nabble.com/file/n4655709/editabletree.png How could we remove the icons in the attached image from the editable tree table ? Or at least replace them with something customized ? It is also on the wicket example page : http://www.wicket-library.com/wicket-examples/ajax/tree/table/editable?0 Thank you in advance -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-remove-the-file-icons-from-the-editable-tree-table-tp4655709.html Sent from the Users forum 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: AjaxEventBehavior that catch only some keypresses
attributes.allowDefault(true) Sven On 01/23/2013 09:41 PM, Malte wrote: Hi! I want write an AjaxEventBehavior that calls the server if an function key is pressed. Im also need to know on serverside which key is pressed. I'd tried it with this code: public HomePage(final PageParameters parameters) { super(parameters); add(new AjaxEventBehavior(keydown){ @Override protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { super.updateAjaxAttributes(attributes); IAjaxCallListener listener = new AjaxCallListener(){ @Override public CharSequence getPrecondition(Component component) { //this javascript code evaluates wether an //ajaxcall is necessary. //Here only by keyocdes for F9 and F10 return var keycode = Wicket.Event.keyCode(attrs.event); + if ((keycode == 120) || (keycode == 121)) + return true; + else + return false;; } }; attributes.getAjaxCallListeners().add(listener); //Append the pressed keycode to the ajaxrequest attributes.getDynamicExtraParameters() .add(var eventKeycode = Wicket.Event.keyCode(attrs.event); + return {keycode: eventKeycode};); } @Override protected void onEvent(AjaxRequestTarget target) { //Extract the keycode parameter from RequestCycle final Request request = RequestCycle.get().getRequest(); final String jsKeycode = request.getRequestParameters() .getParameterValue(keycode).toString(); target.appendJavaScript(alert('from wicket ajax. you pressed +jsKeycode+')); } }); My Problem is, that this blocking all Inputevents on all Inputfields on the page. I find out, that the result false in the Preconditionscript cause in a stopping of Eventhandling. What can I do, that only the keys 120 and 121 result in an ajaxcallback and leave all other keyevents untouched? - 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: find html tag
Look at my original post. User clicks on a href=./mypage.html?cid=menu/submenu/subsubmenu2subsubmenu2/a, then I have in String category (java code) value menu/submenu/subsubmenu2. I need just to make 2 more steps: 1. in html code find anchor tag with href menu/submenu/subsubmenu2; 2. find li tag which is parent of the anchor from point 1; When I have point 2 done, then I know how to put somethink into li tag... On 23.1.2013 21:21, Bas Gooren wrote: Ok, so you are indeed looking for a way to change a html attribute ;-) Since you wrote (in your folluw-up e-mail) that you cannot generate the html, there are some ways, but they mostly work outside of the normal wicket way. 1) In the component which actually renders your static html override onComponentTagBody and fiddle with the markup stream (e.g. look at replaceComponentTagBody) 2) store the static html somewhere by itself, and create a custom model. The model can then load the html and perform string replacement. You can then add a label component which uses the model and has setEscapeModelStrings(false) set. Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 21:11, schreef Michael Jaruska: I need to find the parent li tag of the anchor user clicks - I now from PageParameters which anchor has been clicked. Then I will put into this parent li specific atribute (id=something). This attribute will be then processed by JavaScript on the page. On 23.1.2013 21:04, Bas Gooren wrote: Sorry, I read too quickly. What are you trying to accomplish? Let's say you are able to find the appropriate html tag, what do you want to do with it? Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 21:01, schreef Michael Jaruska: And question is not how can I change html attribute but how can I go through html structure and find html tag with specific attribute :-) On 23.1.2013 20:50, Bas Gooren wrote: Hi! What you want to accomplish (e.g. changing some html attributes) can be done by adding an attributemodifier to each li component. In pseudocode: RepeatingView uls = ... for_every_li: WebMarkupContainer li = ... uls.add(li); now, you can do something like this: li.add(new AttributeAppender(...) { isEnabled() { return true if you want to append a html attribute; } }); Or alternatively: WebMarkupContainer li = new WMC() { onComponentTag(ComponentTag tag) { super(tag); tag.put(my-html-attribute, value); } } Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 20:45, schreef Michael Jaruska: Hi, is there a way I can find specific html tag in markup? I have this html structure: ul class=mymenu li a href=./mypage.html?cid=menumenu/a ul li a href=./mypage.html?cid=menu/submenusubmenu/a ul li a href=./mypage.html?cid=menu/submenu/subsubmenu1subsubmenu1/a /li li a href=./mypage.html?cid=menu/submenu/subsubmenu2subsubmenu2/a /li li a href=./mypage.html?cid=menu/submenu/subsubmenu3subsubmenu3/a /li /ul /ul /ul I'm processing clicks on anchors with my page: public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); ... } Now I need some way I can add atribute into parent li tag of a tag on which I do click. Somethink like (pseudocode): public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); //find corresponding a tag Tag anchorTag = go_from_top_ul_tag_and_find_a_tag_by_category(category) //have corresponding anchor tag, get parrent tag of the anchor tag Tag anchorParentTag = anchorTag.getParent(); //and now I can do my mysterious things with menu... } But I don't know where to start my search and I totaly don't know whot to look for in docu. Please, help :-) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: find html tag
You can use IMarkupFilter to manipulate the raw markup before being loaded and used by the components. See the implementations in Wicket to see what can be done with such filter. On Wed, Jan 23, 2013 at 11:11 PM, Michael Jaruska michael.jaru...@gmail.com wrote: Look at my original post. User clicks on a href=./mypage.html?cid=menu/* *submenu/subsubmenu2**subsubmenu2/a, then I have in String category (java code) value menu/submenu/subsubmenu2. I need just to make 2 more steps: 1. in html code find anchor tag with href menu/submenu/subsubmenu2; 2. find li tag which is parent of the anchor from point 1; When I have point 2 done, then I know how to put somethink into li tag... On 23.1.2013 21:21, Bas Gooren wrote: Ok, so you are indeed looking for a way to change a html attribute ;-) Since you wrote (in your folluw-up e-mail) that you cannot generate the html, there are some ways, but they mostly work outside of the normal wicket way. 1) In the component which actually renders your static html override onComponentTagBody and fiddle with the markup stream (e.g. look at replaceComponentTagBody) 2) store the static html somewhere by itself, and create a custom model. The model can then load the html and perform string replacement. You can then add a label component which uses the model and has setEscapeModelStrings(false) set. Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 21:11, schreef Michael Jaruska: I need to find the parent li tag of the anchor user clicks - I now from PageParameters which anchor has been clicked. Then I will put into this parent li specific atribute (id=something). This attribute will be then processed by JavaScript on the page. On 23.1.2013 21:04, Bas Gooren wrote: Sorry, I read too quickly. What are you trying to accomplish? Let's say you are able to find the appropriate html tag, what do you want to do with it? Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 21:01, schreef Michael Jaruska: And question is not how can I change html attribute but how can I go through html structure and find html tag with specific attribute :-) On 23.1.2013 20:50, Bas Gooren wrote: Hi! What you want to accomplish (e.g. changing some html attributes) can be done by adding an attributemodifier to each li component. In pseudocode: RepeatingView uls = ... for_every_li: WebMarkupContainer li = ... uls.add(li); now, you can do something like this: li.add(new AttributeAppender(...) { isEnabled() { return true if you want to append a html attribute; } }); Or alternatively: WebMarkupContainer li = new WMC() { onComponentTag(ComponentTag tag) { super(tag); tag.put(my-html-attribute, value); } } Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 20:45, schreef Michael Jaruska: Hi, is there a way I can find specific html tag in markup? I have this html structure: ul class=mymenu li a href=./mypage.html?cid=menu**menu/a ul li a href=./mypage.html?cid=menu/**submenusubmenu/a ul li a href=./mypage.html?cid=menu/**submenu/subsubmenu1** subsubmenu1/a /li li a href=./mypage.html?cid=menu/**submenu/subsubmenu2** subsubmenu2/a /li li a href=./mypage.html?cid=menu/**submenu/subsubmenu3** subsubmenu3/a /li /ul /ul /ul I'm processing clicks on anchors with my page: public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).**toString(); ... } Now I need some way I can add atribute into parent li tag of a tag on which I do click. Somethink like (pseudocode): public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).**toString(); //find corresponding a tag Tag anchorTag = go_from_top_ul_tag_and_find_a_** tag_by_category(category) //have corresponding anchor tag, get parrent tag of the anchor tag Tag anchorParentTag = anchorTag.getParent(); //and now I can do my mysterious things with menu... } But I don't know where to start my search and I totaly don't know whot to look for in docu. Please, help :-) --**--** - To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org --**--** - To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org --**--** - To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail:
Re: DataPicker replaced
On Wed, Jan 23, 2013 at 10:29 PM, Paul Bors p...@bors.ws wrote: I presume you mean DatePicker and that you made a typo. What you're looking for was never part of the core project but instead of the Wicket Extensions. Those are the maven coordinates for up to Wicket 1.5.x: dependency groupIdorg.apache.wicket/groupId artifactIdwicket-extensions/artifactId version${wicketVersion}/version /dependency Package and class name: org.apache.wicket.extensions.yui.calendar.DatePicker With Wicket 6.x jQuery took over. I haven't yet upgraded to Wicket 6.x and I suppose your change should be covered in the Migration to Wicket 6 wiki page at: https://cwiki.apache.org/WICKET/migration-to-wicket-60.html Since Wicket 6.x now uses jQuery you get to benefit all of the nice UI components jQuery provides including the missing DatePicker. This is not correct. Wicket uses jQuery only for its main Ajax business - wicket-event.js and wicket-ajax.js Wicket does not use jQuery UI anyway. DatePicker is still part of wicket-datetime module. Based on YUI 2.x. If you prefer jQuery UI then you can use wicket-jquery-ui or wiquery. wicket-bootstrap also provides such component. See it action at: http://jqueryui.com/datepicker/ ~ Thank you, Paul Bors On Wed, Jan 23, 2013 at 12:32 PM, lc991 lorenzoc...@live.it wrote: hi, why i don't find DataPiker class in wicket 6.0? was this class replaced? if yes, with what? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DataPicker-replaced-tp4655689p4655690.html Sent from the Users forum 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: Wicket 6: Using AutoCompleteBehavior with other behaviors
Hi all, I have logged the required fixes for WICKET-4990 in jira. Regards, James james yong wrote Hi Sven, WICKET-4990 is for problem 1. So I raised a jira issue for problem 2, together with its solution. WICKET-4998. Regards, James Sven Meier wrote Hi James, please attach that info to WICKET-4990. Thanks Sven On 01/22/2013 07:07 AM, james yong wrote: Hi, To rectify problem 2, I changed the following in wicket-autocomplete.js, Wicket.Event.add(obj,keypress,function(jqEvent){ if(Wicket.Event.keyCode(jqEvent)===KEY_ENTER){ if(selected-1||hidingAutocomplete===1){ hidingAutocomplete=0; jqEvent.stopImmediatePropagation(); --changed from jqEvent.stopPropagation(); Regards, James james yong wrote Hi, Now migrating a working project from wicket version 1.4 to 6.4. I have a text field that uses the following behaviors: A. AjaxFormComponentUpdatingBehavior(onchange); B. AutoCompleteBehavior; and C. AjaxFormComponentUpdatingBehavior(onkeypress). Say I enter an letter 'U' into the text field, and an auto-suggest list pops up. There are 2 problems which is not seen in wicket 1.4: 1) When I select an item (e.g. USD) from the auto-suggest list using a mouse, the onchange event from behavior A is fired twice. The 1st onchange event is for 'U' and the 2nd onchange event is for 'USD'. Can I prevent the 1st onchange event from happening? 2) When I select an item (e.g. USD) from the auto-suggest list using the Enter keypress, an onkeypress event is fired by behavior C. Can I prevent this onkeypress event from happening? Regards, James -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Using-AutoCompleteBehavior-with-other-behaviors-tp4655495p4655619.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscribe@.apache For additional commands, e-mail: users-help@.apache - To unsubscribe, e-mail: users-unsubscribe@.apache For additional commands, e-mail: users-help@.apache -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Using-AutoCompleteBehavior-with-other-behaviors-tp4655495p4655719.html Sent from the Users forum 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: find html tag
Hi Michael, What you need may not be related to wicket directly. I suggest you can attach a javascript 'click' handler that will get the parent and modify the attributes. If you are using jQuery, you can use the parent function i.e. http://api.jquery.com/parent/ http://api.jquery.com/parent/ Regards, James Michael Jaruska wrote Look at my original post. User clicks on subsubmenu2 ./mypage.html?cid=menu/submenu/subsubmenu2 , then I have in String category (java code) value menu/submenu/subsubmenu2. I need just to make 2 more steps: 1. in html code find anchor tag with href menu/submenu/subsubmenu2; 2. find li tag which is parent of the anchor from point 1; When I have point 2 done, then I know how to put somethink into li tag... On 23.1.2013 21:21, Bas Gooren wrote: Ok, so you are indeed looking for a way to change a html attribute ;-) Since you wrote (in your folluw-up e-mail) that you cannot generate the html, there are some ways, but they mostly work outside of the normal wicket way. 1) In the component which actually renders your static html override onComponentTagBody and fiddle with the markup stream (e.g. look at replaceComponentTagBody) 2) store the static html somewhere by itself, and create a custom model. The model can then load the html and perform string replacement. You can then add a label component which uses the model and has setEscapeModelStrings(false) set. Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 21:11, schreef Michael Jaruska: I need to find the parent li tag of the anchor user clicks - I now from PageParameters which anchor has been clicked. Then I will put into this parent li specific atribute (id=something). This attribute will be then processed by JavaScript on the page. On 23.1.2013 21:04, Bas Gooren wrote: Sorry, I read too quickly. What are you trying to accomplish? Let's say you are able to find the appropriate html tag, what do you want to do with it? Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 21:01, schreef Michael Jaruska: And question is not how can I change html attribute but how can I go through html structure and find html tag with specific attribute :-) On 23.1.2013 20:50, Bas Gooren wrote: Hi! What you want to accomplish (e.g. changing some html attributes) can be done by adding an attributemodifier to each li component. In pseudocode: RepeatingView uls = ... for_every_li: WebMarkupContainer li = ... uls.add(li); now, you can do something like this: li.add(new AttributeAppender(...) { isEnabled() { return true if you want to append a html attribute; } }); Or alternatively: WebMarkupContainer li = new WMC() { onComponentTag(ComponentTag tag) { super(tag); tag.put(my-html-attribute, value); } } Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 20:45, schreef Michael Jaruska: Hi, is there a way I can find specific html tag in markup? I have this html structure: ul class=mymenu li menu ./mypage.html?cid=menu ul li submenu ./mypage.html?cid=menu/submenu ul li subsubmenu1 ./mypage.html?cid=menu/submenu/subsubmenu1 /li li subsubmenu2 ./mypage.html?cid=menu/submenu/subsubmenu2 /li li subsubmenu3 ./mypage.html?cid=menu/submenu/subsubmenu3 /li /ul /ul /ul I'm processing clicks on anchors with my page: public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); ... } Now I need some way I can add atribute into parent li tag of tag on which I do click. Somethink like (pseudocode): public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).toString(); //find corresponding tag Tag anchorTag = go_from_top_ul_tag_and_find_a_tag_by_category(category) //have corresponding anchor tag, get parrent tag of the anchor tag Tag anchorParentTag = anchorTag.getParent(); //and now I can do my mysterious things with menu... } But I don't know where to start my search and I totaly don't know whot to look for in docu. Please, help :-) - To unsubscribe, e-mail: users-unsubscribe@.apache For additional commands, e-mail: users-help@.apache - To unsubscribe, e-mail: users-unsubscribe@.apache For additional commands, e-mail: users-help@.apache - To unsubscribe, e-mail: users-unsubscribe@.apache For additional commands, e-mail: users-help@.apache - To
Re: find html tag
Thanks Martin, this is what I'm looking for, you save my life and my job... :-D On 23.1.2013 22:47, Martin Grigorov wrote: You can use IMarkupFilter to manipulate the raw markup before being loaded and used by the components. See the implementations in Wicket to see what can be done with such filter. On Wed, Jan 23, 2013 at 11:11 PM, Michael Jaruska michael.jaru...@gmail.com wrote: Look at my original post. User clicks on a href=./mypage.html?cid=menu/* *submenu/subsubmenu2**subsubmenu2/a, then I have in String category (java code) value menu/submenu/subsubmenu2. I need just to make 2 more steps: 1. in html code find anchor tag with href menu/submenu/subsubmenu2; 2. find li tag which is parent of the anchor from point 1; When I have point 2 done, then I know how to put somethink into li tag... On 23.1.2013 21:21, Bas Gooren wrote: Ok, so you are indeed looking for a way to change a html attribute ;-) Since you wrote (in your folluw-up e-mail) that you cannot generate the html, there are some ways, but they mostly work outside of the normal wicket way. 1) In the component which actually renders your static html override onComponentTagBody and fiddle with the markup stream (e.g. look at replaceComponentTagBody) 2) store the static html somewhere by itself, and create a custom model. The model can then load the html and perform string replacement. You can then add a label component which uses the model and has setEscapeModelStrings(false) set. Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 21:11, schreef Michael Jaruska: I need to find the parent li tag of the anchor user clicks - I now from PageParameters which anchor has been clicked. Then I will put into this parent li specific atribute (id=something). This attribute will be then processed by JavaScript on the page. On 23.1.2013 21:04, Bas Gooren wrote: Sorry, I read too quickly. What are you trying to accomplish? Let's say you are able to find the appropriate html tag, what do you want to do with it? Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 21:01, schreef Michael Jaruska: And question is not how can I change html attribute but how can I go through html structure and find html tag with specific attribute :-) On 23.1.2013 20:50, Bas Gooren wrote: Hi! What you want to accomplish (e.g. changing some html attributes) can be done by adding an attributemodifier to each li component. In pseudocode: RepeatingView uls = ... for_every_li: WebMarkupContainer li = ... uls.add(li); now, you can do something like this: li.add(new AttributeAppender(...) { isEnabled() { return true if you want to append a html attribute; } }); Or alternatively: WebMarkupContainer li = new WMC() { onComponentTag(ComponentTag tag) { super(tag); tag.put(my-html-attribute, value); } } Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 20:45, schreef Michael Jaruska: Hi, is there a way I can find specific html tag in markup? I have this html structure: ul class=mymenu li a href=./mypage.html?cid=menu**menu/a ul li a href=./mypage.html?cid=menu/**submenusubmenu/a ul li a href=./mypage.html?cid=menu/**submenu/subsubmenu1** subsubmenu1/a /li li a href=./mypage.html?cid=menu/**submenu/subsubmenu2** subsubmenu2/a /li li a href=./mypage.html?cid=menu/**submenu/subsubmenu3** subsubmenu3/a /li /ul /ul /ul I'm processing clicks on anchors with my page: public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).**toString(); ... } Now I need some way I can add atribute into parent li tag of a tag on which I do click. Somethink like (pseudocode): public PageTest(PageParameters parameters){ //cid = category id String category = parameters.get(cid).**toString(); //find corresponding a tag Tag anchorTag = go_from_top_ul_tag_and_find_a_** tag_by_category(category) //have corresponding anchor tag, get parrent tag of the anchor tag Tag anchorParentTag = anchorTag.getParent(); //and now I can do my mysterious things with menu... } But I don't know where to start my search and I totaly don't know whot to look for in docu. Please, help :-) --**--** - To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org --**--** - To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org --**--** - To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org