Wicket 1.5 - setResponsePage() - page still tries to render HTML before redirect

2011-11-04 Thread armhold
Hi, Geoff Hayman raised this issue previously here: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-setResponsePage-page-still-tries-to-render-HTML-before-redirect-td3819145.html but apparently got no response (and Nabble won't let me reply to that for some reason... conspiracy?) I've run

Re: Wicket 1.5 - setResponsePage() - page still tries to render HTML before redirect

2011-11-05 Thread armhold
-redirect-tp3992321p3992468.html To unsubscribe from Wicket 1.5 - setResponsePage() - page still tries to render HTML before redirect, click here. -- George Armhold armh...@gmail.com -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-setResponsePage-page-still

Using JNDI from Jetty/Start.java

2011-12-27 Thread armhold
Has anyone got a JNDI config that works with Start.java under Wicket 1.5 (and therefore Jetty 7.5)? I've got JNDI working fine for my production Tomcat deployment, but can't seem to figure out which incantations are needed to get it working with Jetty for development/testing (I use Start.java to

Re: Using JNDI from Jetty/Start.java

2011-12-27 Thread armhold
Thanks to a hint from Christian Huber I got it working. System.setProperty(java.naming.factory.url.pkgs, org.eclipse.jetty.jndi); System.setProperty(java.naming.factory.initial, org.eclipse.jetty.jndi.InitialContextFactory); EnvConfiguration envConfiguration = new EnvConfiguration();

Re: Using JNDI from Jetty/Start.java

2011-12-28 Thread armhold
I moved the config file to src/test/jetty/jetty-env.xml because I didn't want it deployed with my production war file. It was really the two property settings I was missing. You might not even need the properties if you are using the jetty-maven-plugin; I did because I'm running Start#main()

404 page gets constructed for @RequiresHttps pages

2011-12-28 Thread armhold
I just spent an hour debugging what would normally be a simple problem- the markup for a page that extends a base class failed to define a component which was added by the base class. But the problem wasn't immediately obvious because it was actually occurring in my 404 page, and NOT the page I

Re: Hide page version query parameters

2012-01-04 Thread armhold
You can also add a link rel=canonical href=http://example.com/your-canonical-url/ to the head to instruct the search engines to find the proper page. (warning- video auto-plays on this google link:) http://support.google.com/webmasters/bin/answer.py?hl=enanswer=139394 -- View this message in

Re: hebrew text looks like ×׳—׳‘׳¨׳•

2012-01-06 Thread armhold
I went though this pain a few months ago too. Here are all the places I had to hit: 1. In your HTML files: ?xml version=1.0 encoding=UTF-8? And also in your head: meta http-equiv=Content-Type content=text/html; charset=UTF-8 2. For property files, if you use i18n you will need to use

how to get https port number in Wicket 1.5

2012-01-14 Thread armhold
Assuming that the http/https port number have been set in WicketApplication with the following: setRootRequestMapper(new HttpsMapper(getRootRequestMapper(), new HttpsConfig(8080, 8443))); ... is there any way to get access to the port numbers from components? One obvious solution is

Re: how to get https port number in Wicket 1.5

2012-01-14 Thread armhold
Hi Per, The documentation for @RequireHttps implies that it only works for pages, not components, and my (limited) testing shows that to be the case. Is there a way to use it with components on otherwise insecure pages? My use case is to secure a form on non-https pages, specifically to secure

Re: how to get https port number in Wicket 1.5

2012-01-15 Thread armhold
Hi Martin, thanks. I've already got a solution (from Igor's book mostly, but updated for 1.5) on how to submit a form over https when the page hosting the form is http. I was just looking for a way to determine the https port without hard-coding a reference to WicketApplication. I guess it's not

Re: how to get https port number in Wicket 1.5

2012-01-16 Thread armhold
Hmm, I spoke too soon. It seems that the reason I was running into the *method* mismatch (not *protocol* mismatch) with the StatelessForm is due to having installed an HttpsMapper in my WicketApplication. If you try to post a form over https from an http page, the HttpsMapper apparently discards

Re: how to get https port number in Wicket 1.5

2012-01-16 Thread armhold
Thanks Martin! https://issues.apache.org/jira/browse/WICKET-4338 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-get-https-port-number-in-Wicket-1-5-tp4295139p4301617.html Sent from the Users forum mailing list archive at Nabble.com.

Re: AJAX Rating extension, multiple on a page

2012-01-22 Thread armhold
I've not used this component before, so take this with a grain of salt. But if you're overriding the RatingPanel.onRating(), you implicitly have access to the RatingPanel via this. You can access it in the onRating() method, as well as any other accessible member/final field. So you could do

Re: AJAX Rating extension, multiple on a page

2012-01-22 Thread armhold
Just to be clear in case it wasn't obvious- thingBeingRated will be serialized with the rest of your page if you take this approach. If it's not serializable, use a reference (like a database ID) to look it up when needed, instead of marking the object itself as final. -- View this message in

Re: Wicket-Source: Click-through from browser back to Java source

2012-02-03 Thread armhold
Wow this is really handy, thanks Jenny. Looking forward to the Chrome port! I just whipped up a plugin for Intellij. It might not be publicly available until they have a chance to review it, but here's the link: http://plugins.intellij.net/plugin/?ideaid=6846 You can https://github.com/armhold

Re: Wicket-Source: Click-through from browser back to Java source

2012-02-08 Thread armhold
Thanks Minas, I'll take a look. I do have a bug in my plugin in that the configuration panel seems to always appear twice in the IDE Settings popup, so your existing code might be helpful in figuring that out. The Intellij documentation on plugin API documentation isn't the best, unfortunately.

wrapping onclick in AjaxLink with 1.5.4

2012-02-28 Thread armhold
Hi, I need to run some Javascript on the client when the user clicks an AjaxLink. I'm following https://cwiki.apache.org/WICKET/calling-javascript-function-on-wicket-components-onclick.html these instructions , but my onclick() javascript always gets overwritten by the AjaxLink's behavior. I

Re: wrapping onclick in AjaxLink with 1.5.4

2012-02-29 Thread armhold
Hi Martin, I'm following the example https://cwiki.apache.org/WICKET/calling-javascript-function-on-wicket-components-onclick.html shown here . My code is literally that, added to the prototypical Wicket Quickstart HomePage.java: public class HomePage extends WebPage { private static

Re: wrapping onclick in AjaxLink with 1.5.4

2012-02-29 Thread armhold
Well that was simple, thank you. I'm pedantic enough to have added @Override to the getAjaxCallDecorator(), but I missed decorateScript() in my initial attempt. The method is being called now, and I have updated the Wiki. However the second example listed on the Wiki (AttributeAppender) also

Re: seo - canonical link element

2012-03-08 Thread armhold
Yes, I worked on an app with a search engine component, so it's common for users to come to the same page via slightly different urls. link rel=canonical href=# wicket:id=canonical/ Label canonical = new Label(canonical, ); canonical.add(new AttributeModifier(href,

form params appear in URL if submitted after session timeout

2012-03-11 Thread armhold
I notice that if you submit a form after the session has timed out, Wicket (1.5.4) seems to add the submitted params to the URL of the redirect, resulting in something like: http://localhost:8080/?0username=usernameform1_hf_0password=SECRET Is this a bug? If not, is there any workaround for

Re: form params appear in URL if submitted after session timeout

2012-03-11 Thread armhold
Just built 1.5.5 from source, and the problem is fixed there. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/form-params-appear-in-URL-if-submitted-after-session-timeout-tp4463992p4464052.html Sent from the Users forum mailing list archive at Nabble.com.

Re: form params appear in URL if submitted after session timeout

2012-03-12 Thread armhold
Well at least I suffered (too) for it. :-) Sorry for the regression, and thanks for fixing it. I'm fine reading post params manually, if that's the prescribed way to do it. -- View this message in context:

