[xwiki-users] XWiki Application: Pages of one app as dropdown values of other app
Hi community, I implemented a customer profile holding information about customers as an XWiki application. Now in another app I'd like to have an optional field that can contain the customer if it is related to one. Therefor I want to list all customers (existing pages of App 1) as dropdown values of a field of App 2. To illustrate what I'd like to achieve: App 1 (holding customer information): |-- Page "Customer 1" |-- Page "Customer 2" ... App 2 (holding other information but can be customer related): |-- Page 1 |-- Field "Customer" = Dropdown of Pages of App 1 (Customer 1, Customer 2 ...) I'm rather new in scripting in XWiki/Velocity so I'd really appreciate some help on this :) Regards, Dennis
Hi Dennis, Maybe this can help http://www.xwiki.org/xwiki/bin/view/FAQ/HowToCreateAOneToManyRelationshipInX... . On Mon, Jul 25, 2016 at 3:35 PM, D R <[email protected]> wrote:
Hi community,
I implemented a customer profile holding information about customers as an XWiki application. Now in another app I'd like to have an optional field that can contain the customer if it is related to one. Therefor I want to list all customers (existing pages of App 1) as dropdown values of a field of App 2.
To illustrate what I'd like to achieve:
App 1 (holding customer information): |-- Page "Customer 1" |-- Page "Customer 2" ...
App 2 (holding other information but can be customer related): |-- Page 1 |-- Field "Customer" = Dropdown of Pages of App 1 (Customer 1, Customer 2 ...)
I'm rather new in scripting in XWiki/Velocity so I'd really appreciate some help on this :)
Regards, Dennis _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
You might also find the following of interest (slightly related): http://platform.xwiki.org/xwiki/bin/view/DevGuide/MasterDetailTutorial Thanks -Vincent
On 25 Jul 2016, at 14:56, Marius Dumitru Florea <[email protected]> wrote:
Hi Dennis,
Maybe this can help http://www.xwiki.org/xwiki/bin/view/FAQ/HowToCreateAOneToManyRelationshipInX... .
On Mon, Jul 25, 2016 at 3:35 PM, D R <[email protected]> wrote:
Hi community,
I implemented a customer profile holding information about customers as an XWiki application. Now in another app I'd like to have an optional field that can contain the customer if it is related to one. Therefor I want to list all customers (existing pages of App 1) as dropdown values of a field of App 2.
To illustrate what I'd like to achieve:
App 1 (holding customer information): |-- Page "Customer 1" |-- Page "Customer 2" ...
App 2 (holding other information but can be customer related): |-- Page 1 |-- Field "Customer" = Dropdown of Pages of App 1 (Customer 1, Customer 2 ...)
I'm rather new in scripting in XWiki/Velocity so I'd really appreciate some help on this :)
Regards, Dennis
Thanks guys but I face an issue. I added a Database List property to the Class of App 2 as explained on http://www.xwiki.org/xwiki/bin/view/FAQ/HowToCreateAOneToManyRelationshipInX... . Name: customer Display Type: select Relational Storage checked XWiki Class Name: Customer Profile.Code.Customer ProfileClass Id Field Name: doc.fullName Value Field Name: doc.title In the App 2 Sheet I added $doc.use('XPass.Code.XPassClass') $doc.display('customer') In edit mode of entries of App 2 (XPass) I see 3 entries without text (though App 1 -Customer Profile- has only 2 entries/pages) in the Customer dropdown. Thank you very much in advance for some more help. 2016-07-25 16:40 GMT+02:00 Vincent Massol <[email protected]>:
You might also find the following of interest (slightly related): http://platform.xwiki.org/xwiki/bin/view/DevGuide/MasterDetailTutorial
Thanks -Vincent
On 25 Jul 2016, at 14:56, Marius Dumitru Florea < [email protected]> wrote:
Hi Dennis,
Maybe this can help
http://www.xwiki.org/xwiki/bin/view/FAQ/HowToCreateAOneToManyRelationshipInX...
.
On Mon, Jul 25, 2016 at 3:35 PM, D R <[email protected]> wrote:
Hi community,
I implemented a customer profile holding information about customers as an XWiki application. Now in another app I'd like to have an optional field that can contain the customer if it is related to one. Therefor I want to list all customers (existing pages of App 1) as dropdown values of a field of App 2.
To illustrate what I'd like to achieve:
App 1 (holding customer information): |-- Page "Customer 1" |-- Page "Customer 2" ...
App 2 (holding other information but can be customer related): |-- Page 1 |-- Field "Customer" = Dropdown of Pages of App 1 (Customer 1, Customer 2 ...)
I'm rather new in scripting in XWiki/Velocity so I'd really appreciate some help on this :)
Regards, Dennis
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
On Tue, Jul 26, 2016 at 11:45 AM, D R <[email protected]> wrote:
Thanks guys but I face an issue.
I added a Database List property to the Class of App 2 as explained on
http://www.xwiki.org/xwiki/bin/view/FAQ/HowToCreateAOneToManyRelationshipInX... . Name: customer Display Type: select Relational Storage checked XWiki Class Name: Customer Profile.Code.Customer ProfileClass Id Field Name: doc.fullName
Value Field Name: doc.title
Try doc.name or make sure those pages have their title set by editing them in Wiki edit mode. doc.title is the raw document title which may be empty or may contain Velocity code. It's not the computed title you see displayed on the breadcrumb.
In the App 2 Sheet I added $doc.use('XPass.Code.XPassClass') $doc.display('customer')
In edit mode of entries of App 2 (XPass) I see 3 entries without text (though App 1 -Customer Profile- has only 2 entries/pages) in the Customer dropdown.
Thank you very much in advance for some more help.
2016-07-25 16:40 GMT+02:00 Vincent Massol <[email protected]>:
You might also find the following of interest (slightly related): http://platform.xwiki.org/xwiki/bin/view/DevGuide/MasterDetailTutorial
Thanks -Vincent
On 25 Jul 2016, at 14:56, Marius Dumitru Florea < [email protected]> wrote:
Hi Dennis,
Maybe this can help
http://www.xwiki.org/xwiki/bin/view/FAQ/HowToCreateAOneToManyRelationshipInX...
.
On Mon, Jul 25, 2016 at 3:35 PM, D R <[email protected]> wrote:
Hi community,
I implemented a customer profile holding information about customers as an XWiki application. Now in another app I'd like to have an optional field that can contain the customer if it is related to one. Therefor I want to list all customers (existing pages of App 1) as dropdown values of a field of App 2.
To illustrate what I'd like to achieve:
App 1 (holding customer information): |-- Page "Customer 1" |-- Page "Customer 2" ...
App 2 (holding other information but can be customer related): |-- Page 1 |-- Field "Customer" = Dropdown of Pages of App 1 (Customer 1, Customer 2 ...)
I'm rather new in scripting in XWiki/Velocity so I'd really appreciate some help on this :)
Regards, Dennis
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
After changing "Id Field Name" to doc.name still the dropdown has 3 empty items though the source application has only 2 pages. Do you have another idea why it is not working? 2016-07-26 14:37 GMT+02:00 Marius Dumitru Florea < [email protected]>:
On Tue, Jul 26, 2016 at 11:45 AM, D R <[email protected]> wrote:
Thanks guys but I face an issue.
I added a Database List property to the Class of App 2 as explained on
http://www.xwiki.org/xwiki/bin/view/FAQ/HowToCreateAOneToManyRelationshipInX...
. Name: customer Display Type: select Relational Storage checked XWiki Class Name: Customer Profile.Code.Customer ProfileClass Id Field Name: doc.fullName
Value Field Name: doc.title
Try doc.name or make sure those pages have their title set by editing them in Wiki edit mode. doc.title is the raw document title which may be empty or may contain Velocity code. It's not the computed title you see displayed on the breadcrumb.
In the App 2 Sheet I added $doc.use('XPass.Code.XPassClass') $doc.display('customer')
In edit mode of entries of App 2 (XPass) I see 3 entries without text (though App 1 -Customer Profile- has only 2 entries/pages) in the
Customer
dropdown.
Thank you very much in advance for some more help.
2016-07-25 16:40 GMT+02:00 Vincent Massol <[email protected]>:
You might also find the following of interest (slightly related): http://platform.xwiki.org/xwiki/bin/view/DevGuide/MasterDetailTutorial
Thanks -Vincent
On 25 Jul 2016, at 14:56, Marius Dumitru Florea < [email protected]> wrote:
Hi Dennis,
Maybe this can help
http://www.xwiki.org/xwiki/bin/view/FAQ/HowToCreateAOneToManyRelationshipInX...
.
On Mon, Jul 25, 2016 at 3:35 PM, D R <[email protected]> wrote:
Hi community,
I implemented a customer profile holding information about customers as an XWiki application. Now in another app I'd like to have an optional field that can contain the customer if it is related to one. Therefor I want to list all customers (existing pages of App 1) as dropdown values of a field of App 2.
To illustrate what I'd like to achieve:
App 1 (holding customer information): |-- Page "Customer 1" |-- Page "Customer 2" ...
App 2 (holding other information but can be customer related): |-- Page 1 |-- Field "Customer" = Dropdown of Pages of App 1 (Customer 1, Customer 2 ...)
I'm rather new in scripting in XWiki/Velocity so I'd really appreciate some help on this :)
Regards, Dennis
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Sorry, my mistake. I edited the wrong field. After changing back Id Field Name to doc.fullName and changing Value Field Name to doc.name it works but still shows 3 items instead of the 2 available pages: Customer ProfileTemplate Test Customer 1 Test Customer 2 On the Customer Profile Application I have the pages Test Customer 1 Test Customer 2 Why is the item "Customer ProfileTemplate" shown? 2016-07-27 14:52 GMT+02:00 D R <[email protected]>:
After changing "Id Field Name" to doc.name still the dropdown has 3 empty items though the source application has only 2 pages.
Do you have another idea why it is not working?
2016-07-26 14:37 GMT+02:00 Marius Dumitru Florea < [email protected]>:
On Tue, Jul 26, 2016 at 11:45 AM, D R <[email protected]> wrote:
Thanks guys but I face an issue.
I added a Database List property to the Class of App 2 as explained on
http://www.xwiki.org/xwiki/bin/view/FAQ/HowToCreateAOneToManyRelationshipInX...
. Name: customer Display Type: select Relational Storage checked XWiki Class Name: Customer Profile.Code.Customer ProfileClass Id Field Name: doc.fullName
Value Field Name: doc.title
Try doc.name or make sure those pages have their title set by editing them in Wiki edit mode. doc.title is the raw document title which may be empty or may contain Velocity code. It's not the computed title you see displayed on the breadcrumb.
In the App 2 Sheet I added $doc.use('XPass.Code.XPassClass') $doc.display('customer')
In edit mode of entries of App 2 (XPass) I see 3 entries without text (though App 1 -Customer Profile- has only 2 entries/pages) in the
Customer
dropdown.
Thank you very much in advance for some more help.
2016-07-25 16:40 GMT+02:00 Vincent Massol <[email protected]>:
You might also find the following of interest (slightly related):
http://platform.xwiki.org/xwiki/bin/view/DevGuide/MasterDetailTutorial
Thanks -Vincent
On 25 Jul 2016, at 14:56, Marius Dumitru Florea < [email protected]> wrote:
Hi Dennis,
Maybe this can help
http://www.xwiki.org/xwiki/bin/view/FAQ/HowToCreateAOneToManyRelationshipInX...
.
On Mon, Jul 25, 2016 at 3:35 PM, D R <[email protected]> wrote:
Hi community,
I implemented a customer profile holding information about customers as an XWiki application. Now in another app I'd like to have an optional field that can contain the customer if it is related to one. Therefor I want to list all customers (existing pages of App 1) as dropdown values of a field of App 2.
To illustrate what I'd like to achieve:
App 1 (holding customer information): |-- Page "Customer 1" |-- Page "Customer 2" ...
App 2 (holding other information but can be customer related): |-- Page 1 |-- Field "Customer" = Dropdown of Pages of App 1 (Customer 1, Customer 2 ...)
I'm rather new in scripting in XWiki/Velocity so I'd really appreciate some help on this :)
Regards, Dennis
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
On Wed, Jul 27, 2016 at 4:00 PM, D R <[email protected]> wrote:
Sorry, my mistake. I edited the wrong field. After changing back Id Field Name to doc.fullName and changing Value Field Name to doc.name it works but still shows 3 items instead of the 2 available pages:
Customer ProfileTemplate Test Customer 1 Test Customer 2
On the Customer Profile Application I have the pages Test Customer 1 Test Customer 2
Why is the item "Customer ProfileTemplate" shown?
Because it has an object of type "Customer ProfileClass" like "Test Customer 1" and "Test Customer 2". I'm afraid you need to use the query (instead of the class name) if you want to filter it out.
2016-07-27 14:52 GMT+02:00 D R <[email protected]>:
After changing "Id Field Name" to doc.name still the dropdown has 3 empty items though the source application has only 2 pages.
Do you have another idea why it is not working?
2016-07-26 14:37 GMT+02:00 Marius Dumitru Florea < [email protected]>:
On Tue, Jul 26, 2016 at 11:45 AM, D R <[email protected]> wrote:
Thanks guys but I face an issue.
I added a Database List property to the Class of App 2 as explained on
http://www.xwiki.org/xwiki/bin/view/FAQ/HowToCreateAOneToManyRelationshipInX...
. Name: customer Display Type: select Relational Storage checked XWiki Class Name: Customer Profile.Code.Customer ProfileClass Id Field Name: doc.fullName
Value Field Name: doc.title
Try doc.name or make sure those pages have their title set by editing them in Wiki edit mode. doc.title is the raw document title which may be empty or may contain Velocity code. It's not the computed title you see displayed on the breadcrumb.
In the App 2 Sheet I added $doc.use('XPass.Code.XPassClass') $doc.display('customer')
In edit mode of entries of App 2 (XPass) I see 3 entries without text (though App 1 -Customer Profile- has only 2 entries/pages) in the
Customer
dropdown.
Thank you very much in advance for some more help.
2016-07-25 16:40 GMT+02:00 Vincent Massol <[email protected]>:
You might also find the following of interest (slightly related):
http://platform.xwiki.org/xwiki/bin/view/DevGuide/MasterDetailTutorial
Thanks -Vincent
On 25 Jul 2016, at 14:56, Marius Dumitru Florea < [email protected]> wrote:
Hi Dennis,
Maybe this can help
http://www.xwiki.org/xwiki/bin/view/FAQ/HowToCreateAOneToManyRelationshipInX...
.
On Mon, Jul 25, 2016 at 3:35 PM, D R <[email protected]> wrote:
> Hi community, > > I implemented a customer profile holding information about customers as an > XWiki application. Now in another app I'd like to have an optional field > that can contain the customer if it is related to one. Therefor I want to > list all customers (existing pages of App 1) as dropdown values of a field > of App 2. > > To illustrate what I'd like to achieve: > > App 1 (holding customer information): > |-- Page "Customer 1" > |-- Page "Customer 2" > ... > > App 2 (holding other information but can be customer related): > |-- Page 1 > |-- Field "Customer" = Dropdown of Pages of App 1 (Customer 1, Customer > 2 ...) > > I'm rather new in scripting in XWiki/Velocity so I'd really appreciate some > help on this :) > > Regards, > Dennis
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
With the help of the query I was able to filter out the template, many thanks. 2016-07-28 14:37 GMT+02:00 Marius Dumitru Florea < [email protected]>:
On Wed, Jul 27, 2016 at 4:00 PM, D R <[email protected]> wrote:
Sorry, my mistake. I edited the wrong field. After changing back Id Field Name to doc.fullName and changing Value Field Name to doc.name it works but still shows 3 items instead of the 2 available pages:
Customer ProfileTemplate Test Customer 1 Test Customer 2
On the Customer Profile Application I have the pages Test Customer 1 Test Customer 2
Why is the item "Customer ProfileTemplate" shown?
Because it has an object of type "Customer ProfileClass" like "Test Customer 1" and "Test Customer 2". I'm afraid you need to use the query (instead of the class name) if you want to filter it out.
2016-07-27 14:52 GMT+02:00 D R <[email protected]>:
After changing "Id Field Name" to doc.name still the dropdown has 3 empty items though the source application has only 2 pages.
Do you have another idea why it is not working?
2016-07-26 14:37 GMT+02:00 Marius Dumitru Florea < [email protected]>:
On Tue, Jul 26, 2016 at 11:45 AM, D R <[email protected]> wrote:
Thanks guys but I face an issue.
I added a Database List property to the Class of App 2 as explained
on
http://www.xwiki.org/xwiki/bin/view/FAQ/HowToCreateAOneToManyRelations hipInXWiki
. Name: customer Display Type: select Relational Storage checked XWiki Class Name: Customer Profile.Code.Customer ProfileClass Id Field Name: doc.fullName
Value Field Name: doc.title
Try doc.name or make sure those pages have their title set by editing them in Wiki edit mode. doc.title is the raw document title which may be empty or may contain Velocity code. It's not the computed title you see displayed on the breadcrumb.
In the App 2 Sheet I added $doc.use('XPass.Code.XPassClass') $doc.display('customer')
In edit mode of entries of App 2 (XPass) I see 3 entries without
text
(though App 1 -Customer Profile- has only 2 entries/pages) in the Customer dropdown.
Thank you very much in advance for some more help.
2016-07-25 16:40 GMT+02:00 Vincent Massol <[email protected]>:
You might also find the following of interest (slightly related):
http://platform.xwiki.org/xwiki/bin/view/DevGuide/ MasterDetailTutorial
Thanks -Vincent
> On 25 Jul 2016, at 14:56, Marius Dumitru Florea < [email protected]> wrote: > > Hi Dennis, > > Maybe this can help >
http://www.xwiki.org/xwiki/bin/view/FAQ/HowToCreateAOneToManyRelations hipInXWiki
> . > > On Mon, Jul 25, 2016 at 3:35 PM, D R <[email protected]> wrote: > >> Hi community, >> >> I implemented a customer profile holding information about customers as an >> XWiki application. Now in another app I'd like to have an optional field >> that can contain the customer if it is related to one. Therefor I want to >> list all customers (existing pages of App 1) as dropdown values of a field >> of App 2. >> >> To illustrate what I'd like to achieve: >> >> App 1 (holding customer information): >> |-- Page "Customer 1" >> |-- Page "Customer 2" >> ... >> >> App 2 (holding other information but can be customer related): >> |-- Page 1 >> |-- Field "Customer" = Dropdown of Pages of App 1 (Customer 1, Customer >> 2 ...) >> >> I'm rather new in scripting in XWiki/Velocity so I'd really appreciate some >> help on this :) >> >> Regards, >> Dennis _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
participants (3)
-
D R -
Marius Dumitru Florea -
Vincent Massol