cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From H.vanderLin...@MI.unimaas.nl
Subject Desperately needing help with obscure JXTemplate problem
Date Wed, 16 Jun 2004 15:17:10 GMT
Hi,

Can someone please give a hint as to why the following does not work?

Class SomeClass() {
.....
private Object value;
....
public void setValue(Object x) {
   value = x;
}
public Object getValue() {
   return value;
}

public String getFormattedValue() {
   String result = doSomething(value);
   return result;
}
}

Class SomeOtherClass() {
.....
private Object value;
....
public void setValue(Object x) {
   value = x;
}
public Object getValue() {
   return value;
}

public String getFormattedValue() {
   String result = doSomething(value);
   return result;
}
}


JXTemplates:

<jx:macro name="qualifierList">
    <jx:parameter name="qList"/>
    <value>${qList.someValue.formattedValue}</value>
</jx:macro>

<jx:macro name="elementRow">
    <jx:parameter name="elem"/>
    <value>${elem.formattedValue}</value>
    <qualifierList qList="${elem.qualifiers}"/>
</jx:macro>

<jx:template ...>
<jx:import uri="macros.jx"/>
<qualifierList qList="${form.qualifiers}"/>
<value>${form.qualifiers.someValue}</value>
          
<jx:set var="elemDef" value="${form.elements.strokeMeetingDiagnosis}"/>
<elementRow elem="${elemDef}"/>


Problem:
${elemDef.formattedValue} is of class SomeOtherClass and correctly displays
the formattedValue
${qList.someValue.formattedValue} is of class SomeClass and displays nothing
for formattedValue

${qList.someValue} correctly displays: SomeClass@1234

In the flowscript:

var o = form.qualifiers;
var q = (Packages.mypackage.SomeClass)o.get('someValue');
print(q.getFormattedValue());

correctly displays the formattedValue.

Any idea anyone?


Bye,

Helma van der Linden

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message