开发者

Unable to bind dynamic html to spring command object on post?

开发者 https://www.devze.com 2023-02-12 21:13 出处:网络
I\'ve ajax& jquery code to get html and append to existing html in original page using div tags. New html elements include开发者_如何学运维 text boxes, dropdown boxes.

I've ajax & jquery code to get html and append to existing html in original page using div tags.

New html elements include开发者_如何学运维 text boxes, dropdown boxes.

On page submit, I don't see these values in my spring command object.

I tried to debug, I see the dom has empty value for added elements' form variable.

How to bind these elements to the command object?

I've spent few hrs resolving this, bt no luck...

Please help me


i think your input name should match with your variable name(corresponding variables) declared in your model class..for example if you have input text box name is textBox1 then in model you should have..private String textBox1="";

if it's not the case then post some of your code..


Thanks for responding.. Vivek and gowri...

I was able to resolve this isssue...it was related to Browser...It didn't work in Firefox, but worked good in IE.. (html format issue in Firefox I suppose)

And , with few trial and err..I was able to make it work in Firefox too...

When I've my form tag with in main html table tag, it didn't work. I moved my form tag above table tag...and it worked both in Firefox and IE..

0

精彩评论

暂无评论...
验证码 换一张
取 消