Re: Using generics with some non-generic classes in Wicket
I dont care, because i cant do any thing with the ? The only thing it enforces is that it must now be a generic class which is annoying. Not to mention that in that area eclipse and javac accept different things So or we in wicket dont use any where and have supress warning everywhere for that or we do use it and then suddenly it is in my eyes restricted to much. On 5/14/08, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote: > Johan Compagner wrote: > > yes thats the reason > > > > you are calling the method add with a generified component but that > > container itself is not generified > > > > i dont like this about generics expecially the onces like this: > > > > add(MarkupContainer container) > > > > then suddenly a none generified component cant be added... > > thats really stupid should mean anything.. including none generics > > No, that's not correct. For example, List is much more restrictive > than a raw List (which is a List). To a raw list you can add an > instance of any type whatever, i.e., list.add(new Object()). But in > List the ? is a wildcard which says it could be any type there, i.e., > it could be a List. But you can't add a new Object() to a > List! > > Thus MarkupContainer means "MarkupContainer parameterized by some > unknown type", and *not* MarkupContainer parameterized by Object, which > is what the raw type means. > > Regards, > Sebastiaan > > > johan > > > > > > On Tue, May 13, 2008 at 5:55 PM, Stefan Simik <[EMAIL PROTECTED]> > > wrote: > > > >> I have one idea, > >> > >> the reason of the warnigs is, that parent of AjaxPagingNavigator is > >> PagingNavigator, > >> which has parent Panel ---> that is not parameterized. > >> > >> The same problem is with LoopItem, which extends the > >> WebMarkupContainer ---> that is not parameterized. > >> > >> ? could this be the reason ? > >> > >> > >> > >> > >> > >> > >> Stefan Simik wrote: > >>> Mhmm, it is meaningful ;) I will know in future, thx > >>> > >>> One of the last occuring warning is, when working with > >>> MarkupContainer#add(...) or #addOrReplace(...) method. > >>> > >>> Example: I have a simple AjaxPagingNavigator, to which I add a simple > >>> ListView > >>> --- > >>> ListView menu = new ListView("id", numbers){ > >>> //populate metods > >>> } > >>> add(menu);//warning here > >>> > >>> The warning says: > >>> "Type safety: The method add(Component...) belongs to the raw type > >>> MarkupContainer. > >>> References to generic type MarkupContainer should be parameterized" > >>> > >>> I cannot find out, what's the warning reason, because ListView self is > >>> parameterized. > >>> > >>> > >> -- > >> View this message in context: > >> > http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17212015.html > >> Sent from the Wicket - User mailing list archive at Nabble.com. > >> > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Swarm: Authorization for WebMarkupContainer
Why would you want to delete those jars? I am busy using them and the appear to be working fine (for what I am using). Please can you explain what is broken/why it would be better to use 1.3-SNAPSHOT? What do I lose by reverting back to 1.3-SNAPSHOT? What is the latest version of Wicket that I can use with SWARM 1.3-SNAPSHOT? Thanks Mike Mr Mean wrote: > > ... > > Argh, i am only just reading you are using 1.3.1-SNAPSHOT. You should > be using 1.3-SNAPSHOT. That does it i am deleting those jars. > > Maurice > > -- View this message in context: http://www.nabble.com/Swarm%3A-Authorization--for-WebMarkupContainer-tp17206272p17223972.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket play nicely with GWT
you can always generate a callback url using urlfor(interface) and then pass that url to the gwt component. for example of this see how Link generates a url that results in onLinkClicked() being invoked on it. -igor On Tue, May 13, 2008 at 8:51 PM, Brill Pappin <[EMAIL PROTECTED]> wrote: > Thanks, I'll try that. > > What I did while waiting to see what others come up with is dump the servlet > session and see what the key was. > Messy (and error prone as I refactor) but worked in the short term. > Here it is from inside the GWT servlet in case anyone is interested: > private String getTokenFromWicketSession() { > String token = (String) getThreadLocalRequest() > .getSession() > .getAttribute( > > "wicket:Glasshost.wicket:com.glasshost.model.entity.user.User.token"); > return token; > } > > > I'm thinking what really needs to happen is to rip out the source of the GWT > RPC sevlet (apache lic after all) and implement a wicket filter (or some > other wicket handler) so the target of a GWT RPC call can be a more *normal* > wicket object. > > I'm too new to Wicket to know if that is a reasonable path to try though. > > - Brill > > > > > > -Original Message- > From: Igor Vaynberg [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 13, 2008 10:53 PM > To: users@wicket.apache.org > Subject: Re: Wicket play nicely with GWT > > ((WebRequestCycle)RequestCycle.get()).getWebRequest().getHttpServletRequest( > ).getSession() > should get you the raw http session. > > -igor > > > On Tue, May 13, 2008 at 7:23 PM, Brill Pappin <[EMAIL PROTECTED]> wrote: > > Ok, I've read over several threads on Wicket+GWT and know that are > > several people using the two together. > > > > I've got a nice clean setup that is working all except for one minor > detail. > > > > The problem is that Wicket actually does the authentication and I > > store a token in the sessionStore, however I need to get that token > > back in the non-wicket GWT service servlet. > > > > What I'm currently trying to do is: > > > > String token = (String) RequestCycle.get().getApplication() > > .getSessionStore().getAttribute( > > > > RequestCycle.get().getRequest(), > > User.class.getName() + > > ".token"); > > > > But I'm getting a NPE as if the RequestCycle is not initialized or > > something > > :) > > > > So, what patterns are people who integrate GWT and Wicket using? > > There are many I can think of, some right out of the park, but what I > > really need is access to the session vars in a wicket context. > > > > I should also mention that I'm new to Wicket (read: finally have a > > reason to go explore it as I've been meaning to do). > > > > Comments, suggestions? > > > > - Brill Pappin > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Terracotta and PatternValidator
> I have run into the same issue. I solved it with brute force by > writing a regexp to capture all the inner classes from the Pattern > class and inserting them into my terracotta config's dso section. It > is not the most elegant solution but it will get you past this issue. Why not just writing a validator that keeps a reference to the regex string rather than the Pattern, and create the pattern object just when you need it? There is some overhead in that, but it shouldn't be too bad considering that you'll only use a few of those objects a request at most? Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Wicket play nicely with GWT
I just now saw your post *just* before this one... Looks like we have a magic bullet here :) Thanks for you help! - Brill Pappin -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 13, 2008 10:53 PM To: users@wicket.apache.org Subject: Re: Wicket play nicely with GWT ((WebRequestCycle)RequestCycle.get()).getWebRequest().getHttpServletRequest( ).getSession() should get you the raw http session. -igor On Tue, May 13, 2008 at 7:23 PM, Brill Pappin <[EMAIL PROTECTED]> wrote: > Ok, I've read over several threads on Wicket+GWT and know that are > several people using the two together. > > I've got a nice clean setup that is working all except for one minor detail. > > The problem is that Wicket actually does the authentication and I > store a token in the sessionStore, however I need to get that token > back in the non-wicket GWT service servlet. > > What I'm currently trying to do is: > > String token = (String) RequestCycle.get().getApplication() > .getSessionStore().getAttribute( > > RequestCycle.get().getRequest(), > User.class.getName() + > ".token"); > > But I'm getting a NPE as if the RequestCycle is not initialized or > something > :) > > So, what patterns are people who integrate GWT and Wicket using? > There are many I can think of, some right out of the park, but what I > really need is access to the session vars in a wicket context. > > I should also mention that I'm new to Wicket (read: finally have a > reason to go explore it as I've been meaning to do). > > Comments, suggestions? > > - Brill Pappin > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Wicket play nicely with GWT
Thanks, I'll try that. What I did while waiting to see what others come up with is dump the servlet session and see what the key was. Messy (and error prone as I refactor) but worked in the short term. Here it is from inside the GWT servlet in case anyone is interested: private String getTokenFromWicketSession() { String token = (String) getThreadLocalRequest() .getSession() .getAttribute( "wicket:Glasshost.wicket:com.glasshost.model.entity.user.User.token"); return token; } I'm thinking what really needs to happen is to rip out the source of the GWT RPC sevlet (apache lic after all) and implement a wicket filter (or some other wicket handler) so the target of a GWT RPC call can be a more *normal* wicket object. I'm too new to Wicket to know if that is a reasonable path to try though. - Brill -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 13, 2008 10:53 PM To: users@wicket.apache.org Subject: Re: Wicket play nicely with GWT ((WebRequestCycle)RequestCycle.get()).getWebRequest().getHttpServletRequest( ).getSession() should get you the raw http session. -igor On Tue, May 13, 2008 at 7:23 PM, Brill Pappin <[EMAIL PROTECTED]> wrote: > Ok, I've read over several threads on Wicket+GWT and know that are > several people using the two together. > > I've got a nice clean setup that is working all except for one minor detail. > > The problem is that Wicket actually does the authentication and I > store a token in the sessionStore, however I need to get that token > back in the non-wicket GWT service servlet. > > What I'm currently trying to do is: > > String token = (String) RequestCycle.get().getApplication() > .getSessionStore().getAttribute( > > RequestCycle.get().getRequest(), > User.class.getName() + > ".token"); > > But I'm getting a NPE as if the RequestCycle is not initialized or > something > :) > > So, what patterns are people who integrate GWT and Wicket using? > There are many I can think of, some right out of the park, but what I > really need is access to the session vars in a wicket context. > > I should also mention that I'm new to Wicket (read: finally have a > reason to go explore it as I've been meaning to do). > > Comments, suggestions? > > - Brill Pappin > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket play nicely with GWT
((WebRequestCycle)RequestCycle.get()).getWebRequest().getHttpServletRequest().getSession() should get you the raw http session. -igor On Tue, May 13, 2008 at 7:23 PM, Brill Pappin <[EMAIL PROTECTED]> wrote: > Ok, I've read over several threads on Wicket+GWT and know that are several > people using the two together. > > I've got a nice clean setup that is working all except for one minor detail. > > The problem is that Wicket actually does the authentication and I store a > token in the sessionStore, however I need to get that token back in the > non-wicket GWT service servlet. > > What I'm currently trying to do is: > > String token = (String) RequestCycle.get().getApplication() > .getSessionStore().getAttribute( > > RequestCycle.get().getRequest(), > User.class.getName() + > ".token"); > > But I'm getting a NPE as if the RequestCycle is not initialized or something > :) > > So, what patterns are people who integrate GWT and Wicket using? > There are many I can think of, some right out of the park, but what I really > need is access to the session vars in a wicket context. > > I should also mention that I'm new to Wicket (read: finally have a reason to > go explore it as I've been meaning to do). > > Comments, suggestions? > > - Brill Pappin > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: consistent way of getting httpservletresponse?
On Tue, May 13, 2008 at 7:10 PM, Ritz123 <[EMAIL PROTECTED]> wrote: > > Hi, > > Whats the consistent way of getting HttpServletResponse from the > RequestCycle? ((WebRequestCycle)RequestCycle.get()).getWebResponse().getHttpServletResponse(); > Why doesnt the Response class have abstract or default implementation, that > would make life much easier. because the "Web" or HTTP implementation is only one protocol that wicket supports. i know a few people wrote up apache mina implementation, and you can roll others. response is not meant to represent directly the servlet response, only some abstract thing that wicket is rendering into. -igor > -- > View this message in context: > http://www.nabble.com/consistent-way-of-getting-httpservletresponse--tp17222102p17222102.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wicket play nicely with GWT
Ok, I've read over several threads on Wicket+GWT and know that are several people using the two together. I've got a nice clean setup that is working all except for one minor detail. The problem is that Wicket actually does the authentication and I store a token in the sessionStore, however I need to get that token back in the non-wicket GWT service servlet. What I'm currently trying to do is: String token = (String) RequestCycle.get().getApplication() .getSessionStore().getAttribute( RequestCycle.get().getRequest(), User.class.getName() + ".token"); But I'm getting a NPE as if the RequestCycle is not initialized or something :) So, what patterns are people who integrate GWT and Wicket using? There are many I can think of, some right out of the park, but what I really need is access to the session vars in a wicket context. I should also mention that I'm new to Wicket (read: finally have a reason to go explore it as I've been meaning to do). Comments, suggestions? - Brill Pappin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Terracotta and PatternValidator
Richard, I have run into the same issue. I solved it with brute force by writing a regexp to capture all the inner classes from the Pattern class and inserting them into my terracotta config's dso section. It is not the most elegant solution but it will get you past this issue. Good luck, Ryan On Mon, May 12, 2008 at 11:44 AM, richardwilko <[EMAIL PROTECTED]> wrote: > > Hi, > > I've come across a problem with the wicket-terracotta intergration. > > If you have a PatternValidator (like EmailAddressValidator) attached to an > input then terracotta throws a non portable exception because > java.util.regex.Pattern isnt in the additional-boot-jar-classes bit of the > config xml. > > I tried to add this myself but it turns out that Pattern has loads of > internal classes that it uses and so it is a pain. > > As PatternValidator is a wicket class it would seem that these changes > should either go into the wicket-terracotta integration project's xml config > or that the Pattern in PatternValidator should be made transient and the > code adapted to take care of it. > > Has anyone else got round this problem? I'm thinking for now I should write > my own Validator that does hold the Pattern object. > > Cheers Richard > -- > View this message in context: > http://www.nabble.com/Terracotta-and-PatternValidator-tp17189868p17189868.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
consistent way of getting httpservletresponse?
Hi, Whats the consistent way of getting HttpServletResponse from the RequestCycle? In one of my compoents, I have tried both ((WebResponse)Component.getResponse()).getHttpServletResponse() and ((WebResponse)RequestCycle.get().getResponse()).getHttpServletResponse() but both of them fail because getResponse() returns StringResponse and not WebResponse. I also see a bunch of ther Response subclasses. Wondering whats the consistent way to get HttpServletResponse? Why doesnt the Response class have abstract or default implementation, that would make life much easier. -- View this message in context: http://www.nabble.com/consistent-way-of-getting-httpservletresponse--tp17222102p17222102.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to reset the feedback panel
In 1.3 and up (so this won't work for 1.2): You can use Session.get().getFeedbackMessages().clear() (or call clear using a filter to just clear specific ones). Component specific feedback messages are also temporarily stored in the session, so you'll get those as well. Btw, Session#getFeedbackMessages says "@return unmodifiable list of feedback messages". This is wrong, as it is mutable (and it is actually not a list anymore). Could you please create a JIRA issue to fix the javadoc for 1.3 and 1.4? Cheers, Eelco On Tue, May 13, 2008 at 6:28 PM, Michael Mehrle <[EMAIL PROTECTED]> wrote: > How do I reset the feedback panel from within an event handler? I tried > to set the feedback's model to null, but that throws an error: > > > > org.apache.wicket.WicketRuntimeException: No get method defined for > class: class com.evite.event.model.Event expression: feedback > > at > org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyRes > olver.java:433) > > at > org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(Prope > rtyResolver.java:275) > > at > org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.j > ava:84) > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to reset the feedback panel
How do I reset the feedback panel from within an event handler? I tried to set the feedback's model to null, but that throws an error: org.apache.wicket.WicketRuntimeException: No get method defined for class: class com.evite.event.model.Event expression: feedback at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyRes olver.java:433) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(Prope rtyResolver.java:275) at org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.j ava:84)
Re: getBodyContainer replacement for appending attributes to body tag
> That's described in the migration document here: I meant: http://cwiki.apache.org/WICKET/migrate-13.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: getBodyContainer replacement for appending attributes to body tag
Hi, That's described in the migration document here: [quote] Replacement for getBodyContainer If you had code like this: public void renderHead(HtmlHeaderContainer container) { ((WebPage) getPage()).getBodyContainer().addOnLoadModifier("foo();", null); super.renderHead(container); } you should instead let your component implement IHeaderContributor, and then in the interface method, do: public void renderHead(IHeaderResponse response) { response.renderOnLoadJavascript("foo();"); } [/quote] Eelco On Mon, May 12, 2008 at 2:03 PM, TheMayor <[EMAIL PROTECTED]> wrote: > > Hi Guys, > > Since getBodyContainer is no longer available as of wicket 1.3.x, how can > you allow inherited page markup to update or contribute to the body tag's > attributes (other than onLoad and onUnload). We used to rely on > getBodyContainer().getBodyContainer(). > > Thanks for the help > > -hc > -- > View this message in context: > http://www.nabble.com/getBodyContainer-replacement-for-appending-attributes-to-body-tag-tp17189983p17189983.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: A question about IHeaderContributor
On Tue, May 13, 2008 at 5:28 PM, nate roe <[EMAIL PROTECTED]> wrote: > I can try that I suppose. > > The Javadoc for 1.2 seems to mention Component quite a lot though: > > http://wicket.sourceforge.net/apidocs/wicket/markup/html/IHeaderContributor.html Right. I guess I just lost track of what was implemented when. If the docs say it and it doesn't work it might be a bug or you might be overlooking something. If you think it is a bug, please open a JIRA issue for it. Though I would think someone would have reported it earlier, so pls make sure you check your code well. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Processing a form before page components are created
> The reason I want to do this is that my pages are stateless, and I want to > process the submitted form before all the components on the page are > initialised, incase I need to load different data models, or redirect the > request to another page, thus saving unnecessary database calls and > component initialisation. > > At the moment what I am doing is processing the form by directly reading > the page parameters in the constructor before I add any components to the > page, and then redirecting the request or initializing the page as > appropriate (bypassing the use of Form.onSubmit). If you make sure your models/ components work lazily you can avoid database calls being done until the components are actually rendered. Rendering is a separate phase executing after component construction and form handling. And you can let your form just populate a simple bean to avoid database access. I wouldn't worry about the creation of a few components, and you can break of any time with a RestartResponseException or set the next page (without breaking off current processing) using setResponsePage. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: A question about IHeaderContributor
I can try that I suppose. The Javadoc for 1.2 seems to mention Component quite a lot though: http://wicket.sourceforge.net/apidocs/wicket/markup/html/IHeaderContributor.html On Tue, May 13, 2008 at 5:22 PM, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > I'm not sure, but I think in 1.2 you can only use this interface for > behaviors. Am I right Matej/ others? Nate, can you try adding what you > want as a behavior to the form? > > Eelco > > On Tue, May 13, 2008 at 4:33 PM, nate roe <[EMAIL PROTECTED]> wrote: > > I'm using Wicket 1.2. > > > > I have a Form that implements IHeaderContributor. My intent is to use > > renderHead(Response) to write some JavaScript to the response. The > Form is > > added to the Page. However, renderHead(...) on my Form is never > called. > > > > Am I using this interface incorrectly? > > > > Thanks, > > Nate > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: A question about IHeaderContributor
I'm not sure, but I think in 1.2 you can only use this interface for behaviors. Am I right Matej/ others? Nate, can you try adding what you want as a behavior to the form? Eelco On Tue, May 13, 2008 at 4:33 PM, nate roe <[EMAIL PROTECTED]> wrote: > I'm using Wicket 1.2. > > I have a Form that implements IHeaderContributor. My intent is to use > renderHead(Response) to write some JavaScript to the response. The Form is > added to the Page. However, renderHead(...) on my Form is never called. > > Am I using this interface incorrectly? > > Thanks, > Nate > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
A question about IHeaderContributor
I'm using Wicket 1.2. I have a Form that implements IHeaderContributor. My intent is to use renderHead(Response) to write some JavaScript to the response. The Form is added to the Page. However, renderHead(...) on my Form is never called. Am I using this interface incorrectly? Thanks, Nate
SSL RequestCodingStrategy question
Hi, Have a question about the reference document on wiki for "How to switch to ssl mode (http://cwiki.apache.org/WICKET/how-to-switch-to-ssl-mode.html), why do SecureWebRequestCodingStrategy and even the custom RequestProcessors throw away the query string and ?wicket: portion of the URL? Isnt that going to be required when the page is redirected? -- View this message in context: http://www.nabble.com/SSL-RequestCodingStrategy-question-tp17219573p17219573.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DateTextField - what am I missing here?
"this" points to current wicket page. So wicket looks for "expiryDate" in the wicket page. If you declare "expiryDate" within wicket page, you won't get error message. Otherwise, as suggested by Mr Mean, instead of "this" you should pass model which has getter/setters for "expiryDate". Sanjeev Mr Mean wrote: > > When you do new PropertyModel(this, "expiryDate"), this refers to your > page EditDiscountCode which does not have get/setExpiryDate. Instead > of this you should use the model you also pass to the form which > contains a DiscountCode. > > Maurice > > On Tue, May 13, 2008 at 11:13 PM, V. Jenks <[EMAIL PROTECTED]> wrote: >> >> I don't know, would it? That's what I'm trying to figure out, the >> example is >> very vague. >> >> By that logic, I should name pass in "expiryDate" even though I've >> already >> named the field that? I tried: >> >> >> DateTextField expiryDate = new DateTextField( >> "expiryDate", >> new PropertyModel(this, "expiryDate"), >> >> new StyleDateConverter("S-", true)); >> >> expiryDate.add(new DatePicker()); >> expiryDate.setRequired(true); >> codeForm.add(expiryDate); >> >> >> ...and it fails: >> >> 52560 [httpSSLWorkerThread-80-4] ERROR org.apache.wicket.RequestCycle - >> No >> >> get method defined for class: class >> com.agribeef.abcommerce.ui.admin.EditDiscountCode expression: expiryDate >> >> org.apache.wicket.WicketRuntimeException: No get method defined for >> class: >> class com.agribeef.abcommerce.ui.admin.EditDiscountCode expression: >> expiryDate >> >> This seems rather cumbersome, calendars worked really well in 1.2...I >> can't >> make sense of this. >> >> Thanks again... >> >> >> >> >> Gwyn wrote: >> > >> > From a very quick look, won't your property model value of "date" will >> > mean it'll be doing a "getDate()" not "getExpiryDate()"? >> > >> > /Gwyn >> > >> > On Tue, May 13, 2008 at 8:38 PM, V. Jenks <[EMAIL PROTECTED]> wrote: >> >> >> >> Sorry, I'll clarify, was trying to be as condensed as possible. >> >> "EditDiscountCode" is the name of the page, which inherits WebPage. >> >> >> >> The model object of the form, which is my "DiscountCode" entity, >> does >> >> have a >> >> getter/setter for the expiryDate field, which is what I showed you >> in my >> >> initial post. >> >> >> >> @Entity >> >> @Table(name="tbl_discount_code") >> >> public class DiscountCode implements Serializable >> >> { >> >> >> >> . >> >> >> >> @Temporal(value=TemporalType.DATE) >> >> @Column(nullable=false) >> >> private Date expiryDate; >> >> >> >> . >> >> >> >> public Date getExpiryDate() >> >> { >> >> return this.expiryDate; >> >> } >> >> >> >> public void setExpiryDate(Date expiryDate) >> >> { >> >> this.expiryDate = expiryDate; >> >> } >> >> } >> >> >> >> >> >> So, I suppose I'm not entirely clear on what you're suggesting? >> >> >> >> >> >> >> >> >> >> Mr Mean wrote: >> >> > >> >> > Assuming EditDiscountCode is a wicket component, given the new >> >> > PropertyModel(this, "date") You probably want to either use an >> object >> >> > that has a get/setDate (your model object) or add those methods to >> >> > your component. >> >> > >> >> > Maurice >> >> > >> >> > On Tue, May 13, 2008 at 9:04 PM, V. Jenks <[EMAIL PROTECTED]> >> wrote: >> >> >> >> >> >> I must be missing something obvious but I can't spot itI'm >> using >> >> a >> >> >> DateTextField (Wicket 1.3.2) in my form like so: >> >> >> >> >> >> Java: >> >> >> DateTextField expiryDate = new DateTextField( >> >> >> "expiryDate", >> >> >> new PropertyModel(this, "date"), >> >> >> new StyleDateConverter("S-", true)); >> >> >> >> >> >> expiryDate.add(new DatePicker()); >> >> >> expiryDate.setRequired(true); >> >> >> codeForm.add(expiryDate); >> >> >> >> >> >> >> >> >> HTML: >> >> >> >> >> >> >> >> >> My error: >> >> >> org.apache.wicket.WicketRuntimeException: No get method defined >> for >> >> >> class: >> >> >> class com.agribeef.abcommerce.ui.admin.EditDiscountCode >> expression: >> >> date >> >> >> at >> >> >> >> >> >> >> >> >> org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:433) >> >> >> at >> >> >> >> >> >> >> >> >> org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275) >> >> >> at >> >> >> >> >> >> >> >> >> org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84) >> >> >> at >> >> >> >> >> >> >> >> >> org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113) >> >> >> at >> >> >> org.apache.wicket.Component.getMo
Re: How to implement hint text in a TextField?
I have one last small problem with this topic which is that I don't see any particularly elegant place to clear the hint text from this TextField when the form is submitted. I've considered adding JavaScript to the Form to implement the "onSubmit" handler. I don't like this case because then JavaScript pertaining to this particular Behavior is now in an additional location, on the form. The other idea I've considered is to discard the value in the Handler. This is slightly more elegant, but I still feel like the Behavior has crept out into other classes. Is there a more elegant place that I've overlooked? Thanks, Nate On Fri, May 9, 2008 at 5:22 PM, nate roe <[EMAIL PROTECTED]> wrote: > > Oh, yeah I see IBehavior.rendered(Component) that is called when the > component has been rendered. > > Great, thanks a lot! > Nate > > > On Fri, May 9, 2008 at 5:04 PM, Igor Vaynberg <[EMAIL PROTECTED]> > wrote: > > > i meant in the behavior. does it have something like rendered() or > > afterrender() ? > > > > somewhere so you can do > > getcomponent().getresponse().write("..."); > > > > -igor > > > > > > On Fri, May 9, 2008 at 5:02 PM, nate roe <[EMAIL PROTECTED]> wrote: > > > In Component, do you mean? I see onRender(MarkupStream) .. do I need > > to > > > find the "after component" part by using the MarkupStream? > > > > > > Thank you, > > > Nate > > > > > > On Fri, May 9, 2008 at 4:51 PM, Igor Vaynberg <[EMAIL PROTECTED] > > > > > > wrote: > > > > > >> 1.2 doesnt have it, so just override onrenderaftercomponent and do it > > there > > >> > > >> -igor > > >> > > >> > > >> On Fri, May 9, 2008 at 4:50 PM, nate roe <[EMAIL PROTECTED]> wrote: > > >> > Hrm. The IHeaderResponse interface is new in 1.3 but for a little > > while > > >> > longer I must use Wicket 1.2. How does one accomplish > > >> > response.renderOnDomReadyScript() in 1.2? I don't see any method > > similar > > >> to > > >> > "renderOnDomReadyScript" on the Response class. > > >> > > > >> > Thanks! > > >> > Nate > > >> > > > >> > On Fri, May 9, 2008 at 4:35 PM, Igor Vaynberg < > > [EMAIL PROTECTED]> > > >> > wrote: > > >> > > > >> >> i havent had to do this but something like this might work: > > >> >> > > >> >> class hint extends abstractbehavior { > > >> >> private final imodel hint; > > >> >> > > >> >> onbind(component c) { > > >> >>c.setoutputmarkupid(true); > > >> >> } > > >> >> > > >> >> ondetach() { hint.detach(); super.ondetach(); } > > >> >> > > >> >> renderhead(response) { > > >> >> // init textfield with hint > > >> >>response.renderondomreadyscript("var > > >> >> e=document.getelementbyid('"+getcomponent.getmarkupid()+"'"); > > >> >> e.value='"+hint.getobject()+"';e.style['color']='gray';"); > > >> >> } > > >> >> > > >> >> oncomponenttag(tag) { > > >> >> tag.put("onfocus", "if (this.value='"+hint.getobject()+"') { > > >> >> this.value=''; this.style['color']='black;'}"); > > >> >> } > > >> >> } > > >> >> > > >> >> then just textfield.add(new hint(new model("search"))); > > >> >> > > >> >> -igor > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> On Fri, May 9, 2008 at 4:25 PM, nate roe <[EMAIL PROTECTED]> wrote: > > >> >> > How would one implement "hint text" on a text field in Wicket? > > By > > >> hint > > >> >> text > > >> >> > I mean an empty TextField has greyed out text in it to indicate > > its > > >> >> purpose, > > >> >> > and gets cleared onFocus?) > > >> >> > > > >> >> > Thanks, > > >> >> > Nate Roe > > >> >> > > > >> >> > > >> >> > > - > > >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] > > >> >> For additional commands, e-mail: [EMAIL PROTECTED] > > >> >> > > >> >> > > >> > > > >> > > >> - > > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > > >> For additional commands, e-mail: [EMAIL PROTECTED] > > >> > > >> > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > >
Re: Swarm: Authorization for WebMarkupContainer
Ok, so i did some testing (and in the process found another bug, unrelated to your issue :)), but i could not reproduce your permission denied. Here is my simple setup: public class ContainerPage2 extends SecureWebPage { /** * Construct. */ public ContainerPage2() { add(new Label("label", "always visible")); SecureMarkupContainer container = new SecureMarkupContainer("secure"); container.add(new Label("hidden", "hidden label")); add(container); } /** * Simple secure container. * * @author marrink */ private static final class SecureMarkupContainer extends WebMarkupContainer implements ISecureComponent { /** * */ private static final long serialVersionUID = 1L; /** * * Construct. * * @param id */ public SecureMarkupContainer(String id) { super(id); setSecurityCheck(new ContainerSecurityCheck(this)); } /** * * @see org.apache.wicket.security.components.ISecureComponent#getSecurityCheck() */ public ISecurityCheck getSecurityCheck() { return SecureComponentHelper.getSecurityCheck(this); } /** * * @see org.apache.wicket.security.components.ISecureComponent#isActionAuthorized(java.lang.String) */ public boolean isActionAuthorized(String waspAction) { return SecureComponentHelper.isActionAuthorized(this, waspAction); } /** * * @see org.apache.wicket.security.components.ISecureComponent#isActionAuthorized(org.apache.wicket.security.actions.WaspAction) */ public boolean isActionAuthorized(WaspAction action) { return SecureComponentHelper.isActionAuthorized(this, action); } /** * * @see org.apache.wicket.security.components.ISecureComponent#isAuthenticated() */ public boolean isAuthenticated() { return SecureComponentHelper.isAuthenticated(this); } /** * * @see org.apache.wicket.security.components.ISecureComponent#setSecurityCheck(org.apache.wicket.security.checks.ISecurityCheck) */ public void setSecurityCheck(ISecurityCheck check) { SecureComponentHelper.setSecurityCheck(this, check); } } } and my policy file looks like this: grant principal ${SimplePrincipal} "container4" { //this does not permit secure components on a ContainerPage2 to be visible permission ${ComponentPermission} "${myPackage}.ContainerPage2", "render"; permission ${ComponentPermission} "${myPackage}.ContainerPage2", "enable"; }; grant principal ${SimplePrincipal} "container5" { //this grants the permission to any component with id "secure" on a ContainerPage2 permission ${ComponentPermission} "${myPackage}.ContainerPage2:secure", "inherit, render"; permission ${ComponentPermission} "${myPackage}.ContainerPage2", "enable"; }; grant principal ${SimplePrincipal} "container6" { //this grants the permission to any SecureMarkupContainer inside a ContainerPage2 permission ${ComponentPermission} "${myPackage}.ContainerPage2:${myPackage}.ContainerPage2$SecureMarkupContainer", "inherit, render"; permission ${ComponentPermission} "${myPackage}.ContainerPage2", "enable"; }; grant principal ${SimplePrincipal} "container7" { //this grants the permission to any SecureMarkupContainer, even when placed on other pages (if it wasn't a private class) permission ${ComponentPermission} "${myPackage}.ContainerPage2$SecureMarkupContainer", "inherit, render"; permission ${ComponentPermission} "${myPackage}.ContainerPage2", "enable"; }; Argh, i am only just reading you are using 1.3.1-SNAPSHOT. You should be using 1.3-SNAPSHOT. That does it i am deleting those jars. Maurice On Tue, May 13, 2008 at 8:10 PM, Maurice Marrink <[EMAIL PROTECTED]> wrote: > On Tue, May 13, 2008 at 6:48 PM, Andrea Jahn <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > > I've changed to the 1.3.1-SNAPSHOT version. Therefore I have only replaced > > the constructor PolicyFileHiveFactory() by > > PolicyFileHiveFactory(ActionFac
Re: Using generics with some non-generic classes in Wicket
Johan Compagner wrote: yes thats the reason you are calling the method add with a generified component but that container itself is not generified i dont like this about generics expecially the onces like this: add(MarkupContainer container) then suddenly a none generified component cant be added... thats really stupid should mean anything.. including none generics No, that's not correct. For example, List is much more restrictive than a raw List (which is a List). To a raw list you can add an instance of any type whatever, i.e., list.add(new Object()). But in List the ? is a wildcard which says it could be any type there, i.e., it could be a List. But you can't add a new Object() to a List! Thus MarkupContainer means "MarkupContainer parameterized by some unknown type", and *not* MarkupContainer parameterized by Object, which is what the raw type means. Regards, Sebastiaan johan On Tue, May 13, 2008 at 5:55 PM, Stefan Simik <[EMAIL PROTECTED]> wrote: I have one idea, the reason of the warnigs is, that parent of AjaxPagingNavigator is PagingNavigator, which has parent Panel ---> that is not parameterized. The same problem is with LoopItem, which extends the WebMarkupContainer ---> that is not parameterized. ? could this be the reason ? Stefan Simik wrote: Mhmm, it is meaningful ;) I will know in future, thx One of the last occuring warning is, when working with MarkupContainer#add(...) or #addOrReplace(...) method. Example: I have a simple AjaxPagingNavigator, to which I add a simple ListView --- ListView menu = new ListView("id", numbers){ //populate metods } add(menu);//warning here The warning says: "Type safety: The method add(Component...) belongs to the raw type MarkupContainer. References to generic type MarkupContainer should be parameterized" I cannot find out, what's the warning reason, because ListView self is parameterized. -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17212015.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
Re: DateTextField - what am I missing here?
When you do new PropertyModel(this, "expiryDate"), this refers to your page EditDiscountCode which does not have get/setExpiryDate. Instead of this you should use the model you also pass to the form which contains a DiscountCode. Maurice On Tue, May 13, 2008 at 11:13 PM, V. Jenks <[EMAIL PROTECTED]> wrote: > > I don't know, would it? That's what I'm trying to figure out, the example is > very vague. > > By that logic, I should name pass in "expiryDate" even though I've already > named the field that? I tried: > > > DateTextField expiryDate = new DateTextField( > "expiryDate", > new PropertyModel(this, "expiryDate"), > > new StyleDateConverter("S-", true)); > > expiryDate.add(new DatePicker()); > expiryDate.setRequired(true); > codeForm.add(expiryDate); > > > ...and it fails: > > 52560 [httpSSLWorkerThread-80-4] ERROR org.apache.wicket.RequestCycle - No > > get method defined for class: class > com.agribeef.abcommerce.ui.admin.EditDiscountCode expression: expiryDate > > org.apache.wicket.WicketRuntimeException: No get method defined for class: > class com.agribeef.abcommerce.ui.admin.EditDiscountCode expression: > expiryDate > > This seems rather cumbersome, calendars worked really well in 1.2...I can't > make sense of this. > > Thanks again... > > > > > Gwyn wrote: > > > > From a very quick look, won't your property model value of "date" will > > mean it'll be doing a "getDate()" not "getExpiryDate()"? > > > > /Gwyn > > > > On Tue, May 13, 2008 at 8:38 PM, V. Jenks <[EMAIL PROTECTED]> wrote: > >> > >> Sorry, I'll clarify, was trying to be as condensed as possible. > >> "EditDiscountCode" is the name of the page, which inherits WebPage. > >> > >> The model object of the form, which is my "DiscountCode" entity, does > >> have a > >> getter/setter for the expiryDate field, which is what I showed you in my > >> initial post. > >> > >> @Entity > >> @Table(name="tbl_discount_code") > >> public class DiscountCode implements Serializable > >> { > >> > >> . > >> > >> @Temporal(value=TemporalType.DATE) > >> @Column(nullable=false) > >> private Date expiryDate; > >> > >> . > >> > >> public Date getExpiryDate() > >> { > >> return this.expiryDate; > >> } > >> > >> public void setExpiryDate(Date expiryDate) > >> { > >> this.expiryDate = expiryDate; > >> } > >> } > >> > >> > >> So, I suppose I'm not entirely clear on what you're suggesting? > >> > >> > >> > >> > >> Mr Mean wrote: > >> > > >> > Assuming EditDiscountCode is a wicket component, given the new > >> > PropertyModel(this, "date") You probably want to either use an object > >> > that has a get/setDate (your model object) or add those methods to > >> > your component. > >> > > >> > Maurice > >> > > >> > On Tue, May 13, 2008 at 9:04 PM, V. Jenks <[EMAIL PROTECTED]> wrote: > >> >> > >> >> I must be missing something obvious but I can't spot itI'm using > >> a > >> >> DateTextField (Wicket 1.3.2) in my form like so: > >> >> > >> >> Java: > >> >> DateTextField expiryDate = new DateTextField( > >> >> "expiryDate", > >> >> new PropertyModel(this, "date"), > >> >> new StyleDateConverter("S-", true)); > >> >> > >> >> expiryDate.add(new DatePicker()); > >> >> expiryDate.setRequired(true); > >> >> codeForm.add(expiryDate); > >> >> > >> >> > >> >> HTML: > >> >> > >> >> > >> >> My error: > >> >> org.apache.wicket.WicketRuntimeException: No get method defined for > >> >> class: > >> >> class com.agribeef.abcommerce.ui.admin.EditDiscountCode expression: > >> date > >> >> at > >> >> > >> >> > >> > org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:433) > >> >> at > >> >> > >> >> > >> > org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275) > >> >> at > >> >> > >> >> > >> > org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84) > >> >> at > >> >> > >> >> > >> > org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113) > >> >> at > >> >> org.apache.wicket.Component.getModelObject(Component.java:1551) > >> >> at > >> >> > >> >> > >> > org.apache.wicket.extensions.yui.calendar.DatePicker.configure(DatePicker.java:367) > >> >> at > >> >> > >> >> > >> > org.apache.wicket.extensions.yui.calendar.DatePicker.renderHead(DatePicker.java:208) > >> >> at > >> org.apache.wicket.Component.renderHead(Component.java:2558) > >> >> > >> >> I'm following the example but not sure what this means. > >> >> > >> >> Thanks! > >> >> --
Re: DateTextField - what am I missing here?
I don't know, would it? That's what I'm trying to figure out, the example is very vague. By that logic, I should name pass in "expiryDate" even though I've already named the field that? I tried: DateTextField expiryDate = new DateTextField( "expiryDate", new PropertyModel(this, "expiryDate"), new StyleDateConverter("S-", true)); expiryDate.add(new DatePicker()); expiryDate.setRequired(true); codeForm.add(expiryDate); ...and it fails: 52560 [httpSSLWorkerThread-80-4] ERROR org.apache.wicket.RequestCycle - No get method defined for class: class com.agribeef.abcommerce.ui.admin.EditDiscountCode expression: expiryDate org.apache.wicket.WicketRuntimeException: No get method defined for class: class com.agribeef.abcommerce.ui.admin.EditDiscountCode expression: expiryDate This seems rather cumbersome, calendars worked really well in 1.2...I can't make sense of this. Thanks again... Gwyn wrote: > > From a very quick look, won't your property model value of "date" will > mean it'll be doing a "getDate()" not "getExpiryDate()"? > > /Gwyn > > On Tue, May 13, 2008 at 8:38 PM, V. Jenks <[EMAIL PROTECTED]> wrote: >> >> Sorry, I'll clarify, was trying to be as condensed as possible. >> "EditDiscountCode" is the name of the page, which inherits WebPage. >> >> The model object of the form, which is my "DiscountCode" entity, does >> have a >> getter/setter for the expiryDate field, which is what I showed you in my >> initial post. >> >> @Entity >> @Table(name="tbl_discount_code") >> public class DiscountCode implements Serializable >> { >> >> . >> >> @Temporal(value=TemporalType.DATE) >> @Column(nullable=false) >> private Date expiryDate; >> >> . >> >> public Date getExpiryDate() >> { >> return this.expiryDate; >> } >> >> public void setExpiryDate(Date expiryDate) >> { >> this.expiryDate = expiryDate; >> } >> } >> >> >> So, I suppose I'm not entirely clear on what you're suggesting? >> >> >> >> >> Mr Mean wrote: >> > >> > Assuming EditDiscountCode is a wicket component, given the new >> > PropertyModel(this, "date") You probably want to either use an object >> > that has a get/setDate (your model object) or add those methods to >> > your component. >> > >> > Maurice >> > >> > On Tue, May 13, 2008 at 9:04 PM, V. Jenks <[EMAIL PROTECTED]> wrote: >> >> >> >> I must be missing something obvious but I can't spot itI'm using >> a >> >> DateTextField (Wicket 1.3.2) in my form like so: >> >> >> >> Java: >> >> DateTextField expiryDate = new DateTextField( >> >> "expiryDate", >> >> new PropertyModel(this, "date"), >> >> new StyleDateConverter("S-", true)); >> >> >> >> expiryDate.add(new DatePicker()); >> >> expiryDate.setRequired(true); >> >> codeForm.add(expiryDate); >> >> >> >> >> >> HTML: >> >> >> >> >> >> My error: >> >> org.apache.wicket.WicketRuntimeException: No get method defined for >> >> class: >> >> class com.agribeef.abcommerce.ui.admin.EditDiscountCode expression: >> date >> >> at >> >> >> >> >> org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:433) >> >> at >> >> >> >> >> org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275) >> >> at >> >> >> >> >> org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84) >> >> at >> >> >> >> >> org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113) >> >> at >> >> org.apache.wicket.Component.getModelObject(Component.java:1551) >> >> at >> >> >> >> >> org.apache.wicket.extensions.yui.calendar.DatePicker.configure(DatePicker.java:367) >> >> at >> >> >> >> >> org.apache.wicket.extensions.yui.calendar.DatePicker.renderHead(DatePicker.java:208) >> >> at >> org.apache.wicket.Component.renderHead(Component.java:2558) >> >> >> >> I'm following the example but not sure what this means. >> >> >> >> Thanks! >> >> -- >> >> View this message in context: >> >> >> http://www.nabble.com/DateTextField---what-am-I-missing-here--tp17215983p17215983.html >> >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> >> >> >> >> - >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> > >> > - >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/DateTextField---what-am-I-missing-here--tp
Re: Using generics with some non-generic classes in Wicket
yeah i know just wanted to give an example But Label == String is not the really the same thing as ListView == List.. Because for a Label getModelObject() doesnt have to be a String (it can be anything) but for ListView.getModelObject() does have to be a List.. This is also because our converters sit between modelobject -> string representation. So for a Listview a converter is not really used, as for a label it is used or called for pretty much everytime. johan On Tue, May 13, 2008 at 9:52 PM, Jonathan Locke <[EMAIL PROTECTED]> wrote: > > > have not thought it through. i was just pointing out another option. > in some sense a label shows a string like a listview shows a list. > that's all. > > > Johan Compagner wrote: > > > > cant i have a Label that has a Date as a object? > > That is resolved by the converter for display? > > > > johan > > > > > > On Tue, May 13, 2008 at 6:09 PM, Jonathan Locke < > [EMAIL PROTECTED]> > > wrote: > > > >> > >> > >> well, unless this: > >> > >> public class Label extends WebComponent > >> > >> became: > >> > >> public class Label extends WebComponent > >> > >> not saying this is the right thing to do as it might break a lot of > code, > >> but it would be more precise. > >> > >> > >> Johan Compagner wrote: > >> > > >> > the only thing i can quickly come up with is this > >> > > >> > public ExtendLabel(String id, T string) > >> > { > >> > super(id, new Model(string)); > >> > } > >> > > >> > > >> > > >> > > >> > On Tue, May 13, 2008 at 4:55 PM, Stefan Simik <[EMAIL PROTECTED] > > > >> > wrote: > >> > > >> >> > >> >> Thx Maurice, your are right. I was using Wicket 1.4M1. > >> >> I checked out latest from trunk, and it OK. ;) > >> >> > >> >> So another problematic compiler warning. > >> >> For example simple - subtype of Label, which has model type of > >> anything > >> >> Serializable. > >> >> > >> >> > >> >> > >> >> public class ExtendedLabelextends > >> >> Label { > >> >> > >> >> private IStringProvider stringProvider = null; > >> >> > >> >> > >> >> public ExtendedLabel(String id, IModel model, IStringProvider > >> >> stringProvider) { > >> >>super(id, model); > >> >>this.stringProvider = stringProvider; > >> >> } > >> >> > >> >> public ExtendedLabel(String id, String text) { > >> >>this(id, new Model(text), new BasicStringProvider()); > >> >>//this(id, new Model (text), new > >> BasicStringProvider()); > >> >> //error > >> >> } > >> >> > >> >> } > >> >> > >> >> > >> >> > >> >> > >> >> The problematic part, is the second constructor, which calls this. > Its > >> >> second parameter - "new Model(text)", > >> >> > >> >> which I cannot generify. If I write "new Model(text)", I get an > error: > >> >> "The > >> >> constructor Model(String) is undefined." > >> >> > >> >> > >> >> I can't find out, what I am doing wrong. > >> >> > >> >> > >> >> Thx > >> >> > >> >> Stefan Simik > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> -- > >> >> View this message in context: > >> >> > >> > http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17210525.html > >> >> Sent from the Wicket - User mailing list archive at Nabble.com. > >> >> > >> > > >> > > >> > >> -- > >> View this message in context: > >> > http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-1.4M1-tp17208928p17212325.html > >> Sent from the Wicket - User mailing list archive at Nabble.com. > >> > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-1.4M1-tp17208928p17216943.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Using generics with some non-generic classes in Wicket
have not thought it through. i was just pointing out another option. in some sense a label shows a string like a listview shows a list. that's all. Johan Compagner wrote: > > cant i have a Label that has a Date as a object? > That is resolved by the converter for display? > > johan > > > On Tue, May 13, 2008 at 6:09 PM, Jonathan Locke <[EMAIL PROTECTED]> > wrote: > >> >> >> well, unless this: >> >> public class Label extends WebComponent >> >> became: >> >> public class Label extends WebComponent >> >> not saying this is the right thing to do as it might break a lot of code, >> but it would be more precise. >> >> >> Johan Compagner wrote: >> > >> > the only thing i can quickly come up with is this >> > >> > public ExtendLabel(String id, T string) >> > { >> > super(id, new Model(string)); >> > } >> > >> > >> > >> > >> > On Tue, May 13, 2008 at 4:55 PM, Stefan Simik <[EMAIL PROTECTED]> >> > wrote: >> > >> >> >> >> Thx Maurice, your are right. I was using Wicket 1.4M1. >> >> I checked out latest from trunk, and it OK. ;) >> >> >> >> So another problematic compiler warning. >> >> For example simple - subtype of Label, which has model type of >> anything >> >> Serializable. >> >> >> >> >> >> >> >> public class ExtendedLabelextends >> >> Label { >> >> >> >> private IStringProvider stringProvider = null; >> >> >> >> >> >> public ExtendedLabel(String id, IModel model, IStringProvider >> >> stringProvider) { >> >>super(id, model); >> >>this.stringProvider = stringProvider; >> >> } >> >> >> >> public ExtendedLabel(String id, String text) { >> >>this(id, new Model(text), new BasicStringProvider()); >> >>//this(id, new Model (text), new >> BasicStringProvider()); >> >> //error >> >> } >> >> >> >> } >> >> >> >> >> >> >> >> >> >> The problematic part, is the second constructor, which calls this. Its >> >> second parameter - "new Model(text)", >> >> >> >> which I cannot generify. If I write "new Model(text)", I get an error: >> >> "The >> >> constructor Model(String) is undefined." >> >> >> >> >> >> I can't find out, what I am doing wrong. >> >> >> >> >> >> Thx >> >> >> >> Stefan Simik >> >> >> >> >> >> >> >> >> >> >> >> -- >> >> View this message in context: >> >> >> http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17210525.html >> >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-1.4M1-tp17208928p17212325.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-1.4M1-tp17208928p17216943.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using generics with some non-generic classes in Wicket
i already did the commit just yet.. i did make them all because i think people generally dont want to generify them anyway (use the model object) On Tue, May 13, 2008 at 9:48 PM, Stefan Simik <[EMAIL PROTECTED]> wrote: > > please, and will be these classes later generified ? > Or should I make a RFE, or can I help anyway-for example attach a patch ? > > I love your work and Wicket, so I do my best, to make it better ;) > > Stefan Simik > > > > > > > Johan Compagner wrote: > > > > yes thats the reason > > > > you are calling the method add with a generified component but that > > container itself is not generified > > > > i dont like this about generics expecially the onces like this: > > > > add(MarkupContainer container) > > > > then suddenly a none generified component cant be added... > > thats really stupid should mean anything.. including none generics > > > > johan > > > > > > On Tue, May 13, 2008 at 5:55 PM, Stefan Simik <[EMAIL PROTECTED]> > > wrote: > > > >> > >> I have one idea, > >> > >> the reason of the warnigs is, that parent of AjaxPagingNavigator is > >> PagingNavigator, > >> which has parent Panel ---> that is not parameterized. > >> > >> The same problem is with LoopItem, which extends the > >> WebMarkupContainer ---> that is not parameterized. > >> > >> ? could this be the reason ? > >> > >> > >> > >> > >> > >> > >> Stefan Simik wrote: > >> > > >> > Mhmm, it is meaningful ;) I will know in future, thx > >> > > >> > One of the last occuring warning is, when working with > >> > MarkupContainer#add(...) or #addOrReplace(...) method. > >> > > >> > Example: I have a simple AjaxPagingNavigator, to which I add a > simple > >> > ListView > >> > > --- > >> > ListView menu = new ListView("id", numbers){ > >> > //populate metods > >> > } > >> > add(menu);//warning here > >> > > >> > The warning says: > >> > "Type safety: The method add(Component...) belongs to the raw type > >> > MarkupContainer. > >> > References to generic type MarkupContainer should be > parameterized" > >> > > >> > I cannot find out, what's the warning reason, because ListView self > is > >> > parameterized. > >> > > >> > > >> > >> -- > >> View this message in context: > >> > http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17212015.html > >> Sent from the Wicket - User mailing list archive at Nabble.com. > >> > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-1.4M1-tp17208928p17216869.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Using generics with some non-generic classes in Wicket
please, and will be these classes later generified ? Or should I make a RFE, or can I help anyway-for example attach a patch ? I love your work and Wicket, so I do my best, to make it better ;) Stefan Simik Johan Compagner wrote: > > yes thats the reason > > you are calling the method add with a generified component but that > container itself is not generified > > i dont like this about generics expecially the onces like this: > > add(MarkupContainer container) > > then suddenly a none generified component cant be added... > thats really stupid should mean anything.. including none generics > > johan > > > On Tue, May 13, 2008 at 5:55 PM, Stefan Simik <[EMAIL PROTECTED]> > wrote: > >> >> I have one idea, >> >> the reason of the warnigs is, that parent of AjaxPagingNavigator is >> PagingNavigator, >> which has parent Panel ---> that is not parameterized. >> >> The same problem is with LoopItem, which extends the >> WebMarkupContainer ---> that is not parameterized. >> >> ? could this be the reason ? >> >> >> >> >> >> >> Stefan Simik wrote: >> > >> > Mhmm, it is meaningful ;) I will know in future, thx >> > >> > One of the last occuring warning is, when working with >> > MarkupContainer#add(...) or #addOrReplace(...) method. >> > >> > Example: I have a simple AjaxPagingNavigator, to which I add a simple >> > ListView >> > --- >> > ListView menu = new ListView("id", numbers){ >> > //populate metods >> > } >> > add(menu);//warning here >> > >> > The warning says: >> > "Type safety: The method add(Component...) belongs to the raw type >> > MarkupContainer. >> > References to generic type MarkupContainer should be parameterized" >> > >> > I cannot find out, what's the warning reason, because ListView self is >> > parameterized. >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17212015.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-1.4M1-tp17208928p17216869.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DateTextField - what am I missing here?
>From a very quick look, won't your property model value of "date" will mean it'll be doing a "getDate()" not "getExpiryDate()"? /Gwyn On Tue, May 13, 2008 at 8:38 PM, V. Jenks <[EMAIL PROTECTED]> wrote: > > Sorry, I'll clarify, was trying to be as condensed as possible. > "EditDiscountCode" is the name of the page, which inherits WebPage. > > The model object of the form, which is my "DiscountCode" entity, does have a > getter/setter for the expiryDate field, which is what I showed you in my > initial post. > > @Entity > @Table(name="tbl_discount_code") > public class DiscountCode implements Serializable > { > > . > > @Temporal(value=TemporalType.DATE) > @Column(nullable=false) > private Date expiryDate; > > . > > public Date getExpiryDate() > { > return this.expiryDate; > } > > public void setExpiryDate(Date expiryDate) > { > this.expiryDate = expiryDate; > } > } > > > So, I suppose I'm not entirely clear on what you're suggesting? > > > > > Mr Mean wrote: > > > > Assuming EditDiscountCode is a wicket component, given the new > > PropertyModel(this, "date") You probably want to either use an object > > that has a get/setDate (your model object) or add those methods to > > your component. > > > > Maurice > > > > On Tue, May 13, 2008 at 9:04 PM, V. Jenks <[EMAIL PROTECTED]> wrote: > >> > >> I must be missing something obvious but I can't spot itI'm using a > >> DateTextField (Wicket 1.3.2) in my form like so: > >> > >> Java: > >> DateTextField expiryDate = new DateTextField( > >> "expiryDate", > >> new PropertyModel(this, "date"), > >> new StyleDateConverter("S-", true)); > >> > >> expiryDate.add(new DatePicker()); > >> expiryDate.setRequired(true); > >> codeForm.add(expiryDate); > >> > >> > >> HTML: > >> > >> > >> My error: > >> org.apache.wicket.WicketRuntimeException: No get method defined for > >> class: > >> class com.agribeef.abcommerce.ui.admin.EditDiscountCode expression: date > >> at > >> > >> > org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:433) > >> at > >> > >> > org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275) > >> at > >> > >> > org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84) > >> at > >> > >> > org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113) > >> at > >> org.apache.wicket.Component.getModelObject(Component.java:1551) > >> at > >> > >> > org.apache.wicket.extensions.yui.calendar.DatePicker.configure(DatePicker.java:367) > >> at > >> > >> > org.apache.wicket.extensions.yui.calendar.DatePicker.renderHead(DatePicker.java:208) > >> at org.apache.wicket.Component.renderHead(Component.java:2558) > >> > >> I'm following the example but not sure what this means. > >> > >> Thanks! > >> -- > >> View this message in context: > >> > http://www.nabble.com/DateTextField---what-am-I-missing-here--tp17215983p17215983.html > >> Sent from the Wicket - User mailing list archive at Nabble.com. > >> > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/DateTextField---what-am-I-missing-here--tp17215983p17216684.html > > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DateTextField - what am I missing here?
Sorry, I'll clarify, was trying to be as condensed as possible. "EditDiscountCode" is the name of the page, which inherits WebPage. The model object of the form, which is my "DiscountCode" entity, does have a getter/setter for the expiryDate field, which is what I showed you in my initial post. @Entity @Table(name="tbl_discount_code") public class DiscountCode implements Serializable { . @Temporal(value=TemporalType.DATE) @Column(nullable=false) private Date expiryDate; . public Date getExpiryDate() { return this.expiryDate; } public void setExpiryDate(Date expiryDate) { this.expiryDate = expiryDate; } } So, I suppose I'm not entirely clear on what you're suggesting? Mr Mean wrote: > > Assuming EditDiscountCode is a wicket component, given the new > PropertyModel(this, "date") You probably want to either use an object > that has a get/setDate (your model object) or add those methods to > your component. > > Maurice > > On Tue, May 13, 2008 at 9:04 PM, V. Jenks <[EMAIL PROTECTED]> wrote: >> >> I must be missing something obvious but I can't spot itI'm using a >> DateTextField (Wicket 1.3.2) in my form like so: >> >> Java: >> DateTextField expiryDate = new DateTextField( >> "expiryDate", >> new PropertyModel(this, "date"), >> new StyleDateConverter("S-", true)); >> >> expiryDate.add(new DatePicker()); >> expiryDate.setRequired(true); >> codeForm.add(expiryDate); >> >> >> HTML: >> >> >> My error: >> org.apache.wicket.WicketRuntimeException: No get method defined for >> class: >> class com.agribeef.abcommerce.ui.admin.EditDiscountCode expression: date >> at >> >> org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:433) >> at >> >> org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275) >> at >> >> org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84) >> at >> >> org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113) >> at >> org.apache.wicket.Component.getModelObject(Component.java:1551) >> at >> >> org.apache.wicket.extensions.yui.calendar.DatePicker.configure(DatePicker.java:367) >> at >> >> org.apache.wicket.extensions.yui.calendar.DatePicker.renderHead(DatePicker.java:208) >> at org.apache.wicket.Component.renderHead(Component.java:2558) >> >> I'm following the example but not sure what this means. >> >> Thanks! >> -- >> View this message in context: >> http://www.nabble.com/DateTextField---what-am-I-missing-here--tp17215983p17215983.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/DateTextField---what-am-I-missing-here--tp17215983p17216684.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using generics with some non-generic classes in Wicket
yes thats the reason you are calling the method add with a generified component but that container itself is not generified i dont like this about generics expecially the onces like this: add(MarkupContainer container) then suddenly a none generified component cant be added... thats really stupid should mean anything.. including none generics johan On Tue, May 13, 2008 at 5:55 PM, Stefan Simik <[EMAIL PROTECTED]> wrote: > > I have one idea, > > the reason of the warnigs is, that parent of AjaxPagingNavigator is > PagingNavigator, > which has parent Panel ---> that is not parameterized. > > The same problem is with LoopItem, which extends the > WebMarkupContainer ---> that is not parameterized. > > ? could this be the reason ? > > > > > > > Stefan Simik wrote: > > > > Mhmm, it is meaningful ;) I will know in future, thx > > > > One of the last occuring warning is, when working with > > MarkupContainer#add(...) or #addOrReplace(...) method. > > > > Example: I have a simple AjaxPagingNavigator, to which I add a simple > > ListView > > --- > > ListView menu = new ListView("id", numbers){ > > //populate metods > > } > > add(menu);//warning here > > > > The warning says: > > "Type safety: The method add(Component...) belongs to the raw type > > MarkupContainer. > > References to generic type MarkupContainer should be parameterized" > > > > I cannot find out, what's the warning reason, because ListView self is > > parameterized. > > > > > > -- > View this message in context: > http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17212015.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Using generics with some non-generic classes in Wicket
cant i have a Label that has a Date as a object? That is resolved by the converter for display? johan On Tue, May 13, 2008 at 6:09 PM, Jonathan Locke <[EMAIL PROTECTED]> wrote: > > > well, unless this: > > public class Label extends WebComponent > > became: > > public class Label extends WebComponent > > not saying this is the right thing to do as it might break a lot of code, > but it would be more precise. > > > Johan Compagner wrote: > > > > the only thing i can quickly come up with is this > > > > public ExtendLabel(String id, T string) > > { > > super(id, new Model(string)); > > } > > > > > > > > > > On Tue, May 13, 2008 at 4:55 PM, Stefan Simik <[EMAIL PROTECTED]> > > wrote: > > > >> > >> Thx Maurice, your are right. I was using Wicket 1.4M1. > >> I checked out latest from trunk, and it OK. ;) > >> > >> So another problematic compiler warning. > >> For example simple - subtype of Label, which has model type of > anything > >> Serializable. > >> > >> > >> > >> public class ExtendedLabelextends > >> Label { > >> > >> private IStringProvider stringProvider = null; > >> > >> > >> public ExtendedLabel(String id, IModel model, IStringProvider > >> stringProvider) { > >>super(id, model); > >>this.stringProvider = stringProvider; > >> } > >> > >> public ExtendedLabel(String id, String text) { > >>this(id, new Model(text), new BasicStringProvider()); > >>//this(id, new Model (text), new BasicStringProvider()); > >> //error > >> } > >> > >> } > >> > >> > >> > >> > >> The problematic part, is the second constructor, which calls this. Its > >> second parameter - "new Model(text)", > >> > >> which I cannot generify. If I write "new Model(text)", I get an error: > >> "The > >> constructor Model(String) is undefined." > >> > >> > >> I can't find out, what I am doing wrong. > >> > >> > >> Thx > >> > >> Stefan Simik > >> > >> > >> > >> > >> > >> -- > >> View this message in context: > >> > http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17210525.html > >> Sent from the Wicket - User mailing list archive at Nabble.com. > >> > > > > > > -- > View this message in context: > http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-1.4M1-tp17208928p17212325.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: DateTextField - what am I missing here?
Assuming EditDiscountCode is a wicket component, given the new PropertyModel(this, "date") You probably want to either use an object that has a get/setDate (your model object) or add those methods to your component. Maurice On Tue, May 13, 2008 at 9:04 PM, V. Jenks <[EMAIL PROTECTED]> wrote: > > I must be missing something obvious but I can't spot itI'm using a > DateTextField (Wicket 1.3.2) in my form like so: > > Java: > DateTextField expiryDate = new DateTextField( > "expiryDate", > new PropertyModel(this, "date"), > new StyleDateConverter("S-", true)); > > expiryDate.add(new DatePicker()); > expiryDate.setRequired(true); > codeForm.add(expiryDate); > > > HTML: > > > My error: > org.apache.wicket.WicketRuntimeException: No get method defined for class: > class com.agribeef.abcommerce.ui.admin.EditDiscountCode expression: date > at > > org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:433) > at > > org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275) > at > > org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84) > at > > org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113) > at org.apache.wicket.Component.getModelObject(Component.java:1551) > at > > org.apache.wicket.extensions.yui.calendar.DatePicker.configure(DatePicker.java:367) > at > > org.apache.wicket.extensions.yui.calendar.DatePicker.renderHead(DatePicker.java:208) > at org.apache.wicket.Component.renderHead(Component.java:2558) > > I'm following the example but not sure what this means. > > Thanks! > -- > View this message in context: > http://www.nabble.com/DateTextField---what-am-I-missing-here--tp17215983p17215983.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JPA suggestions?
You could also see http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Iolite , at some point Iolite will evolve into a little more sophisticated solution than now but you should get some of the idea anyhow. http://cwiki.apache.org/WICKET/blog-tutorial.html David Nedrow wrote: I have a data "driver" package built around JPA and an Entity Manager Factory (javax.persistence.EntityManagerFactory). This is currently used by a couple of standalone applications and works well. What is the best way to leverage this package in the context of a Wicket-based web application? IE., how best to instantiate the factory (if necessary) and/or use the DAOs. Should this happen at the wicket application level, or somehow page/panel-based? Thanks for any pointers, -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DateTextField - what am I missing here?
I must be missing something obvious but I can't spot itI'm using a DateTextField (Wicket 1.3.2) in my form like so: Java: DateTextField expiryDate = new DateTextField( "expiryDate", new PropertyModel(this, "date"), new StyleDateConverter("S-", true)); expiryDate.add(new DatePicker()); expiryDate.setRequired(true); codeForm.add(expiryDate); HTML: My error: org.apache.wicket.WicketRuntimeException: No get method defined for class: class com.agribeef.abcommerce.ui.admin.EditDiscountCode expression: date at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:433) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275) at org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84) at org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113) at org.apache.wicket.Component.getModelObject(Component.java:1551) at org.apache.wicket.extensions.yui.calendar.DatePicker.configure(DatePicker.java:367) at org.apache.wicket.extensions.yui.calendar.DatePicker.renderHead(DatePicker.java:208) at org.apache.wicket.Component.renderHead(Component.java:2558) I'm following the example but not sure what this means. Thanks! -- View this message in context: http://www.nabble.com/DateTextField---what-am-I-missing-here--tp17215983p17215983.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Swarm: Authorization for WebMarkupContainer
On Tue, May 13, 2008 at 6:48 PM, Andrea Jahn <[EMAIL PROTECTED]> wrote: > > Hi, > > I've changed to the 1.3.1-SNAPSHOT version. Therefore I have only replaced > the constructor PolicyFileHiveFactory() by > PolicyFileHiveFactory(ActionFactory). > The result was the same as with version 1.3.0 (resultHiddenPanel not visible > and the same output in the logfile). Are you using the SwarmPolicyFileHiveFactory? see http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Security+1.3.1#Wicket-Security1.3.1-migrateto1.3.1 > > Then I changed the ContainerSecurityCheck with a ComponentSecurityCheck in > the class SecureWebMarkupContainer. > The resultHiddenPanel now is always visible (also when the user has not the > permission). Well like i said earlier permission ${ComponentPermission} "xxx.yyy.zzz.front.ProductAreaListPage", "inherit, render"; is sufficient to allow the entire page to be rendered, does your policy file contain another grant statement with a similar permission? > > Logfile: > > 2008-05-13 18:30:30,880 DEBUG > org.apache.wicket.security.hive.BasicHive.hasPermission(BasicHive.java:214) - > Subjects[HashKey: 821489378, sortOrder 0 = [EMAIL PROTECTED] [mailto:[EMAIL > PROTECTED] implies > org.apache.wicket.security.hive.authorization.permissions.ComponentPermission > "xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel" "access, render" > > 2008-05-13 18:30:32,583 DEBUG > org.apache.wicket.security.hive.BasicHive.hasPermission(BasicHive.java:188) - > Subjects[HashKey: 821489378, sortOrder 0 = [EMAIL PROTECTED] [mailto:[EMAIL > PROTECTED] has a cached match for > org.apache.wicket.security.hive.authorization.permissions.ComponentPermission > "xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel" "access, render", > result true > > > Perhaps I have made another mistake ? Hmm, the ContainerSecurityCheck should have worked, let me see if i can reproduce that with a test. > > > > Maurice, > > thank you very much for the quick replies ! > Should I (or could you) delete my first question from the "Getting started > with SWARM" page, as it was the wrong place to post the question ? > Deleted. Maurice - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket Stuff devs - teamcity is open for registration
You should have enough now Frank On Tue, May 13, 2008 at 7:57 PM, Martin Funk <[EMAIL PROTECTED]> wrote: > Hi, > > may someone please grant me some karma to manage my own build configuration? > > username: funkattack > projects: wicket-contrib-gmap2, wicket-contrib-gmap2-examples > > mf > > 2008/5/5 Martijn Dashorst <[EMAIL PROTECTED]>: > > > > > We have moved our build server to run on teamcity. Our previous > > software was not up to par. I have picked Teamcity because it was the > > quickest to setup securely at 1am in the morning (yes I've looked at > > hudson), several of the core committers use the product in their > > companies and we don't have a problem with using commercial software > > for free :) > > > > You can register yourself on our teamcity server: > > > >http://wicketstuff.org/teamcity > > > > This doesn't give you the ability to add projects/build > > configurations, but it will make our lives much easier to grant you > > that ability. > > > > Registration is available to all project maintainers on Wicket Stuff > > and other Wicket related open source projects (Wicket Web Beans comes > > to mind). > > > > Add your account and reply in this thread when you are done. Please > > provide the projects you are maintaining or want to maintain (this > > gives me an overview of who does what). One of the teamcity admins > > will grant you the ability to manage your own build configuration. > > > > I'm sorry that all the effort that went into configuring bamboo is now > > naught, however I am confident that teamcity will help us throughout > > 2008 and beyond in managing our builds. > > > > Martijn > > > > -- > > Buy Wicket in Action: http://manning.com/dashorst > > Apache Wicket 1.3.3 is released > > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3 > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket Stuff devs - teamcity is open for registration
Hi, may someone please grant me some karma to manage my own build configuration? username: funkattack projects: wicket-contrib-gmap2, wicket-contrib-gmap2-examples mf 2008/5/5 Martijn Dashorst <[EMAIL PROTECTED]>: > We have moved our build server to run on teamcity. Our previous > software was not up to par. I have picked Teamcity because it was the > quickest to setup securely at 1am in the morning (yes I've looked at > hudson), several of the core committers use the product in their > companies and we don't have a problem with using commercial software > for free :) > > You can register yourself on our teamcity server: > >http://wicketstuff.org/teamcity > > This doesn't give you the ability to add projects/build > configurations, but it will make our lives much easier to grant you > that ability. > > Registration is available to all project maintainers on Wicket Stuff > and other Wicket related open source projects (Wicket Web Beans comes > to mind). > > Add your account and reply in this thread when you are done. Please > provide the projects you are maintaining or want to maintain (this > gives me an overview of who does what). One of the teamcity admins > will grant you the ability to manage your own build configuration. > > I'm sorry that all the effort that went into configuring bamboo is now > naught, however I am confident that teamcity will help us throughout > 2008 and beyond in managing our builds. > > Martijn > > -- > Buy Wicket in Action: http://manning.com/dashorst > Apache Wicket 1.3.3 is released > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3 > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: JPA suggestions?
It really depends on your preferences. Either a databinder (using JPA related classes directly in your UI code) or a DAO/ services based approach will work. Eelco On Tue, May 13, 2008 at 8:29 AM, David Nedrow <[EMAIL PROTECTED]> wrote: > I have a data "driver" package built around JPA and an Entity Manager > Factory (javax.persistence.EntityManagerFactory). This is currently used by > a couple of standalone applications and works well. > > What is the best way to leverage this package in the context of a > Wicket-based web application? IE., how best to instantiate the factory (if > necessary) and/or use the DAOs. Should this happen at the wicket application > level, or somehow page/panel-based? > > Thanks for any pointers, > > -David > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Swarm: Authorization for WebMarkupContainer
Hi, I've changed to the 1.3.1-SNAPSHOT version. Therefore I have only replaced the constructor PolicyFileHiveFactory() by PolicyFileHiveFactory(ActionFactory). The result was the same as with version 1.3.0 (resultHiddenPanel not visible and the same output in the logfile). Then I changed the ContainerSecurityCheck with a ComponentSecurityCheck in the class SecureWebMarkupContainer. The resultHiddenPanel now is always visible (also when the user has not the permission). Logfile: 2008-05-13 18:30:30,880 DEBUG org.apache.wicket.security.hive.BasicHive.hasPermission(BasicHive.java:214) - Subjects[HashKey: 821489378, sortOrder 0 = [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] implies org.apache.wicket.security.hive.authorization.permissions.ComponentPermission "xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel" "access, render" 2008-05-13 18:30:32,583 DEBUG org.apache.wicket.security.hive.BasicHive.hasPermission(BasicHive.java:188) - Subjects[HashKey: 821489378, sortOrder 0 = [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] has a cached match for org.apache.wicket.security.hive.authorization.permissions.ComponentPermission "xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel" "access, render", result true Perhaps I have made another mistake ? Maurice, thank you very much for the quick replies ! Should I (or could you) delete my first question from the "Getting started with SWARM" page, as it was the wrong place to post the question ? Thanks Andrea *Von:* users@wicket.apache.org *Gesendet:* 13.05.08 15:24:38 *An:* users@wicket.apache.org *Betreff:* Re: Swarm: Authorization for WebMarkupContainer Meaning either use the ComponentSecurityCheck or the snapshot version. not that stuff about changing the policy file. Mauirce On Tue, May 13, 2008 at 3:21 PM, Maurice Marrink <[EMAIL PROTECTED]> wrote: > Ah got it, must have been looking with my wrong glasses on earlier :) > You are using version 1.3.0 that version of SecureContainerCheck only > checks the class of the container, hence the message about missing > permissions for SecureWebMarkupContainer. > permission ${ComponentPermission} > "xxx.yyy.zzz.front.SecureWebMarkupContainer", "inherit, render, > enable"; > should do the trick, however this will enable every > SecurewebMarkupContainer in your application which might not be what > you want. > > There are several other options you can try: > -replace the ContainerSecurityCheck with a ComponentSecurityCheck > -switch to version 1.3-SNAPHOT, the ContainerSecurityCheck has been > modified to deal with this type of situation (i.e. check component > id's too) along with some more stuff to improve permission > inheritance. > -extend ContainersecurityCheck and overwrite isActionAuthorized with > the following code: > > public boolean isActionAuthorized(WaspAction action) > { > if (enableAuthentication && !isAuthenticated()) > throw new RestartResponseAtInterceptPageException(getLoginPage()); > boolean result = getStrategy().isComponentAuthorized(getComponent(), action) > || getStrategy().isClassAuthorized(getComponent().getClass(), action); > if (result && checkSecureModel() && > SecureComponentHelper.hasSecureModel(getComponent())) > return ((ISecureModel)getComponent().getModel()).isAuthorized(getComponent(), > action); > return result; > } > This code comes from 1.3-SNAPSHOT but should be sufficient to work in > your case. > > I recommend either option 1 or 2 depending on how comfortable you are > with snapshots > > Maurice > > > > On Tue, May 13, 2008 at 2:46 PM, Andrea Jahn <[EMAIL PROTECTED]> wrote: > > > > > > > > Hi, > > > > here the code again without the linebreaks: > > > > Hive: > > > > > > 01 // pages allowed for all users > > 02 grant > > 03 { > > > > 04 permission ${ComponentPermission} "xxx.yyy.zzz.front.Login", "inherit, > > render"; > > > > 05 permission ${ComponentPermission} "xxx.yyy.zzz.front.Login", "enable"; > > > > 06 permission ${ComponentPermission} "xxx.yyy.zzz.front.Welcome", "inherit, > > render"; > > > > 07 permission ${ComponentPermission} "xxx.yyy.zzz.front.Welcome", "enable"; > > 08 > > 09 }; > > 10 > > > > 11 grant principal > > org.apache.wicket.security.hive.authorization.SimplePrincipal "APPL_ADMIN" > > 12 { > > > > 13 // Menu Administration - Product areas > > > > 14 permission ${ComponentPermission} > > "xxx.yyy.zzz.front.ProductAreaListPage", "inherit, render"; > > > > 15 permission ${ComponentPermission} > > "xxx.yyy.zzz.front.ProductAreaListPage", "enable"; > > 16 > > > > 17 // Product area list page - Hidden panel > > > > 18 permission ${ComponentPermission} > > "xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel", "inherit, > > render, enable"; > > > > 19 permission ${ComponentPermission} > > "xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel", "enable"; > > 20 }; > > 21 > > 22 > > > > > > Application.log > > > > > > 2008-05-13 12:26:14,566 DEBUG > > org.apache.wicket.security.hive.config.PolicyFileHiveFactory.
Re: Using generics with some non-generic classes in Wicket
well, unless this: public class Label extends WebComponent became: public class Label extends WebComponent not saying this is the right thing to do as it might break a lot of code, but it would be more precise. Johan Compagner wrote: > > the only thing i can quickly come up with is this > > public ExtendLabel(String id, T string) > { > super(id, new Model(string)); > } > > > > > On Tue, May 13, 2008 at 4:55 PM, Stefan Simik <[EMAIL PROTECTED]> > wrote: > >> >> Thx Maurice, your are right. I was using Wicket 1.4M1. >> I checked out latest from trunk, and it OK. ;) >> >> So another problematic compiler warning. >> For example simple - subtype of Label, which has model type of anything >> Serializable. >> >> >> >> public class ExtendedLabelextends >> Label { >> >> private IStringProvider stringProvider = null; >> >> >> public ExtendedLabel(String id, IModel model, IStringProvider >> stringProvider) { >>super(id, model); >>this.stringProvider = stringProvider; >> } >> >> public ExtendedLabel(String id, String text) { >>this(id, new Model(text), new BasicStringProvider()); >>//this(id, new Model (text), new BasicStringProvider()); >> //error >> } >> >> } >> >> >> >> >> The problematic part, is the second constructor, which calls this. Its >> second parameter - "new Model(text)", >> >> which I cannot generify. If I write "new Model(text)", I get an error: >> "The >> constructor Model(String) is undefined." >> >> >> I can't find out, what I am doing wrong. >> >> >> Thx >> >> Stefan Simik >> >> >> >> >> >> -- >> View this message in context: >> http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17210525.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> > > -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-1.4M1-tp17208928p17212325.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using generics with some non-generic classes in Wicket
I have one idea, the reason of the warnigs is, that parent of AjaxPagingNavigator is PagingNavigator, which has parent Panel ---> that is not parameterized. The same problem is with LoopItem, which extends the WebMarkupContainer ---> that is not parameterized. ? could this be the reason ? Stefan Simik wrote: > > Mhmm, it is meaningful ;) I will know in future, thx > > One of the last occuring warning is, when working with > MarkupContainer#add(...) or #addOrReplace(...) method. > > Example: I have a simple AjaxPagingNavigator, to which I add a simple > ListView > --- > ListView menu = new ListView("id", numbers){ > //populate metods > } > add(menu);//warning here > > The warning says: > "Type safety: The method add(Component...) belongs to the raw type > MarkupContainer. > References to generic type MarkupContainer should be parameterized" > > I cannot find out, what's the warning reason, because ListView self is > parameterized. > > -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17212015.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using generics with some non-generic classes in Wicket
Mhmm, it is meaningful ;) I will know in future, thx One of the last occuring warning is, when working with MarkupContainer#add(...) or #addOrReplace(...) method. Example: I have a simple AjaxPagingNavigator, to which I add a simple ListView --- ListView menu = new ListView("id", numbers){ //populate metods } add(menu);//warning here The warning says: "Type safety: The method add(Component...) belongs to the raw type MarkupContainer. References to generic type MarkupContainer should be parameterized" I cannot find out, what's the warning reason, because ListView self is parameterized. -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17211948.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with CheckBox and CheckGroup
There is no such thing as setSelected(true). You'll have work with a model like: new CheckBox("checkbox", new PropertyModel(yourModel, "checkboxSelected")); in that case you can lookup your model like yourModel.getCheckboxSelected(); (which you could do in your onUpdate()) You can select your checkbox in the same way by updating your model. Rob Dubois, Fabien wrote: Hi everybody, I need really your help. In a form, from the bdd, I create checkgroups with checkgroupselectors. This checkgroup works fine with the Check. But a want to add a Checkbox with thanks to AjaxBehavior can select or unselect all the checkgroup. But I don't succed. This is the part of my code : CheckBox group_all = new CheckBox("select_all", new Model()); group_all.add(new Label("select_all", "Selectionner tous les projets")); group_all.add(new AjaxFormComponentUpdatingBehavior("onchange") { private static final long serialVersionUID = 1L; protected void onUpdate(AjaxRequestTarget target) { for (int i = 0 ; i < list_checkgroup.size() ; i++){ CheckGroup check = (CheckGroup)list_checkgroup.get(i); log.info("Test1 : "+check.getModelObjectAsString()); -> print [] log.info("Test2 : "+check.getModel().getObject()); --> print [] check.getModel().setObject(true); --> no working target.addComponent(check); } } }); // parametrage de la listview desfile this.listview_domaine = new ListView("listview_domaine", list_domaine) { private static final long serialVersionUID = 1L; protected void populateItem(ListItem listItem) { final TDomaine domaine = (TDomaine)listItem.getModelObject(); listItem.add(new Label("nom_domaine", domaine.getNom())); list_sousdomaine = CDataFromBDD.getListSousDomaine(domaine.getNom()); listview_sousdomaine = new ListView("listview_sousdomaine", list_sousdomaine) { private static final long serialVersionUID = 1L; protected void populateItem(ListItem listItem) { final TSousDomaine sousdomaine = (TSousDomaine)listItem.getModelObject(); group_sousdomaine = new CheckGroup("group_sousdomaine",new ArrayList()); -> create the checkgroup group_sousdomaine.setOutputMarkupId(true); group_sousdomaine.setRenderBodyOnly(false); CheckGroupSelector checkgroup_sousdomaine = new CheckGroupSelector("groupselector_sousdomaine"); checkgroup_sousdomaine.add(new Label("nom_sousdomaine", sousdomaine.getNom())); group_sousdomaine.add(checkgroup_sousdomaine); -> add the CheckGroupSelector list_projet = CDataFromBDD.getListProjet(sousdomaine.getNom()); listview_projet = new ListView("listview_projet", list_projet) { private static final long serialVersionUID = 1L; protected void populateItem(ListItem listItem) { final TProjet projet = (TProjet)listItem.getModelObject(); TInformationsGenerales info_gen = CDataFromBDD.getInfoGen(projet.getIdProjet()); TVersion version = CDataFromBDD.getVersion(info_gen.getIdInformationGen()); listItem.add(new Check("checkbox_projet", new Model())); listItem.add(new Label("name_projet", info_gen.getNom())); listItem.add(new Label("version_projet", version.getNumVersion())); } }; group_sousdomaine.add(listview_projet); list_checkgroup.add(group_sousdomaine); -> save the CheckGroup objet in a ArrayList listItem.add(group_sousdomaine); } }; listItem.add(listview_sousdomaine); } }; The first problem is that I can't get back the value of checgroups : for every one, is there selected or unselected ? The second problem Is how can I set the checkgroup to selected or unselected ? Thank you very much for your help :-) - To unsubscribe, e-mail: [EMAIL PRO
Re: [inmethod-grid] javascript error closing modal window containing grid
Hi, I'll look at it as soon as I get some spare time. In the meanwhile, can you try putting the modal window in a wicket form and see if that helps? -Matej On Tue, May 13, 2008 at 5:23 PM, ChuckDeal <[EMAIL PROTECTED]> wrote: > > I am experiencing a javascript error when closing a ModalWindow that > contains an inmethod-grid control. I am having trouble tracking where the > error originates. Could anyone offer some advice on how to begin > debugging an error with the ModalDialog? > > This is a quickstart that shows the problem. On the home page, click the > link to open the modal dialog. Then simply click the close button of the > dialog. When the dialog disappears, the js error message will be > available. > > http://www.nabble.com/file/p17211224/modal-grid.zip modal-grid.zip > > I am using IE 6 on WinXPProSP2 > > Chuck > -- > View this message in context: > http://www.nabble.com/-inmethod-grid--javascript-error-closing-modal-window-containing-grid-tp17211224p17211224.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Resizable and reorderable grid components. http://www.inmethod.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JPA suggestions?
Have you looked into using Spring's JPA support? On Tue, May 13, 2008 at 11:29 AM, David Nedrow <[EMAIL PROTECTED]> wrote: > I have a data "driver" package built around JPA and an Entity Manager > Factory (javax.persistence.EntityManagerFactory). This is currently used by > a couple of standalone applications and works well. > > What is the best way to leverage this package in the context of a > Wicket-based web application? IE., how best to instantiate the factory (if > necessary) and/or use the DAOs. Should this happen at the wicket application > level, or somehow page/panel-based? > > Thanks for any pointers, > > -David > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JPA suggestions?
I have a data "driver" package built around JPA and an Entity Manager Factory (javax.persistence.EntityManagerFactory). This is currently used by a couple of standalone applications and works well. What is the best way to leverage this package in the context of a Wicket-based web application? IE., how best to instantiate the factory (if necessary) and/or use the DAOs. Should this happen at the wicket application level, or somehow page/panel-based? Thanks for any pointers, -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using generics with some non-generic classes in Wicket
no String != T and the super constructor wants to have T not String. and i think you cant in that constructor ok T == String so String is valid.. i have no idea how to do that. johan On Tue, May 13, 2008 at 5:23 PM, Stefan Simik <[EMAIL PROTECTED]> wrote: > > Uuf, great :) It works ! Thx. > > But, is not String something Serializable ? > I cannot understand where was the problem, > but I know, this is more about Java Generics, not about Wicket. > > > > > Johan Compagner wrote: > > > > the only thing i can quickly come up with is this > > > > public ExtendLabel(String id, T string) > > { > > super(id, new Model(string)); > > } > > > > -- > View this message in context: > http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17211220.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
[inmethod-grid] javascript error closing modal window containing grid
I am experiencing a javascript error when closing a ModalWindow that contains an inmethod-grid control. I am having trouble tracking where the error originates. Could anyone offer some advice on how to begin debugging an error with the ModalDialog? This is a quickstart that shows the problem. On the home page, click the link to open the modal dialog. Then simply click the close button of the dialog. When the dialog disappears, the js error message will be available. http://www.nabble.com/file/p17211224/modal-grid.zip modal-grid.zip I am using IE 6 on WinXPProSP2 Chuck -- View this message in context: http://www.nabble.com/-inmethod-grid--javascript-error-closing-modal-window-containing-grid-tp17211224p17211224.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using generics with some non-generic classes in Wicket
Uuf, great :) It works ! Thx. But, is not String something Serializable ? I cannot understand where was the problem, but I know, this is more about Java Generics, not about Wicket. Johan Compagner wrote: > > the only thing i can quickly come up with is this > > public ExtendLabel(String id, T string) > { > super(id, new Model(string)); > } > -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17211220.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Inmethod Grid patch for Wicket 1.4-m1
Hello Matej, all, Ah, that is good to hear. The patch makes grid trunk in sync with wicket-1.4-m1. There might be differences with wicket-1.4 trunk? In any case, we could not build grid trunk with wicket-1.4-m1 when we retrieved it (last Friday). So please Matej, do not apply this patch on your repository :) Regards, Erik. Matej Knopp wrote: > Grid trunk is 1.4 of course. But it's kept in sync with 1.4 trunk. Why > would Your patch basically reverses that, why would I want to apply > it? :) > > -Matej > > On Tue, May 13, 2008 at 3:31 PM, Johan Compagner <[EMAIL PROTECTED]> wrote: > >> i guess Matej wil gladly apply it for you >> Except that Matej then has to branch... i what does he like that... :) >> >> johan >> >> >> On Tue, May 13, 2008 at 11:02 AM, Erik van Oosten <[EMAIL PROTECTED]> >> wrote: >> >> >> >> > Hello, >> > >> > Inmethod Grid does not support Wicket 1.4 currently. Apply the attached >> > patch (created by my colleague Job de Noo) to the trunk version to get >> > it running again. >> > >> > Have fun, >> >Erik. >> > >> > >> > -- >> > Erik van Oosten >> > http://day-to-day-stuff.blogspot.com/ >> > >> > >> > >> > - >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> >> > > > > -- -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using generics with some non-generic classes in Wicket
the only thing i can quickly come up with is this public ExtendLabel(String id, T string) { super(id, new Model(string)); } On Tue, May 13, 2008 at 4:55 PM, Stefan Simik <[EMAIL PROTECTED]> wrote: > > Thx Maurice, your are right. I was using Wicket 1.4M1. > I checked out latest from trunk, and it OK. ;) > > So another problematic compiler warning. > For example simple - subtype of Label, which has model type of anything > Serializable. > > > > public class ExtendedLabelextends > Label { > > private IStringProvider stringProvider = null; > > > public ExtendedLabel(String id, IModel model, IStringProvider > stringProvider) { >super(id, model); >this.stringProvider = stringProvider; > } > > public ExtendedLabel(String id, String text) { >this(id, new Model(text), new BasicStringProvider()); >//this(id, new Model (text), new BasicStringProvider()); > //error > } > > } > > > > > The problematic part, is the second constructor, which calls this. Its > second parameter - "new Model(text)", > > which I cannot generify. If I write "new Model(text)", I get an error: > "The > constructor Model(String) is undefined." > > > I can't find out, what I am doing wrong. > > > Thx > > Stefan Simik > > > > > > -- > View this message in context: > http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17210525.html > Sent from the Wicket - User mailing list archive at Nabble.com. >
Re: Using generics with some non-generic classes in Wicket
Thx Maurice, your are right. I was using Wicket 1.4M1. I checked out latest from trunk, and it OK. ;) So another problematic compiler warning. For example simple - subtype of Label, which has model type of anything Serializable. public class ExtendedLabelextends Label { private IStringProvider stringProvider = null; public ExtendedLabel(String id, IModel model, IStringProvider stringProvider) { super(id, model); this.stringProvider = stringProvider; } public ExtendedLabel(String id, String text) { this(id, new Model(text), new BasicStringProvider()); //this(id, new Model (text), new BasicStringProvider()); //error } } The problematic part, is the second constructor, which calls this. Its second parameter - "new Model(text)", which I cannot generify. If I write "new Model(text)", I get an error: "The constructor Model(String) is undefined." I can't find out, what I am doing wrong. Thx Stefan Simik -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17210525.html Sent from the Wicket - User mailing list archive at Nabble.com.
Re: Inmethod Grid patch for Wicket 1.4-m1
Grid trunk is 1.4 of course. But it's kept in sync with 1.4 trunk. Why would Your patch basically reverses that, why would I want to apply it? :) -Matej On Tue, May 13, 2008 at 3:31 PM, Johan Compagner <[EMAIL PROTECTED]> wrote: > i guess Matej wil gladly apply it for you > Except that Matej then has to branch... i what does he like that... :) > > johan > > > On Tue, May 13, 2008 at 11:02 AM, Erik van Oosten <[EMAIL PROTECTED]> > wrote: > > > > > Hello, > > > > Inmethod Grid does not support Wicket 1.4 currently. Apply the attached > > patch (created by my colleague Job de Noo) to the trunk version to get > > it running again. > > > > Have fun, > >Erik. > > > > > > -- > > Erik van Oosten > > http://day-to-day-stuff.blogspot.com/ > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- Resizable and reorderable grid components. http://www.inmethod.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using generics with some non-generic classes in Wicket
It is generified in trunk, but it might be possible that it was not yet at the time of the 1.4-m1 release. Maurice On Tue, May 13, 2008 at 3:47 PM, Stefan Simik <[EMAIL PROTECTED]> wrote: > > Hi boys, > > I would like to ask something about wicket generics. I have a warning, that > I don't know, how to solve. > > For example in such a line: > > IModel model = new StringResourceModel( ... ); > > I have a warning, which I cannot remove: > --- > Type safety: The expression of type StringResourceModel needs unchecked > conversion to conform to IModel > > > Why is the StringResourceModel (and some other classes) not generified ? > Will they be later, > or is there any problem with generifying of these classes ? > > Thx, > Stefan Simik > > > > > -- > View this message in context: > http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17208928.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using generics with some non-generic classes in Wicket
Hi boys, I would like to ask something about wicket generics. I have a warning, that I don't know, how to solve. For example in such a line: IModel model = new StringResourceModel( ... ); I have a warning, which I cannot remove: --- Type safety: The expression of type StringResourceModel needs unchecked conversion to conform to IModel Why is the StringResourceModel (and some other classes) not generified ? Will they be later, or is there any problem with generifying of these classes ? Thx, Stefan Simik -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17208928.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Inmethod Grid patch for Wicket 1.4-m1
i guess Matej wil gladly apply it for you Except that Matej then has to branch... i what does he like that... :) johan On Tue, May 13, 2008 at 11:02 AM, Erik van Oosten <[EMAIL PROTECTED]> wrote: > Hello, > > Inmethod Grid does not support Wicket 1.4 currently. Apply the attached > patch (created by my colleague Job de Noo) to the trunk version to get > it running again. > > Have fun, >Erik. > > > -- > Erik van Oosten > http://day-to-day-stuff.blogspot.com/ > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >
Re: persistent sessions in Tomcat
the default config of tomcat already restarts the wicket example sessions just fine for me I havent changed 1 thing about that On Tue, May 13, 2008 at 11:59 AM, ElSe <[EMAIL PROTECTED]> wrote: > > Do you mean tomcat logs? No I don't. Some *.ser files appear in the > work\Catalina\localhost\ directory so session is serialized > but > isn't restored. > > Do I understand correctly that my assumption is correct and the wicket > session must be restored with the tomcat persistent manager? So there must > be some error in the configuration of the server or application itself? > > > igor.vaynberg wrote: > > > > do you get any serialization errors in your logs, you might be trying > > to store something non serializable in the wicket component. > > > > -igor > > > > > > On Mon, May 12, 2008 at 1:09 AM, ElSe <[EMAIL PROTECTED]> wrote: > >> > >> Hi, > >> > >> I'm just started experiments with Wicket so I suppose my question is > >> stupid > >> however I haven't found the answer on the forum. > >> > >> The point was to understand how to organize persistent sessions for > the > >> wicket application. It seemed to me that such application should work > >> with > >> the standard Tomcat mechanism transparently as any other servlet. > >> So I have written simple wicket application - just two pages that show > >> sessionid, configured Tomcat persistent manager and started session. > >> Then I > >> restarted the server and tried to pass from one page to another > waiting > >> to > >> see the same sessionid. But I have seen "page has expired". > >> Should I provide some serialization support in my application or there > >> is > >> some error in my logic or there aren't such possibility and I "want > >> something strange"(c)? > >> > >> BR > >> -- > >> View this message in context: > >> > http://www.nabble.com/persistent-sessions-in-Tomcat-tp17183181p17183181.html > >> Sent from the Wicket - User mailing list archive at Nabble.com. > >> > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/persistent-sessions-in-Tomcat-tp17183181p17205069.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Swarm: Authorization for WebMarkupContainer
Meaning either use the ComponentSecurityCheck or the snapshot version. not that stuff about changing the policy file. Mauirce On Tue, May 13, 2008 at 3:21 PM, Maurice Marrink <[EMAIL PROTECTED]> wrote: > Ah got it, must have been looking with my wrong glasses on earlier :) > You are using version 1.3.0 that version of SecureContainerCheck only > checks the class of the container, hence the message about missing > permissions for SecureWebMarkupContainer. > permission ${ComponentPermission} > "xxx.yyy.zzz.front.SecureWebMarkupContainer", "inherit, render, > enable"; > should do the trick, however this will enable every > SecurewebMarkupContainer in your application which might not be what > you want. > > There are several other options you can try: > -replace the ContainerSecurityCheck with a ComponentSecurityCheck > -switch to version 1.3-SNAPHOT, the ContainerSecurityCheck has been > modified to deal with this type of situation (i.e. check component > id's too) along with some more stuff to improve permission > inheritance. > -extend ContainersecurityCheck and overwrite isActionAuthorized with > the following code: > > public boolean isActionAuthorized(WaspAction action) > { > if (enableAuthentication && !isAuthenticated()) > throw new > RestartResponseAtInterceptPageException(getLoginPage()); > boolean result = > getStrategy().isComponentAuthorized(getComponent(), action) > || > getStrategy().isClassAuthorized(getComponent().getClass(), action); > if (result && checkSecureModel() && > SecureComponentHelper.hasSecureModel(getComponent())) > return > ((ISecureModel)getComponent().getModel()).isAuthorized(getComponent(), > action); > return result; > } > This code comes from 1.3-SNAPSHOT but should be sufficient to work in > your case. > > I recommend either option 1 or 2 depending on how comfortable you are > with snapshots > > Maurice > > > > On Tue, May 13, 2008 at 2:46 PM, Andrea Jahn <[EMAIL PROTECTED]> wrote: > > > > > > > > Hi, > > > > here the code again without the linebreaks: > > > > Hive: > > > > > > 01 // pages allowed for all users > > 02 grant > > 03 { > > > > 04 permission ${ComponentPermission} "xxx.yyy.zzz.front.Login", "inherit, > render"; > > > > 05 permission ${ComponentPermission} "xxx.yyy.zzz.front.Login", "enable"; > > > > 06 permission ${ComponentPermission} "xxx.yyy.zzz.front.Welcome", > "inherit, render"; > > > > 07 permission ${ComponentPermission} "xxx.yyy.zzz.front.Welcome", "enable"; > > 08 > > 09 }; > > 10 > > > > 11 grant principal > org.apache.wicket.security.hive.authorization.SimplePrincipal "APPL_ADMIN" > > 12 { > > > > 13 // Menu Administration - Product areas > > > > 14 permission ${ComponentPermission} > "xxx.yyy.zzz.front.ProductAreaListPage", "inherit, render"; > > > > 15 permission ${ComponentPermission} > "xxx.yyy.zzz.front.ProductAreaListPage", "enable"; > > 16 > > > > 17 // Product area list page - Hidden panel > > > > 18 permission ${ComponentPermission} > "xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel", "inherit, render, > enable"; > > > > 19 permission ${ComponentPermission} > "xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel", "enable"; > > 20 }; > > 21 > > 22 > > > > > > Application.log > > > > > > 2008-05-13 12:26:14,566 DEBUG > org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) > - skipping line 1: // pages allowed for all users > > > > 2008-05-13 12:26:14,566 DEBUG > org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) > - resolved alias: ComponentPermission to > org.apache.wicket.security.hive.authorization.permissions.ComponentPermission > > 2008-05-13 12:26:14,566 DEBUG > org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) > - resolved alias: ComponentPermission to > org.apache.wicket.security.hive.authorization.permissions.ComponentPermission > > 2008-05-13 12:26:14,566 DEBUG > org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) > - resolved alias: ComponentPermission to > org.apache.wicket.security.hive.authorization.permissions.ComponentPermission > > 2008-05-13 12:26:14,566 DEBUG > org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) > - resolved alias: ComponentPermission to > org.apache.wicket.security.hive.authorization.permissions.ComponentPermission > > > > 2008-05-13 12:26:14,566 DEBUG > org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) > - skipping line 8: > > > > 2008-05-13 12:26:14,566 DEBUG > org.apache.wicket.secu
Re: Swarm: Authorization for WebMarkupContainer
Ah got it, must have been looking with my wrong glasses on earlier :) You are using version 1.3.0 that version of SecureContainerCheck only checks the class of the container, hence the message about missing permissions for SecureWebMarkupContainer. permission ${ComponentPermission} "xxx.yyy.zzz.front.SecureWebMarkupContainer", "inherit, render, enable"; should do the trick, however this will enable every SecurewebMarkupContainer in your application which might not be what you want. There are several other options you can try: -replace the ContainerSecurityCheck with a ComponentSecurityCheck -switch to version 1.3-SNAPHOT, the ContainerSecurityCheck has been modified to deal with this type of situation (i.e. check component id's too) along with some more stuff to improve permission inheritance. -extend ContainersecurityCheck and overwrite isActionAuthorized with the following code: public boolean isActionAuthorized(WaspAction action) { if (enableAuthentication && !isAuthenticated()) throw new RestartResponseAtInterceptPageException(getLoginPage()); boolean result = getStrategy().isComponentAuthorized(getComponent(), action) || getStrategy().isClassAuthorized(getComponent().getClass(), action); if (result && checkSecureModel() && SecureComponentHelper.hasSecureModel(getComponent())) return ((ISecureModel)getComponent().getModel()).isAuthorized(getComponent(), action); return result; } This code comes from 1.3-SNAPSHOT but should be sufficient to work in your case. I recommend either option 1 or 2 depending on how comfortable you are with snapshots Maurice On Tue, May 13, 2008 at 2:46 PM, Andrea Jahn <[EMAIL PROTECTED]> wrote: > > > > Hi, > > here the code again without the linebreaks: > > Hive: > > > 01 // pages allowed for all users > 02 grant > 03 { > > 04 permission ${ComponentPermission} "xxx.yyy.zzz.front.Login", "inherit, > render"; > > 05 permission ${ComponentPermission} "xxx.yyy.zzz.front.Login", "enable"; > > 06 permission ${ComponentPermission} "xxx.yyy.zzz.front.Welcome", "inherit, > render"; > > 07 permission ${ComponentPermission} "xxx.yyy.zzz.front.Welcome", "enable"; > 08 > 09 }; > 10 > > 11 grant principal > org.apache.wicket.security.hive.authorization.SimplePrincipal "APPL_ADMIN" > 12 { > > 13 // Menu Administration - Product areas > > 14 permission ${ComponentPermission} "xxx.yyy.zzz.front.ProductAreaListPage", > "inherit, render"; > > 15 permission ${ComponentPermission} "xxx.yyy.zzz.front.ProductAreaListPage", > "enable"; > 16 > > 17 // Product area list page - Hidden panel > > 18 permission ${ComponentPermission} > "xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel", "inherit, render, > enable"; > > 19 permission ${ComponentPermission} > "xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel", "enable"; > 20 }; > 21 > 22 > > > Application.log > > > 2008-05-13 12:26:14,566 DEBUG > org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) > - skipping line 1: // pages allowed for all users > > 2008-05-13 12:26:14,566 DEBUG > org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) > - resolved alias: ComponentPermission to > org.apache.wicket.security.hive.authorization.permissions.ComponentPermission > 2008-05-13 12:26:14,566 DEBUG > org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) > - resolved alias: ComponentPermission to > org.apache.wicket.security.hive.authorization.permissions.ComponentPermission > 2008-05-13 12:26:14,566 DEBUG > org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) > - resolved alias: ComponentPermission to > org.apache.wicket.security.hive.authorization.permissions.ComponentPermission > 2008-05-13 12:26:14,566 DEBUG > org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) > - resolved alias: ComponentPermission to > org.apache.wicket.security.hive.authorization.permissions.ComponentPermission > > 2008-05-13 12:26:14,566 DEBUG > org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) > - skipping line 8: > > 2008-05-13 12:26:14,566 DEBUG > org.apache.wicket.security.hive.BasicHive.addPrincipal(BasicHive.java:108) - > Adding > org.apache.wicket.security.hive.authorization.permissions.ComponentPermission > "xxx.yyy.zzz.front.Login" "access, inherit, render" to everybody > > 2008-05-13 12:26:14,566 DEBUG > org.apache.wicket.security.hive.BasicHive.addPrincipal(BasicHive.java:108) - > Adding > org.apache.wicket.security.hive.authorization.permissions.ComponentPermission > "xxx.yyy.zzz.front.Welcome" "access, render, enable" to everybody > > 2
Re: Url resolve...
I've the same behavour describe http://www.nabble.com/is-it-a-bug--(using-beta-4)-td13284326.html#a13321146 here . I've solved my problem using: mountBookmarkablePage("/home", getHomePage()); -- View this message in context: http://www.nabble.com/Url-resolve...-tp17203548p17207838.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with CheckBox and CheckGroup
Hi everybody, I need really your help. In a form, from the bdd, I create checkgroups with checkgroupselectors. This checkgroup works fine with the Check. But a want to add a Checkbox with thanks to AjaxBehavior can select or unselect all the checkgroup. But I don't succed. This is the part of my code : CheckBox group_all = new CheckBox("select_all", new Model()); group_all.add(new Label("select_all", "Selectionner tous les projets")); group_all.add(new AjaxFormComponentUpdatingBehavior("onchange") { private static final long serialVersionUID = 1L; protected void onUpdate(AjaxRequestTarget target) { for (int i = 0 ; i < list_checkgroup.size() ; i++){ CheckGroup check = (CheckGroup)list_checkgroup.get(i); log.info("Test1 : "+check.getModelObjectAsString()); -> print [] log.info("Test2 : "+check.getModel().getObject()); --> print [] check.getModel().setObject(true); --> no working target.addComponent(check); } } }); // parametrage de la listview desfile this.listview_domaine = new ListView("listview_domaine", list_domaine) { private static final long serialVersionUID = 1L; protected void populateItem(ListItem listItem) { final TDomaine domaine = (TDomaine)listItem.getModelObject(); listItem.add(new Label("nom_domaine", domaine.getNom())); list_sousdomaine = CDataFromBDD.getListSousDomaine(domaine.getNom()); listview_sousdomaine = new ListView("listview_sousdomaine", list_sousdomaine) { private static final long serialVersionUID = 1L; protected void populateItem(ListItem listItem) { final TSousDomaine sousdomaine = (TSousDomaine)listItem.getModelObject(); group_sousdomaine = new CheckGroup("group_sousdomaine",new ArrayList()); -> create the checkgroup group_sousdomaine.setOutputMarkupId(true); group_sousdomaine.setRenderBodyOnly(false); CheckGroupSelector checkgroup_sousdomaine = new CheckGroupSelector("groupselector_sousdomaine"); checkgroup_sousdomaine.add(new Label("nom_sousdomaine", sousdomaine.getNom())); group_sousdomaine.add(checkgroup_sousdomaine); -> add the CheckGroupSelector list_projet = CDataFromBDD.getListProjet(sousdomaine.getNom()); listview_projet = new ListView("listview_projet", list_projet) { private static final long serialVersionUID = 1L; protected void populateItem(ListItem listItem) { final TProjet projet = (TProjet)listItem.getModelObject(); TInformationsGenerales info_gen = CDataFromBDD.getInfoGen(projet.getIdProjet()); TVersion version = CDataFromBDD.getVersion(info_gen.getIdInformationGen()); listItem.add(new Check("checkbox_projet", new Model())); listItem.add(new Label("name_projet", info_gen.getNom())); listItem.add(new Label("version_projet", version.getNumVersion())); } }; group_sousdomaine.add(listview_projet); list_checkgroup.add(group_sousdomaine); -> save the CheckGroup objet in a ArrayList listItem.add(group_sousdomaine); } }; listItem.add(listview_sousdomaine); } }; The first problem is that I can't get back the value of checgroups : for every one, is there selected or unselected ? The second problem Is how can I set the checkgroup to selected or unselected ? Thank you very much for your help :-)
Re: Swarm: Authorization for WebMarkupContainer
Hi, here the code again without the linebreaks: Hive: 01 // pages allowed for all users 02 grant 03 { 04 permission ${ComponentPermission} "xxx.yyy.zzz.front.Login", "inherit, render"; 05 permission ${ComponentPermission} "xxx.yyy.zzz.front.Login", "enable"; 06 permission ${ComponentPermission} "xxx.yyy.zzz.front.Welcome", "inherit, render"; 07 permission ${ComponentPermission} "xxx.yyy.zzz.front.Welcome", "enable"; 08 09 }; 10 11 grant principal org.apache.wicket.security.hive.authorization.SimplePrincipal "APPL_ADMIN" 12 { 13 // Menu Administration - Product areas 14 permission ${ComponentPermission} "xxx.yyy.zzz.front.ProductAreaListPage", "inherit, render"; 15 permission ${ComponentPermission} "xxx.yyy.zzz.front.ProductAreaListPage", "enable"; 16 17 // Product area list page - Hidden panel 18 permission ${ComponentPermission} "xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel", "inherit, render, enable"; 19 permission ${ComponentPermission} "xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel", "enable"; 20 }; 21 22 Application.log 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) - skipping line 1: // pages allowed for all users 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermission 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermission 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermission 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermission 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) - skipping line 8: 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.BasicHive.addPrincipal(BasicHive.java:108) - Adding org.apache.wicket.security.hive.authorization.permissions.ComponentPermission "xxx.yyy.zzz.front.Login" "access, inherit, render" to everybody 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.BasicHive.addPrincipal(BasicHive.java:108) - Adding org.apache.wicket.security.hive.authorization.permissions.ComponentPermission "xxx.yyy.zzz.front.Welcome" "access, render, enable" to everybody 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.BasicHive.addPrincipal(BasicHive.java:108) - Adding org.apache.wicket.security.hive.authorization.permissions.ComponentPermission "xxx.yyy.zzz.front.Welcome" "access, inherit, render" to everybody 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.BasicHive.addPrincipal(BasicHive.java:108) - Adding org.apache.wicket.security.hive.authorization.permissions.ComponentPermission "xxx.yyy.zzz.front.Login" "access, render, enable" to everybody 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) - skipping line 10: 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) - skipping line 13: // Menu Administration - Product areas 2008-05-13 12:26:14,581 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermission 2008-05-13 12:26:14,581 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermission 2008-05-13 12:26:14,581 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) - skipping line 16: 2008-05-13 12:26:14,581 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) - skipping line 17: // Product area list page - Hidden panel 2008-05-13 12:26:14,581 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermission 2008-05-13 12:26
Processing a form before page components are created
Hi, I was wondering if anyone had any good suggestions or patterns on how to process a form without using Form.onSubmit and model objects? The reason I want to do this is that my pages are stateless, and I want to process the submitted form before all the components on the page are initialised, incase I need to load different data models, or redirect the request to another page, thus saving unnecessary database calls and component initialisation. At the moment what I am doing is processing the form by directly reading the page parameters in the constructor before I add any components to the page, and then redirecting the request or initializing the page as appropriate (bypassing the use of Form.onSubmit). It would strike me that for mainly stateless pages this would be useful, I believe it is something Tapestry 5 supports quite nicely. Rgs, Joel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Url resolve...
That actually looks to be correct behavoir.If your URL is www.myserver.com/myapplication/ , then going to .. takes you to www.mysesrver.com/myapplication (no trailing slash). Then going to /css/styles.css takes you to www.myserver.com/myapplication/css/styles.css Where is your CSS file stored? It should be in webapp/css. If you go to http://www.myserver.com/myapplication/css/style.css in your browser, is the file found? -Doug danielepiras wrote: > > Hi, > > I'm developing an application that run on www.myserver.com/myapplication/ > In my Index.html page, I include a css: > > > The problem is that wicket transform href url and if I give a look to the > page source I find: > > > So the css is not found because is refer to www.myserver.com/css/style.css > and not www.myserver.com/myapplication/css/style.css > > What I have to do? > Thank you very much > Daniele > -- View this message in context: http://www.nabble.com/Url-resolve...-tp17203548p17206860.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Swarm: Authorization for WebMarkupContainer
Hi, I tried to create a "SecureWebMarkupContainer" (contains a DataView, Label,..), which should be only visible for authorized users. But although the user has the permission "APPL_ADMIN", he cannot see the "resultHiddenPanel". Within the hive I used the wicket id "resultHiddenPanel" to identify the component, but within the logfile there's the message, that the component "SecureWebMarkupContainer" (class name) is not found. Perhaps do I have to create a subclass of SecureWebMarkupContainer for each WebMarkupContainer component and add that classname to the hive ? --- Code: Hive: 01 // pages allowed for all users 02 grant 03 { 04 permission ${ComponentPermission} "xxx.yyy.zzz.front.Login", "inherit, render"; 05 permission ${ComponentPermission} "xxx.yyy.zzz.front.Login", "enable"; 06 permission ${ComponentPermission} "xxx.yyy.zzz.front.Welcome", "inherit, render"; 07 permission ${ComponentPermission} "xxx.yyy.zzz.front.Welcome", "enable"; 08 09 }; 10 11 grant principal org.apache.wicket.security.hive.authorization.SimplePrincipal "APPL_ADMIN" 12 { 13 // Menu Administration - Product areas 14 permission ${ComponentPermission} "xxx.yyy.zzz.front.ProductAreaListPage", "inherit, render"; 15 permission ${ComponentPermission} "xxx.yyy.zzz.front.ProductAreaListPage", "enable"; 16 17 // Product area list page - Hidden panel 18 permission ${ComponentPermission} "xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel", "inherit, render, enable"; 19 permission ${ComponentPermission} "xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel", "enable"; 20 }; 21 22 Application.log 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) - skipping line 1: // pages allowed for all users 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermission 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermission 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermission 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermission 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) - skipping line 8: 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.BasicHive.addPrincipal(BasicHive.java:108) - Adding org.apache.wicket.security.hive.authorization.permissions.ComponentPermission "xxx.yyy.zzz.front.Login" "access, inherit, render" to everybody 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.BasicHive.addPrincipal(BasicHive.java:108) - Adding org.apache.wicket.security.hive.authorization.permissions.ComponentPermission "xxx.yyy.zzz.front.Welcome" "access, render, enable" to everybody 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.BasicHive.addPrincipal(BasicHive.java:108) - Adding org.apache.wicket.security.hive.authorization.permissions.ComponentPermission "xxx.yyy.zzz.front.Welcome" "access, inherit, render" to everybody 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.BasicHive.addPrincipal(BasicHive.java:108) - Adding org.apache.wicket.security.hive.authorization.permissions.ComponentPermission "xxx.yyy.zzz.front.Login" "access, render, enable" to everybody 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) - skipping line 10: 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) - skipping line 13: // Menu Administration - Product areas 2008-05-13 12:26:14,581 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermission 2008-05-13 12:26:14,581 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermission 2008-05-13 12:26:14,581 DEBUG o
Re: Url resolve...
Have you tried surrounding that stylesheet link with a ? On Tue, May 13, 2008 at 4:25 AM, danielepiras <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm developing an application that run on www.myserver.com/myapplication/ > In my Index.html page, I include a css: > > > The problem is that wicket transform href url and if I give a look to the > page source I find: > > > So the css is not found because is refer to www.myserver.com/css/style.css > and not www.myserver.com/myapplication/css/style.css > > What I have to do? > Thank you very much > Daniele > -- > View this message in context: > http://www.nabble.com/Url-resolve...-tp17203548p17203548.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: an "lost in the dark" exception question
Thanks Frank, 1. ManagedItemDecorator is Serializable but without a no params constructor. 2. We are using development mode. I'll try to change to production mode and see if we can put a no-param-constructor. Cheers ... On Tue, May 13, 2008 at 12:26 PM, Frank van Lankvelt < [EMAIL PROTECTED]> wrote: > According to a conversation I had with Johan, only the last shown page > is kept in memory. Earlier versions are written to disk. > > When using ajax, the page does not have to be actually written to disk > as you cannot reach the previous state by using the back button. When > using a BookmarkableLink, the previous page _can_ be reached by the back > button so it has to be written out. > > Are you using the "development" mode of Wicket? It always checks > whether the page is serializable, if I recall correctly. > > The problem remains that the ManagedItemDecorator is not serializable. > (see java.io.ObjectStreamClass.lookup) > > cheers, Frank > > On Tue, 2008-05-13 at 12:01 +0300, Eyal Golan wrote: > > First of all, thanks. > > (most of) all the above I found out. > > I mentioned "weird" because if that was the problem (Serialization or > > invalid constructor), then the Expand link would have never worked. Am I > > correct? > > BUT, The exception happens only after I go to a BookmarkableLink. > > > > > > It's not we didn't try to discover the problem before :) > > > > > > On Tue, May 13, 2008 at 11:16 AM, Martijn Dashorst < > > [EMAIL PROTECTED]> wrote: > > > > > On 5/13/08, Eyal Golan <[EMAIL PROTECTED]> wrote: > > > > We have a weird exception in our system. > > > > > > Not so weird when you read the exception trace. It is a dark art, but > > > worth the effort of learning. > > > > > > > My team mates created a non standard DataView: > > > > > > Uh oh... :) > > > > > > So read this part: > > > > > > > 2008-05-13 10:55:21,885 ERROR [org.apache.wicket.RequestCycle] - > Could > > > not > > > > deserialize object using > > > > > > > > `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` > > > > object factory > > > > > > What does that mean? (Don't read ahead just yet, think about the > message) > > > > > > > > > > > > > > > > > > > > > > > > > > > It means that an object, your Item's model object, could not be > > > deserialized. This means that one of your objects that are attached to > > > the page does not honor the serialization contract. Specifically when > > > you go through the stack trace and find the cause: > > > > > > > Caused by: java.io.InvalidClassException: > > > > com.eurekify.tms.web.common.campaign.ManagedItemDecorator; no valid > > > > constructor > > > > > > It seems that there is something wrong with ManagedItemDecorator - it > > > is missing some valid constructor. Now if you don't know why this is, > > > then look up the InvalidClassException using google. This points to > > > the following JavaDoc [1] and states: > > > > > > Thrown when the Serialization runtime detects one of the following > > > problems with a Class. > > > > > > * The serial version of the class does not match that of the class > > > descriptor read from the stream > > > * The class contains unknown datatypes > > > * The class does not have an accessible no-arg constructor > > > > > > Voila, there is your problem, which you could discover yourself given > > > a bit of brain excercise. > > > > > > Martijn > > > > > > [1] > > > > http://java.sun.com/j2se/1.4.2/docs/api/java/io/InvalidClassException.html > > > > > > -- > > > Buy Wicket in Action: http://manning.com/dashorst > > > Apache Wicket 1.3.3 is released > > > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3 > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > -- > - > Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 > San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA > 94952-3329 +1 (707) 773-4646 > - > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/
Re: persistent sessions in Tomcat
Do you mean tomcat logs? No I don't. Some *.ser files appear in the work\Catalina\localhost\ directory so session is serialized but isn't restored. Do I understand correctly that my assumption is correct and the wicket session must be restored with the tomcat persistent manager? So there must be some error in the configuration of the server or application itself? igor.vaynberg wrote: > > do you get any serialization errors in your logs, you might be trying > to store something non serializable in the wicket component. > > -igor > > > On Mon, May 12, 2008 at 1:09 AM, ElSe <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> I'm just started experiments with Wicket so I suppose my question is >> stupid >> however I haven't found the answer on the forum. >> >> The point was to understand how to organize persistent sessions for the >> wicket application. It seemed to me that such application should work >> with >> the standard Tomcat mechanism transparently as any other servlet. >> So I have written simple wicket application - just two pages that show >> sessionid, configured Tomcat persistent manager and started session. >> Then I >> restarted the server and tried to pass from one page to another waiting >> to >> see the same sessionid. But I have seen "page has expired". >> Should I provide some serialization support in my application or there >> is >> some error in my logic or there aren't such possibility and I "want >> something strange"(c)? >> >> BR >> -- >> View this message in context: >> http://www.nabble.com/persistent-sessions-in-Tomcat-tp17183181p17183181.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/persistent-sessions-in-Tomcat-tp17183181p17205069.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: an "lost in the dark" exception question
According to a conversation I had with Johan, only the last shown page is kept in memory. Earlier versions are written to disk. When using ajax, the page does not have to be actually written to disk as you cannot reach the previous state by using the back button. When using a BookmarkableLink, the previous page _can_ be reached by the back button so it has to be written out. Are you using the "development" mode of Wicket? It always checks whether the page is serializable, if I recall correctly. The problem remains that the ManagedItemDecorator is not serializable. (see java.io.ObjectStreamClass.lookup) cheers, Frank On Tue, 2008-05-13 at 12:01 +0300, Eyal Golan wrote: > First of all, thanks. > (most of) all the above I found out. > I mentioned "weird" because if that was the problem (Serialization or > invalid constructor), then the Expand link would have never worked. Am I > correct? > BUT, The exception happens only after I go to a BookmarkableLink. > > > It's not we didn't try to discover the problem before :) > > > On Tue, May 13, 2008 at 11:16 AM, Martijn Dashorst < > [EMAIL PROTECTED]> wrote: > > > On 5/13/08, Eyal Golan <[EMAIL PROTECTED]> wrote: > > > We have a weird exception in our system. > > > > Not so weird when you read the exception trace. It is a dark art, but > > worth the effort of learning. > > > > > My team mates created a non standard DataView: > > > > Uh oh... :) > > > > So read this part: > > > > > 2008-05-13 10:55:21,885 ERROR [org.apache.wicket.RequestCycle] - Could > > not > > > deserialize object using > > > > > `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` > > > object factory > > > > What does that mean? (Don't read ahead just yet, think about the message) > > > > > > > > > > > > > > > > > > It means that an object, your Item's model object, could not be > > deserialized. This means that one of your objects that are attached to > > the page does not honor the serialization contract. Specifically when > > you go through the stack trace and find the cause: > > > > > Caused by: java.io.InvalidClassException: > > > com.eurekify.tms.web.common.campaign.ManagedItemDecorator; no valid > > > constructor > > > > It seems that there is something wrong with ManagedItemDecorator - it > > is missing some valid constructor. Now if you don't know why this is, > > then look up the InvalidClassException using google. This points to > > the following JavaDoc [1] and states: > > > > Thrown when the Serialization runtime detects one of the following > > problems with a Class. > > > > * The serial version of the class does not match that of the class > > descriptor read from the stream > > * The class contains unknown datatypes > > * The class does not have an accessible no-arg constructor > > > > Voila, there is your problem, which you could discover yourself given > > a bit of brain excercise. > > > > Martijn > > > > [1] > > http://java.sun.com/j2se/1.4.2/docs/api/java/io/InvalidClassException.html > > > > -- > > Buy Wicket in Action: http://manning.com/dashorst > > Apache Wicket 1.3.3 is released > > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3 > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- - Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1 (707) 773-4646 - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Inmethod Grid patch for Wicket 1.4-m1
Hello, Inmethod Grid does not support Wicket 1.4 currently. Apply the attached patch (created by my colleague Job de Noo) to the trunk version to get it running again. Have fun, Erik. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ Index: grid-examples/src/test/java/com/inmethod/grid/examples/Start.java === --- grid-examples/src/test/java/com/inmethod/grid/examples/Start.java (revision 3872) +++ grid-examples/src/test/java/com/inmethod/grid/examples/Start.java Fri May 09 16:35:59 CEST 2008 @@ -13,7 +13,7 @@ // Set some timeout options to make debugging easier. connector.setMaxIdleTime(1000 * 60 * 60); connector.setSoLingerTime(-1); - connector.setPort(8080); + connector.setPort(8081); server.setConnectors(new Connector[] { connector }); WebAppContext bb = new WebAppContext(); Index: grid/src/main/java/com/inmethod/grid/treegrid/TreeGrid.java === --- grid/src/main/java/com/inmethod/grid/treegrid/TreeGrid.java (revision 3872) +++ grid/src/main/java/com/inmethod/grid/treegrid/TreeGrid.java Fri May 09 16:31:43 CEST 2008 @@ -81,26 +81,27 @@ /** * [EMAIL PROTECTED] */ - public void nodeCollapsed(Object node) { + public void nodeCollapsed(TreeNode node) { } /** * [EMAIL PROTECTED] */ - public void nodeExpanded(Object node) { + public void nodeExpanded(TreeNode node) { } /** * [EMAIL PROTECTED] */ - public void nodeSelected(Object node) { + public void nodeSelected(TreeNode node) { onItemSelectionChanged(new Model((Serializable) node), true); } /** * [EMAIL PROTECTED] */ - public void nodeUnselected(Object node) { +@Override +public void nodeUnselected(TreeNode node) { onItemSelectionChanged(new Model((Serializable) node), false); } }; @@ -193,7 +194,7 @@ * [EMAIL PROTECTED] */ @Override - public boolean isItemSelected(IModel itemModel) { + public boolean isItemSelected(IModel itemModel) { return getTreeState().isNodeSelected(itemModel.getObject()); } @@ -203,8 +204,8 @@ @SuppressWarnings("unchecked") @Override public void resetSelectedItems() { - Collection nodes = getTreeState().getSelectedNodes(); - for (Object node : nodes) { + Collection nodes = getTreeState().getSelectedNodes(); + for (TreeNode node : nodes) { getTreeState().selectNode(node, false); } getTree().invalidateAll(); @@ -244,8 +245,8 @@ } @Override - public void markItemDirty(IModel model) { - Object node = model.getObject(); + public void markItemDirty(IModel model) { + TreeNode node = model.getObject(); getTree().markNodeDirty(node); } @@ -253,7 +254,7 @@ * [EMAIL PROTECTED] */ @Override - public void selectItem(IModel itemModel, boolean selected) { + public void selectItem(IModel itemModel, boolean selected) { getTreeState().selectNode(itemModel.getObject(), selected); } Index: grid/src/main/java/com/inmethod/grid/common/AbstractGrid.java === --- grid/src/main/java/com/inmethod/grid/common/AbstractGrid.java (revision 3872) +++ grid/src/main/java/com/inmethod/grid/common/AbstractGrid.java Fri May 09 16:33:44 CEST 2008 @@ -6,6 +6,7 @@ import java.util.List; import javax.swing.tree.TreeModel; +import javax.swing.tree.TreeNode; import org.apache.wicket.Component; import org.apache.wicket.MetaDataKey; @@ -564,7 +565,7 @@ *true if the item should be selected, *false otherwise. */ - public abstract void selectItem(IModel itemModel, boolean selected); + public abstract void selectItem(IModel itemModel, boolean selected); /** * Marks all currently displayed items as selected. For [EMAIL PROTECTED] DataGrid} @@ -587,7 +588,7 @@ * @return true if the item is selected, false * otherwise */ - public abstract boolean isItemSelected(IModel itemModel); + public abstract boolean isItemSelected(IModel itemModel); /** * Returns the collection of models of all currently selected items. @@ -870,7 +871,7 @@ * @param itemModel *model used to access the item */ - public abstract void markItemDirty(IModel model); + public abstract void markItemDirty(IModel model); private boolean selectToEdit = true; Index: pom.xml === --- pom.xml (revision 3872) +++ pom.xml Fri May 09 16:23:22 CEST 2008 @@ -513,7 +513,7 @@ 1.0.0-SNAPSHOT - 1.4-SNAPSHOT +1.4-m1 6.1.4 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: an "lost in the dark" exception question
First of all, thanks. (most of) all the above I found out. I mentioned "weird" because if that was the problem (Serialization or invalid constructor), then the Expand link would have never worked. Am I correct? BUT, The exception happens only after I go to a BookmarkableLink. It's not we didn't try to discover the problem before :) On Tue, May 13, 2008 at 11:16 AM, Martijn Dashorst < [EMAIL PROTECTED]> wrote: > On 5/13/08, Eyal Golan <[EMAIL PROTECTED]> wrote: > > We have a weird exception in our system. > > Not so weird when you read the exception trace. It is a dark art, but > worth the effort of learning. > > > My team mates created a non standard DataView: > > Uh oh... :) > > So read this part: > > > 2008-05-13 10:55:21,885 ERROR [org.apache.wicket.RequestCycle] - Could > not > > deserialize object using > > > `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` > > object factory > > What does that mean? (Don't read ahead just yet, think about the message) > > > > > > > > > It means that an object, your Item's model object, could not be > deserialized. This means that one of your objects that are attached to > the page does not honor the serialization contract. Specifically when > you go through the stack trace and find the cause: > > > Caused by: java.io.InvalidClassException: > > com.eurekify.tms.web.common.campaign.ManagedItemDecorator; no valid > > constructor > > It seems that there is something wrong with ManagedItemDecorator - it > is missing some valid constructor. Now if you don't know why this is, > then look up the InvalidClassException using google. This points to > the following JavaDoc [1] and states: > > Thrown when the Serialization runtime detects one of the following > problems with a Class. > > * The serial version of the class does not match that of the class > descriptor read from the stream > * The class contains unknown datatypes > * The class does not have an accessible no-arg constructor > > Voila, there is your problem, which you could discover yourself given > a bit of brain excercise. > > Martijn > > [1] > http://java.sun.com/j2se/1.4.2/docs/api/java/io/InvalidClassException.html > > -- > Buy Wicket in Action: http://manning.com/dashorst > Apache Wicket 1.3.3 is released > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3 > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/
Url resolve...
Hi, I'm developing an application that run on www.myserver.com/myapplication/ In my Index.html page, I include a css: The problem is that wicket transform href url and if I give a look to the page source I find: So the css is not found because is refer to www.myserver.com/css/style.css and not www.myserver.com/myapplication/css/style.css What I have to do? Thank you very much Daniele -- View this message in context: http://www.nabble.com/Url-resolve...-tp17203548p17203548.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: an "lost in the dark" exception question
On 5/13/08, Eyal Golan <[EMAIL PROTECTED]> wrote: > We have a weird exception in our system. Not so weird when you read the exception trace. It is a dark art, but worth the effort of learning. > My team mates created a non standard DataView: Uh oh... :) So read this part: > 2008-05-13 10:55:21,885 ERROR [org.apache.wicket.RequestCycle] - Could not > deserialize object using > `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` > object factory What does that mean? (Don't read ahead just yet, think about the message) It means that an object, your Item's model object, could not be deserialized. This means that one of your objects that are attached to the page does not honor the serialization contract. Specifically when you go through the stack trace and find the cause: > Caused by: java.io.InvalidClassException: > com.eurekify.tms.web.common.campaign.ManagedItemDecorator; no valid > constructor It seems that there is something wrong with ManagedItemDecorator - it is missing some valid constructor. Now if you don't know why this is, then look up the InvalidClassException using google. This points to the following JavaDoc [1] and states: Thrown when the Serialization runtime detects one of the following problems with a Class. * The serial version of the class does not match that of the class descriptor read from the stream * The class contains unknown datatypes * The class does not have an accessible no-arg constructor Voila, there is your problem, which you could discover yourself given a bit of brain excercise. Martijn [1] http://java.sun.com/j2se/1.4.2/docs/api/java/io/InvalidClassException.html -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
an "lost in the dark" exception question
Hello all, We have a weird exception in our system. My team mates created a non standard DataView: final DataView dataView = new DataView("rows", dataProvider) { protected void populateItem(final Item item) { final ManagedItemDecorator entity = (ManagedItemDecorator)item.getModelObject(); //final Component links = new Label("links",new PropertyModel(entity,"links")); *final Component links = new LinksPanel("links",null,isEnabled);* item.add(links); AjaxLink expandButton = GUIUtis.getExpandButton("expandLink",links,entity); WebMarkupContainer expandTD = new WebMarkupContainer("expand"); expandTD.add(GUIUtis.createAttributeModifier("rowspan", "2")); expandTD.add(expandButton); item.add(expandTD); More stuff here ... } }; The ExpandButton opens (like a folder in a tree) a Panel that shows more information. In the LinksPanel there is another link that open BookmarkablePage. Scenario: When we open this BookmarkablePage and then press on ANY of the AjaxLink (expand button), we get an exception: 2008-05-13 10:55:21,885 ERROR [org.apache.wicket.RequestCycle] - Could not deserialize object using `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory java.lang.RuntimeException: Could not deserialize object using `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:406) at org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:228) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:702) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:311) at org.apache.wicket.Session.getPage(Session.java:745) at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:443) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065) at com.eurekify.security.SecurityFilter.doFilterInternal(SecurityFilter.java:38) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:285) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475) Caused by: java.io.InvalidClassException: com.eurekify.tms.web.common.campaign.ManagedItemDecorator; no valid constructor at java.io.ObjectStreamClass.(Unknown Source) at java.io.ObjectStreamClass.lookup(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at java.util.ArrayList.writeObject(Unknown Source) at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.
Re: Why is it illegal to update hierarchy in onAfterRender?
Hi Johan, > AutoAdd can be done in the rendering. They are only there just then. > And they will be removed by wicket after rendering. Thanks Johan, those 2 lines explain it for me. Could you add them to the javadoc of MarkupContainer? Regards, Erik. Johan Compagner wrote: > Hmm i am affraid the source for more info is the source.. > > AutoAdd can be done in the rendering. They are only there just then. > And they will be removed by wicket after rendering. (at least they > should) > > They are or can be normal components > > -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]