Hi,
On Fri, Apr 3, 2015 at 9:25 PM, Gerritjan Koekkoek <
gerritjankoekkoek(a)gmail.com> wrote:
> I would like to create a form for a international
audience (multi language)
> So I created a AppWithinMinutes app.
> I would like that my users can Multiselect from a list that is a selection
> of objects based on a class.
>
> So i created a class (with AppWithinMinutes:
> Class properties
> Short Text (shortText1: String)
> Long Text (longText1: TextArea)
> Long Text (longText2: TextArea)
> Database List (databaseList1: Database List)
>
> The databaseList1 has the following properties:
> DisplayType: checkbox
> Multiple Select: true
> XWiki Class Name: XWiki.UIExtensionClass
> Id Field Name: name ()
> Value Field Name: name
>
>
> The first issue I get that I get all objects of the class. I hoped to add a
> selection by adding this query:
> from doc.object(XWiki.UIExtensionClass) as obj where
> lower(obj.extensionPointId) like '%cdlsworld.standardized.questionaires%'
> and ('wiki' = obj.scope) order by obj.name
> But how can I add this?
>
>
==Eduard replied
===========
That works, I used the xwql -> hql converter script-snippet to convert the xwql
select doc.fullName as id
,doc.title as value
from XWikiDocument as doc
, BaseObject as obj
, com.xpn.xwiki.objects.StringProperty as obj_extensionPointId1
, com.xpn.xwiki.objects.StringProperty as obj_scope2
, com.xpn.xwiki.objects.StringProperty as obj_name3
where ( lower ( obj_extensionPointId1.value ) like
'%cdlsworld.standardized.questionaires%'
and ( 'wiki' = obj_scope2.value ) ) and doc.fullName=obj.name
and obj.className='XWiki.UIExtensionClass'
and obj_extensionPointId1.id.id=obj.id
and obj_extensionPointId1.id.name='extensionPointId'
and obj_scope2.id.id=obj.id
and obj_scope2.id.name='scope'
and obj_name3.id.id=obj.id
and obj_name3.id.name='name'
order by obj_name3.value
> The second issue that I hoped to be able to use
for the option to add the
> translated value
> $services.localization.get('$value')
>
Eduard replied:
==========
What is $value? The document name returned by the
above query?
The value is now replaced by doc.title.
The documents returned have a title in the following format:
$services.localization.render('cdlsworld.standardized.questionaires.cdlsqweApplication')
The issue is that in the form I do get the as doc.title the velocity script:
$services.localization.render('cdlsworld.standardized.questionaires.cdlsqweApplication')
in the doc itself this title is evaluated as: "Social and Physical abilities"
and I had hoped this would be the displayed item in the select list
Thanks,
Eduard
> _______________________________________________
> users mailing list
> users(a)xwiki.org
>
http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users