• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

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; }
}
 
And will you succeed? Yes you will indeed! (98 and 3/4 % guaranteed) - Seuss. tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic