PATH  WebObjects 4.0 Documentation > What's New in WebObjects 4.0

Table of Contents Previous Section

Putting Values into a WORequest

WebObjects 4.0 allows you to set arguments for an action as follows:

myLink : WOHyperlink {
	directActionName = "display";
	queryDictionary = arguments;
	?sku = currentProduct.sku;
}
The queryDictionary attribute is set to an NSDictionary that contains arguments for the displayAction method. The keys in this dictionary are variables in the action method. The sku argument is an additional argument for the displayAction method and is an alternate way of setting arguments for the action.

Note: Although the above example uses a direct action, use of the queryDictionary and the "?" binding aren't limited to direct actions: you can use them any time you need to put a value into a WORequest.

Table of Contents Next Section