• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

[Struts2] dinamic name for textfield

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I need pass dinamic name at textfield tag.

For example:
<s:textfield name="<%=request.getParameter("type")%>.myField" maxlength="250" size="20px;"/>

Is it possible?

My Action contains these objects:
MyBean myBean1 = new MyBean();
MyBean myBean2 = new MyBean();

his name is generic, type can be myBean1 or myBean2

MyBean class contains myField attribute

Help please

Thanks in advance
reply
    Bookmark Topic Watch Topic
  • New Topic