Re: Image based on external url model object

2015-11-27 Thread Tobias Soloschenko
Hi Sebastien,

thanks for testing :-) 

I thought it would be nice to get all models by the default WebComponent method 
and that they are all stored as defaultmodelobject. 

WDTY?

Anyway it would safe 2 methods.

kind regards

Tobias

> Am 28.11.2015 um 01:15 schrieb Sebastien :
> 
> Hi Tobias,
> 
> My mega bad, my object was null at the page initialization! :/
> 
> However, I am wondering why your model is a merged array of models, thus
> handling 2 different cases...
> Wouldn't had been simpler to leave the "src" as the default model and
> "srcSet" as another internal model array or ListModel? It would simplify
> the code and definitely ease the CPM case :)
> 
> Thanks & best regards,
> Sebastien.
> 
> 
>> On Fri, Nov 27, 2015 at 11:10 PM, Sebastien  wrote:
>> 
>> Hi Tobias,
>> 
>> Sorry for the delay for testing your new component! As a first feedback:
>> 
>> 1/ Actually, the component works if used with a direct model:
>> form.add(new ExternalImage("gravatarImageURL", Model.of("
>> http://www.gravatar.com/avatar/13532aede1a04cc766f6ac5c19ef7ff4";)));
>> 
>> 2/ Strangely, it crashes when used with a PropertyModel, like:
>> this.add(new ExternalImage("gravatarImageURL", new
>> PropertyModel(this.getModel(), "gravatarImageURL")));
>> 
>> java.lang.NullPointerException
>> at 
>> org.apache.wicket.markup.html.image.ExternalImage.buildSrcAttribute(ExternalImage.java:168)
>> at 
>> org.apache.wicket.markup.html.image.ExternalImage.onComponentTag(ExternalImage.java:142)
>> at 
>> org.apache.wicket.Component.internalRenderComponent(Component.java:2521)
>> 
>> 3/ There is no ctor for working with CPM, like: new
>> ExternalImage("gravatarImageURL")
>> 
>> Thanks again & best regards :)
>> Sebastien.
>> 
>> 
>>> On Tue, Nov 24, 2015 at 6:30 PM, Sebastien  wrote:
>>> 
>>> Hi Tobias,
>>> 
>>> Thanks again, I will try to test this tonight...
>>> 
>>> Best regards,
>>> Sebastien.
>>> 
>>> 
>>> 
>>> On Tue, Nov 24, 2015 at 6:28 PM, Tobias Soloschenko <
>>> tobiassolosche...@googlemail.com> wrote:
>>> 
 Here they are:
 
 
 https://github.com/klopfdreh/wicket-components-playground/wiki/19.-ExternalImage
 
 To test only copy them into your classpath and it would be nice to give
 me some feedback.
 
 kind regards
 
 Tobias
 
 P.S.: If they fit the requirements I'm going to create a PR.
 
 

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



Re: Image based on external url model object

2015-11-27 Thread Sebastien
Hi Tobias,

My mega bad, my object was null at the page initialization! :/

However, I am wondering why your model is a merged array of models, thus
handling 2 different cases...
Wouldn't had been simpler to leave the "src" as the default model and
"srcSet" as another internal model array or ListModel? It would simplify
the code and definitely ease the CPM case :)

Thanks & best regards,
Sebastien.


On Fri, Nov 27, 2015 at 11:10 PM, Sebastien  wrote:

> Hi Tobias,
>
> Sorry for the delay for testing your new component! As a first feedback:
>
> 1/ Actually, the component works if used with a direct model:
> form.add(new ExternalImage("gravatarImageURL", Model.of("
> http://www.gravatar.com/avatar/13532aede1a04cc766f6ac5c19ef7ff4";)));
>
> 2/ Strangely, it crashes when used with a PropertyModel, like:
> this.add(new ExternalImage("gravatarImageURL", new
> PropertyModel(this.getModel(), "gravatarImageURL")));
>
> java.lang.NullPointerException
>  at 
> org.apache.wicket.markup.html.image.ExternalImage.buildSrcAttribute(ExternalImage.java:168)
>  at 
> org.apache.wicket.markup.html.image.ExternalImage.onComponentTag(ExternalImage.java:142)
>  at 
> org.apache.wicket.Component.internalRenderComponent(Component.java:2521)
>
> 3/ There is no ctor for working with CPM, like: new
> ExternalImage("gravatarImageURL")
>
> Thanks again & best regards :)
> Sebastien.
>
>
> On Tue, Nov 24, 2015 at 6:30 PM, Sebastien  wrote:
>
>> Hi Tobias,
>>
>> Thanks again, I will try to test this tonight...
>>
>> Best regards,
>> Sebastien.
>>
>>
>>
>> On Tue, Nov 24, 2015 at 6:28 PM, Tobias Soloschenko <
>> tobiassolosche...@googlemail.com> wrote:
>>
>>> Here they are:
>>>
>>>
>>> https://github.com/klopfdreh/wicket-components-playground/wiki/19.-ExternalImage
>>>
>>> To test only copy them into your classpath and it would be nice to give
>>> me some feedback.
>>>
>>> kind regards
>>>
>>> Tobias
>>>
>>> P.S.: If they fit the requirements I'm going to create a PR.
>>>
>>>


Re: Image based on external url model object

2015-11-27 Thread Sebastien
Hi Tobias,

Sorry for the delay for testing your new component! As a first feedback:

1/ Actually, the component works if used with a direct model:
form.add(new ExternalImage("gravatarImageURL", Model.of("
http://www.gravatar.com/avatar/13532aede1a04cc766f6ac5c19ef7ff4";)));

2/ Strangely, it crashes when used with a PropertyModel, like:
this.add(new ExternalImage("gravatarImageURL", new
PropertyModel(this.getModel(), "gravatarImageURL")));

java.lang.NullPointerException
 at 
org.apache.wicket.markup.html.image.ExternalImage.buildSrcAttribute(ExternalImage.java:168)
 at 
org.apache.wicket.markup.html.image.ExternalImage.onComponentTag(ExternalImage.java:142)
 at org.apache.wicket.Component.internalRenderComponent(Component.java:2521)

3/ There is no ctor for working with CPM, like: new
ExternalImage("gravatarImageURL")

Thanks again & best regards :)
Sebastien.


On Tue, Nov 24, 2015 at 6:30 PM, Sebastien  wrote:

> Hi Tobias,
>
> Thanks again, I will try to test this tonight...
>
> Best regards,
> Sebastien.
>
>
>
> On Tue, Nov 24, 2015 at 6:28 PM, Tobias Soloschenko <
> tobiassolosche...@googlemail.com> wrote:
>
>> Here they are:
>>
>>
>> https://github.com/klopfdreh/wicket-components-playground/wiki/19.-ExternalImage
>>
>> To test only copy them into your classpath and it would be nice to give
>> me some feedback.
>>
>> kind regards
>>
>> Tobias
>>
>> P.S.: If they fit the requirements I'm going to create a PR.
>>
>>


Re: Avoid busy indicator into DataTable

2015-11-27 Thread Marco Di Sabatino Di Diodoro



Il 27/11/2015 11:21, Marco Di Sabatino Di Diodoro ha scritto:

Hi all,

I add a checkgroup into datatable.

group = new ActionTableCheckGroup("checkgroup", model) {

};

group.add(new AjaxFormChoiceComponentUpdatingBehavior() {

private static final long serialVersionUID = 
-151291731388673682L;


@Override
protected void onUpdate(final AjaxRequestTarget target) {
}
});

When I select all or one checkbox, the Ajax busy Indicator begins with 
flickering for all the chosen elements. How can I remove this behavior 
for the checkgroup component?
One solution was to ovverride BootstrapAjaxPagingNavigator with an 
submit link and remove AjaxFormChoiceComponentUpdatingBehavior, but 
prev and next aren't working for me.


Any suggestions are welcome

I solved the problem my question by extending the 
AjaxFormChoiceComponentUpdatingBehavior class and implementing 
IAjaxIndicatorAware.


Regards
M

Marco



--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/


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



Re: Form: Validation of JSR-303 Class Level Constraints

2015-11-27 Thread Martin Grigorov
Hi,

  

42Lines Bean Validation has been merged to Wicket since 6.x

The code is at https://github.com/apache/wicket/tree/master/wicket-bean-
validation

Examples: http://examples7x.wicket.apache.org/bean-validation/

Documentation:
https://ci.apache.org/projects/wicket/guide/7.x/guide/forms2.html#forms2_4

> On Nov 27 2015, at 1:16 pm, Eugen Berenstein
 wrote:  

>

> Hi,  
I need to apply cross field constraints to an object with JSR-303. As I  
understand class level constraints are the correct tool for this.  
Is there a way in Wicket 7 or 8 to apply these on a Form's model object?

>

> I have tried the 42lines:wicket-bean-validation library but the release  
1.1 seems to be incompatible this Wicket 7. I also have overwritten  
Form.onValidateModelObjects()  
and added the validation there which does work but seems insufficient to  
me.

>

> Thank You, Eugen Berenstein



Form: Validation of JSR-303 Class Level Constraints

2015-11-27 Thread Eugen Berenstein
Hi,
I need to apply cross field constraints to an object with JSR-303. As I 
understand class level constraints are the correct tool for this.
Is there a way in Wicket 7 or 8 to apply these on a Form's model object?

I have tried the 42lines:wicket-bean-validation library but the release 
1.1 seems to be incompatible this Wicket 7. I also have overwritten 
Form.onValidateModelObjects()
and added the validation there which does work but seems insufficient to 
me.

Thank You, Eugen Berenstein

Avoid busy indicator into DataTable

2015-11-27 Thread Marco Di Sabatino Di Diodoro

Hi all,

I add a checkgroup into datatable.

group = new ActionTableCheckGroup("checkgroup", model) {

};

group.add(new AjaxFormChoiceComponentUpdatingBehavior() {

private static final long serialVersionUID = 
-151291731388673682L;


@Override
protected void onUpdate(final AjaxRequestTarget target) {
}
});

When I select all or one checkbox, the Ajax busy Indicator begins with 
flickering for all the chosen elements. How can I remove this behavior 
for the checkgroup component?
One solution was to ovverride BootstrapAjaxPagingNavigator with an 
submit link and remove AjaxFormChoiceComponentUpdatingBehavior, but prev 
and next aren't working for me.


Any suggestions are welcome

Marco

--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/