First, that was funny. Second, and this is *annoying*, "parameters" is
not a named object when using the "component" tag, so I assume it is
the same for "include", so instead of using "#parameters", use
"parameters" which is the same as "top.parameters".

musachy

On Thu, Aug 7, 2008 at 3:28 PM, Zoran Avtarovski
<[EMAIL PROTECTED]> wrote:
> I¹m really starting to develop a love-hate (and fear) relationship with
> OGNL. Please bear with my long winded explanation, it' therapeutic (for me
> at least). And, please, I really do need help.
>
> I'm finding using OGNL like dating a supermodel, who also suffers from
> multiple personality disorder and Turrets. At first it's hello OGNL, your
> having breakfast at some uptown café, expensive glossy mags littered around
> the place, ordering eggs on some exotic bread and coffee that monkeys
> excrete. You know the feeling. You're interacting with stack, calling
> methods, the odd lambda expression. Your on top of the world. It's a case of
> JSP - who, expression language - what?
>
> Next thing you know, BAM!! You're wearing your breakfast, feeling the pain
> of 300 pages of last month's Italian Vogue across the back of your head and
> longing for the security of a bagel and filtered coffee with JSP.
>
>
> Take my current problem. A simple task of passing a parameter to an included
> page.
>
> <s:include value="myPage.jsp>
>    <s:param name="myParam">2</s:param>
> </s:include>
>
> And in myPage.jsp I have
>
> <s:property value="#parameters.myParam/>
>
> BAM!! There's that Italian Vogue again.
>
> So I try:
>
> <s:property value="#parameters['myParam']/>
>
> and
>
> <s:property value="%{#parameters.myParam}/>
>
> and
>
> <s:property value="myParam/>
>
> and
>
> <s:property value=%{myParam}/>
>
> Now I'm reaching for the Ibuprofen. You also see where the Turrets comes in.
>
> If I now look at my once loved, then hated, now missed JSP:
>
> <c:import url="myPage.jsp">
>    <c:param name=myParam">2</c:param>
> </c:import>
>
> And in myPage.jsp I have ${params.myParam}. Bingo! Bagel and coffee.
>
> Please somebody please point out my error as I know it must be MY ERROR, but
> I just can't see it.
>
> I've read the stuff on the struts wiki which indicates that my example
> should be working. The OGNL site is too generic to be of much use here.
>
> As an aside, if any budding author wants to produce an InfoQ style guide to
> OGNL and struts I'd happily spring for it.
>
> I'm not asking a lot. We all have flaws. I'd just like to settle into a
> little monogamy for a while - until the next supermodel at least.
>
> Z.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to