Re: The Apache Software Foundation Announces Apache Wicket™ 6.0.0
Thank you all for this new version! Il 05/09/2012 18:53, Martijn Dashorst ha scritto: With great pleasure we announce the availability of Apache Wicket 6.0.0 -- Martijn Dashorst, Vice President, Apache Wicket Apache Wicket v6.0.0 is the 6th major release of the popular open source Java web framework. Numerous enhancements make Apache Wicket v6.0.0 a solid choice for web development: - Out-of-the box JQuery integration - Complete control over AJAX requests - Improved event registration in browsers - Support for large datasets in components - Dependency management for client side javascript libraries - Experimental support for websockets Additional features include a customizable client-side API, improved feedback messages, correct packaging for OSGi compatibility and improved initialization of plugins. Highlights include: Java 6 required -This release moves the minimum required Java version to Java 6. This means that Wicket applications running on earlier Java versions meaning to upgrade, also need to upgrade their Java runtime. Revamped Wicket AJAX now leverages JQuery - Wicket's custom AJAX JavaScript library has been re-implemented using JQuery. This makes it easier to integrate JQuery plugins into Wicket applications. With the new AJAX implementation it is possible to provide your own version of JQuery should the need arise, or even to replace the whole Wicket client side AJAX implementation. AJAX Attributes - With the new and improved AJAX implementation, you can alter any aspect of an AJAX request through AjaxRequestAttributes. For example you can specify that the request should be executed using POST instead of GET, or that the AJAX request should be multi-part, etc. See the migration guide or the JavaDoc of AjaxRequestAttributes for all possible options. Browser event registration replaces inline events - Wicket now uses JavaScript event registration instead of inline attributes for AJAX components. This enables multiple event listeners to be attached to a markup tag, cleans up the rendered markup considerably and reduces the amount of generated markup. IDataProvider now uses long instead of int - The IDataProviderT interface and implementations now use long instead of int for index and size parameters to better line up with the Java Persistence API and other persistency frameworks. Big data is now possible with Wicket! ${label} replaces ${input} in feedback messages - Previous Wicket versions used the input that was provided by users in error messages when validations failed. This led to error messages like 1234a is not a valid number. In Wicket 6 the feedback messages use the label of the invalid form component instead. You can set the label by calling setLabel() on the form component. If no label is provided, Wicket defaults to displaying the component identifier. This changes the error message to Phonenumber is not a valid number. Resources can declare dependencies - It is now much easier to create resource contributions with dependencies, for example a JQuery plugin can declare a dependency on JQuery and other resources such as embedded style sheets. Users of such resources don’t have to provide these dependencies themselves, and the dependencies are linked in the appropriate order. Packaged resources will use minimized version automatically - When a minimized JavaScript resource is available (filename.min.js – add the .min part to the filename before the extension), Wicket will automatically use the minimized version when running in deployment mode, while using the non-minimized version for development mode. OSGi compatible packaging - Wicket's packaging has been made compatible with OSGi bundles by moving some classes to different packages. The full list can be found in our migration guide. This makes it much easier to deploy Wicket applications in an OSGi environment. Experimental websocket implementations - This release also includes two experimental websocket implementations: one using Atmosphere as a bridge for browsers and containers that don't support websockets natively and one for containers and browsers that have native websocket support. The complete set of changes is available in the migration guide at http://s.apache.org/wicket-6.0-migration Availability and Oversight As with all Apache products, Apache Wicket v6.0.0 is released under the Apache License v2.0, and is overseen by a self-selected team of active contributors to the project. A Project Management Committee (PMC) guides the Project's day-to-day operations, including community development and product releases. Apache Wicket source code, documentation, and related resources are available at http://wicket.apache.org/ Apache, Wicket, Apache Wicket, and ApacheCon are trademarks of The Apache Software Foundation. All other brands and trademarks are the property of their respective owners. - To unsubscribe, e-mail:
Re: Inserting String/Date problem .
Hi, this is not a wicket question, but a java question. However: why do you use String for a Date information? Statement has setDate method and wicket has DateField and DateTextField. Bye Luca Il 05/04/2012 07:27, SudeepShakya ha scritto: I have two textboxes which take dates using datepicker(I have set Date.class in the Textbox also) and a dropdown choice which takes 'telecom' and I have getters and setters for all of them. I have set all of them as String. And the query and code for doing the operation for selecting the data is below : String query = SELECT * FROM tbl_vote INNER JOIN tbl_contestant WHERE ( ( (tbl_vote.tokenID = tbl_contestant.tokenID) AND tbl_vote.telecom = ?) AND (date_time= ? AND date_time= ?)); PreparedStatement statement = this.db.prepareStatement(query); statement.setString(1, aVote.getTelecom()); statement.setString(2,aVote.getDate1()); statement.setString(3, aVote.getDate2()); The datepicker sets the date in format 4/5/12 (dd/mm/yy) but I know that mySql use the format -mm-dd. So when i enter the dates and the other field, the data is not retrieved. So how to set date to the database ? I have set Date field as 'datetime' in database. Is there some wrong logic in my code/query ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Inserting-String-Date-problem-tp4534005p4534005.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: NumberValidator.MinimumValidator
Hi, try: Class MinimumValidatorZ extends java.lang.ComparableZ java.io.Serializable Bye Luca Il 02/04/2012 12:12, SudeepShakya ha scritto: I am reading Enjoying Web Programming with wicket(1st edition). And I found out that there is no such thing in wicket 1.5.x. So how to implement these type of function in wicket 1.5.x ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/NumberValidator-MinimumValidator-tp4525647p4525647.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DatePicker to pick a year
Hi, it's better if you set the id of the input in the java code. Something like: yourinput.setOutpuMarkUpId(true); yourinput.setMarkUpId(mydatepicker); //i' don't remember exactly the name of the function, but it's something similar bye Luca Il 30/11/2010 16:40, Anna Simbirtsev ha scritto: Hi, I am trying to use JQuery calendar instead, because I like that it has month and year dropdowns. I added js, css and images files. Added this to the head: $(document).ready(function() { $(#mydatepicker).datepicker(); $( #mydatepicker ).datepicker({ changeMonth: true, changeYear: true }); }); This is in the body: input wicket:id=myid name=extensions:0:extension:myid type=text id=mydatepicker value=/ But it does not work, does anybody has any ideas? Thanks On Mon, Nov 29, 2010 at 1:07 PM, Anna Simbirtsev asimbirt...@gmail.com wrote: That works, thanks. I just wonder how users will be able to figure it out. On Mon, Nov 29, 2010 at 11:56 AM, Marco Mancini marcoman...@gmail.com wrote: in this page the problem is dateformat... but he can switch year https://issues.apache.org/jira/browse/WICKET-2767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12846200#action_12846200 try to click on month name for change year! 2010/11/29 Anna Simbirtsev asimbirt...@gmail.com It does not work, only can switch between month, not year. On Mon, Nov 29, 2010 at 11:33 AM, Marco Mancini marcoman...@gmail.com wrote: try this code: DatePicker mydp= new DatePicker(){ private static final long serialVersionUID = 1L; @Override protected boolean enableMonthYearSelection() { return true; } }; 2010/11/29 Anna Simbirtsev asimbirt...@gmail.com Hi, Is it possible to get datapicker to switch between year, currently there are arrows to only switch between month? Thanks, Anna - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Anna Simbirtsev (416) 729-7331 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Anna Simbirtsev (416) 729-7331 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Authorization with Wicket
why don't: public class ArticleManager extends WebPage { public ArticleManager(String id){ AjaxLink editButton = new AjaxLink(editButton) { @Override public void onClick(AjaxRequestTarget target) { if(!AuthorizationManager.authorize(AuthorizationManager.WRITE,article)){ setResponsePage(new UserAccessViolationPage()); } else{ setResponsePage(new Editor(article,panelIndex)); } } }; Regards Luca Provenzani 2010/1/29 Riccardo Trombini riccardo.tromb...@csnc.ch Hi I wrote an AuthorizationManager which checks if a user is authorized to access a given resource. An an example, I have an EditPage to edit articles. Only users with the write privilege should be able to access this page. I call therefor the AuthorizationManager.authorize(); Method to check the authorization. It looks like this : public class Editor extends BasePage{ public Editor(final Article article) { if(!AuthorizationManager.authorize(AuthorizationManager.WRITE, article)){ setResponsePage(new UserAccessViolationPage()); } else{ } } This Function returns true or false. I want now that if it returns false that the users gets redirected to an errorpage. How can I do that ? with the code you see above I am not able to do that, cause it generates an internal error. Wicket does still want to render all the markups in the Editor.html. An other way I tried out is by throwing an UserAccessViolationException (extends Exception) and implemented a custom errorpage for this. This works as long as I don't have this code snipped to call the EditorPage: public class ArticleManager extends WebPage { public ArticleManager(String id){ AjaxLink editButton = new AjaxLink(editButton) { @Override public void onClick(AjaxRequestTarget target) { setResponsePage(new Editor(article, panelIndex)); } }; Cause I am not able to advance the AjaxLink(editButton) with throws UserAccessViolation. I have to insert the try/catch block and then redirect. But I think is is really dirty. Has someonelse a solution for this ? Thank you very much ! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Nullable resource link
i don't understand the problem can't you check the resource before link is rendered? You can create a new resource object empty in the case of null bytesand setVisible(false) or extend link to do this automatically on empty resource... Luca 2009/10/14 Iain Reddick iain.redd...@beatsystems.com Hi, I need to display a resource link conditionally, based on whether a resource exists, or is null. The resource itself is bytes in a database and should not be anchored to a component. How should I handle this, with regard to the resource being nullable? Thanks. iainr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Nullable resource link
why not something more directly like: *public class ProvaLink extends ResourceLink { ResourceReference resourceReference; @Override public boolean isVisible() { if(resourceReference==null)return false; else return true; } } *hope to help... Luca 2009/10/14 Iain Reddick iain.redd...@beatsystems.com I think my best solution is to use a lightweight container like this: public class NullableContainer extends WebMarkupContainer { public NullableContainer(String id) { super(id); } public NullableContainer(String id, IModel model) { super(id, model); } @Override protected void onBeforeRender() { super.onBeforeRender(); onPopulate(); } /** * Convenience method for lazy-adding of children */ protected void onPopulate() { } @Override public boolean isVisible() { return getModelObject() != null; } } I then can override onPopulate() and add my children that depend on the nullable for construction. It's basically the logic equivalent of if model is not null, add children. Iain Reddick wrote: I'm fishing for best practice in this type of situation - do I use the solution you outlined, or do I add a simple invisible dummy link instead of the the resource link, or is there a better solution that I'm missing? Luca Provenzani wrote: i don't understand the problem can't you check the resource before link is rendered? You can create a new resource object empty in the case of null bytesand setVisible(false) or extend link to do this automatically on empty resource... Luca 2009/10/14 Iain Reddick iain.redd...@beatsystems.com Hi, I need to display a resource link conditionally, based on whether a resource exists, or is null. The resource itself is bytes in a database and should not be anchored to a component. How should I handle this, with regard to the resource being nullable? Thanks. iainr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.4.2 Released!
Thank You very much, I'll update our project early. Luca 2009/10/10 Igor Vaynberg igor.vaynb...@gmail.com The Apache Wicket project is proud to announce the second maintenance release of Apache Wicket 1.4. Download Apache Wicket 1.4 --- You can download the release here: http://www.apache.org/dyn/closer.cgi/wicket/1.4.2 Or use this in your Maven pom's to upgrade to the new version: dependency groupIdorg.apache.wicket/groupId artifactIdwicket/artifactId version1.4.2/version /dependency Release Notes - Wicket - Version 1.4.2 ** Bug * [WICKET-2393] - Passwords should not be trimmed * [WICKET-2430] - Malformed \u encoding in MultipleUploadField_sl.properties * [WICKET-2433] - Ajax support for multipart forms broken in a nested form * [WICKET-2434] - RequestCycle urlFor ignores existing parameters when appending provided params * [WICKET-2436] - invalid DataTable markup breaks table layout * [WICKET-2438] - AjaxEventBehavior not working on feedback message components * [WICKET-2453] - Form.findForm(Component c) bug. When form is part of Border and form component like TextField is inside another Border , component cannot resolve its form. * [WICKET-2456] - DateTextField cannot work with default converter (or javadoc wrong) * [WICKET-2457] - Flash/ExternalInterface does not work in IE if movie is fetched via Wicket/Ajax * [WICKET-2458] - JavascriptUtils.escapeQuotes() misses escaping double quotes * [WICKET-2461] - AjaxPagingNavigationIncrementLink does not work without AjaxPagingNavigator component * [WICKET-2463] - Ajax miltipart form submitting ignores setDefaultFormProcessing(false) * [WICKET-2466] - javadoc the CryptedUrlWebRequestCodingStrategy needs to be update/corrected to reflect the usage of session-id for encryption and hence URLs which were bookmarkable before will NOT remain bookmarkable. * [WICKET-2475] - NPE after application hot redeployment * [WICKET-2477] - AjaxEditableChoiceLabel does not detach choices model * [WICKET-2478] - TabbedPanel rendering bug * [WICKET-2485] - IComponentResolvers are not supported inside wicket:enclosure * [WICKET-2488] - QuickFix proposal WicketTesterHelper.assertEquals(final Collection? expects, final Collection? actuals) should compare list sizes ** Improvement * [WICKET-626] - profile Wicket for 1.4.0 * [WICKET-2435] - TabbedPanel extract factory method for tabs-container * [WICKET-2439] - Improve MixedParamUrlCodingStrategy, introduce Hybrid * [WICKET-2444] - Internal Spring beans should be ignored * [WICKET-2445] - FormInput.java needs the validators updated. * [WICKET-2449] - Fix javadoc biggest mistakes - mainly @Deprecated tags * [WICKET-2454] - IE8: be more verbose if ajax refresh fails * [WICKET-2469] - Allow using a different FileItemFactory by extracting a method in MultipartServletWebRequest class * [WICKET-2492] - Application_pt_BR.properties path ** New Feature * [WICKET-2395] - add MixedParamHybridUrlCodingStrategy * [WICKET-2483] - Access to WizardModel.conditions ** Wish * [WICKET-2120] - widen visibiliy of GuiceProxyTargetLocator and findBindingAnnotation * [WICKET-2462] - Would it possible add chinese resource label for WizardButton eg. CancelButton, NextButton and PreviousButton etc. * [WICKET-2489] - need to know if a component has been added to the AjaxRequestTarget We thank you for your patience and support. The Wicket Team - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket bench 1.4
i don't see difference between wicket1.3 and wicket1.4 with wicket bench. I like this plug-in, but it's still incoplete, and it has some little problems with java editor... Luca 2009/10/7 Douglas Ferguson doug...@douglasferguson.us Does wicket bench work with wicket 1.4? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket bench 1.4
in this case i don't know, because i don't use selenium... ;-) Luca 2009/10/7 Douglas Ferguson doug...@douglasferguson.us I'm interested in using the selenium features. D/ On Oct 7, 2009, at 2:01 AM, Luca Provenzani wrote: i don't see difference between wicket1.3 and wicket1.4 with wicket bench. I like this plug-in, but it's still incoplete, and it has some little problems with java editor... Luca 2009/10/7 Douglas Ferguson doug...@douglasferguson.us Does wicket bench work with wicket 1.4? - 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
Rendered html to string
Hi all, does someone know how to render a wicket component into a String? Thanks Luca
Re: Rendered html to string
oops, yes, you are right! :-) 2009/9/30 Peter Arnulf Lustig u...@yahoo.de getMarkupStream().toString(); maybe? - Ursprüngliche Mail Von: Luca Provenzani eufor...@gmail.com An: users@wicket.apache.org Gesendet: Mittwoch, den 30. September 2009, 12:32:19 Uhr Betreff: Rendered html to string Hi all, does someone know how to render a wicket component into a String? Thanks Luca - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Rendered html to string
it seems to be interesting for us... can you send a code example? 2009/9/30 Martin Sachs sachs.mar...@gmail.com if you want just one component in the hierarchie to be rendered to a String you have to make a Behaviour and use the StringResponse-class to replace the hole Response in beforeRender for this component. in onRendered you can add the string again to the hole Response. We do this for caching HTML Fragments via EHCache. Martin Luca Provenzani schrieb: oops, yes, you are right! :-) 2009/9/30 Peter Arnulf Lustig u...@yahoo.de getMarkupStream().toString(); maybe? - Ursprüngliche Mail Von: Luca Provenzani eufor...@gmail.com An: users@wicket.apache.org Gesendet: Mittwoch, den 30. September 2009, 12:32:19 Uhr Betreff: Rendered html to string Hi all, does someone know how to render a wicket component into a String? Thanks Luca - 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
Activate datapicker onblur
Hi all, how can i activate (open datapicker window) when user click(or focus) on the correlate textbox? Thanks Luca
Re: Wicket in Italy
Hi, we are a little company of software and to make webSoftware in the last two year we used only wicket! But we live in Florence ;-) Do you think to organize some events? Regards, Luca 3FConsulting S.r.l. 2009/9/23 Giovanni pino_o...@yahoo.com Hi, are there any Wicketers living in Turin, Italy? Best regards, giovanni Resources are limited, Imagination is unlimited.
Re: Wicket 1.4-rc6 Swarm
this is a very good new! thank you a lot! Luca 2009/7/9 Olger Warnier ol...@xs4all.nl Hi Igor / List, Thanks for the trust. The wicket-security project trunk found at https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-security is now compatible with wicket 1.4 RC6. If you have issues or comments, please let me know. I am not aware of your release rules, if you have a pointer, I could check if it is possibe to get it towards a release along with the wicket 1.4 release. Kind Regards, Olger On 9 jul 2009, at 19:38, Igor Vaynberg wrote: done -igor On Thu, Jul 9, 2009 at 10:02 AM, Olger Warnierol...@xs4all.nl wrote: Hi Igor, On 9 jul 2009, at 17:13, Igor Vaynberg wrote: all you need is an account on sf.net AND for someone to add you to the project. I digged up my sourceforge account, its : terranvs If someone is willing to add my account to the project, I'll commit the whole so people can test it for their situation. Kind Regards, Olger -igor On Thu, Jul 9, 2009 at 8:06 AM, Martin Grigorovmcgreg...@e-card.bg wrote: All you need is an account for SourceForge. Then you could commit in wicketstuff's SVN El jue, 09-07-2009 a las 13:38 +0200, Olger Warnier escribió: Hi Luca, Maybe it is possible to commit the whole into an existing / new branch of the wicket-security project. Is there someone who could arrange that ? Kind Regards, Olger On 9 jul 2009, at 11:00, Luca Provenzani wrote: Hi all, i'm interested too. Probably my company have to realize a new project in the near future and we think to use wicket 1.4, but we need something like swarm. I started to see in svn but if it is possible to have your updated code it would be fantastic. thank you Luca 2009/7/9 Olger Warnier ol...@xs4all.nl Hi Joshua / List, For our project, I have ported wicket-security to 1.4 based on the code of Maurice found at: http://wicket-stuff.svn.sourceforge.net/viewvc/wicket-stuff/branches/wicket-security-1.4-earlyaccess/ And https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-security/ Most of the tests work fine, a few of them are disabled (I is not quite clear to me what the expected behaviour is yet) and I removed the ACEGI example as it was too outdated. (I have a spring-security sample available to add) The current state is more of less a first 'seems to work' version based on RC5 that needs more attention while being used and extended. Please let me know if you are intrested, I could provide the code and further suport to get it released along with the wicket 1.4 release. Kind Regards, Olger On 8 jul 2009, at 18:42, Joshua Martin wrote: When will Wicket 1.4 be compatible with Swarm/Wasp? -- _ Joshua S. 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.4-rc6 Swarm
Hi all, i'm interested too. Probably my company have to realize a new project in the near future and we think to use wicket 1.4, but we need something like swarm. I started to see in svn but if it is possible to have your updated code it would be fantastic. thank you Luca 2009/7/9 Olger Warnier ol...@xs4all.nl Hi Joshua / List, For our project, I have ported wicket-security to 1.4 based on the code of Maurice found at: http://wicket-stuff.svn.sourceforge.net/viewvc/wicket-stuff/branches/wicket-security-1.4-earlyaccess/ And https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-security/ Most of the tests work fine, a few of them are disabled (I is not quite clear to me what the expected behaviour is yet) and I removed the ACEGI example as it was too outdated. (I have a spring-security sample available to add) The current state is more of less a first 'seems to work' version based on RC5 that needs more attention while being used and extended. Please let me know if you are intrested, I could provide the code and further suport to get it released along with the wicket 1.4 release. Kind Regards, Olger On 8 jul 2009, at 18:42, Joshua Martin wrote: When will Wicket 1.4 be compatible with Swarm/Wasp? -- _ Joshua S. Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: getting started with swarm/wasp - rendering links to secure pages
i don't think it is possible to do... because HomePage isn't a secure page and then it's not under swarm control when it's rendered. i'm afraid that you have to do by your hand... but i'm not an expert! ;-) Luca 2009/6/9 Christopher L Merrill ch...@webperformance.com I have a question about rendering of links to secure pages when the user has not been authenticated. Based on this line from the tutorial: In addition we granted links to our homepage the right to be clicked (enable). I expected the link to either be non-visible or non-clickable - since I did not grant the enable permission for this page until login. The link is enabled (though the user is redirected to the login page when clicked). I've made my way through the getting-started guide ( http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm ) and have a simple example working in my prototype. I have 3 pages: - HomePage (non-secure) - LoginPage (non-secure...obviously) - Page2 (secure) My authorization file looks like this: grant principal org.apache.wicket.security.hive.authorization.SimplePrincipal basic { permission org.apache.wicket.security.hive.authorization.permissions.ComponentPermission com.webperformance.portal.web.Page2, inherit, render; permission org.apache.wicket.security.hive.authorization.permissions.ComponentPermission com.webperformance.portal.web.Page2, enable; }; When the user logs in, they get the basic principal via a UsernamePasswordContext. I have a link from the HomePage to Page2 (secure page). When the HomePage renders and the user had not logged in, the link is enabled. Clicking the link does not take the user to the page - it takes them to the login page. I was expecting the link to be disabled - so you don't even get the clickable cursor for it. Am I simply mistaken in my understanding of what right to be clicked means? Or have I missed some crucial bit somewhere to allow it to function as I expected? If user is not authorized for an action, we will either want links to be disabled (i.e. non- clickable) or be not rendered at all...depending on the context. Is this something that should be done via wasp/swarm or should I be doing this manually during page construction? TIA! Chris -- - Chris Merrill | Web Performance, Inc. ch...@webperformance.com| http://webperformance.com 919-433-1762| 919-845-7601 Website Load Testing and Stress Testing Software Services - - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ResourceLink, IE and https
Hi all This is my situation: i've a ResourceLink based on a JasperReport Resource(DynamicWebResource ) and all is ok until i use http. But if the web server uses https IE can't download the file. i searched in the web but i 've found only an e-mail with similar problem ( http://www.nabble.com/Download-Link-Problem-td14693760.html#a14693760), but no answer! Someone can help? Regards Luca
Re: ResourceLink, IE and https
in this way it works, but how can i refresh the report when parameter is changed? Until now i change parameter into the onclick of the ResourceLink, but now the resource is cached...and then the result report is ever the same.. thanks Luca 2009/3/5 Jonas barney...@gmail.com Does it work if you set your Resource setCacheable(true)? On Thu, Mar 5, 2009 at 3:21 PM, Luca Provenzani eufor...@gmail.com wrote: Hi all This is my situation: i've a ResourceLink based on a JasperReport Resource(DynamicWebResource ) and all is ok until i use http. But if the web server uses https IE can't download the file. i searched in the web but i 've found only an e-mail with similar problem ( http://www.nabble.com/Download-Link-Problem-td14693760.html#a14693760), but no answer! Someone can help? Regards Luca - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ResourceLink, IE and https
sorry i wrote a wrong thing... the result is NOT ever the same, but is the report with the previous parameters. I try to explain better: i've a form that determines the report's prameters. On ResourceLink, i added a onmousedown AjaxFormSubmitBehavior to submit the parameter and calculate other. Then into the onclick of ResourceLink i update th resource parameter. the source: *rXlsLnk = new ResourceLink(lnkReport, xlsResource){ private static final long serialVersionUID = 1L; @Override public void onClick() { HashMapString, String par = new HashMapString, String(); par.put(myWhere, myWhere); xlsResource.setReportParameters(par); super.onClick(); } }; rXlsLnk.add(new AjaxFormSubmitBehavior(onmousedown) { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target) { myWhere = WHERE iscr.SISSIONE_COD_SCUOLA='+MySession.getSessesion().getOperatore().getSissioneScuole().getCodMec()+' + AND iscr.FS_ISCR_AS='+iscrFilter.getAnnoScolastico()+' ; if(iscrFilter.getPlessoId()!=null !iscrFilter.getPlessoId().equals(-1)) ... etc etc } else { } } } @Override protected void onError(AjaxRequestTarget target) { myWhere = WHERE 1=0; target.addComponent(feedbackPanel); } });* The first time i download the report i obtain an empty report, because empty parameters. The second time i obtained the report with th first submit parameter end then and then... can you help? thanks a lot Luca 2009/3/5 Jonas barney...@gmail.com If it is the browser that caches the report, you can work around this by adding something random to the url generated by ResourceLink#getUrl, similar to what's done in NonCachingImage. urlFor(IResourceListener.INTERFACE) + wicket:antiCache= + System.currentTimeMillis() Unfortunatly, ResourceLink#getUrl is final, so you'll probably have to create your own Link subclass similar to ResourceLink On Thu, Mar 5, 2009 at 4:33 PM, Luca Provenzani eufor...@gmail.com wrote: in this way it works, but how can i refresh the report when parameter is changed? Until now i change parameter into the onclick of the ResourceLink, but now the resource is cached...and then the result report is ever the same.. thanks Luca 2009/3/5 Jonas barney...@gmail.com Does it work if you set your Resource setCacheable(true)? On Thu, Mar 5, 2009 at 3:21 PM, Luca Provenzani eufor...@gmail.com wrote: Hi all This is my situation: i've a ResourceLink based on a JasperReport Resource(DynamicWebResource ) and all is ok until i use http. But if the web server uses https IE can't download the file. i searched in the web but i 've found only an e-mail with similar problem ( http://www.nabble.com/Download-Link-Problem-td14693760.html#a14693760 ), but no answer! Someone can help? Regards Luca - 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: ResourceLink, IE and https
OK it's all ok i just move the code from the onclick to onmousedown AjaxFormSubmitBehavior. and now all work fine! a big thank Jonas! Luca 2009/3/5 Luca Provenzani eufor...@gmail.com sorry i wrote a wrong thing... the result is NOT ever the same, but is the report with the previous parameters. I try to explain better: i've a form that determines the report's prameters. On ResourceLink, i added a onmousedown AjaxFormSubmitBehavior to submit the parameter and calculate other. Then into the onclick of ResourceLink i update th resource parameter. the source: *rXlsLnk = new ResourceLink(lnkReport, xlsResource){ private static final long serialVersionUID = 1L; @Override public void onClick() { HashMapString, String par = new HashMapString, String(); par.put(myWhere, myWhere); xlsResource.setReportParameters(par); super.onClick(); } }; rXlsLnk.add(new AjaxFormSubmitBehavior(onmousedown) { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target) { myWhere = WHERE iscr.SISSIONE_COD_SCUOLA='+MySession.getSessesion().getOperatore().getSissioneScuole().getCodMec()+' + AND iscr.FS_ISCR_AS='+iscrFilter.getAnnoScolastico()+' ; if(iscrFilter.getPlessoId()!=null !iscrFilter.getPlessoId().equals(-1)) ... etc etc } else { } } } @Override protected void onError(AjaxRequestTarget target) { myWhere = WHERE 1=0; target.addComponent(feedbackPanel); } });* The first time i download the report i obtain an empty report, because empty parameters. The second time i obtained the report with th first submit parameter end then and then... can you help? thanks a lot Luca 2009/3/5 Jonas barney...@gmail.com If it is the browser that caches the report, you can work around this by adding something random to the url generated by ResourceLink#getUrl, similar to what's done in NonCachingImage. urlFor(IResourceListener.INTERFACE) + wicket:antiCache= + System.currentTimeMillis() Unfortunatly, ResourceLink#getUrl is final, so you'll probably have to create your own Link subclass similar to ResourceLink On Thu, Mar 5, 2009 at 4:33 PM, Luca Provenzani eufor...@gmail.com wrote: in this way it works, but how can i refresh the report when parameter is changed? Until now i change parameter into the onclick of the ResourceLink, but now the resource is cached...and then the result report is ever the same.. thanks Luca 2009/3/5 Jonas barney...@gmail.com Does it work if you set your Resource setCacheable(true)? On Thu, Mar 5, 2009 at 3:21 PM, Luca Provenzani eufor...@gmail.com wrote: Hi all This is my situation: i've a ResourceLink based on a JasperReport Resource(DynamicWebResource ) and all is ok until i use http. But if the web server uses https IE can't download the file. i searched in the web but i 've found only an e-mail with similar problem ( http://www.nabble.com/Download-Link-Problem-td14693760.html#a14693760), but no answer! Someone can help? Regards Luca - 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: How can I clear the value of an AutoCompleteTextField
i think you can put the field of the model/bean of the form to empty and then call target.addComponet(tagsContainer); what kind of effect do you want? If you need to call javascript you can use target.appendJavaScript()... Luca 2009/2/12 Azzeddine Daddah waarhei...@gmail.com Hello everyone, Could someone please tell me how I can clear the selected value of an AutoCompleteTextField. I've an AutoCompleteTextField and a link which should clear the value of the text field after clicking it. I would also do some effects after clearing this value. Below my code: final AutoCompleteTextFieldString auto = new AutoCompleteTextFieldString(auto, new ModelString()) ... form.add(auto); form.add(new IndicatingAjaxLinkString(addLink, new ModelString(Add)) { @Override public void onClick(AjaxRequestTarget target) { String inputValue = auto.getValue(); auto.clearInput(); // How to clear the auto's value and add some effects to the tagsContainer? target.addComponent(tagsContainer); } }); Kind Regards, Hbiloo
Change Year in DatePicker
Hi All, i use org.apache.wicket.extensions.yui.calendar.DateField as DatePicker. with wicket 1.3.0 But when i open datePicker on my webpage i can't change year, i can only change the months. Does someone know how to configure DateField to do this? is it possible? Thank Luca
Re: Change Year in DatePicker
Thank you for answer, but i can't do it in wicket 1.3.0. i think that the unique way is try to update the application to wicket 1.3.5 Luca 2009/1/28 Daniel Peters daniel.pet...@idealo.de Luca Provenzani wrote: i use org.apache.wicket.extensions.yui.calendar.DateField as DatePicker. with wicket 1.3.0 But when i open datePicker on my webpage i can't change year, i can only change the months. Does someone know how to configure DateField to do this? is it possible? extend DatePicker and override one method: protected boolean enableMonthYearSelection() { return true; } (not sure about version 1.3.0, but it worked in 1.3.5 and 1.4) -Daniel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Retrieve RemoteUser from HttpServletRequest
nothing to do! i read again only two null strings... it's really strange! in the jsp is simple: i need only this: *request.getRemoteUser(),request.getRemoteAddr() * and seem to be simple even in wicket... only one right of code... but... why doesn't httpservletrequest give me the right values? Luca 2009/1/22 James Carman jcar...@carmanconsulting.com Right, just use the servlet API for this one (and Igor's pointing out how to get to the API below) On Thu, Jan 22, 2009 at 11:42 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: servlethttprequest r=((webrequest)getrequestcycle().getrequest()).gethttpservletrequest(); -igor On Thu, Jan 22, 2009 at 8:40 AM, Luca Provenzani eufor...@gmail.com wrote: my application works on an apache-tomcat server. And on this server my client has his authentication system that is similar to the Apache Basic Authentication. Than, i need to read remoteUser that contains the id of the user. thank you for your attention Luca 2009/1/22 Bert taser...@gmail.com On Wed, Jan 21, 2009 at 14:37, Luca Provenzani eufor...@gmail.com wrote: Thank You for answer Bert I'll try to retrieve remoteAddress in this way(tomorrow morning, ehm for Italy ;-), because now i'm working for an other project). that would be the same timezone as me (germany) but... i need to retrieve the authenticated remoteUser, not the UserAgent, how can i do this? what do you mean with remoteUser? the Authentification the user has on his PC? - 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: Retrieve RemoteUser from HttpServletRequest
no! i haven't a right web.xml... that is the problem! sorry! i'm a newbie in wicket.. Thank you all !! Luca 2009/1/23 Serkan Camurcuoglu serkan.camurcuo...@telenity.com is your wicket url also protected by security and login constraints in your web.xml? Luca Provenzani wrote: nothing to do! i read again only two null strings... it's really strange! in the jsp is simple: i need only this: *request.getRemoteUser(),request.getRemoteAddr() * and seem to be simple even in wicket... only one right of code... but... why doesn't httpservletrequest give me the right values? Luca 2009/1/22 James Carman jcar...@carmanconsulting.com Right, just use the servlet API for this one (and Igor's pointing out how to get to the API below) On Thu, Jan 22, 2009 at 11:42 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: servlethttprequest r=((webrequest)getrequestcycle().getrequest()).gethttpservletrequest(); -igor On Thu, Jan 22, 2009 at 8:40 AM, Luca Provenzani eufor...@gmail.com wrote: my application works on an apache-tomcat server. And on this server my client has his authentication system that is similar to the Apache Basic Authentication. Than, i need to read remoteUser that contains the id of the user. thank you for your attention Luca 2009/1/22 Bert taser...@gmail.com On Wed, Jan 21, 2009 at 14:37, Luca Provenzani eufor...@gmail.com wrote: Thank You for answer Bert I'll try to retrieve remoteAddress in this way(tomorrow morning, ehm for Italy ;-), because now i'm working for an other project). that would be the same timezone as me (germany) but... i need to retrieve the authenticated remoteUser, not the UserAgent, how can i do this? what do you mean with remoteUser? the Authentification the user has on his PC? - 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: Retrieve RemoteUser from HttpServletRequest
my application works on an apache-tomcat server. And on this server my client has his authentication system that is similar to the Apache Basic Authentication. Than, i need to read remoteUser that contains the id of the user. thank you for your attention Luca 2009/1/22 Bert taser...@gmail.com On Wed, Jan 21, 2009 at 14:37, Luca Provenzani eufor...@gmail.com wrote: Thank You for answer Bert I'll try to retrieve remoteAddress in this way(tomorrow morning, ehm for Italy ;-), because now i'm working for an other project). that would be the same timezone as me (germany) but... i need to retrieve the authenticated remoteUser, not the UserAgent, how can i do this? what do you mean with remoteUser? the Authentification the user has on his PC? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Retrieve RemoteUser from HttpServletRequest
Hi All! I'm in a webPage and i need to retrieve the RemoteUser and RemoteAddress from the httpServletRequest. I use this code: * **HttpServletRequest request = getWebRequestCycle().getWebRequest().getHttpServletRequest();* * String remUser = request.getRemoteUser(); **String remAddr = request.getRemoteAddr(); * But the two strings are null. I'm sure that this values are not null because if i try to retrieve them with a simple jsp the result is what i expect to be. what is wrong? What can i do? Thank Luca
Re: Retrieve RemoteUser from HttpServletRequest
Thank You for answer Bert I'll try to retrieve remoteAddress in this way(tomorrow morning, ehm for Italy ;-), because now i'm working for an other project). but... i need to retrieve the authenticated remoteUser, not the UserAgent, how can i do this? Luca 2009/1/21 Bert taser...@gmail.com Hi, I use RequestCycle.get().getClientInfo().getProperties().getRemoteAddress(); or RequestCycle.get().getClientInfo().getProperties().getUserAgent(); for this. hth Bert On Wed, Jan 21, 2009 at 11:35, Luca Provenzani eufor...@gmail.com wrote: Hi All! I'm in a webPage and i need to retrieve the RemoteUser and RemoteAddress from the httpServletRequest. I use this code: * **HttpServletRequest request = getWebRequestCycle().getWebRequest().getHttpServletRequest();* * String remUser = request.getRemoteUser(); **String remAddr = request.getRemoteAddr(); * But the two strings are null. I'm sure that this values are not null because if i try to retrieve them with a simple jsp the result is what i expect to be. what is wrong? What can i do? Thank Luca - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Intercept AutoCompleteTextField choice...
Thank a lot! It's what i wanted!! 2009/1/12 noon rami.muurim...@gmail.com I followed the example introduced in Wicket wiki and it solved exaclty my problem. http://cwiki.apache.org/WICKET/autocomplete-using-a-wicket-model.html Luca Provenzani wrote: Hi to all! I've an AutoCompleteTextField and it's all ok. But how can i intercept the final choice of the user? I explain better. For example, the choices are Medium,Monster and Moon. The user types m and the AutoCompleteTextField print the three choices. The user clicks on Monster. How can i know what he choosed? Thank you Luca PS Excuse me for the terrible english! -- View this message in context: http://www.nabble.com/Intercept-AutoCompleteTextField-choice...-tp21416801p21423950.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
Intercept AutoCompleteTextField choice...
Hi to all! I've an AutoCompleteTextField and it's all ok. But how can i intercept the final choice of the user? I explain better. For example, the choices are Medium,Monster and Moon. The user types m and the AutoCompleteTextField print the three choices. The user clicks on Monster. How can i know what he choosed? Thank you Luca PS Excuse me for the terrible english!