You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Allen Liu <al...@gmail.com> on 2022/08/15 15:58:53 UTC

jcr auto retrieve value by name doesn't work

Hi Jcr team,
I am facing an issue with retrieving value from jcr. It seems like the name
of a component can't contain a number
For example

<description
                                granite:id="Key-1380275737505"
                                jcr:primaryType="nt:unstructured"

sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
                                fieldLabel="Description"
                                maxlength="{Double}4096.0"
                                minlength="{Double}0.0"
                                name="./jcr:content/metadata/1/dc:description">
                                                           </description>

If the name is ./jcr:content/metadata/1/dc:description as shown above,
the value saved can't be retrieved automatically and it's showing as
an empty field on the UI.

However if I change the name to
./jcr:content/metadata/a/dc:description, the textfield can retrieve
the value without issue.

Is this a known issue? Thanks!


Allen

Re: jcr auto retrieve value by name doesn't work

Posted by Julian Reschke <ju...@gmx.de>.
Am 15.08.2022 um 17:58 schrieb Allen Liu:
> Hi Jcr team,
> I am facing an issue with retrieving value from jcr. It seems like the name
> of a component can't contain a number
> For example
>
> <description
>                                  granite:id="Key-1380275737505"
>                                  jcr:primaryType="nt:unstructured"
>
> sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
>                                  fieldLabel="Description"
>                                  maxlength="{Double}4096.0"
>                                  minlength="{Double}0.0"
>                                  name="./jcr:content/metadata/1/dc:description">
>                                                             </description>
>
> If the name is ./jcr:content/metadata/1/dc:description as shown above,
> the value saved can't be retrieved automatically and it's showing as
> an empty field on the UI.
>
> However if I change the name to
> ./jcr:content/metadata/a/dc:description, the textfield can retrieve
> the value without issue.
>
> Is this a known issue? Thanks!
>
>
> Allen

It seems this is a Sling question, not a Jackrabbit question. What UI
are you referring to?

Best regards, Julian