Weird param in URL

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Weird param in URL

Jacques Le Roux
Administrator
in r759666   I have commited this

-            <hyperlink also-hidden="false"
target="/partymgr/control/editcreditcard?partyId=${returnHeader.fromPartyId}${externalKeyParam}" target-window="partymgr"
description="${uiLabelMap.AccountingCreateNewCreditCard}" target-type="inter-app"/>
+            <hyperlink also-hidden="false" target="/partymgr/control/editcreditcard" target-window="partymgr"
description="${uiLabelMap.AccountingCreateNewCreditCard}" target-type="inter-app">
+                <parameter param-name="partyId" value="=${returnHeader.fromPartyId}${externalKeyParam}"/>
+            </hyperlink>

I find weird partyId=${returnHeader.fromPartyId}${externalKeyParam} ?  Was it right to interpret it as
value="=${returnHeader.fromPartyId}${externalKeyParam}"

Jacques


Reply | Threaded
Open this post in threaded view
|

Re: Weird param in URL

Jacques Le Roux
Administrator
Forgot this issue, there was a typo in, and I found other cases where 2 string are concatenated like that, so
it's ok

In applications/order/webapp/ordermgr/return/ReturnForms.xml, it has been migrated like that

        <field name="newCreditCard" widget-style="buttontext"
use-when="returnHeader!=null&amp;&amp;returnHeader.getString(&quot;fromPartyId&quot;)!=null">
            <hyperlink also-hidden="false" target="/partymgr/control/editcreditcard" target-window="partymgr"
description="${uiLabelMap.AccountingCreateNewCreditCard}" target-type="inter-app">
                <parameter param-name="partyId" value="${returnHeader.fromPartyId}${externalKeyParam}"/>
            </hyperlink>
        </field>


        <field name="fromPartyId" title="${uiLabelMap.OrderReturnFromParty}">
            <display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName} ${firstName}
${lastName}">
                <sub-hyperlink link-style="buttontext" target-type="inter-app" description="${fromPartyId}"
target="/partymgr/control/viewprofile">
                    <parameter param-name="partyId" value="fromPartyId}${externalKeyParam"/>
                </sub-hyperlink>
            </display-entity>
        </field>


        <field name="destinationFacilityId" widget-style="buttontext" title="${uiLabelMap.OrderReturnDestinationFacility}">
            <hyperlink target-type="inter-app" description="${destinationFacilityId}" target="/facility/control/EditFacility">
                <parameter param-name="facilityId" value="destinationFacilityId}${externalKeyParam"/>
            </hyperlink>
        </field>

Jacques

From: "Jacques Le Roux" <[hidden email]>

> in r759666   I have commited this
>
> -            <hyperlink also-hidden="false"
> target="/partymgr/control/editcreditcard?partyId=${returnHeader.fromPartyId}${externalKeyParam}" target-window="partymgr"
> description="${uiLabelMap.AccountingCreateNewCreditCard}" target-type="inter-app"/>
> +            <hyperlink also-hidden="false" target="/partymgr/control/editcreditcard" target-window="partymgr"
> description="${uiLabelMap.AccountingCreateNewCreditCard}" target-type="inter-app">
> +                <parameter param-name="partyId" value="=${returnHeader.fromPartyId}${externalKeyParam}"/>
> +            </hyperlink>
>
> I find weird partyId=${returnHeader.fromPartyId}${externalKeyParam} ?  Was it right to interpret it as
> value="=${returnHeader.fromPartyId}${externalKeyParam}"
>
> Jacques
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Weird param in URL

David E Jones-3

Actually, it's not okay like this. Whatever is in the value attribute  
will be put directly into the HTML hidden input value attribute. If  
you run this and take a look at the HTML generated you'll see what I  
mean...

It looks like this may be meant to append the externalLoginKey  
parameter, but in a bad way... and one that is not needed since the  
form widget takes care of that if you have target-type="inter-app" on  
the hyperlink element.

My recommendation would be to fix this (as it is an issue) by simply  
removing the externalKeyParam stuff, and use the from-field instead of  
the value attribute so that they ${} is not needed.

-David


On Mar 29, 2009, at 8:02 AM, Jacques Le Roux wrote:

