• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: passing parameters to an action
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: passing parameters to an action


  • Subject: Re: passing parameters to an action
  • From: Pierre Frisch <email@hidden>
  • Date: Thu, 8 Jan 2004 11:00:21 -0800

Hi Andreas,

We have had the same problem and there is no real easy solution the best is to add a binding to the WOHyperLink like ?MyMenuItem=myMenuItemName and then in your action retrieve it from the formValues and dispatch it. It works well but the code is not very pretty as you will have to have all your menu handling method in one class.

Pierre
--
Pierre Frisch
sPearWay Ltd.
sPearCat Web Catalogs, the flexibility of custom design, the price of a package.
http://www.spearcat.com/



On Jan 8, 2004, at 10:25, Andreas Kosmala wrote:

Hi All,

is it possible to pass parameters to action methods or to get the attributes from the element that called the action method?

my problem:
I want to build a menu with hyperlinks. Idea: a WORepitition with a Vector for the menu entries with names and pages that shall be called. Works fine. Problem: when a reload is performed, clicking a menu entry causes the corresponding page to be instantiated again, because apparently the hyperlink using the pageName attribute calls a pageWithName() that always create a new page.
A solution could be working with an action method that stores all already instantiated pages in the session. For I am using a WORepitition containing one WOHyperlink I only can declare one such action method. But this action method must return different pages depending on the clicked hyperlink, so I have to pass a parameter. Does anybody have an idea how to do this?


TIA
andreas
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: passing parameters to an action
      • From: Arturo PĂ©rez <email@hidden>
References: 
 >passing parameters to an action (From: Andreas Kosmala <email@hidden>)

  • Prev by Date: Re: WOJC Thread-Problem... makes me crazy
  • Next by Date: Re: passing parameters to an action
  • Previous by thread: passing parameters to an action
  • Next by thread: Re: passing parameters to an action
  • Index(es):
    • Date
    • Thread