Re: Bookmarkable images from db

2009-12-08 Thread Peter Dotchev
the second allows you to build the url of any resource by name.. Alex Objelean Peter Dotchev wrote: Hi Alex, I check SharedResources, but as I understand it I would have to add there a Resource object for each image. After checking again the javadoc there might be another way

Re: ExternalLink takes IModelString for label

2009-11-23 Thread Peter Dotchev
https://issues.apache.org/jira/browse/WICKET-2588 igor.vaynberg wrote: yep, so we cant fix it in 1.4.x, but add an rfe for 1.5 -igor On Sun, Nov 22, 2009 at 2:24 PM, Peter Dotchev dotc...@gmail.com wrote: Hi Wicketeers, I just noticed that this constructor   public ExternalLink

Re: Why don't all Link classes support a label like ExternalLink does?

2009-11-22 Thread Peter Dotchev
Hi, I also find myself often in the situation to create two components Link + Label for a link. So, I would appreciate if Link's used their model for the element content. Best regards, Peter Martijn Dashorst wrote: Not everybody puts a label inside a link. Not as common as you might think

ExternalLink takes IModelString for label

2009-11-22 Thread Peter Dotchev
Hi Wicketeers, I just noticed that this constructor public ExternalLink(final String id, final IModelString href, final *IModelString* label) takes IModelString for label. This is somewhat limiting since the model could hold a number or a date for example. Actually passing a raw IModel

Re: WicketFilter.getLastModified creates a RequestCycle but does not clean it up

2009-11-09 Thread Peter Dotchev
created jira item https://issues.apache.org/jira/browse/WICKET-2566 Regards, Peter igor.vaynberg wrote: peter, please open a jira issue. looks like a bug to me. -igor On Sat, Nov 7, 2009 at 1:52 PM, Peter Dotchev dotc...@gmail.com wrote: Hi Wicketeers, I noticed

WicketFilter.getLastModified creates a RequestCycle but does not clean it up

2009-11-07 Thread Peter Dotchev
Hi Wicketeers, I noticed that WicketFilter.getLastModified creates a RequestCycle but does not /detach /it, so onEndRequest is not called. I use JCR and open a session to it on first use (lazy init). I store the JCR session in th RequestCycle. I close the JCR session in

Re: Bookmarkable images from db

2009-11-02 Thread Peter Dotchev
, there is also a wicket way of do it: - Use shared resource, which is stateless and bookmarkable If you need more informations about this approach, search on forum or just ask... and I'll provide you with some examples of how I do it.. Alex Objelean Peter Dotchev wrote: Hi, My app

Bookmarkable images from db

2009-11-01 Thread Peter Dotchev
Hi, My app allows users to upload images and I store them in JCR http://en.wikipedia.org/wiki/Content_repository_API_for_Java. I can get InputStream for each one of them. I want to display images in specific pages and I want image URLs to be stable/bookmarkable. Also I don't want these pages

Data validation and form components

2009-04-28 Thread Peter Dotchev
Hi, Setter methods of my business logic classes perform validation and throw exceptions if given parameter is invalid. I don't have separate methods for data validation. In my wicket form I use CompoundPropertyModel which sets user entered values directly in the business object. If the user

Why is LoadableDetachableModel read-only?

2007-11-02 Thread Peter Dotchev
Hi, setObject() is not supported on LoadableDetachableModel because it extends AbstractReadOnlyModel. What is the reason for this? This way LoadableDetachableModel cannot be used with form controls. In my case I have a DropDownChoice with a list of non-serializable objects. What kind of model

substitute same value in several places

2007-09-27 Thread Peter Dotchev
Hi, I'd like to use the same value in several places of a page, e.g. two labels with same content. Let's say I want to substitute the same property using CompoundPropertyModel. How can I do that in Wicket 1.3? Thanks for your help. Peter -- View this message in context:

Custom page - class mapping

2007-08-31 Thread Peter Dotchev
Hello, I'd like to use custom convention for page class names. Something like Home.html - HomePage.class How can I do this in wicket 1.3? I don't want to mount each page separately. I guess I should implement IRequestTargetUrlCodingStrategy but would not like to do it from scratch. Any hints?