Re: Resolving nested properties

2015-03-04 Thread Rob Sonke
Done:
https://issues.apache.org/jira/browse/WICKET-5847

I'll create a pull request too and I'll mention that in the jira ticket.

Rob


On Wed, Mar 4, 2015 at 10:16 AM, Tobias Soloschenko <
tobiassolosche...@googlemail.com> wrote:

> Hi Rob,
>
> maybe we could name it KeyReplacingLocalizer.
>
> Here is the reference of the ReplacingResourceModel. It wasn't in html5
> submodule but in minis.
>
>
> https://github.com/wicketstuff/core/blob/85bfa1b4bf67261ad4a7b07295c366c49733ad1f/jdk-1.7-parent/minis-parent/minis/src/main/java/org/wicketstuff/minis/model/ReplacingResourceModel.java
>
> The pattern is like this:
>
> private static final Pattern PLACEHOLDER_PATTERN = Pattern.compile("\\$\\
> {(.*?)\\}");
>
> kind regards
>
> Tobias
>
> 2015-03-04 9:57 GMT+01:00 Rob Sonke :
>
> > Agree Martin, thanks for the tips (also Tobias). I'll look into an
> > implementation of an extra Localizer, good names are welcome, and file a
> > ticket.
> >
> > Rob
> >
> > On Wed, Mar 4, 2015 at 9:46 AM, Martin Grigorov 
> > wrote:
> >
> > > Hi,
> > >
> > > Since there were no many requests for this functionality I'd prefer if
> we
> > > use a specialization of Localizer as Rob did.
> > > The Pattern compilation is the slower operation, so it should be a
> static
> > > final field. The matching is usually fast so maybe there is no problem
> to
> > > put it directly in Localizer. But I don't see why to do it if there are
> > > just few users of this functionality.
> > >
> > > Please file a ticket!
> > > Preferably with a patch/PR and some tests!
> > >
> > > Thanks!
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Wed, Mar 4, 2015 at 10:25 AM, Tobias Soloschenko <
> > > tobiassolosche...@googlemail.com> wrote:
> > >
> > > > Hi,
> > > >
> > > > maybe we can provide a new Localizer or change the existing default
> > > > implementation. As far as I know the StringResourceModel uses the
> same
> > > > Syntax for replacing which might lead to errors
> > > >
> > > > @others: What do you think?
> > > >
> > > > @Rob: the pattern should be modified a bit so that it is not greedy
> > (.*?)
> > > > - have a look in WicketStuff / submodul html5 - there is a class
> > > > ReplacingResourceModel - the pattern you find there is a better one.
> > > >
> > > > kind regards
> > > >
> > > > Tobias
> > > >
> > > > > Am 04.03.2015 um 09:09 schrieb Rob Sonke :
> > > > >
> > > > > Hi,
> > > > >
> > > > > It took a while to dive into this but I wrote a simple solution
> based
> > > on
> > > > > the pattern/matcher example of Tobias and this seems to work well.
> It
> > > > only
> > > > > wraps the default Localizer class in Wicket by overriding the
> > getString
> > > > > method:
> > > > >
> > > > > getResourceSettings().setLocalizer(new Localizer()
> > > > >
> > > > > {
> > > > >
> > > > >  public String getString(final String key, final Component
> component,
> > > > > final IModel model, final Locale locale, final String style,
> final
> > > > > IModel defaultValue) throws MissingResourceException
> > > > >
> > > > >  {
> > > > >
> > > > >String value = super.getString(key, component, model, locale,
> > style,
> > > > > defaultValue);
> > > > >
> > > > >StringBuffer output = new StringBuffer();
> > > > >
> > > > >final Pattern PLACEHOLDER_PATTERN =
> > > Pattern.compile("\\$\\{(.*)\\}");
> > > > >
> > > > >Matcher matcher = PLACEHOLDER_PATTERN.matcher(value);
> > > > >
> > > > >
> > > > >// Search for other nested keys to replace
> > > > >
> > > > >while (matcher.find())
> > > > >
> > > > >{
> > > > >
> > > > >  String replacedPlaceHolder = getString(matcher.group(1),
> > > component,
> > > > > model, locale, style, (String)null);
> > > > >
> > > > &

Re: Resolving nested properties

2015-03-04 Thread Rob Sonke
Agree Martin, thanks for the tips (also Tobias). I'll look into an
implementation of an extra Localizer, good names are welcome, and file a
ticket.

Rob

On Wed, Mar 4, 2015 at 9:46 AM, Martin Grigorov 
wrote:

> Hi,
>
> Since there were no many requests for this functionality I'd prefer if we
> use a specialization of Localizer as Rob did.
> The Pattern compilation is the slower operation, so it should be a static
> final field. The matching is usually fast so maybe there is no problem to
> put it directly in Localizer. But I don't see why to do it if there are
> just few users of this functionality.
>
> Please file a ticket!
> Preferably with a patch/PR and some tests!
>
> Thanks!
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Mar 4, 2015 at 10:25 AM, Tobias Soloschenko <
> tobiassolosche...@googlemail.com> wrote:
>
> > Hi,
> >
> > maybe we can provide a new Localizer or change the existing default
> > implementation. As far as I know the StringResourceModel uses the same
> > Syntax for replacing which might lead to errors
> >
> > @others: What do you think?
> >
> > @Rob: the pattern should be modified a bit so that it is not greedy (.*?)
> > - have a look in WicketStuff / submodul html5 - there is a class
> > ReplacingResourceModel - the pattern you find there is a better one.
> >
> > kind regards
> >
> > Tobias
> >
> > > Am 04.03.2015 um 09:09 schrieb Rob Sonke :
> > >
> > > Hi,
> > >
> > > It took a while to dive into this but I wrote a simple solution based
> on
> > > the pattern/matcher example of Tobias and this seems to work well. It
> > only
> > > wraps the default Localizer class in Wicket by overriding the getString
> > > method:
> > >
> > > getResourceSettings().setLocalizer(new Localizer()
> > >
> > > {
> > >
> > >  public String getString(final String key, final Component component,
> > > final IModel model, final Locale locale, final String style, final
> > > IModel defaultValue) throws MissingResourceException
> > >
> > >  {
> > >
> > >String value = super.getString(key, component, model, locale, style,
> > > defaultValue);
> > >
> > >StringBuffer output = new StringBuffer();
> > >
> > >final Pattern PLACEHOLDER_PATTERN =
> Pattern.compile("\\$\\{(.*)\\}");
> > >
> > >Matcher matcher = PLACEHOLDER_PATTERN.matcher(value);
> > >
> > >
> > >// Search for other nested keys to replace
> > >
> > >while (matcher.find())
> > >
> > >{
> > >
> > >  String replacedPlaceHolder = getString(matcher.group(1),
> component,
> > > model, locale, style, (String)null);
> > >
> > >  matcher.appendReplacement(output, replacedPlaceHolder);
> > >
> > >}
> > >
> > >matcher.appendTail(output);
> > >
> > >return output.toString();
> > >
> > >  }
> > >
> > > });
> > >
> > >
> > > Any need for putting this in Wicket? Or maybe somebody has better
> options
> > > how to do this. I'm all ears but I'm already happy that I could
> implement
> > > this anyway without patching the Wicket source.
> > >
> > >
> > > Rob
> > >
> > > On Sat, Feb 21, 2015 at 6:14 PM, Tobias Soloschenko <
> > > tobiassolosche...@googlemail.com> wrote:
> > >
> > >> Hi,
> > >>
> > >> if it gained not as much interest in the community, but there are
> still
> > >> some users asking for such an implementation - maybe we can put it
> into
> > >> wicketstuff-minis?
> > >>
> > >> kind regards
> > >>
> > >> Tobias
> > >>
> > >> P.S.: I also answered the question in stackoverflow. :-)
> > >>
> > >> Am 21.02.15 um 17:59 schrieb Sven Meier:
> > >>
> > >> Hi,
> > >>>
> > >>> such a feature was asked a few times, e.g.:
> > >>>
> > >>> http://stackoverflow.com/questions/16684200/refer-to-
> > >>> one-property-from-another
> > >>>
> > >>> But apparently it never gained much interest in the community. In my
> > >>> experience you won't find many cases where this is useful anyway.
> > >&g

Re: Resolving nested properties

2015-03-04 Thread Rob Sonke
Hi,

It took a while to dive into this but I wrote a simple solution based on
the pattern/matcher example of Tobias and this seems to work well. It only
wraps the default Localizer class in Wicket by overriding the getString
method:

getResourceSettings().setLocalizer(new Localizer()

{

  public String getString(final String key, final Component component,
final IModel model, final Locale locale, final String style, final
IModel defaultValue) throws MissingResourceException

  {

String value = super.getString(key, component, model, locale, style,
defaultValue);

StringBuffer output = new StringBuffer();

final Pattern PLACEHOLDER_PATTERN = Pattern.compile("\\$\\{(.*)\\}");

Matcher matcher = PLACEHOLDER_PATTERN.matcher(value);


// Search for other nested keys to replace

while (matcher.find())

{

  String replacedPlaceHolder = getString(matcher.group(1), component,
model, locale, style, (String)null);

  matcher.appendReplacement(output, replacedPlaceHolder);

}

matcher.appendTail(output);

return output.toString();

  }

});


Any need for putting this in Wicket? Or maybe somebody has better options
how to do this. I'm all ears but I'm already happy that I could implement
this anyway without patching the Wicket source.


Rob

On Sat, Feb 21, 2015 at 6:14 PM, Tobias Soloschenko <
tobiassolosche...@googlemail.com> wrote:

> Hi,
>
> if it gained not as much interest in the community, but there are still
> some users asking for such an implementation - maybe we can put it into
> wicketstuff-minis?
>
> kind regards
>
> Tobias
>
> P.S.: I also answered the question in stackoverflow. :-)
>
> Am 21.02.15 um 17:59 schrieb Sven Meier:
>
>  Hi,
>>
>> such a feature was asked a few times, e.g.:
>>
>> http://stackoverflow.com/questions/16684200/refer-to-
>> one-property-from-another
>>
>> But apparently it never gained much interest in the community. In my
>> experience you won't find many cases where this is useful anyway.
>>
>> Have fun
>> Sven
>>
>>
>> On 21.02.2015 16:51, Tobias Soloschenko wrote:
>>
>>> Rob,
>>>
>>> we will see what others say and if there is a standard way for this in
>>> wicket. I'm currently testing the implementation - it also replaces keys
>>> found in hierarchy, because Wickets Localizer is going to be used for each
>>> key which is going to be replaced. So the example of your first mail is
>>> also covered.
>>>
>>> kind regards
>>>
>>> Tobias
>>>
>>> Am 21.02.15 um 16:37 schrieb Rob Sonke:
>>>
>>>> Tobias,
>>>>
>>>> Somehow I'm missing your replies in gmail. But thanks for the
>>>> suggestions.
>>>> Using custom models would be a last resort for me. Because I will have
>>>> to
>>>> replace all occurences. I'm somehow hoping to hook into the localizer.
>>>>
>>>> On Sat, Feb 21, 2015 at 2:01 PM, Rob Sonke  wrote:
>>>>
>>>>  Hi all,
>>>>>
>>>>> I'm trying to achieve a fairly simple thing within .properties files to
>>>>> avoid a lot of duplicate words through different files.
>>>>>
>>>>> For example there's is a HomePage.properties with:
>>>>> lbl.foo=This is an example text, we love ${lbl.item}
>>>>>
>>>>> And then in MyWebApplication.properties:
>>>>> lbl.item=Wicket
>>>>>
>>>>> But as far as I can see, Wicket tries to resolve the parameters with
>>>>> objects passed to eg StringResourceModel. How can I hook into this and
>>>>> solve this in a nice way?
>>>>>
>>>>> Kind regards,
>>>>> Rob
>>>>>
>>>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Resolving nested properties

2015-02-21 Thread Rob Sonke
Hi Sven,

Ah, that's the same kind of request. I can imagine that it's not a very hot
feature. But we use the variant/style settings to override properties with
kind of "theme" specific labels. But often such a theme only wants to use
different naming for specific elements. With this option, we can simply
override one property in a variant or style, and change a lot of labels all
at once.

I thought actually that this was a default feature in the java
ResourceBundles. But apart from that, I was expecting some feature like
myapp.getResourceSettings().addResourceResolver(new MyCustomResolver());
but this doesnt seem possible. With such an option, we can implement this
easily ourselves.

Rob


On Sat, Feb 21, 2015 at 4:37 PM, Rob Sonke  wrote:

> Tobias,
>
> Somehow I'm missing your replies in gmail. But thanks for the suggestions.
> Using custom models would be a last resort for me. Because I will have to
> replace all occurences. I'm somehow hoping to hook into the localizer.
>
> On Sat, Feb 21, 2015 at 2:01 PM, Rob Sonke  wrote:
>
>> Hi all,
>>
>> I'm trying to achieve a fairly simple thing within .properties files to
>> avoid a lot of duplicate words through different files.
>>
>> For example there's is a HomePage.properties with:
>> lbl.foo=This is an example text, we love ${lbl.item}
>>
>> And then in MyWebApplication.properties:
>> lbl.item=Wicket
>>
>> But as far as I can see, Wicket tries to resolve the parameters with
>> objects passed to eg StringResourceModel. How can I hook into this and
>> solve this in a nice way?
>>
>> Kind regards,
>> Rob
>>
>
>


Re: Resolving nested properties

2015-02-21 Thread Rob Sonke
Tobias,

Somehow I'm missing your replies in gmail. But thanks for the suggestions.
Using custom models would be a last resort for me. Because I will have to
replace all occurences. I'm somehow hoping to hook into the localizer.

On Sat, Feb 21, 2015 at 2:01 PM, Rob Sonke  wrote:

> Hi all,
>
> I'm trying to achieve a fairly simple thing within .properties files to
> avoid a lot of duplicate words through different files.
>
> For example there's is a HomePage.properties with:
> lbl.foo=This is an example text, we love ${lbl.item}
>
> And then in MyWebApplication.properties:
> lbl.item=Wicket
>
> But as far as I can see, Wicket tries to resolve the parameters with
> objects passed to eg StringResourceModel. How can I hook into this and
> solve this in a nice way?
>
> Kind regards,
> Rob
>


Resolving nested properties

2015-02-21 Thread Rob Sonke
Hi all,

I'm trying to achieve a fairly simple thing within .properties files to
avoid a lot of duplicate words through different files.

For example there's is a HomePage.properties with:
lbl.foo=This is an example text, we love ${lbl.item}

And then in MyWebApplication.properties:
lbl.item=Wicket

But as far as I can see, Wicket tries to resolve the parameters with
objects passed to eg StringResourceModel. How can I hook into this and
solve this in a nice way?

Kind regards,
Rob


Re: Wicket6 setResponsePage() stackoverflow error.

2014-11-25 Thread Rob Sonke
Gabriel, did you consider offering the patch to the wicketstuff project?
Maybe those changes are general improvements for all of us. Thanks for
sharing anyway!

On Tue, Nov 25, 2014 at 7:49 PM, Gabriel Landon  wrote:

> I know it's not the error you report, but did you add
> "liferay-web-xml-enabled=false" in the liferay-plugin-package.properties
> file.
> I had to do that to have portlet work with liferay 6.1 and 6.2
> see :
>
> http://apache-wicket.1842946.n4.nabble.com/wicket-portlet-and-liferay-6-1-td4650001.html
>
> Also I'm not using PageParameters, but constructors :
> setResponsePage(new MyClass(param1, param2, ...))
>
> I also had to tweak a few files in the wicketstuff-portlet :
> -PortletRequesMapper (to handle
> BookmarkableListenerInterfaceRequestHandler)
> -WicketPorlet and ResponseStat (to fix some ajax issues)
> wicketstuff-portlet-6.jar
> <
> http://apache-wicket.1842946.n4.nabble.com/file/n4668558/wicketstuff-portlet-6.jar
> >
>
> But still from time to time I've got problem with wicket-portlet and
> liferay
> with an infinite loop that use 100% CPU. Unfortunatly I'm not skilled
> enough
> in Porlet spec to fix this. So from my point of view wicketstuff-portlet is
> not production safe anymore...
>
> Hope this help,
> Gabriel.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket6-setResponsePage-stackoverflow-error-tp4668538p4668558.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Expiration page not shown in case of back button usage

2012-12-11 Thread Rob Sonke
Yes I know but by using the back button it seems to be ignored. Like it
tries to serve the same page no matter we have a session or not.


On Tue, Dec 11, 2012 at 9:59 AM, Martin Grigorov wrote:

> On Mon, Dec 10, 2012 at 9:04 AM, Rob Sonke  wrote:
>
> > Last week we fixed an issue with Wicket 6 where mounted pages were being
> > reconstructed after the session expired. That was due to this (new)
> setting
> > which we set to false now:
> >
> > getPageSettings().setRecreateMountedPagesAfterExpiry(false);
> >
> > This worked perfectly for clicking on (ajax) links but, this doesn't seem
> > to work when I use the back button of the browser after the session
> > expired. What happens is that Wicket tries to reconstruct the previous
> > (mounted bookmarkable) page. But that's failing in our case because we
> dont
> > support that as every page needs session information.
> >
> > Am I doing something wrong? As I would expect a PageExpiredException in
> > this case.
> >
>
> If you need PEE then this is the correct setting.
>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>
>


Expiration page not shown in case of back button usage

2012-12-10 Thread Rob Sonke
Last week we fixed an issue with Wicket 6 where mounted pages were being
reconstructed after the session expired. That was due to this (new) setting
which we set to false now:

getPageSettings().setRecreateMountedPagesAfterExpiry(false);

This worked perfectly for clicking on (ajax) links but, this doesn't seem
to work when I use the back button of the browser after the session
expired. What happens is that Wicket tries to reconstruct the previous
(mounted bookmarkable) page. But that's failing in our case because we dont
support that as every page needs session information.

Am I doing something wrong? As I would expect a PageExpiredException in
this case.


Re: Strange classloader issues

2010-02-02 Thread Rob Sonke
Thanks, might something caused by a headercontributor, it often involves 
something with ajax or javascript. I'll look into it today


On 2/2/10 10:46 AM, Johan Compagner wrote:

look at your html code
because somehow you get those kind of urls
org.apache.wicket.ajax.WicketAjax%3C/div%3E%3Cdiv%20class=
back to wicket and that seems very weird.
it seems that that is a piece of html with those div and class stuff.

It could also be that this is done by some header contribution ?


On Tue, Feb 2, 2010 at 08:49, Rob Sonke  wrote:

   

Hi,

We're having strange errors on several of our online wicket apps which we
can't reproduce but popping up in the logs everyday. It seems that Wicket in
some way is messing up it's full class names with other stuff like html.
I'll add some examples below.

Is this is an issue, if yes, how can we prevent these errors. And if not,
what causes this?

TP-Processor29 ERROR
org.apache.wicket.request.target.resource.SharedResourceRequestTarget:$L]
unable to lazily register shared resource
org.apache.wicket.ajax.WicketAjax%3C/div%3E%3Cdiv%20class=
java.lang.ClassNotFoundException: org.apache.wicket.ajax.WicketAjax%3C
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at
org.apache.wicket.application.DefaultClassResolver.resolveClass(DefaultClassResolver.java:111)
at
org.apache.wicket.request.target.resource.SharedResourceRequestTarget.respond(SharedResourceRequestTarget.java:149)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:468)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:301)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