inferring locale from URL in 1.5

2012-03-22 Thread armhold
What's the cleanest way to set a user's locale based on the domainname of the URL of the request in 1.5? https://cwiki.apache.org/WICKET/wicket-and-localized-urls.html This guide relies on overriding newRequestCycleProcessor(). Would a proper 1.5 analog be to add a custom

Re: inferring locale from URL in 1.5

2012-03-25 Thread armhold
Martin, The wicket-examples site rarely works for me (server under-resourced?) but I found the code in the examples section of the Wicket source from git. LocaleFirstMapper was a huge help; I'm fairly sure I wouldn't have gotten it working without that reference, so thank you very much. Here's

Re: inferring locale from URL in 1.5

2012-03-26 Thread armhold
Try clicking the source code links from wicket-library.com. Always times out for me. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/inferring-locale-from-URL-in-1-5-tp4497412p4505742.html Sent from the Users forum mailing list archive at Nabble.com.

Re: inferring locale from URL in 1.5

2012-03-26 Thread armhold
Hmm, I was actually planning to use that code (LazyHttpsConfig) myself. Looked like a nice way to avoid hard-coding port numbers for dev vs prod use. Maybe not now. :-) -- View this message in context:

Re: What real life scenario calls for page ID?

2012-03-26 Thread armhold
I'm really grateful for this conversation, as I've been wondering the same question for a while now. Martin writes: So far I didn't hear a good explanation why the page id causes you troubles. Most of you are saying it is ugly. Well it is kind of ugly. It is far less ugly than the 1.4-style

