Re: [FMPP] Help Evaluating Nested Maps
Brought to you by:
ddekany
|
From: Daniel D. <dd...@fr...> - 2006-07-12 03:07:43
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title></title>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-=
1">
<meta http-equiv=3D"Content-Style-Type" content=3D"text/css">
<style type=3D"text/css"><!--
body {
margin: 5px 5px 5px 5px;
background-color: #ffffff;
}
/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Text Styles =3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D */
hr { color: #000000}
body, table /* Normal text */
{
font-size: 9pt;
font-family: 'Courier New';
font-style: normal;
font-weight: normal;
color: #000000;
text-decoration: none;
}
span.rvts1 /* Heading */
{
font-size: 10pt;
font-family: 'Arial';
font-weight: bold;
color: #0000ff;
}
span.rvts2 /* Subheading */
{
font-size: 10pt;
font-family: 'Arial';
font-weight: bold;
color: #000080;
}
span.rvts3 /* Keywords */
{
font-size: 10pt;
font-family: 'Arial';
font-style: italic;
color: #800000;
}
a.rvts4, span.rvts4 /* Jump 1 */
{
font-size: 10pt;
font-family: 'Arial';
color: #008000;
text-decoration: underline;
}
a.rvts5, span.rvts5 /* Jump 2 */
{
font-size: 10pt;
font-family: 'Arial';
color: #008000;
text-decoration: underline;
}
span.rvts6
{
font-size: 11pt;
font-family: 'tahoma';
font-weight: bold;
color: #ffffff;
}
span.rvts7
{
font-size: 11pt;
font-family: 'tahoma';
}
a.rvts8, span.rvts8
{
font-size: 11pt;
font-family: 'tahoma';
color: #0000ff;
text-decoration: underline;
}
span.rvts9
{
font-size: 8pt;
font-family: 'arial';
font-style: italic;
color: #c0c0c0;
}
/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Para Styles =3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D */
p,ul,ol /* Paragraph Style */
{
text-align: left;
text-indent: 0px;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
}
.rvps1 /* Centered */
{
text-align: center;
}
--></style>
</head>
<body>
<p>I doesn't see any problem with this... so it's probably that GHI reall=
y doesn't have an entry with "A1" key, or that "A1" is mapped to a Java n=
ull value (that way the value is missing despite that the key exists).</p=
>
<p><br></p>
<p>What do you see if you list the hash entries like:</p>
<p><br></p>
<p><#list ABC.DEF.GHI?keys as k></p>
<p>${k} =3D> ${ABC.DEF.GHI[k]?default('Java null')}</p>
<p></#list></p>
<p><br></p>
<p>Wednesday, July 12, 2006, 3:41:22 AM, Bruce Perryman wrote:</p>
<p><br></p>
<div><table border=3D0 cellpadding=3D1 cellspacing=3D2 style=3D"border-co=
lor: #000000; border-style: solid;">
<tr valign=3Dtop>
<td width=3D14 style=3D"background-color: #0000ff;">
<p><span class=3Drvts6>></span></p>
</td>
<td width=3D547 style=3D"background-color: #ffffff;">
<p><span class=3Drvts7>OK,</span></p>
<p><br></p>
<p><span class=3Drvts7>I'm doing something wrong, again.</span></p>
<p><br></p>
<p><span class=3Drvts7>This is the structure of my maps:</span></p>
<p><br></p>
<p><span class=3Drvts7>ABC</span></p>
<p><span class=3Drvts7> ||</span></p>
<p><span class=3Drvts7> =3D>DEF</span></p>
<p><span class=3Drvts7> ||</span></p>
<p><span class=3Drvts7> =3D>GHI</span></p>
<p><span class=3Drvts7> |=
|</span></p>
<p><span class=3Drvts7> =3D=
>A1=3Da</span></p>
<p><span class=3Drvts7> =3D=
>A2=3Db</span></p>
<p><span class=3Drvts7> =3D=
>A3=3Dc</span></p>
<p><span class=3Drvts7> =3D>GHI2</span></p>
<p><span class=3Drvts7> |=
|</span></p>
<p><span class=3Drvts7> =3D=
>B1=3Dd</span></p>
<p><span class=3Drvts7> =3D=
>B2=3De</span></p>
<p><span class=3Drvts7> =3D=
>B3=3Df</span></p>
<p><br></p>
<p><span class=3Drvts7>Hopefully this description makes sense to you. ABC=
contains a map DEF and DEF contains a few maps, two of which are GHI, an=
d GHI2.</span></p>
<p><br></p>
<p><span class=3Drvts7>I am trying to evaluate A1 at the GHI level. This =
I do as follows:</span></p>
<p><br></p>
<p><span class=3Drvts7>${ABC.DEF.GHI.A1}</span></p>
<p><br></p>
<p><span class=3Drvts7>This results in the error that A1 is undefined. If=
I evaluate ${ABC.DEF.GHI} the error is that a string, etc. is expected b=
ut the expression evaluates to a simple hash.</span></p>
<p><br></p>
<p><span class=3Drvts7>Can you please point me in the right direction? Ul=
timately, I want to be able to use a variable to represent the GHI level =
with something like:</span></p>
<p><br></p>
<p><span class=3Drvts7>${ABC.DEF[x].A1}</span></p>
<p><br></p>
<p><span class=3Drvts7>But I thought I'd work with the 'simple' case firs=
t.</span></p>
<p><br></p>
<p><span class=3Drvts7>Thanks in advance for your help.</span></p>
</td>
</tr>
</table>
</div>
<p><br></p>
<p><br></p>
<p><span class=3Drvts9>-- </span></p>
<p><span class=3Drvts9>Best regards,</span></p>
<p><span class=3Drvts9> Daniel Dekany</span></p>
</body></html>
|