Or:

TP-Processor110 ERROR
org.apache.wicket.request.target.resource.SharedResourceRequestTarget:$L]
unable to lazily register shared resource
maxxton.newyse.web.component.date.picker.UIDa%3C/ul%3E%20%20%3C/div%3E%3C/div%3E%3Cdiv%20class=
java.lang.ClassNotFoundException:
maxxton.newyse.web.component.date.picker.UIDa%3C
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at
org.apache.wicket.application.DefaultClassResolver.resolveClass(DefaultClassResolver.java:111)
etc..

Regards,
Rob


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


 
   


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Strange classloader issues

2010-02-01 Thread Rob Sonke

Hi,

We're having strange errors on several of our online wicket apps which 
we can't reproduce but popping up in the logs everyday. It seems that 
Wicket in some way is messing up it's full class names with other stuff 
like html. I'll add some examples below.


Is this is an issue, if yes, how can we prevent these errors. And if 
not, what causes this?


TP-Processor29 ERROR 
org.apache.wicket.request.target.resource.SharedResourceRequestTarget:$L] unable 
to lazily register shared resource 
org.apache.wicket.ajax.WicketAjax%3C/div%3E%3Cdiv%20class=

java.lang.ClassNotFoundException: org.apache.wicket.ajax.WicketAjax%3C
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at 
org.apache.wicket.application.DefaultClassResolver.resolveClass(DefaultClassResolver.java:111)
at 
org.apache.wicket.request.target.resource.SharedResourceRequestTarget.respond(SharedResourceRequestTarget.java:149)
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)

