Re: URL params parsing issue if param value contain '='
Can i use IPageParametersEncoder here? I can use the Base64 encoding decoding there and implement the below strategy. when the first request(*page.html?param1=paramvalue==*) comes I can get the request params from native HTTPServletRequest and put that value in page parameters without encoding. Wicket will do the redirection to the url *page.html/param1/encoded_paramvalue* and next time things will work as expected as the param value is encoded now. By doing this, the fix will be specific to this feature and there won't be any impact on any other module. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/URL-params-parsing-issue-if-param-value-contain-tp4651238p4651242.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: Static web page localization
Thanks! 2012/8/15 Martin Grigorov : > Hi, > > You may use Wicket IResource that should serve the SWFs dynamically. > See http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ > for an inspiration. > > On Wed, Aug 15, 2012 at 9:02 AM, Arni Kekoni > wrote: >> Hello >> >> I have a bunch of static web pages, with no wicket objects associated with >> them. >> These pages have .swf files like so: >> >> >> >> Is it possible to use wicket to localize those .swf files? Serve >> xyz_en.swf for english and so on? >> I know you could simply create a page_en.html, page_nl.html and so >> on, but I am looking for possible automation. >> >> Thanks >> Arni >> >> - >> 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 > > - > 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: Static web page localization
Hi, You may use Wicket IResource that should serve the SWFs dynamically. See http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ for an inspiration. On Wed, Aug 15, 2012 at 9:02 AM, Arni Kekoni wrote: > Hello > > I have a bunch of static web pages, with no wicket objects associated with > them. > These pages have .swf files like so: > > > > Is it possible to use wicket to localize those .swf files? Serve > xyz_en.swf for english and so on? > I know you could simply create a page_en.html, page_nl.html and so > on, but I am looking for possible automation. > > Thanks > Arni > > - > 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: URL params parsing issue if param value contain '='
Hi, You can wrap the HttpServletRequest (see HttpServletRequestWrapper) and fix the query string by encoding the additional '=' char. On Wed, Aug 15, 2012 at 9:08 AM, sumitkathuria wrote: > Hello, > > We are in process of integrating our application with the third party > application and during the auth flow, The wicket is not returning the > correct parameter value when the third party application passes the > parameter value containing = operator. > > After doing the initial investigation, i came to know that there is function > in URL class which splits the query parameter key value string based upon > "=" operator which is causing problem. > > /private static QueryParameter parseQueryParameter(final String qp, final > Charset charset) > { > if (qp.indexOf('=') == -1) > { > // name => empty value > return new QueryParameter(decodeParameter(qp, > charset), ""); > } > > *String parts[] = Strings.split(qp, '=');* > return new QueryParameter(decodeParameter(parts[0], charset), > decodeParameter(parts[1], > charset)); > }/ > > It would be really helpful if some one can suggest me the resolution for > this issue. It is not possible for us to ask third party application for > encoding the URL parameters, we have to do something at our end only. > > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/URL-params-parsing-issue-if-param-value-contain-tp4651238.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
URL params parsing issue if param value contain '='
Hello, We are in process of integrating our application with the third party application and during the auth flow, The wicket is not returning the correct parameter value when the third party application passes the parameter value containing = operator. After doing the initial investigation, i came to know that there is function in URL class which splits the query parameter key value string based upon "=" operator which is causing problem. /private static QueryParameter parseQueryParameter(final String qp, final Charset charset) { if (qp.indexOf('=') == -1) { // name => empty value return new QueryParameter(decodeParameter(qp, charset), ""); } *String parts[] = Strings.split(qp, '=');* return new QueryParameter(decodeParameter(parts[0], charset), decodeParameter(parts[1], charset)); }/ It would be really helpful if some one can suggest me the resolution for this issue. It is not possible for us to ask third party application for encoding the URL parameters, we have to do something at our end only. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/URL-params-parsing-issue-if-param-value-contain-tp4651238.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
Static web page localization
Hello I have a bunch of static web pages, with no wicket objects associated with them. These pages have .swf files like so: Is it possible to use wicket to localize those .swf files? Serve xyz_en.swf for english and so on? I know you could simply create a page_en.html, page_nl.html and so on, but I am looking for possible automation. Thanks Arni - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Ajaxtabbedpanel example not working on ie9
If you're talking about: http://www.wicket-library.com/wicket-examples/ajax/tabbed-panel?2 That works fine with IE: 9.0.8112.16421, perhaps you blocked JavaScript from executing? ~ Thank you, Paul Bors -Original Message- From: Delange [mailto:delan...@telfort.nl] Sent: Tuesday, August 14, 2012 5:44 PM To: users@wicket.apache.org Subject: Ajaxtabbedpanel example not working on ie9 Running this example from the apache website it's working ok, But when i run the sample example on my tomcat server and open it in an IE9 browser: i see no reaction if a choose another tab When I try this on Chrome or Safari it works fine. How to resolve this with IE9? Here a debug list: 1.5.5 Inspector Session: 894 bytes Page: 11,1K builtinSource code [go back] first tab second tab third tab This is tab-panel 1 scroll lock | clear | close Wicket Ajax Debug Window (drag me here) INFO: focus set on id3 INFO: INFO: Initiating Ajax GET request on tabbed-panel;jsessionid=1o1o1xat4y10e17ppe024et92n?0-1.IBehaviorListener.0-t abs-tabs~container-tabs-1-link&random=0.01693648764738187 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (2538 characters) INFO: ERROR: Cannot create DOM document: [object Error] ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Kan de waarde van de eigenschap documentElement niet ophalen: het object is null of niet gedefinieerd INFO: Invoking post-call handler(s)... INFO: Invoking failure handler(s)... INFO: focus removed from id3WICKET AJAX DEBUG -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajaxtabbedpanel-example-not-worki ng-on-ie9-tp4651235.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
Ajaxtabbedpanel example not working on ie9
Running this example from the apache website it's working ok, But when i run the sample example on my tomcat server and open it in an IE9 browser: i see no reaction if a choose another tab When I try this on Chrome or Safari it works fine. How to resolve this with IE9? Here a debug list: 1.5.5 Inspector Session: 894 bytes Page: 11,1K builtinSource code [go back] first tab second tab third tab This is tab-panel 1 scroll lock | clear | close Wicket Ajax Debug Window (drag me here) INFO: focus set on id3 INFO: INFO: Initiating Ajax GET request on tabbed-panel;jsessionid=1o1o1xat4y10e17ppe024et92n?0-1.IBehaviorListener.0-tabs-tabs~container-tabs-1-link&random=0.01693648764738187 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (2538 characters) INFO: ERROR: Cannot create DOM document: [object Error] ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Kan de waarde van de eigenschap documentElement niet ophalen: het object is null of niet gedefinieerd INFO: Invoking post-call handler(s)... INFO: Invoking failure handler(s)... INFO: focus removed from id3WICKET AJAX DEBUG -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajaxtabbedpanel-example-not-working-on-ie9-tp4651235.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: WicketRuntimeException: "Submit Button ... is not enabled"
As an idea, I tend to keep the panel edit/view state as a boolean and then toggle the label on the button and control the behavior of the button press via an if-else statement in the onSubmit() of the button. This helps because I only have a single Edit/Save button and I toggle from labels to form fields on the fly controlling those components via AjaxFallback*** implemented in a single refrechPanel() method that calls setVisable(editMode) for all the components that are to toggle or hide. Also you can do this to the DataTable rows when necessary similar to how the Editable tree table works: http://www.wicket-library.com/wicket-examples/ajax/tree/table/editable?3 I get away with all this because I have my own generic labeled form component that can toggle from a label to a form component and have a html tag as well as an Help icon and feedback panel associated with it. ~ Thank you, Paul Bors -Original Message- From: eugenebalt [mailto:eugeneb...@yahoo.com] Sent: Tuesday, August 14, 2012 12:16 PM To: users@wicket.apache.org Subject: Re: WicketRuntimeException: "Submit Button ... is not enabled" It is true that we have multiple buttons on our form that we are disabling/hiding selectively. Our scenario: a panel that contains the button "Edit", and then when it's clicked, the panel opens and "Edit" is replaced by two other visible buttons - "Submit" and "Cancel". "Edit" is gone. We need this dynamic behavior to enable rich, "self-changing" forms. Example: add(new Button ("editButton"){ @Override public boolean isVisible() { return showeditbutton; } @Override public void onSubmit() { showeditbutton = false;// hide this one showsavebutton = true; // show the others showcancelbutton = true; } } These are global variables/flags on the form. So given this "self-changing form" requirement, what's the fastest way to get rid of this intermittent "Not Enabled / Visible" error? Is there a way to turn off this validation in Wicket? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-Submit-But ton-is-not-enabled-tp4651180p4651233.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: WicketRuntimeException: "Submit Button ... is not enabled"
It is true that we have multiple buttons on our form that we are disabling/hiding selectively. Our scenario: a panel that contains the button "Edit", and then when it's clicked, the panel opens and "Edit" is replaced by two other visible buttons - "Submit" and "Cancel". "Edit" is gone. We need this dynamic behavior to enable rich, "self-changing" forms. Example: add(new Button ("editButton"){ @Override public boolean isVisible() { return showeditbutton; } @Override public void onSubmit() { showeditbutton = false;// hide this one showsavebutton = true; // show the others showcancelbutton = true; } } These are global variables/flags on the form. So given this "self-changing form" requirement, what's the fastest way to get rid of this intermittent "Not Enabled / Visible" error? Is there a way to turn off this validation in Wicket? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-Submit-Button-is-not-enabled-tp4651180p4651233.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: WicketRuntimeException: "Submit Button ... is not enabled"
No, they are interchangeable. On 14/08/2012 11:42 AM, eugenebalt wrote: Thanks a lot. In our case, we have an AjaxButton that maps to a "input type=submit". Would using the input type "Button" get rid of this problem? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-Submit-Button-is-not-enabled-tp4651180p4651231.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: WicketRuntimeException: "Submit Button ... is not enabled"
Thanks a lot. In our case, we have an AjaxButton that maps to a "input type=submit". Would using the input type "Button" get rid of this problem? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-Submit-Button-is-not-enabled-tp4651180p4651231.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 control IMG/CSS URL-Rewriting in mounted pages?
Wicket rewrite the SRC attribute of the image as relative to your webapp context unless you declare that image as a wicket component, give it a wicket:id and then use a ContextImage. Thus you would turn a to a . If you do so, then you can still preserve the "wrong" src relative path of "../images/image.jpg" so that your web developers can see the images while editing the static HTML resources and when you run the web-app Wicket will take care of fixing that URL for you no matter at what point you mount the page. If you have too many such images and refactoring might take you too long, then consider write your own Custom Wicket Tag Resolver for an attribute of the img HTML tag and override what the framework does for you (do call super) by changing the src attribute in a similar way ContextImage would do it for you. For example see this article: http://sanityresort.blogspot.com/2011/08/creating-custom-wicket-tag-resolver.html Or see how other such resolvers or AttributeModifer are used by Wicket itself, you can start with the AutoComponentResolver. ~ Good look to you! Paul Bors -Original Message- From: Joachim Schrod [mailto:jsch...@acm.org] Sent: Tuesday, August 14, 2012 2:53 AM To: users@wicket.apache.org Subject: Re: How to control IMG/CSS URL-Rewriting in mounted pages? Yes, that's what I observed and described below. And that behavior is not appropriate for my use case. So, how can I stop Wicket to "make the url relative to the web root no matter what mount path I use for the page"? I want to *change* that: my designer delivers HTML where the images are *not* relative to the web root, but to one directory below. In our HTML files are URLs like "../images/image.img" and I don't want to change these URLs. Alternatively, how can I tell Wicket that the web root has a different prefix just for rewriting these image URLs? Thanks, Joachim Martin Grigorov wrote: > Hi, > > If your images/css are in the web root then use something like > "images/image.img" in your .html. > Wicket will make the url relative to the web root no matter what mount > path you use for the page. > > On Mon, Aug 13, 2012 at 5:41 PM, Joachim Schrod wrote: >> Hi, >> >> I'm new to Wicket and write my first application in it. I use "Wicket >> in Action" and online resources as documentation. (I stumbled already >> about the 1st few roadblocks owing to changes from Wicket 1.4 to 1.5. >> ;-)) So, if there's an easy pointer to answer my question, don't >> hesitate to just send it. >> >> My problem: I have a page that's mounted as URL "cat/entry". In the >> page's HTML there are links to images and CSS files that start with >> "..", e.g., "../images/bg_blabla.img". These are no Wicket >> components, just plain HTML. >> >> When Wicket renders the page, it rewrites the image URLs and prepends >> "../", e.g., the image URL now is output as >> "../../images/bg_blabla.img". I suppose it tries to adept to the >> extra path level that I introduced during mount and compensates for it. >> >> How can I stop Wicket from adding this "../" prefix? I searched via >> Google and read through Javadocs, but to no avail. >> >> For background: The URL in the HTML file is right... My HTML >> designers deliver their design files as "cat/entry.html", my mounts >> just follow their lead. I would like to change their files as little >> as possible, it makes files swapping back to/with them much easier. >> >> I hope somebody here may help me, thanks in advance. >> >> Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod, Roedermark, Germany Email: jsch...@acm.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: Is there a way to search component by its wicket ID ?
If you use wicket-component-expressions from com.googlecode.londonwicket you can get to the list of all the components on the page that have that "username" id via a regexp of "**:username", but as James mentioned earlier, the ID is not unique and your wicket component tree might have such multiple nodes (hence why wicket-component-expressions gives you a list of them). I normally know that my panel has only one such component by the ID since I developed it, so if I attach it to my page inside a panel with an ID like "myPanel" then I use "**:myPanel:**:username" and I also filter by the component type such as TextField.class to narrow down the search. That's not production code, is unit test and I'm assuming that's the context of your question. By using such regexp, I found myself refactoring the unit test code less when shuffling panels on a page. ~ Thank you, Paul Bors -Original Message- From: James Eliyezar [mailto:ja...@mcruncher.com] Sent: Tuesday, August 14, 2012 4:12 AM To: users@wicket.apache.org Subject: Re: Is there a way to search component by its wicket ID ? Because the id is unique only within the markup container of a component. It need not be unique in a page. This is by design. For more details refer: https://cwiki.apache.org/WICKET/component-hierarchy.html On Tue, Aug 14, 2012 at 3:42 PM, arkadyz111 wrote: > But why we have to write "userForm" ? What is an idea behind of this ? > > Why get("username") is not enough ? > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Is-there-a-way-to-search-componen t-by-its-wicket-ID-tp4651175p4651217.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 > > -- Thanks & regards James Selvakumar mcruncher.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket freelancer job in Vienna, Austria
Hi Marco, I'm also based in Vienna and this sounds interesting. Can you provide me with some more details about the project and what exactly you are looking for. Best, Gerwin Brunner P.S.: Wir können die Unterhaltung auch auf Deutsch durchführen :) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-freelancer-job-in-Vienna-Austria-tp4651049p4651222.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: Checkbox in DataTable is not reflecting its sts in checkbox
You have 2 choices: 1) put the boolean as a property of your KostenOV and reference it with a model (e.g. propertyModel) 2) Use a CheckGroup and multiple checkboxes which use the id of KostenOV as their value. Have a look at: -http://www.wicket-library.com/wicket-examples/compref/wicket/bookmarkable/org.apache.wicket.examples.compref.CheckGroupPage -http://www.wicket-library.com/wicket-examples/compref/wicket/bookmarkable/org.apache.wicket.examples.compref.CheckGroupPage I would probably go for option 2. On 14/08/2012 7:09 AM, Delange wrote: I agree, but how should the code be? At the end it has to be placed in the model. Do you have any suggestion? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Checkbox-in-DataTable-is-not-reflecting-its-sts-in-checkbox-tp4651174p4651225.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: Checkbox in DataTable is not reflecting its sts in checkbox
I agree, but how should the code be? At the end it has to be placed in the model. Do you have any suggestion? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Checkbox-in-DataTable-is-not-reflecting-its-sts-in-checkbox-tp4651174p4651225.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: Wicket freelancer job in Vienna, Austria
Hi Marco, I'm also based in Vienna and this sounds interesting. Can you provide me with some more details about the project and what exactly you are looking for. Best, Gerwin Brunner P.S.: Wir können die Unterhaltung auch auf Deutsch durchführen :) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-freelancer-job-in-Vienna-Austria-tp4651049p4651223.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: Is there a way to search component by its wicket ID ?
Hi there, I'm not really sure if searching a component by its ID is a good idea - It kinda' breaks modularity and goes against the OO approach. I have never searched a component by its ID but assuming you need the full path (hierarchy) to it, such component will be hard to use in any other context because you harcoded the path to that component. Whenever I need to get access to a component I simply store it in a Map or component List for later search and/or use. Best regards nuno -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Is-there-a-way-to-search-component-by-its-wicket-ID-tp4651175p4651221.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: wicket-dnd strange situation
Hi Hielke First, I want to say thanks for wiquery. I integrated wiquery in a big project with success and we are happy with them. I know that the 2 code snippets do exactly the same. The first uses the wicket mechanism and the second uses the jquery mechanism. I read at http://code.google.com/p/wicket-dnd/issues/detail?id=13#c1 that "WiQueryCoreInitializer(hooked up via WiQueryInitializer) installs its custom WiQueryDecoratingHeaderResponse" and I suppose that WiQueryDecoratingHeaderResponse translate the first code snippet in the second. In my case the problem is "$" jquery variable instead "$.noConflict()" (we need to use another JavaScript library - prototype from wicekt-dnd - alongside jQuery). Probably a jquery layer in the wicket core will help more the wicket developers that consume jquery (core, ui) and the projects that integrate wicket with jquery. In this layer I see a standard mode to add jquery.js, some behaviors that add jquery core functions in wicket and also different kinds of helpers (options) for function parameters (boolean, string, ) Best regards, Decebal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-dnd-strange-situation-tp4650918p4651220.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: Is there a way to search component by its wicket ID ?
Because the id is unique only within the markup container of a component. It need not be unique in a page. This is by design. For more details refer: https://cwiki.apache.org/WICKET/component-hierarchy.html On Tue, Aug 14, 2012 at 3:42 PM, arkadyz111 wrote: > But why we have to write "userForm" ? What is an idea behind of this ? > > Why get("username") is not enough ? > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Is-there-a-way-to-search-component-by-its-wicket-ID-tp4651175p4651217.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 > > -- Thanks & regards James Selvakumar mcruncher.com
Re: Problem sending email using SSL after upgrading to Wicket 1.5
Martin, Yes I use smtp props that are similar to what you have shared. Kindly see my initial post for the smtp properties used by me. I may sound stupid but the same piece of code runs fine when using wicket-1.4.x. And I use the following wicket related dependencies: - wicket - wicket-extensions - wicket-ioc - wicket-spring - wicket-datetime - wicketstuff-annotation - wicketstuff-objectautocomplete - wiquery-jquery-ui All of them use the version 1.5.7. (Yes some of them don't belong to the wicket project at all but they depend on wicket-1.5.x) Is there a possibility of a dependency conflict? NOTE: I found that wicket-ioc depends on "cglib". But even when I excluded it the problem persists. On Tue, Aug 14, 2012 at 2:27 PM, Martin Grigorov wrote: > Hi, > > I don't think this is anyhow related to Wicket. > Here are the GMail SMTP related props I use successfully: > > mail.server.host=smtp.gmail.com > mail.server.port=587 > mail.server.username=my.em...@gmail.com > mail.server.password=my-passwd > mail.server.starttls.enable=true > > You may also check the docs of SMTPAppender in Logback. There are > examples for configuring it with GMail. I believe the problem is in > these settings. > > On Tue, Aug 14, 2012 at 5:34 AM, James Eliyezar > wrote: > > Greetings to all of you. > > > > We recently upgraded our application to Wicket 1.5. > > However, after upgrading we had problems sending email using SSL from our > > application. > > This may not be related to wicket at all but I promise we didn't change > any > > dependencies other than wicket's. > > What amuses me is that it works as expected in our older versions which > > still use Wicket 1.4.x. > > Both the older version and the current version were run using the same > JRE. > > > > Here's the code that sends email: > > > > > > public class MailSenderTask implements Runnable > > { > > private Properties smtpProperties; > > private EmailMessage message; > > private static final Logger logger = > > LoggerFactory.getLogger(MailSenderTask.class); > > > > public MailSenderTask(Properties smtpProperties, EmailMessage > message) > > { > > this.smtpProperties = smtpProperties; > > this.message = message; > > } > > > > public synchronized void sendMail() throws Exception > > { > > try { > > if (addSSlProvider()) { > > logger.info("Adding ssl provider"); > > Security.addProvider(new > > com.sun.net.ssl.internal.ssl.Provider()); > > } else { > > logger.info("Using plain text connection as ssl/tls is > not > > enabled"); > > } > > Session session = createSession(); > > MimeMessage mimeMessage = new MimeMessage(session); > > mimeMessage.setSender(new > InternetAddress(message.getSender())); > > mimeMessage.setSubject(message.getSubject()); > > > > if (message.getRecipients().indexOf(',') > 0) { > > mimeMessage.setRecipients(Message.RecipientType.TO, > > InternetAddress.parse(message.getRecipients())); > > } else { > > mimeMessage.setRecipient(Message.RecipientType.TO, new > > InternetAddress(message.getRecipients())); > > } > > > > MimeBodyPart bodyPart = new MimeBodyPart(); > > bodyPart.setContent(message.getBody(), "text/html"); > > > > Multipart multipart = new MimeMultipart(); > > multipart.addBodyPart(bodyPart); > > > > if (message.getAttachments() != null && > > message.getAttachments().length > 0) { > > for (File file : message.getAttachments()) { > > logger.debug("Adding {} as an attachment", file); > > MimeBodyPart attachmentPart = new MimeBodyPart(); > > attachmentPart.attachFile(file); > > multipart.addBodyPart(attachmentPart); > > } > > } > > > > mimeMessage.setContent(multipart); > > > > logger.info("Sending mail..."); > > Transport.send(mimeMessage); > > logger.info("Mail sent to {}", message.getRecipients()); > > } catch (Exception ex) { > > throw new EmailException("Error occurred while sending mail", > > ex); > > } > > } > > > > private boolean addSSlProvider() > > { > > String sslEnabledProperty = > > smtpProperties.getProperty("mail.smtp.starttls.enable"); > > if (StringUtils.isNotEmpty(sslEnabledProperty)) { > > return Boolean.parseBoolean(sslEnabledProperty); > > } > > return false; > > } > > > > private Session createSession() > > { > > Session session = null; > > if > > (Boolean.parseBoolean(smtpProperties.getProperty("mail.smtp.auth"))) { > > logger.info("Creating session with authentication"); > > session
Re: Is there a way to search component by its wicket ID ?
But why we have to write "userForm" ? What is an idea behind of this ? Why get("username") is not enough ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Is-there-a-way-to-search-component-by-its-wicket-ID-tp4651175p4651217.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
Looking for A Telecommuting Wicket Specialist
Hi! We are looking for a telecommuting wicket private contractor to do some application development using Wicket (1.4.x). We prefer a direct contract with the developer-contractor instead of software companies. ** Martin http://code.google.com/p/koodaripalvelut-wicket/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org