java - Override name attribute in own tag in spring-mvc -


i wrote own tag in tag library descriptor , implementation in java.

public class protectedhidden extends abstracthtmlelementtag {       @override      protected int writetagcontent(tagwriter tagwriter) throws jspexception {         string hash = (string) super.pagecontext.getsession().getattribute("csrftokenmanager.tokenval");         string oldvalue = getdisplaystring(getboundvalue(), getpropertyeditor());         string newvalue = desedeencryption.encrypt(oldvalue + "|" + hash.replace("-", ""), hash);         string oldname = (string) super.getpath();         string newname = "zf_" + oldname;          tagwriter.starttag("input");         writedefaultattributes(tagwriter);         tagwriter.writeattribute("type", "hidden");         tagwriter.writeattribute("name", newname);         tagwriter.writeattribute("value", processfieldvalue(getname(), newvalue, "hidden"));         tagwriter.endtag();         return skip_body;     } } 

i'm trying set attribute name, rendered element has old name. tried set name processfieldvalue, nothing has changed. how can it?


Comments

Popular posts from this blog

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -