struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Hill" <andrew.david.h...@gridnode.com>
Subject RE: nested <logic:equal
Date Tue, 08 Oct 2002 15:01:49 GMT
You have:
value="<%="foo%>">

Shouldnt this be:
value="<%=foo%>">

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



<bean:define id="foo"         name="resDepDTO"               property=
"instBilledToDate"/>

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

I tried this one but am getting

the method setValue(java.lang.String) in the type
org.apache.struts.taglib.logic.CompareTagBase is not applicable for the
arguments (java.lang.Object)



                    "Sri Sankaran"
                    <Sri.Sankaran@       To:     "Struts Users Mailing List"
<struts-user@jakarta.apache.org>
                    sas.com>             cc:
                                         Subject:     RE: nested
<logic:equal
                    10/08/2002
                    10:37 AM
                    Please respond
                    to "Struts
                    Users Mailing
                    List"






As was pointed out earlier, your if-else logic needs to be modified

if(a > 0 && a < b) {
  do stuff
} else if( a > 0) {
  do some other stuff
}

Assuming you have that....

Your JSP snippet doesn't seem to be testing 'less than b' at all.

You cannot nest a tag within your value attribute.   You have

  value="<bean:write name="resDepDTO"
                 property="instBilledToDate"/>"

To achieve this, use a bean:define and a scriptlet

<bean:define id="foo"
           name="resDepDTO"
       property="instBilledToDate"/>

Then your value attribute becomes

  value="<%=foo%>"

Sri
-----Original Message-----
From: nirdesh.mohan@highmark.com [mailto:nirdesh.mohan@highmark.com]
Sent: Tuesday, October 08, 2002 10:12 AM
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:   <
mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <
mailto:struts-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <
mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <
mailto:struts-user-help@jakarta.apache.org>







--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message