at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:468)
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:301)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)


Or:

TP-Processor110 ERROR 
org.apache.wicket.request.target.resource.SharedResourceRequestTarget:$L] unable 
to lazily register shared resource 
maxxton.newyse.web.component.date.picker.UIDa%3C/ul%3E%20%20%3C/div%3E%3C/div%3E%3Cdiv%20class=
java.lang.ClassNotFoundException: 
maxxton.newyse.web.component.date.picker.UIDa%3C
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at 
org.apache.wicket.application.DefaultClassResolver.resolveClass(DefaultClassResolver.java:111)

etc..

Regards,
Rob


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Portlet and ... 2.0 (How to pass parameters?)

2009-08-13 Thread Rob Sonke
It's up to you but I think there is a more beautiful/easier way. Just 
configure the public render params the same in the portlet.xml. Use this 
to set params in e.g. an onClick:


ActionResponse actionResponse = (ActionResponse) 
((PortletRequestContext)PortletRequestContext.get()).getPortletResponse();

actionResponse.setRenderParameter(name.getValue(), value);

And this to retrieve a parameter anywhere:
PortletRequestContext prc = (PortletRequestContext)RequestContext.get();
Map map = prc.getPortletRequest().getPublicParameterMap();
map.get(name.getValue());

But that's up to you :)

