ThxsI verified and it seem it is always _0_ for each properties (even for
multiple properties of same type)ie If I have 2 properties with 'date' type in
MySpace.MyClass (date_entry and birthday), $doc.display($prop.getName() will
generate this form
<input id="MySpace.MyClass_0_date_entry" xxxx<input
id="MySpace.MyClass_0_birthday" xx
But If I have a 'database list' with checkbox property "BirthdayYear" in
MySpace.MyClass, $doc.display($prop.getName() will generate this form (with 2
similar hidden input field ! Maybe a bug?) :<label class="xwiki-form-listclass"
for="xwiki-form-A_Expert-0-0"><input id="xwiki-form-A_Expert-0-0"
type="checkbox" value="1980"
name="MySpace.MyClass_0_BirthdayYear">1980</label><label
class="xwiki-form-listclass" for="xwiki-form-BirthdayYear-0-1"><input
id="xwiki-form-A_Expert-0-1" type="checkbox" value="1981"
name="MySpace.MyClass_0_BirthdayYear">1981</label>...
<label class="xwiki-form-listclass" for="xwiki-form-BirthdayYear-0-n"><input
id="xwiki-form-A_Expert-0-n" type="checkbox" value="20nn"
name="MySpace.MyClass_0_BirthdayYear"> 20nn</label><input type="hidden"
value="" name="MySpace.MyClass_0_BirthdayYear"><input type="hidden" value=""
name="MySpace.MyClass_0_BirthdayYear"> I didn't find what is generate this _0_
(macro or java stuf)
ThxsPascal B
De : Marius Dumitru Florea <[email protected]>
À : Pascal BASTIEN <[email protected]>; XWiki Users <[email protected]>
Envoyé le : Mardi 3 février 2015 8h16
Objet : Re: [xwiki-users] Howto getprefix in a Sheet?
...
> If any have an (or many) idea how I can obtain this prefix in my Sheet
> (If not I can concanet MySpace.docClass_0_$prop.Name but I'm not sure about
> _0_)
I'm afraid you have to compute the prefix yourself. 0 represents the
object number. So MySpace.MyClass_4_age refers to the 'age' property
of the MySpace.MyClass object with number 4 (normally the fifth object
of that type from the target document).
Hope this helps,
Marius
>
> Thxs
> Pascal B
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users