component displayname="Parent" accessors="true" {
property name="ID" type="numeric" access="private";
property name="Name" type="string";
}component displayname="Child" accessors="true" extends="Parent" {
property name="ChildID" type="numeric";
property name="ChildName" type="string";
}<cfscript>
CHILD = new Child();
CHILD.setID(123);
CHILD.setName("ABC");
CHILD.setChildId(987);
CHILD.setChildName("ZYX");
echo( CHILD.ID & " " & CHILD.Name );
echo( serializeJSON(CHILD) );
</cfscript>123 ABC
{"ChildID":987,"ChildName":"ZYX"}123 ABC
{"ChildID":987,"ChildName":"ZYX","ID":123,"Name":"ABC"}
Component (Child) Child
Only the functions and data members that are accessible from your location are displayedExtends Parent
Properties ChildID
number 987 ChildName
string ZYX
public getChildID
Public Function getChildID (generated)
source:/Users/juan/Sites/Child.cfcarguments
label name required type default hint return type numeric setChildName
Public Function setChildName (generated)
source:/Users/juan/Sites/Child.cfcarguments
label name required type default hint ChildName true string null return type any getChildName
Public Function getChildName (generated)
source:/Users/juan/Sites/Child.cfcarguments
label name required type default hint return type string getName
Public Function getName (generated)
source:/Users/juan/Sites/Child.cfcarguments
label name required type default hint return type string setChildID
Public Function setChildID (generated)
source:/Users/juan/Sites/Child.cfcarguments
label name required type default hint ChildID true numeric null return type any setName
Public Function setName (generated)
source:/Users/juan/Sites/Child.cfcarguments
label name required type default hint Name true string null return type any setID
Public Function setID (generated)
source:/Users/juan/Sites/Child.cfcarguments
label name required type default hint ID true numeric null return type any getID
Public Function getID (generated)
source:/Users/juan/Sites/Child.cfcarguments
label name required type default hint return type numeric
--
Did you find this reply useful? Help the Railo community and add it to the Railo Server wiki at https://github.com/getrailo/railo/wiki
---
You received this message because you are subscribed to the Google Groups "Railo" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/railo/7189b45d-0060-4c04-8020-b5c591437aa6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi,I'm not sure if this is a bug or just my misunderstanding of how CFC inheritance should work. Assume the following three files:Parent.cfccomponent displayname="Parent" accessors="true" {
property name="ID" type="numeric" access="private";
property name="Name" type="string";
}Child.cfc
component displayname="Child" accessors="true" extends="Parent" {
property name="ChildID" type="numeric";
property name="ChildName" type="string";
}
...