grails update td in a form
===

I have a button that updates a tag like fieldset or td to show the rendered template:

       <td id="tdBtn"><g:submitToRemote name="showFieldSet" value="Edit" update="fieldSet" action="setPwdTxtVisible" onComplete="hideBtn(3)" /></td>

     <fieldset id="fieldSet">
    <-- this will be the section where the template will be rendered upon btn click name="showFieldSet" -->
         
        </fieldset>

the action:

    def setPwdTxtVisible=
    	{
    		def employeeId= params.employeeId
    		MySession session = MySession.getMySession(request, params.employeeId)
    		session.profileInstance.isEditPwd = true
    		render(template:"/layouts/passwordProfile")
    	
    	}

Is there a way to do the update inside a def method instead of in a button? The thing is when the validate fails upon saving the data, the page is reloaded and the updated td comes back to no rendered template again. I want to update the td inside the catch (in a try catch)so that the template will still be there.  like coding it this way: And how do I access the td in the frist place not using javascript? Is this possible?

   

     def setPwdTxtVisible=
    	{
    		def employeeId= params.employeeId
    		MySession session = MySession.getMySession(request, params.employeeId)
    		session.profileInstance.isEditPwd = true
    		render(template:"/layouts/passwordProfile")
         	update fieldset //<<------
    	
    	}