• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SWD: Method written in FormAction is expecting RequestContext as Parameter

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a page which displays the list of products. I created a action bean for product which extends the ActionForm Class, so I can mention the formObjectName and formObjectClass, as mentioned in Code1 below.
I wrote code for reference data in the ProductAction class,to be displayed in the jsp. It is given in Code2 below It is getting displayed.

I have got three records of product(i.e three rows to be displayed).

For this I used the same ProductAction Class to render the data (using <render-view> element of swf) before the jsp is displayed. Just as I have done above I stored above, I wrote a method to retrieve the arraylist from backend. The method takes no arguments and returns an arraylist, the arraylist of product. I stored it in MutableAttributeMap as I have done above. For this method it is asking the following as paramenter and throwing the following exception. I just dont understand why it is expecting Requestcontext as parameter. I am calling this retireveProducts() method from a method whic accepts requestcontext as parameter and returns Event as return type. The complete Action class is given in code 3
Exception

Code1

Code2

Code3
 
VenkataPrasad Regula
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have also tried the following code by passing the requestcontext as parameter. It is giving the following exception
Exception

Code
 
I will suppress my every urge. But not this shameless plug:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic