[Cubicweb] OrbUI - edition view

Aurélien Campéas aurelien.campeas at logilab.fr
Mon Feb 11 13:06:52 CET 2013

Le 10/02/2013 20:44, Carlos Balderas a écrit :
> Hi List, we've been doing some work on OrbUI project, trying to make
> what we think could be a little improvement in the way to manage
> relations in "edition" view.

Hi Carlos,

> We have already push some code in case you want to take a look.
> https://bitbucket.org/crealibre/orbui
> <https://bitbucket.org/crealibre/orbui>, I am almost sure that we have
> left some things "untighten", but will be fixing little by little.

There are a lot of things here. It will take some time to digest it :)

> Our next step is to change the "relationSelectionRow" for an autocomple
> widget, we'd like to keep the "Pending Insert" part of the original
> functionallity, though.
> In order to do so I have found the next questions to see if someone
> could give me some orientation:
> 1.- There is a method called "cw_unrelated_rql" in Entity class, same
> one that  I'd like to use to return the matching criteria for the
> autocomplete widget, but one thing to need to fix is to add one more
> restriction that would be the ILIKE restriction for the main attribute
> of the entity we are searching for.

cw_unrelated_rql could indeed take one more parameter for additional 
restrictions (in the form of an rql syntax tree fragment maybe).

> 2.- The second question is about the way to find the main attribute's
> name we need to make the search in the autocomplete widget. For
> instance, something like the incontext, oneline, etc views do, they
> always show this value.

 >>> schema['CWUser'].main_attribute()
<login [CWUser,String]>

Does that answer the question ?

(And I see that there is no mention of it in the doc ...)

> We need to have an RQL sentences similar to this:
> Any S,AA ORDERBY AA DESC WHERE NOT S works_for_company O, O eid %(x)s, S
> is Person, S modification_date AA, S ILIKE %%(inputvalue)%%%s
> I hope I explained myself right about what I'd like to do.

Not sure if that goes in the right direction. Feel free to ask for more :)


More information about the Cubicweb mailing list