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

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -