Hi Erica!

Erica Usui wrote:
> Hi!
>
> My property is just like a static list, but populated by another class - so,
> I used a DB List property.
> What I want to show on select is different from what I want the stored value
> to be, this is actually the purpose of DB List properties' "id name" and
> "value name", but my experience showed the contrary...
>   

I've been doing some research with running XE/XEM 2.4.30451 installation 
working with my own classes and I am not able to get running a DBList 
with an ID Field and an alternative Value Field. What I sent in Value 
Field is both set as selecting value and value stored in the property. 
This is only valid for built-in classes as XWiki.XWikiUsers.

What I get for a List of Users is first_name+last_name for the list (I 
always get a box with a scroll bar whatever selection I check) and the 
full docname as stored value (XWiki.fjrodriguezf,XWiki.juancrujeiras,...).

I'll do more research next week after installing a new XE snapshot.
> I've already seem these
> link<http://dev.xwiki.org/xwiki/bin/view/Drafts/DatabaseListProperties>,
> and also found important information about this subject on this mailing (
> http://lists.xwiki.org/pipermail/users/2008-February/010417.html). But
> didn't solve my problem.
>
> Again, I just want to do the same as property "List of users" does, which is
> when selecting it is shown "first_name+last_name", and when querying the
> result is "XWiki.alias". I want to do something similar, but with my own
> class, not XWiki.XWikiUsers.
> For example:
> XWiki.dbClass [which has: property1 (string), property2 (string)].
> XWiki.class1Class [which has: property3 (dbList)=> XWiki class name:
> XWiki.dbClass, id field name: property1; value field name: property2)].
>   

That is clear to me. What I was proposing was to work with a well known 
class to have a common point for comparing results.
> 2010/10/29 [Ricardo Rodriguez] eBioTIC. <ricardo.rodrig...@ebiotic.net>
>
>   
>> Hi,
>>
>> Erica Usui wrote:
>>     
>>> Hi!
>>>
>>> I'm trying to list the users' name in a form, but the name have
>>>       
>> complement
>>     
>>> (p.e. Name: Carlos Eduardo da Silva / HR - manager). As in a "List of
>>>       
>> users"
>>     
>>> property, I want to display, when someone is selecting a name, the full
>>>       
>> name
>>     
>>> and complement, but when displaying in the results I want it to show the
>>> user's Alias.
>>>
>>> So what I did was a class (XWiki.dbClass)  with two properties:
>>> Name (String) (p.e. Carlos Eduardo da Silva / HR - manager)
>>> Alias (String) (p.e.Carlos)
>>> Which I used as a DataBase to the property "Name" in the other class
>>> (XWiki.formClass).
>>>
>>> So, I chose for this property:
>>> XWiki Class Name: XWiki.dbClass
>>> Id Field Name: Name
>>> Value Field Name: Alias
>>>
>>> But the result was not as in a "List of Users" property, in which when
>>>       
>> one
>>     
>>> choose for example "Carlos Eduardo da Silva" the result in the table is
>>> "Carlos".
>>> The result was that both, selected and diplayed information, are in this
>>> example "Carlos".
>>>
>>>       
>> Perhaps I'm missing something, Erica, but if you are dealing with XWiki
>> users, what not simply modify XWiki.XWikiUsers class to  host the new
>> information you need to store? You must be careful when you updated this
>> class at XWiki update time!
>>
>> Or create that new dbClass to store new data (position and alias) and
>> instantiate it (add an instance of that class) to each XWiki user.
>>
>> I know this is not what you are asking for, but I'm trying to understand
>> what do you want to do. I've tried this Database List properties type in
>> a XE 2.6-SNAPSHOT.31892 and it seems to work a expected.
>>
>> When you talk about "result in the table", what table are you talking
>> about? Thanks!
>>
>>     
>>> And another thing... I didn't understand the DB Tree property. One thing
>>> that worked was:
>>> XWiki Class Name: XWiki.dbClass
>>> Id Field Name: doc.fullName
>>> Value Field Name: Alias
>>> Parent Field Name: doc.parent
>>>
>>> But I don't understand the meaning of that...
>>>
>>> Can anyone help me ?
>>>
>>>       
>> This is the only file where I can find a reference to Tree Property in
>> the XWiki ecosystem...
>>
>> http://dev.xwiki.org/xwiki/bin/view/Drafts/DatabaseListProperties
>>
>> But it is just in the title of the document. I've trying to get it
>> working to no avail. It seems that it allows to assign a value of a
>> property by selecting a document from a tree of documents. But I'm not
>> able to get it working. Could you try with, let's say, a dbTree based on
>> XWiki.XWikiUsers? Thanks!
>>
>> Just my two cents!
>>
>> Ricardo
>>
>> --
>> Ricardo Rodríguez
>> CTO
>> eBioTIC.
>> Life Sciences, Data Modeling and Information Management Systems
>>
>> _______________________________________________
>> users mailing list
>> users@xwiki.org
>> http://lists.xwiki.org/mailman/listinfo/users
>>
>>     
>
>
>
>   

-- 
Ricardo Rodríguez
CTO
eBioTIC.
Life Sciences, Data Modeling and Information Management Systems

_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to