Constraints are Getting Set During Server Start
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2012 08:09 AM
Hi,
Do any one know when does alfresco sets up constraints values ?
I think its at server start.
What if I want to add dynamic constraint fetching values from database?
If I have many drop down constraints in my application, it will take lot of time for server start.
Do any one knows solution to it?
Do any one know when does alfresco sets up constraints values ?
I think its at server start.
What if I want to add dynamic constraint fetching values from database?
If I have many drop down constraints in my application, it will take lot of time for server start.
Do any one knows solution to it?
Labels:
- Labels:
-
Archive
7 REPLIES 7
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2012 03:31 AM
Hi Anuj,
You can use custom constrain in that case.
Where you need to create a javaclass which will populate the drop down from the db.
https://forums.alfresco.com/en/viewtopic.php?f=4&t=11687
You can use custom constrain in that case.
Where you need to create a javaclass which will populate the drop down from the db.
https://forums.alfresco.com/en/viewtopic.php?f=4&t=11687
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2012 02:32 AM
Hi Anuj,
You can use custom constrain in that case.
Where you need to create a javaclass which will populate the drop down from the db.
https://forums.alfresco.com/en/viewtopic.php?f=4&t=11687
I went through it Mit.
Its generating its own component for drop downs.
Can't I use existing component and get the results?
I have more than one drop down and according to content type I need to get values.
I am getting handle in getAllowedValues() which gets called during run time but what I am not getting is for which property its getting called.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2012 05:55 AM
the property with which you have associated your custom constrain.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2012 06:11 AM
Yes. But I have 4 properties defined in custom constraint class. So how come I know for which property getAllowedValues() get called?
According to property I need to fetch data from db.
According to property I need to fetch data from db.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2012 07:57 AM
then you require for different constrains classes and associated each of them sepratly.
I mean its quite logical any custom constrain will give certain set of values only.
So, better create 4 diff constrains.
I mean its quite logical any custom constrain will give certain set of values only.
So, better create 4 diff constrains.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2012 08:10 AM
Thanks Mit.
Actually I did not want to do that, but now probably have to go that way only
Actually I did not want to do that, but now probably have to go that way only

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2012 09:07 AM
that is also the best practice. 😎
