dinesh707 wrote > following are my code parts. So when some one and a mp3URL to some text > area, system will send a ajax request to " onMp3UrlChanged()". Then it > will get the title and set that value into "songName" and refresh the > zone. IT WORKS!. But my problem is later when i change the text in the > TextField and call "uploadToDB()" inside "onSuccess()", then still the > output will be last set value to the "songName". It is not taking the new > update from the form. > > WHY? and how to fix it ? > > --- java class --- > @Persist > @Property > private String songName; > > @InjectComponent(value="songName") > private TextField songNameField; > > //this is an ajax call > void onMp3UrlChanged() { > mp3Url = request.getParameter("param"); > sip = new SongInformationParser(mp3Url); > songName = sip.getTitle(); > disabled = false; > ajaxResponseRenderer.addRender("songInfoZone1", songInfoZone1) > } > > void uploadToDB(){ > System.out.println(songName); > } > > --- TML --- > <t:zone t:id="songInfoZone1" id="songInfoZone1"> > > <input t:type="TextField" t:id="songName" disabled="${disabled}" > size="30"/> > </t:zone>
Is your disabled property also @Persist? If not it will be re-initalized with false and Tapestry will not bind disabled fields. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Why-variable-do-not-update-in-a-text-field-tp5717217p5717223.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org