Rob

On 8/14/09 1:50 AM, Gonzalo Aguilar Delgado wrote:

Hi all!

I managed to do it with wicket 1.4. This is how:

Define it in portlet.xml


...

 crmportal:userId
 http://www.level2crm.com/params";>x:userId



Every portlet that will use it must also be configured with:

...
crmportal:userId


After doing this the portlet must have access to this parameter. But as
I have not access from Page processing to the
Wicket Portlet class I should hold the variable in session for a while:

 Link link = new Link("id", new
PropertyModel(userObject, "uuid.uuid"))
{
@Override
public void onClick()
{

UUID uuid =  (UUID) 
this.getModelObject();

PortletSession session =
((PortletRequestContext)RequestContext.get()).getPortletRequest()
.getPortletSession();

session.setAttribute(CustomerListPortlet.CURRENT_UUID,
uuid.toString());
}
};


And after in the function processActionResponseState we can set the
public parameter after we recover it from session.

@Override
protected void processActionResponseState(String wicketURL,
String wicketFilterPath, String wicketFilterQuery,
PortletRequest request, ActionResponse response,
WicketResponseState responseState) throws 
PortletException,
IOException {

PortletSession session = request.getPortletSession();
String uuid = (String)session.getAttribute(CURRENT_UUID);
if(uuid!=null)
{
response.setRenderParameter("crmportal:userId", uuid);
}

// TODO Auto-generated method stub
super.processActionResponseState(wicketURL, wicketFilterPath,
wicketFilterQuery, request, response, 
responseState);
}



The other portlets will see this public render parameter as normal
parameter (NOTE: I don't know why not differentiate from the rest of
parameters. Can it have security considerations?).

This is accessible directly in the page (This is other portlet and other
application inside the portal):
IModel loadableUserModel = new LoadableDetachableModel() {

@Override
protected Object load(){
User selectedUser = null;
String value =
((PortletRequestContext)RequestContext.get()).getPortletRequest().getParameter("crmportal:userId");
if(value!=null)
{
UuidUserType uuid = 
UuidUserType.fromString(value);
selectedUser = userDAO.find(uuid);

if(!userDAO.isAttached(selectedUser))
{
userDAO.save(selectedUser); //Attach it
}

Set  setDetails =
selectedUser.getContactBasicDetails();
setDetails.isEmpty();

return setDetails.toArray();
}
return null;
}


};


It seems to work right.

But means are subject of discussion...

Tnx


El jue, 13-08-2009 a las 13:43 +0200, Gonzalo Aguilar Delgado escribió:

   

Hi all!,

I have some questions about parameter passing in portal environment. I
saw that WebPage class can have access to the Application class
but not the portlet class. This makes a little tricky to handle requests
because:

