• 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

Customizing FormPropertyConfig

 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The struts-config_1_2.dtd indicates that one can have a custom class that
extends FormPropertyConfig for getting properties. However it looks like one
add custom attributes to the tag that is used to indicate form properties
however

<form-property xPath="zzz" className="CustomPropertyConfig" name="yyy" type="java.lang.String" />


class CustomPropertyConfig {
private String xPath;
public String getXPath() { return xPath; }
public void setXPath(String s) { xPath = s; }
}

However getXPath() always returns null. So is there a way to add custom
atributes to this tag which struts will recognize. Currently it silently ignores (Struts 1.2).
 
Alok Pota
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thats...

class CustomPropertyConfig extends FormPropertyConfig {
private String xPath;
public String getXPath() { return xPath; }
public void setXPath(String s) { xPath = s; }
}
 
Switching from electric heat to a rocket mass heater reduces your carbon footprint as much as parking 7 cars. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic