Hi Rasika,

It seems like the issue is with the "getAllParameters" method where it
swallow the params with same name as you pointed out. But the issue is
specific to requests with multipart/form-data forms. i will try to debug
the code and provide a solution.

thanks,
Chanaka

On Fri, Sep 11, 2015 at 9:33 PM, Rasika Perera <rasi...@wso2.com> wrote:

> Hi ES Team,
>
> I tried to create an Asset Type with following model elements in RXT using
> ES v2.3.6;
>
> <table name="Quick Startup Steps" maxoccurs="unbounded">
>>     <subheading>
>>     <heading>Step Description</heading>
>>     </subheading>
>>     <field type="text">
>>         <name>Step Description</name>
>>     </field>
>> </table>
>
>
> When creating an asset using "ES Publisher"; All model elements are
> rendered correctly as per the image.
>
> [image: Inline image 1]
>
> But after submitting the form; when viewing the created artifact it has
> only "step 2" value. This is also confirmed when viewing the artifact from
> the "carbon console". And also, when adding an artifact using "carbon
> console"; artifact is created correctly.
>
> How can I get all values(e.g. step1, step2) into the unbounded artifact
> field?
>
> Note: I observed that; the form input elements for "step 1" and "step 2"
> has the same "name" attribute."asset-api.js"[1] uses jaggery API
>  `request.getAllParameters()` to read all submitted parameters where they
> are stored on a map structure[2]. Hence, Parameters with the same key will
> be overridden.
>
> [1]
> https://github.com/wso2/carbon-store/blob/9d79318fd657e278b1e7c7450681c0845c2964a6/apps/store/modules/asset-api.js#L127
>
> [2]
> https://github.com/wso2/jaggery/blob/542105b0bc01ec229773f905fc8a7e87a4bb167e/components/hostobjects/org.jaggeryjs.hostobjects.web/src/main/java/org/jaggeryjs/hostobjects/web/RequestHostObject.java#L254
>
> --
> With Regards,
>
> *Rasika Perera*
> Software Engineer
> M: +94 71 680 9060 E: rasi...@wso2.com
> LinkedIn: http://lk.linkedin.com/in/rasika90
>
> WSO2 Inc. www.wso2.com
> lean.enterprise.middleware
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Chanaka Jayasena
Senior Software Engineer; WSO2, Inc.;  http://wso2.com/
email: chan...@wso2.com; cell: +94 77 785 5565
blog: http://chanaka3d.blogspot.com
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to