Greetings to the developers of the lovely framework, tapestry5

I wrote a form with a single text field, this field is bound to a string
object. When I enter a single or multiple spaces in this text field and
submit the form, the obtained values is always null.
I checked the supplies values in an injected request object, I found the
value I'm expecting, but it's not provided in the other usual tapestry way.
Is there a way I can override such behavior ?
I think I should raise an issue but I need you guys to help me figure out
if there is something wrong I'm doing.

I have to say that I have other fields that will have blank values so I
should be able to distinguish between empty fields and fields with spaces
only.

<t:form t:id="myform">
Hello,
<t:textfield t:id="textValue"/>
</t:form>

@Property
private String textValue;
@Component(id = "textValue")
private TextField textField;
@Inject
private Request request;

@OnEvent(component = "myform", value = EventConstants.VALIDATE)
void validate() {
System.out.println(textValue == null ? 0 : textValue.length());
System.out.println("\"" + textValue + "\"");
for (String pn : request.getParameterNames()) {
System.out.println("\"" + pn + "\":\"" + request.getParameter(pn) + "\"");
}
}

@OnEvent(component = "myform", value = EventConstants.SUCCESS)
void success() {
System.out.println(textValue == null ? 0 : textValue.length());
System.out.println("\"" + textValue + "\"");
for (String pn : request.getParameterNames()) {
System.out.println("\"" + pn + "\":\"" + request.getParameter(pn) + "\"");
}
}

Thank you.
-- 
*Regards,*
*Muhammad Gelbana
Java Developer*

Reply via email to