I have created a component that I use in some form.
& lt ;! DOCTYPE HTML Public "- // W3C // DTD XHTML 1.0 Strict // N" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-ercd.dtd" & gt; & Lt; Html xmlns: t = "http://tapestry.apache.org/schema/tapestry_5_3.xsd" & gt; & Lt; Noscript class = "js-required" & gt; $ {Message: javascript_required} & lt; / Noscript & gt; & Lt; T: Content & gt; & Lt; Table & gt; & Lt; TR & gt; & Lt; H2 & gt; Vehicles: & lt; / H2 & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; VRM: & lt; / Td> & Lt; TD & gt; & Lt; Input t: type = "TextField" t: value = "vehicle.vrm" t: id = "vrmTextField" t: Valid = "minlength = 3, maxlength = 15" size = "30" /> & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt; & Lt; / T: Content & gt;
and Java
public class vehicle company {
@ property vehicle vehicle; Vehicle Company () {Vehicles = New Vehicles (); } Public Zero Clear () {Vehicle = New Vehicle (); }} The problem is that when I am part of this component, I submit the form, I believe in the textfield - I want to clear it from the area. My other simple components which use properties like sting, inc, are all obvious.
componentResources.discardPersistentFieldChanges () does not work on the vehicle component, nor does the call to the obvious method directly above. I think if I want to add @stistist for the vehicle item then component. Resources. DISCARD PRESENTANTFIELD CHANGE () will work - but I cant speak because you can not instantify a @STIST-ed object if I delete the @protect then I get a blank pointer
how to continue Any advice about clearing the object value from the field in my component? Is my only option using @presscost before occupying prices, so do I want to clear the fields of the components? Text ">
You can try the Vehicle = New Vehicle (); in onSuccessFromForm () . Or you can write your vehicle.vrm From vehicle.Worm and then you can set vehicle = void to onSuccessFromForm () . < / Div>
No comments:
Post a Comment