> Forgot this issue, there was a typo in, and I found other cases  
> where 2 string are concatenated like that, so it's ok
>
> In applications/order/webapp/ordermgr/return/ReturnForms.xml, it has  
> been migrated like that
>
>       <field name="newCreditCard" widget-style="buttontext" use-
> when="returnHeader!
> =null&amp;&amp;returnHeader.getString(&quot;fromPartyId&quot;)!=null">
>           <hyperlink also-hidden="false" target="/partymgr/control/
> editcreditcard" target-window="partymgr" description="$
> {uiLabelMap.AccountingCreateNewCreditCard}" target-type="inter-app">
>               <parameter param-name="partyId" value="$
> {returnHeader.fromPartyId}${externalKeyParam}"/>
>           </hyperlink>
>       </field>
>
>
>       <field name="fromPartyId" title="$
> {uiLabelMap.OrderReturnFromParty}">
>           <display-entity entity-name="PartyNameView" key-field-
> name="partyId" description="${groupName} ${firstName} ${lastName}">
>               <sub-hyperlink link-style="buttontext" target-
> type="inter-app" description="${fromPartyId}" target="/partymgr/
> control/viewprofile">
>                   <parameter param-name="partyId" value="fromPartyId}
> ${externalKeyParam"/>
>               </sub-hyperlink>
>           </display-entity>
>       </field>
>
>
>       <field name="destinationFacilityId" widget-style="buttontext"  
> title="${uiLabelMap.OrderReturnDestinationFacility}">
>           <hyperlink target-type="inter-app" description="$
> {destinationFacilityId}" target="/facility/control/EditFacility">
>               <parameter param-name="facilityId"  
> value="destinationFacilityId}${externalKeyParam"/>
>           </hyperlink>
>       </field>
>
> Jacques
> From: "Jacques Le Roux" <[hidden email]>
>> in r759666   I have commited this
>> -            <hyperlink also-hidden="false" target="/partymgr/
>> control/editcreditcard?partyId=${returnHeader.fromPartyId}$
>> {externalKeyParam}" target-window="partymgr" description="$
>> {uiLabelMap.AccountingCreateNewCreditCard}" target-type="inter-app"/>
>> +            <hyperlink also-hidden="false" target="/partymgr/
>> control/editcreditcard" target-window="partymgr" description="$
>> {uiLabelMap.AccountingCreateNewCreditCard}" target-type="inter-app">
>> +                <parameter param-name="partyId" value="=$
>> {returnHeader.fromPartyId}${externalKeyParam}"/>
>> +            </hyperlink>
>> I find weird partyId=${returnHeader.fromPartyId}$
>> {externalKeyParam} ?  Was it right to interpret it as value="=$
>> {returnHeader.fromPartyId}${externalKeyParam}"
>> Jacques
>

Reply | Threaded
Open this post in threaded view
|

Re: Weird param in URL

Jacques Le Roux
Administrator
Not only it's was bad but morover I put typos in these changes :/

Only one thing make me wonder : I thought I found between 5 and 10 other cases using externalKeyParam, but  not necessarily in
links. And I cant't find any now, anway I prefer to forget it..

Fixed at t revision: 760409

Jacques

From: "David E Jones" <[hidden email]>

>
> Actually, it's not okay like this. Whatever is in the value attribute  will be put directly into the HTML hidden input value
> attribute. If  you run this and take a look at the HTML generated you'll see what I  mean...
>
> It looks like this may be meant to append the externalLoginKey  parameter, but in a bad way... and one that is not needed since
> the  form widget takes care of that if you have target-type="inter-app" on  the hyperlink element.
>
> My recommendation would be to fix this (as it is an issue) by simply  removing the externalKeyParam stuff, and use the from-field
> instead of  the value attribute so that they ${} is not needed.
>
> -David
>
>
> On Mar 29, 2009, at 8:02 AM, Jacques Le Roux wrote:
>
>> Forgot this issue, there was a typo in, and I found other cases  where 2 string are concatenated like that, so it's ok
>>
>> In applications/order/webapp/ordermgr/return/ReturnForms.xml, it has  been migrated like that
>>
>>       <field name="newCreditCard" widget-style="buttontext" use- when="returnHeader!
>> =null&amp;&amp;returnHeader.getString(&quot;fromPartyId&quot;)!=null">
>>           <hyperlink also-hidden="false" target="/partymgr/control/ editcreditcard" target-window="partymgr" description="$
>> {uiLabelMap.AccountingCreateNewCreditCard}" target-type="inter-app">
>>               <parameter param-name="partyId" value="$ {returnHeader.fromPartyId}${externalKeyParam}"/>
>>           </hyperlink>
>>       </field>
>>
>>
>>       <field name="fromPartyId" title="$ {uiLabelMap.OrderReturnFromParty}">
>>           <display-entity entity-name="PartyNameView" key-field- name="partyId" description="${groupName} ${firstName}
>> ${lastName}">
>>               <sub-hyperlink link-style="buttontext" target- type="inter-app" description="${fromPartyId}" target="/partymgr/
>> control/viewprofile">
>>                   <parameter param-name="partyId" value="fromPartyId} ${externalKeyParam"/>
>>               </sub-hyperlink>
>>           </display-entity>
>>       </field>
>>
>>
>>       <field name="destinationFacilityId" widget-style="buttontext"  title="${uiLabelMap.OrderReturnDestinationFacility}">
>>           <hyperlink target-type="inter-app" description="$ {destinationFacilityId}" target="/facility/control/EditFacility">
>>               <parameter param-name="facilityId"  value="destinationFacilityId}${externalKeyParam"/>
>>           </hyperlink>
>>       </field>
>>
>> Jacques
>> From: "Jacques Le Roux" <[hidden email]>
>>> in r759666   I have commited this
>>> -            <hyperlink also-hidden="false" target="/partymgr/ control/editcreditcard?partyId=${returnHeader.fromPartyId}$
>>> {externalKeyParam}" target-window="partymgr" description="$ {uiLabelMap.AccountingCreateNewCreditCard}"
>>> target-type="inter-app"/>
>>> +            <hyperlink also-hidden="false" target="/partymgr/ control/editcreditcard" target-window="partymgr" description="$
>>> {uiLabelMap.AccountingCreateNewCreditCard}" target-type="inter-app">
>>> +                <parameter param-name="partyId" value="=$ {returnHeader.fromPartyId}${externalKeyParam}"/>
>>> +            </hyperlink>
>>> I find weird partyId=${returnHeader.fromPartyId}$ {externalKeyParam} ?  Was it right to interpret it as value="=$
>>> {returnHeader.fromPartyId}${externalKeyParam}"
>>> Jacques
>>
>