Re: What real life scenario calls for page ID?

2012-03-27 Thread armhold
Martin wrote: HomePageMapper is explicitly registered in SystemMapper (the default compound root mapper). The resource mapper example in wicket-examples also mounts custom home mapper. Thanks Martin. I managed to get something working based on this. Here's a gist, in case anyone else is

Re: When I am open title page of my application, the next error occurs...

2012-03-30 Thread armhold
Your IDE probably auto-imported it instead of java.lang.Object. Your IDE most likely has a feature whereby you can add org.omg.CORBA to the list of don't ever auto-import this package. Last cause: $Proxy155 cannot be cast to org.omg.CORBA.Object PS: I will forever read this package as oh my god

Re: reloading of HTML and classes

2012-04-07 Thread armhold
I don't use ReloadingWicketFilter, but have pretty good luck reloading changed HTML and classes by simply running in debug mode in my IDE. With -Dwicket.configuration=development and running under the debugger, I can redeploy changes with reload changed classes (command+F9 in Intellij on OSX; I

a model for passing data between pages

2012-04-09 Thread armhold
I have a use case where several pages of a flow need to edit a DTO. Changes to the DTO (which may be an existing JPA Entity, or a not-yet-persisted one) are saved at the end of the flow (assuming the user clicks save). The user is allowed to navigate back-and-forth among the pages, so the obvious

Re: a model for passing data between pages

2012-04-09 Thread armhold
Hi duesenklipper. I'd rather use a custom Session subclass with typesafe getters and setters: class MySession extends WebSession { private MyDTO dtoForFlow; public MyDTO getDtoForFlow() { return dtoForFlow; } Typesafety via custom sessions is nice, but I think that would

Re: a model for passing data between pages

2012-04-10 Thread armhold
Hi Dan, Thanks, I didn't know about MetaDataKey- that cleans it up nicely: public class SessionModelT extends Serializable implements IModelT { protected MetaDataKeyT key; public SessionModel(MetaDataKeyT key) { this.key = key; } public SessionModel(MetaDataKeyT

Re: Single page wicket app

2012-05-18 Thread armhold
Ajax calls do save the page state. I think the real issue for you is that if users have the page open but idle for a long time (longer than session expiration... 30 mins?) the Ajax links won't work for them when they decide to start using the page again. You could perhaps use a