Ok, as advised I modified this line:
<rde-dm:attribute type="multivalue" mode="write" source="request"
value="[#request:params#].toArray()" attribute="param-list" />
like this :
<rde-dm:attribute mode="write" source="request"
value="[#request:params#].toArray().toString(';')" value-separator=";"
attribute="param-list" />
It works perfectly :)
Tim D, Thank you very much for your help !
E
On Nov 29, 5:59 pm, Tim D <[email protected]> wrote:
> type="multivalue" isn't listed as a valid DynaMent attribute in the
> manual.
>
> toArray() will actually give you the first substring when used alone
>
> you should likely use .toString(";") then the value-seperator=";"
> attribute to write a multivalue attribute. You can then read it with
> the foreach or a attribute dynament with mode read and value-
> seperator="|" to differentiate the result.
>
> On Nov 24, 5:20 pm, EFuentes <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > In Live Server, I'm trying to separate URL parameter values:
>
> > here is my XML dynament code:
> > <rde-dm:attribute mode="read" source="request"
> > attribute="request:params" />
> > <rde-dm:attribute type="multivalue" mode="write" source="request"
> > value="[#request:params#].toArray()" attribute="param-list" />
> > <rde-dm:attribute type="multivalue" mode="for-each" source="request"
> > attribute="request:param-list" alias="param-item">
> > <rde-dm:attribute mode="read" source="context"
> > attribute="context:param-item" />
> > </rde-dm:attribute>
>
> > here is the URL:
> > /cps/rde/xchg/testproject/modules/test/params.xml?params=bob;fred;mike
>
> > Here are the results:
> > <params>bob;fred;mike</params>
> > <param-list>
> > <param-item>bob</param-item>
> > </param-list>
>
> > Why is there only one result ?
> > What do I have to do to get the rest ?
>
> > Please help !
>
> > E
--
You received this message because you are subscribed to the Google Groups
"RedDot CMS Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/reddot-cms-users?hl=en.