Re: Overriding and translating JSR-303 validation messages

2016-05-18 Thread Kalle Korhonen
You should be able to override them by adding a
ValidationMessages.properties file at the root of your classpath. See
https://github.com/apache/tapestry-5/blob/master/tapestry-beanvalidator/src/test/resources/ValidationMessages_en.properties
for examples.

Kalle

On Wed, May 18, 2016 at 4:34 AM, Casey Link  wrote:

> G'day,
>
> In tapestry < 5.4 the validation messages for JSR-303 lived at
>
> org / apache / tapestry5 / internal / ValidationMessages.properties
>
> In tapestry 5.4 however, I cannot find the properties file that contains
> these messages.
>
> Could someone kindly point me in the right direction? I'd like to
> localize them as well as override a few in english ("may not be null"
> isn't very user friendly).
>
> Best,
>
> --
> Casey Link
>
> Outskirts Labs { https://outskirtslabs.com }
> Technology for Changemakers
>
>


Overriding and translating JSR-303 validation messages

2016-05-18 Thread Casey Link
G'day,

In tapestry < 5.4 the validation messages for JSR-303 lived at

org / apache / tapestry5 / internal / ValidationMessages.properties

In tapestry 5.4 however, I cannot find the properties file that contains
these messages.

Could someone kindly point me in the right direction? I'd like to
localize them as well as override a few in english ("may not be null"
isn't very user friendly).

Best,

-- 
Casey Link

Outskirts Labs { https://outskirtslabs.com }
Technology for Changemakers



Re: [tapestry5-jquery] CustomDatepicker mixin not working

2016-05-18 Thread Nathan Quirynen



On 17/05/16 21:43, françois facon wrote:

Hi Nathan,

Could you open an issue at 
https://github.com/got5/tapestry5-jquery/issues ?


François

2016-05-17 10:34 GMT+02:00 Nathan Quirynen 
mailto:nat...@pensionarchitects.be>>:


Hi,

I'm upgrading to tapestry:5.4.0 and tapestry-jquery:4.0.0.

I have the following .tml:





and in my java code:

@Property
private LocalDate someDate;

public JSONObject getParams() {
JSONObject params = new JSONObject();
params.put("dateFormat", "dd-mm-yy");
params.put("changeMonth", true);
params.put("changeYear", true);
return params;
}

In the browsers console I do see the following:

Invoking

tjq/customdatepicker({"selector":"#someDateField","params":{"dateFormat":"dd-mm-yy","changeMonth":true,"changeYear":true,"selector":"#someDateField"}})

But for some reason the parameters are not being applied to the
component...


I have noticed that it does work when it is inside a Zone and when
the Zone is rerendered, but cannot find out why...
Hope you guys can find the problem!


Example code you can test yourself:


/CustomDatePickerTest.tml/


http://tapestry.apache.org/schema/tapestry_5_4.xsd
"
xmlns:p="tapestry:parameter">







Rerender




/CustomDatePicker.java/

public class CustomDatePickerTest {

@Property
private LocalDate someDate;
@Inject
private AjaxResponseRenderer ajax;
@InjectComponent
private Zone zone;

public JSONObject getParams() {
JSONObject params = new JSONObject();
params.put("dateFormat", "dd-mm-yy");
params.put("changeMonth", true);
params.put("changeYear", true);
return params;
}

void onRerender() {
ajax.addRender(zone);
}
}