[ 
https://issues.apache.org/jira/browse/FREEMARKER-57?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Remie updated FREEMARKER-57:
----------------------------
    Description: 
My situation: Create two classes Car and Motor in which class Car has a 
reference object to Motor. Now while iterating through the system list it is 
possible to display all the values like:

<li>${system_index + 1}.${system.name} from and has a ${system.getMotor()}</li>

The motor variable outputs its toString() method. However when trying to access 
the variable of the motor name, like this:

<li>${system_index + 1}.${system.name} from ${system.developer} and has a 
${system.getMotor().getName()}</li>

FreeMarker outputs the following message:

==> ${system.getMotor().getName()} [on line 12, column 75 in helloworld.ftl]

How can i access the variable getName of the Motor class?

 

  was:
My situation: Create two classes Car and Motor in which class Car has a 
reference object to Motor. Now while iterating through the system list it is 
possible to display all the values like:
<li>${system_index + 1}.${system.name} from and has a ${system.getMotor()}</li>

The motor variable outputs its toString() method. However when trying to access 
the variable of the motor name, like this:

<li>${system_index + 1}.${system.name} from ${system.developer} and has a 
${system.getMotor().getName()}</li>

FreeMarker outputs the following message:

==> ${system.getMotor().getName()} [on line 12, column 75 in helloworld.ftl]

How can i access the variable getName of the Motor class?

 


> Cannot access children
> ----------------------
>
>                 Key: FREEMARKER-57
>                 URL: https://issues.apache.org/jira/browse/FREEMARKER-57
>             Project: Apache Freemarker
>          Issue Type: Bug
>          Components: engine
>    Affects Versions: 2.4.0
>            Reporter: Remie
>            Priority: Critical
>             Fix For: 2.4.0
>
>
> My situation: Create two classes Car and Motor in which class Car has a 
> reference object to Motor. Now while iterating through the system list it is 
> possible to display all the values like:
> <li>${system_index + 1}.${system.name} from and has a 
> ${system.getMotor()}</li>
> The motor variable outputs its toString() method. However when trying to 
> access the variable of the motor name, like this:
> <li>${system_index + 1}.${system.name} from ${system.developer} and has a 
> ${system.getMotor().getName()}</li>
> FreeMarker outputs the following message:
> ==> ${system.getMotor().getName()} [on line 12, column 75 in helloworld.ftl]
> How can i access the variable getName of the Motor class?
>  



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to