> Hi Pascal,
> 
> For your dictLangue() dictionary, how about creating it from 
> this.context().request().formValues(), then adding your langue key+value?
> 
> Then update your urlPourDA to return everything up until the "?".
> 
> (Not tested, but I think that should work.)

Just tried it, and I get & instead of & for the URLs. I remember seeing 
some notes about in the mailing list, but I can't find anything in my archive.

> -G
> 
> 
> On Jul 8, 2011, at 8:34 AM, Pascal Robert wrote:
> 
>> I have a strange problem with query arguments. I have one link that I 
>> generated with:
>> 
>> LienChangeLangue: WOHyperlink {
>> href = uriPourDA;
>> queryDictionary = dictLangue;
>> }
>> 
>> where "uriPourDa" is :
>> 
>> public String uriPourDA() {
>>   return this.context().request().uri().replaceAll("[\\?|\\&]langue=[0-9]", 
>> "");
>> }
>> 
>> public NSDictionary<String, String> dictLangue() {
>>   return !estFrancais() ? new NSDictionary<String, String>("1", "langue") : 
>> new NSDictionary<String, String>("2", "langue");     
>> }
>> 
>> The reason I'm using the URI is that I don't want people to change pages 
>> when they switch languages, I want them to be on the same page. That works 
>> fine when I don't have any other query arguments.
>> 
>> But if I'm on another page that already have query arguments, like this:
>> 
>> Hyperlink2: WOHyperlink {
>>      actionClass = "DirectAction";
>>      directActionName = "voirInfoMembre";
>>      ?noMembre = numeroMembreSecret;
>> }
>> 
>> The generated URL is like this:
>> 
>> http://127.0.0.1/cgi-bin/WebObjects/Registre.woa/-52718/wa/voirInfoMembre?noMembre=KgsudeSxmbM%3D?langue=1
>> 
>> So the second argument have a ? instead of a &. Is this a WO 5.3.3 bug? 
>> Wonder (latest legacy) is there too, but it's not a full Wonder app. 
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/george%40boxofficetickets.com
>> 
>> This email sent to [email protected]
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to