Re: Help Evaluating Nested Maps

Daniel Dekany <[email protected]> Wed, 12 Jul 2006 05:07:31 +0200
Newsgroups gmane.comp.text.fmpp
Message-ID <[email protected]>
--===============0191726970==
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

<!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>&lt;#list ABC.DEF.GHI?keys as k&gt;</p>
<p>${k} =3D&gt; ${ABC.DEF.GHI[k]?default('Java null')}</p>
<p>&lt;/#list&gt;</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>&gt;</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>&nbsp; ||</span></p>
<p><span class=3Drvts7>&nbsp; =3D&gt;DEF</span></p>
<p><span class=3Drvts7>&nbsp; &nbsp; &nbsp; &nbsp; ||</span></p>
<p><span class=3Drvts7>&nbsp; &nbsp; &nbsp; &nbsp; =3D&gt;GHI</span></p>
<p><span class=3Drvts7>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |=
|</span></p>
<p><span class=3Drvts7>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =3D=
&gt;A1=3Da</span></p>
<p><span class=3Drvts7>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =3D=
&gt;A2=3Db</span></p>
<p><span class=3Drvts7>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =3D=
&gt;A3=3Dc</span></p>
<p><span class=3Drvts7>&nbsp; &nbsp; &nbsp; &nbsp; =3D&gt;GHI2</span></p>
<p><span class=3Drvts7>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |=
|</span></p>
<p><span class=3Drvts7>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =3D=
&gt;B1=3Dd</span></p>
<p><span class=3Drvts7>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =3D=
&gt;B2=3De</span></p>
<p><span class=3Drvts7>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =3D=
&gt;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>--&nbsp;</span></p>
<p><span class=3Drvts9>Best regards,</span></p>
<p><span class=3Drvts9>&nbsp;Daniel Dekany</span></p>

</body></html>



--===============0191726970==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

--===============0191726970==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
fmpp-open mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fmpp-open

--===============0191726970==--