• 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

Stripes: ForwardResolution between two ActionBeans

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ciao a tutti,

I'm using Stripes to develop a web application (it's a personal, but useful, project just to learn the framework).
Actually I have two ActionBeans that are located in two different packages and I need to forward the resolution of the first ActionBean (step1) directly to the second one (step2).
Is it possible? The problem is that if I specify the full path in the ForwardResolution constructor (i.e. it.overzero.project.package2.actionbean2) it is appended to the path of the first invoked ActionBean, so my application tries to find the second ActionBean at it.overzero.project.package1.actionbean1.it.overzero.project.package2.actionbean2
and this is obviously wrong.
What is the correct logic to follow to do this?

Thanks,
Gabriele Fabbri
 
Gabriele Fabbri
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, I just solved the problem in this way:

The fist actionbean is in the package it.overzero.prj
The second actionbean is in the package it.overzero.prj.pkg

At this point, in the ForwardResolution constructor of the first actionbean I wrote: new ForwardResolution("../MySecondStep.action") and it works.

But I still have the doubt that this is not the proper way to proceed.
Could you tell me if I'm going in the correct direction?
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The most reliable way to forward between ActionBeans is to use the class instead of a string:

new ForwardResolution(MySecondStep.class)

Then if you do any refactoring or change the UrlBinding it is automatically handled for you. You won't have to go back and update strings.
 
Gabriele Fabbri
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much Aaron, you are right.
It's clear now!

Gabriele
 
reply
    Bookmark Topic Watch Topic
  • New Topic