We can set session paramaters. And can call functions inside Application
(WicketExamplesMenuApplicati

Re: Portlet and ... 2.0 (How to pass parameters?)

2009-08-13 Thread Rob Sonke
Could you maybe explain why you need it? Do you want to pass data inside 
your portlet or to another portlet?


Rob

On 8/13/09 1:43 PM, Gonzalo Aguilar Delgado wrote:

Hi all!,

I have some questions about parameter passing in portal environment. I
saw that WebPage class can have access to the Application class
but not the portlet class. This makes a little tricky to handle requests
because:

We can set session paramaters. And can call functions inside Application
(WicketExamplesMenuApplication.getExamples()).

@Override
public void onClick()
{
int index = ((LoopItem)getParent()).getIteration();
ExampleApplication ea =
WicketExamplesMenuApplication.getExamples().get(
index + 1);
PortletSession session =
((PortletRequestContext)RequestContext.get()).getPortletRequest()
.getPortletSession();

session.setAttribute(WicketExamplesMenuPortlet.EXAMPLE_APPLICATION_ATTR,
ea);
}

But it will be the portlet class the responsible for handling
processing. So the only way to pass information from the onClick
function to the
portlet application for rendering (for example) is using the portlet
session.

But I suppose that's not the preferred way.


What's the best way to pass information to the portlet class? Is there
any way to use the portlet class like we use the application class
(WicketExamplesMenuApplication.getExamples() ->
WicketExamplesMenuPortlet.getExamples())


I also saw that in the portlet example, the examples structure is
initialized by the WicketExamplesMenuPortlet and sent to the
WicketExamplesMenuApplication using the servlet context. But this will
overbloat the servlet attributes storage space. Also this should be
solved if webpages could access to the portlet class directly.

Why to do this way?



I want to know all this because I want to use shared render parameters
(I put there a user id and all the portlets update accordingly). To do
this I will do:



 1.- Onclick: Put the Id on the session like above.
 2.- Portlet.DoView: Recover id from session and store it in
 shared render params.
 3.- Delete it from session.


Is this the correct way to do it?


Thank you very much in advance...



   


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: DatePicker

2009-08-12 Thread Rob Sonke
What problem do you have? I haven't used the default datepicker in 
wicket yet but I guess it has its default class names linked which you 
can override in your own css files.


Rob

On 8/12/09 3:25 PM, hakan.stei...@foxt.com wrote:

Hi,

I'm having some problem configuring the DatePicker the way I want. More
specifically how can I change the css of the DatePicker?

Thanks.

-Håkan
   


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AW: Wicket an jQuery: current status

2009-06-04 Thread Rob Sonke
Oh yes I read a while ago that they were planning to merge the two 
projects but didn't notice that that happened already. Looking good so 
far :)


Rob


Dorothée Giernoth wrote:

But wiquery formally known as wiqueXt and jQuery4Wicket is very active and 
going strong: http://code.google.com/p/wiquery/


-Ursprüngliche Nachricht-
Von: Stefan Lindner [mailto:lind...@visionet.de] 
Gesendet: Donnerstag, 4. Juni 2009 08:09

An: users@wicket.apache.org
Betreff: RE: Wicket an jQuery: current status

No, no connections. I thin the wicketstuff project is still based upon jquery 
1.2. I don't know if this project is still active.

-Ursprüngliche Nachricht-----
Von: Rob Sonke [mailto:r...@tigrou.nl] 
Gesendet: Donnerstag, 4. Juni 2009 07:22

An: users@wicket.apache.org
Betreff: Re: Wicket an jQuery: current status

Nice, is there any connection between your project and wickext and the 
existing code in wicketstuff?



On 6/3/09 10:18 PM, Stefan Lindner wrote:
  

Hi all,

as I told you, I am working on a Apache Wicket - jQuery integration. The
current status can be found under
http://subversion.visionet.de/project/WicketJQuery

Stefan

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

   



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

  


Re: Wicket an jQuery: current status

2009-06-03 Thread Rob Sonke
Nice, is there any connection between your project and wickext and the 
existing code in wicketstuff?



On 6/3/09 10:18 PM, Stefan Lindner wrote:

Hi all,

as I told you, I am working on a Apache Wicket - jQuery integration. The
current status can be found under
http://subversion.visionet.de/project/WicketJQuery

Stefan

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

   


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: DropDownChoices: How to force a selection.

2009-05-30 Thread Rob Sonke
It should work with the value in your model. In your case something like 
selectedDistrito.setSelectedChoice(1);


Rob

On 5/30/09 3:02 AM, Marco Santos wrote:

Here is the creation of the DDC:

