Re: DirectAction: NSDictionary of the form values
Re: DirectAction: NSDictionary of the form values
- Subject: Re: DirectAction: NSDictionary of the form values
- From: Jean-François Veillette <email@hidden>
- Date: Thu, 5 Jul 2007 08:56:39 -0400
from your description, it look like 'formValues()' wrap all values in
an array (from the doc).
formValues()
Returns an NSDictionary containing all of the form data
with names for keys and NSArrays containing the value(s)
associated with those keys for values.
so to get "value1", you would do :
String value1 = (String) request().formValues().valueForKey
("key1").objectAtIndex(0);
Or simply use 'formValueForKey':
String value1 = (String) request().formValueForKey("key1");
- jfv
Le 07-07-05 à 06:33, Edgar Ra. Klein a écrit :
Hi guys,
I'm having a problem w/ the Dictionary returned by the
DirectAction's form values. More precisely, I have a DirectAction
w/ some form values like:
...DirectAction.woa/wa/default?key1=value1&key2=value2
The method request().formValues() returns an NSDictionary looking
like that:
{key1 = ("value1"); key2 = ("value2"); }
Unfortunately, the values are wrapped into (" ") and therefore I
cannot pass this dictionary to ask the
EOUtilities.objectsMatchingValues method for database entries.
Am I doing s.th. wrong or is there an easy way to convert the
wrapped values to unwrapped versions?
Thanx,
Edgar
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden