tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John De Lello" <Jo...@DelWare.com>
Subject Logic:Equal Question.
Date Thu, 08 May 2003 16:17:28 GMT
Hi Everyone,

I extended DynaValidatorForm to a class called "VWDynaValidatorForm" and I
added a protected boolean called "hasResults" I also added a setter and
getter for this property. The getter is called "getHasResults()"

My struts config file looks like:

****************************************************************************
*********************
   <form-beans>
        <form-bean
            name="paymentReviewForm"
            type="com.vwks.ing.form.VWDynaValidatorForm">
            <form-property name="source"            type="java.lang.String"
initial="I"/>
            <form-property name="name"              type="java.lang.String"
/>
        </form-bean>
    </form-beans>

    <action-mappings>
       <action path="/PaymentReviewDispatchAction"
 
type="com.vwks.ing.action.payment.PaymentReviewDispatchAction"
                  scope="request"
                  name="paymentReviewForm"
                  validate="false"
                  parameter="dispatchTo">
                  <forward name="display"
path="/web/payment/paymentReview.jsp"/>
                  <forward name="search"
path="/web/payment/paymentReview.jsp"/>
          </action>
    </action-mappings>

In my dispatch action class I am doing this:



        	VWDynaValidatorForm vwForm = (VWDynaValidatorForm) form;
	// a whole unch of other stuff..

          	vwForm.setHasResults(false);
	
	return mapping.findForward("search");
****************************************************************************
*********************

Now, in my JSP I need to conditionally display some text based on where
"hasResults" is set to true or not. Here is what I am trying to do:

	<logic:equal value="false" name="paymentReviewForm"
property="hasResults" scope="request">
            	<tr align='center' bgcolor="#FFFFFF"><td colspan='4'
class="whiteResults"><br>No records were found matching your
criteria.</td></tr>
	</logic:equal>

This generates the following error:
	javax.servlet.ServletException: Exception accessing property
hasResults for bean paymentReviewForm: java.lang.NoSuchMethodException:
Unknown property 'hasResults' 

How do I tell the logic tag to access the "getHasResults" method that is in
my extended class??

Thank you
John


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message