private void buildDistritosComboBox() {
 DistritosModel distritosModel = new DistritosModel();
 SelectedChoice selectedDistrito = new SelectedChoice();//A class
with a variable selectedChoice and it getter and setter
 DropDownChoice distritosDDC = new DropDownChoice("distritos", new
PropertyModel(selectedDistrito, "selectedChoice"), distritosModel);
 distritosDDC.setOutputMarkupId(true);
 distritosDDC.setRequired(true);
   


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket portlet into liferay

2009-04-23 Thread Rob Sonke

Hi,

Nice to hear that everything seems to work now. About the datepicker, 
which one is that? Because I'm using one from the wicketstuff projects 
(http://www.dynarch.com/static/jscalendar-1.0/index.html) and that one 
is working fine. But we're about to migrate to a jquery based one.


Rob

On 4/23/09 5:28 AM, Tonio Caputo wrote:

Hi,

After trying a lot I finally was able to show and work (more or less).

A warning: Never call your appl/portlet-name with the same name
as the url-mapping, if not it won't work that was the main problem.

My new problem I'm using DatePicker from wicket-extensions/wicket-date
in a form, the date picker is not working (I mean the button that shows the
calendar
and let you choose a date in a friendly way)

Not found something useful in mailing-lists so
I added supports mime-type: text/javascript and application/x-javascript to
portlet.xml, but still not working.

Any idea of what is happening, or a solution to this problem

Thanks very much in advance
tonio

On Tue, Apr 21, 2009 at 5:33 PM, Rob Sonke  wrote:

   

Hi,

We're running wicket 1.4m2 on liferay 5.2.x and that's working fine. We
only use the sun portlet container instead of the one from Liferay. Search
the mailinglist and the liferay forum for the steps which you'll have to
perform.

Rob


On 4/21/09 4:45 AM, Tonio Caputo wrote:

 

Hi,

I've tried with liferay 5.2.2 tomcat6/tomcat55/jetty6.1.14, and no
success.

In both tomcat, application is deployed, but when put into a page, the
application
is not shown.

In jetty, the application doesn't get deployed.

In all cases there is no log, or any message that let me know what is
happening.

Any help will be greatly welcome
Wicket is really a nice framework (the nicer I've seen), and it would be
wonderful if I can use it instead JSP framework provided by liferay.

Thanks in advance
tonio

On Mon, Apr 20, 2009 at 12:21 PM, Tonio Caputo
  wrote:



   

Hi wicket users,

I'm a newbie in wicket and portlets, I'm involved in trying to find a
web framework to create portlets in a liferay portal, my duty is to
try wicket and see if it works.

Versions   wicket 1-4-rc2
  liferay 5.2

After reading  Issue https://issues.apache.org/jira/browse/WICKET-1620,
it
seems clear
that this is possible.

Reading wicket portlet examples, I realized there is a lot of stuff in
WicketPortlet, that
is a bit difficult to understand for a newbie for both things
(wicket/portlet).

I'll just like to know, if this is the correct example after WICKET-1620,
or perhaps there
is a simpler one.

Thanks in advance
tonio




 


   


   


Re: Wicket portlet into liferay

2009-04-21 Thread Rob Sonke

Hi,

We're running wicket 1.4m2 on liferay 5.2.x and that's working fine. We 
only use the sun portlet container instead of the one from Liferay. 
Search the mailinglist and the liferay forum for the steps which you'll 
have to perform.


Rob

On 4/21/09 4:45 AM, Tonio Caputo wrote:

Hi,

I've tried with liferay 5.2.2 tomcat6/tomcat55/jetty6.1.14, and no success.

In both tomcat, application is deployed, but when put into a page, the
application
is not shown.

In jetty, the application doesn't get deployed.

In all cases there is no log, or any message that let me know what is
happening.

Any help will be greatly welcome
Wicket is really a nice framework (the nicer I've seen), and it would be
wonderful if I can use it instead JSP framework provided by liferay.

Thanks in advance
tonio

On Mon, Apr 20, 2009 at 12:21 PM, Tonio Caputo  wrote:

   

Hi wicket users,

I'm a newbie in wicket and portlets, I'm involved in trying to find a
web framework to create portlets in a liferay portal, my duty is to
try wicket and see if it works.

Versions   wicket 1-4-rc2
  liferay 5.2

After reading  Issue https://issues.apache.org/jira/browse/WICKET-1620, it
seems clear
that this is possible.

Reading wicket portlet examples, I realized there is a lot of stuff in
WicketPortlet, that
is a bit difficult to understand for a newbie for both things
(wicket/portlet).

I'll just like to know, if this is the correct example after WICKET-1620,
or perhaps there
is a simpler one.

Thanks in advance
tonio


 


   


Re: Web application using Wicket and iBATIS can't find DAOs?? ...pls help...its urgent

2009-02-06 Thread Rob Sonke
Btw, we're working with the same combination (spring/ibatis/wicket) and 
you'll love it :)


Rob


Kai Mutz wrote:

Edwin Ansicodd  wrote:
  

Thank you Kai for your post!!



2) Install a SpringComponentInjector in your application, e.g.
class MyApplication extends WebApplication {
  public void init() {
   super.init();
   addComponentInstantiationListener(new
SpringComponentInjector(this));
   }
}
  

Yes, also did this:

public class JPSApplication extends SpringWebApplication implements
IUnauthorizedComponentInstantiationListener{

@SpringBean private LookupTableDAO ltDAO;

public void init(){
super.init();

addComponentInstantiationListener(new
SpringComponentInjector(this)); //for the SpringBean
InjectorHolder.getInjector().inject(this);



You do not need the last line here. Adding the SpringComponentInjector is
sufficient. AFAIK the InjectorHolder is needed within classes, which do not
extend a wicket component.

Cheers, Kai



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

  


Re: [OT] wicket users around the world

2008-12-11 Thread Rob Sonke

Middelburg in the Netherlands

francisco treacy wrote:

to know a little bit more of our great (and vast) community, i was
just wondering if you're keen on sharing where you come from and/or
where you work with wicket...

for instance, here argentinian/belgian working with wicket in antibes, france

francisco

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

  


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket integration with good charts api

2008-11-04 Thread Rob Sonke

Google charts good enough? (see wicket stuff projects)

Tomasz Dziurko wrote:

My client needs in his application very good looking charts (simple
bars with some gradienst and 3D effects). Unfortunately he didn't like
what JFreeChart library offers so I must find and implement another
solution.
Questions are:
1. Is there any other chart library easy to integrate with Wicket?
2.Which chart api (could be me commercial, client is
paying) could you suggest?

Thank you for your help

Regards
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Meetings in the Netherlands (or neighbouring countries)

2008-10-28 Thread Rob Sonke
Not really a meeting but at november the 12th there's the NLJug's JFall 
again with at least one wicket session. I'll be there anyway.


Rob


Harro Lissenberg wrote:

A colleague and I are getting more and more interested in Wicket and
where wondering if any meetings/presentations/lectures in or around
the Netherlands are being planned.
The community meetups page is rather out-of-date:

http://cwiki.apache.org/WICKET/community-meetups.html

So, anybody out there know of any meetings that might be worthwhile?

-
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: Stream/download files through portlet

2008-10-15 Thread Rob Sonke
Thijs and I debugged the code together this morning because when he read 
this thread he was sure that both options (overriding setheaders and 
onclick) should work. After some debugging we found a bug in Liferay 
which could be easily fixed in our used version. The current (5.1.2) 
version has a lot of changes around these properties, we will recheck 
that once we're able to upgrade.


Thanks for your help.

Serkan Camurcuoglu wrote:

In the PLT.12.1.1 section of jsr 286 it says:

"Response properties can be viewed as header values set for the portal
application. If these header values are intended to be transmitted to the
client they should be set before the response is committed. When setting
headers in the render lifecycle phase portlets should set the header in the
render headers part or simply override the GenericPortlet.doHeaders method
(see PLT.11.1.1.4.3)."

I think you may try:

PortletRequestContext ctx = (PortletRequestContext) RequestContext.get();
PortletResponse presp = ctx.getPortletResponse();
presp.addProperty("header", "value");

this is kind of a hack but it might work..




Rob Sonke wrote:
  

No, too bad. The headers aren't picked up.


Serkan Camurcuoglu wrote:


For the DynamicWebResource case, doesn't overriding setHeaders() in
DynamicWebResource and adding your http header in this method work?

By the way, which portlet container are you working with?




Rob Sonke wrote:
  
  

Hi,

We're using wicket for our portlets now for almost 3/4 year and it's 
great. We're following/try to help with the full implementation of jsr 
286 in wicket too (Thijs and me, see other threads). But I'm having a 
problem now with offering files through a portlet. There are actually 
two options, use the resource phase of jsr286 or use a separate download 
servlet. First option rocks, second option not (if option 1 won't work, 
I'll have to deal with it but I prefer not).


So I'm trying to serve a file through the portlet based on a wicket 
link. A normal link would end up in a actionResponse which will not 
allow you to touch the resourcestream (returning null as the portlet 
specs describe). An ajax link (which uses the resource phase) will end 
up with a lot of binary code in the ajax xml output which will, of 
course, not work.


I tried also adding a DynamicWebResource to a wicket ResourceLink, which 
works actually pretty good except that he's not communicating the 
filename to the brower by setting a header. I tried adding a header to 
the ResourceResponse but that one was not passed to the client too 
(maybe I did that wrong).


Could anyone point me in the right direction or could tell me what I'm 
doing wrong over here?


Regards,
Rob

-
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: Stream/download files through portlet

2008-10-14 Thread Rob Sonke
Awesome! I was pretty sure that I tried that too but probably not in 
combination with other changes. I have overridden the onclick like this:


ResourceLink link = new ResourceLink("downloadLink", resource)
   {
 /* (non-Javadoc)
  * @see org.apache.wicket.markup.html.link.ResourceLink#onClick()
  */
 @Override
 public void onClick()
 {
   super.onClick();
   PortletRequestContext ctx = (PortletRequestContext) 
RequestContext.get();

   PortletResponse presp = ctx.getPortletResponse();
   presp.addProperty("Content-Disposition", 
String.format("attachment; filename=\"%s\"", "boe.doc"));

 }
   };

Thanks, that made my day :)

Rob


Serkan Camurcuoglu wrote:

In the PLT.12.1.1 section of jsr 286 it says:

"Response properties can be viewed as header values set for the portal
application. If these header values are intended to be transmitted to the
client they should be set before the response is committed. When setting
headers in the render lifecycle phase portlets should set the header in the
render headers part or simply override the GenericPortlet.doHeaders method
(see PLT.11.1.1.4.3)."

I think you may try:

PortletRequestContext ctx = (PortletRequestContext) RequestContext.get();
PortletResponse presp = ctx.getPortletResponse();
presp.addProperty("header", "value");

this is kind of a hack but it might work..




Rob Sonke wrote:
  

No, too bad. The headers aren't picked up.


Serkan Camurcuoglu wrote:


For the DynamicWebResource case, doesn't overriding setHeaders() in
DynamicWebResource and adding your http header in this method work?

By the way, which portlet container are you working with?




Rob Sonke wrote:
  
  

Hi,

We're using wicket for our portlets now for almost 3/4 year and it's 
great. We're following/try to help with the full implementation of jsr 
286 in wicket too (Thijs and me, see other threads). But I'm having a 
problem now with offering files through a portlet. There are actually 
two options, use the resource phase of jsr286 or use a separate download 
servlet. First option rocks, second option not (if option 1 won't work, 
I'll have to deal with it but I prefer not).


So I'm trying to serve a file through the portlet based on a wicket 
link. A normal link would end up in a actionResponse which will not 
allow you to touch the resourcestream (returning null as the portlet 
specs describe). An ajax link (which uses the resource phase) will end 
up with a lot of binary code in the ajax xml output which will, of 
course, not work.


I tried also adding a DynamicWebResource to a wicket ResourceLink, which 
works actually pretty good except that he's not communicating the 
filename to the brower by setting a header. I tried adding a header to 
the ResourceResponse but that one was not passed to the client too 
(maybe I did that wrong).


Could anyone point me in the right direction or could tell me what I'm 
doing wrong over here?


Regards,
Rob

-
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: Stream/download files through portlet

2008-10-14 Thread Rob Sonke

No, too bad. The headers aren't picked up.


Serkan Camurcuoglu wrote:

For the DynamicWebResource case, doesn't overriding setHeaders() in
DynamicWebResource and adding your http header in this method work?

By the way, which portlet container are you working with?




Rob Sonke wrote:
  

Hi,

We're using wicket for our portlets now for almost 3/4 year and it's 
great. We're following/try to help with the full implementation of jsr 
286 in wicket too (Thijs and me, see other threads). But I'm having a 
problem now with offering files through a portlet. There are actually 
two options, use the resource phase of jsr286 or use a separate download 
servlet. First option rocks, second option not (if option 1 won't work, 
I'll have to deal with it but I prefer not).


So I'm trying to serve a file through the portlet based on a wicket 
link. A normal link would end up in a actionResponse which will not 
allow you to touch the resourcestream (returning null as the portlet 
specs describe). An ajax link (which uses the resource phase) will end 
up with a lot of binary code in the ajax xml output which will, of 
course, not work.


I tried also adding a DynamicWebResource to a wicket ResourceLink, which 
works actually pretty good except that he's not communicating the 
filename to the brower by setting a header. I tried adding a header to 
the ResourceResponse but that one was not passed to the client too 
(maybe I did that wrong).


Could anyone point me in the right direction or could tell me what I'm 
doing wrong over here?


Regards,
Rob

-
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: Stream/download files through portlet

2008-10-14 Thread Rob Sonke
Thanks for your answer. I think overriding the setHeaders will end up 
with the same result as with adding the filename through the constructor 
of DynamicWebResource but I'll try it in some minutes.


We're using Liferay as the portal.

Rob


Serkan Camurcuoglu wrote:

For the DynamicWebResource case, doesn't overriding setHeaders() in
DynamicWebResource and adding your http header in this method work?

By the way, which portlet container are you working with?




Rob Sonke wrote:
  

Hi,

We're using wicket for our portlets now for almost 3/4 year and it's 
great. We're following/try to help with the full implementation of jsr 
286 in wicket too (Thijs and me, see other threads). But I'm having a 
problem now with offering files through a portlet. There are actually 
two options, use the resource phase of jsr286 or use a separate download 
servlet. First option rocks, second option not (if option 1 won't work, 
I'll have to deal with it but I prefer not).


So I'm trying to serve a file through the portlet based on a wicket 
link. A normal link would end up in a actionResponse which will not 
allow you to touch the resourcestream (returning null as the portlet 
specs describe). An ajax link (which uses the resource phase) will end 
up with a lot of binary code in the ajax xml output which will, of 
course, not work.


I tried also adding a DynamicWebResource to a wicket ResourceLink, which 
works actually pretty good except that he's not communicating the 
filename to the brower by setting a header. I tried adding a header to 
the ResourceResponse but that one was not passed to the client too 
(maybe I did that wrong).


Could anyone point me in the right direction or could tell me what I'm 
doing wrong over here?


Regards,
Rob

-
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]



Stream/download files through portlet

2008-10-14 Thread Rob Sonke

Hi,

We're using wicket for our portlets now for almost 3/4 year and it's 
great. We're following/try to help with the full implementation of jsr 
286 in wicket too (Thijs and me, see other threads). But I'm having a 
problem now with offering files through a portlet. There are actually 
two options, use the resource phase of jsr286 or use a separate download 
servlet. First option rocks, second option not (if option 1 won't work, 
I'll have to deal with it but I prefer not).


So I'm trying to serve a file through the portlet based on a wicket 
link. A normal link would end up in a actionResponse which will not 
allow you to touch the resourcestream (returning null as the portlet 
specs describe). An ajax link (which uses the resource phase) will end 
up with a lot of binary code in the ajax xml output which will, of 
course, not work.


I tried also adding a DynamicWebResource to a wicket ResourceLink, which 
works actually pretty good except that he's not communicating the 
filename to the brower by setting a header. I tried adding a header to 
the ResourceResponse but that one was not passed to the client too 
(maybe I did that wrong).


Could anyone point me in the right direction or could tell me what I'm 
doing wrong over here?


Regards,
Rob

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket talk at NL-JUG's J-Fall

2008-10-09 Thread Rob Sonke

Great, will be there.

Rob


Erik van Oosten wrote:
Just to let you know. My talk 'Effective Wicket', targeted at starting 
Wicketeers has been accepted on NL-JUG's J-Fall.


http://www.nljug.org/jfall/

Regards,
   Erik.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: setOutputMarkupId and Ajax

2008-10-03 Thread Rob Sonke
Oh stupid, you're right. Only the targets needs the setOutputMarkupId 
true...



Igor Vaynberg wrote:

like which ones?

-igor

On Fri, Oct 3, 2008 at 12:44 PM, Rob Sonke <[EMAIL PROTECTED]> wrote:
  

I understand that but why not adding it by default to the constructor of all
ajax components?

Rob


Igor Vaynberg wrote:


wicket only knows that the component needs it when you add it to the
ajax request target. by the time you add it to the ART the component
has already been rendered into the browser during the previous
request, and so its too late at this point - all we can do is warn
you.

-igor

On Fri, Oct 3, 2008 at 11:01 AM, Mathias P.W Nilsson
<[EMAIL PROTECTED]> wrote:

  

Hi!

I don't know if this has already been answered but here it goes.

When use Ajax with wicket you have to set the the component to output
it's
markup id or else wicket framework complains about not having it set. Now
Why isn't the components markup set automatically
when wicket knows about it? Why not skip this, for ajax anyway. If you
want
to do some other javascript the output it but otherwise wicket could take
care of it or maybe I'm missing something.

// Mathias
--
View this message in context:
http://www.nabble.com/setOutputMarkupId-and-Ajax-tp19802839p19802839.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]


  

-
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: setOutputMarkupId and Ajax

2008-10-03 Thread Rob Sonke
I understand that but why not adding it by default to the constructor of 
all ajax components?


Rob


Igor Vaynberg wrote:

wicket only knows that the component needs it when you add it to the
ajax request target. by the time you add it to the ART the component
has already been rendered into the browser during the previous
request, and so its too late at this point - all we can do is warn
you.

-igor

On Fri, Oct 3, 2008 at 11:01 AM, Mathias P.W Nilsson
<[EMAIL PROTECTED]> wrote:
  

Hi!

I don't know if this has already been answered but here it goes.

When use Ajax with wicket you have to set the the component to output it's
markup id or else wicket framework complains about not having it set. Now
Why isn't the components markup set automatically
when wicket knows about it? Why not skip this, for ajax anyway. If you want
to do some other javascript the output it but otherwise wicket could take
care of it or maybe I'm missing something.

// Mathias
--
View this message in context: 
http://www.nabble.com/setOutputMarkupId-and-Ajax-tp19802839p19802839.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]

  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Wicket in Action Jubilation

2008-09-06 Thread Rob Sonke
Mine arrived today,  ordered at Manning and shipped to the Netherlands. 
I was already excited about the ebook but I can't wait to dive into this 
one! Great work guys!



Jonathan Locke wrote:

i just got mine today.

it is really really nice!!!


Martijn Dashorst wrote:
  

Thanks for the report, I've notified Manning of this issue and they're
looking into it.

I also asked when the books should arrive. If you've ordered from
Manning, you should receive your copy one of these days. As I
understand it, shipping was happening today or tomorrow. I'm not sure
if you get a message that the book was shipped.

If you ordered your copy with Amazon, you might have to wait longer as
the books need to go to Amazon first before they get shipped out (and
that happens on Amazon's schedule, nothing much Manning can do about).
This may be a bit disappointing, but remember that you got a great
discount.

A big thanks to everybody that reviewed/bought the book, hang on just
a little more—the book is coming (provided you ordered the print
edition).

Martijn

On Mon, Sep 1, 2008 at 12:23 AM, James Carman
<[EMAIL PROTECTED]> wrote:


I called my local Barnes & Noble today asking if they had a copy of
WIA and the lady said "that book is out of print; perhaps you can get
one used through B&N.com."  The Waldenbooks in our mall said it was on
"back order" (I'm assuming this is because of my two talks I gave to
the Cincinnati Java Users Group).  Is anyone else having issues
getting a copy at brick and mortar stores?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


--
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.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: Problem with CheckBox and CheckGroup

2008-05-13 Thread Rob Sonke
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