You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ni...@highmark.com on 2002/10/08 16:11:48 UTC

nested
Hi guys,

I am just wondering if any one of you help me out in writing following
code...

Here is my problem


if(a>0)
     then make this button enable
else if(a>0 &&a<B)
     then make this button disabled



<logic:equal name="resDepDTO" property="instBilledToDate" value="0">
    <html:submit property="submitAction" value="Delete" onclick="return
confirm('Do you Really want to delete the
     record ?');" />
</logic:equal>
<logic:greaterThan name="resDepDTO" property="instBilledToDate" value="0">
     <logic:greaterThan name="resDepDTO" property="installments" value="<
bean:write name="resDepDTO" property=
                    "instBilledToDate"/>">
          <html:submit property="submitAction" value="Delete" disabled=
"true" onclick="return confirm('Do you Really want to delete the record
?');"/>
     </logic:greaterThan>
</logic:greaterThan>

Thanks,
Nirdesh



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: nested Posted by Gemes Tibor <ge...@regens.hu>.
2002. október 8. 16:11 dátummal nirdesh.mohan@highmark.com ezt írtad:

> if(a>0)
>      then make this button enable
> else if(a>0 &&a<B)
>      then make this button disabled

There is some err in your logic above imho...

the "else if" part couldn't  be executed.

Tib

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: nested Posted by Andrew Hill <an...@gridnode.com>.
Ahhh... its little things like this that make me sooooo glad Im not using
JSP ;-)

Hmmmm.
<logic:greaterThan name="resDepDTO" property="installments"
value="<bean:write etc...

You cant nest your tags like that Im afraid. :-(
JSP will barf on that like a (tom)cat with a furball... as it cant parse the
page as xml (or some such excuse).
You will need to use an ugly <%= jsdksjdk %> expression for that one (or
perhaps the fancy new expression language).

I presume that you were having trouble due to errors (rather than conceptual
difficulty getting the logic itself to work). Thats probably your culprit.


-----Original Message-----
From: nirdesh.mohan@highmark.com [mailto:nirdesh.mohan@highmark.com]
Sent: Tuesday, October 08, 2002 22:12
To: Struts Users Mailing List
Cc: 'Struts Users Mailing List'
Subject: nested <logic:equal



Hi guys,

I am just wondering if any one of you help me out in writing following
code...

Here is my problem


if(a>0)
     then make this button enable
else if(a>0 &&a<B)
     then make this button disabled



<logic:equal name="resDepDTO" property="instBilledToDate" value="0">
    <html:submit property="submitAction" value="Delete" onclick="return
confirm('Do you Really want to delete the
     record ?');" />
</logic:equal>
<logic:greaterThan name="resDepDTO" property="instBilledToDate" value="0">
     <logic:greaterThan name="resDepDTO" property="installments" value="<
bean:write name="resDepDTO" property=
                    "instBilledToDate"/>">
          <html:submit property="submitAction" value="Delete" disabled=
"true" onclick="return confirm('Do you Really want to delete the record
?');"/>
     </logic:greaterThan>
</logic:greaterThan>

Thanks,
Nirdesh



--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>