Load fragments dynamically in xCP 2.2
We need to load the fragments dynamically. These fragments have multiple inputs. Each fragment has different set of inputs. We can do this using the expression for fragment ID. However when we load using expressions, only ID input is available and all other inputs are not visible. How can we achieve this functionality.
Best Answer
-
To achieve your condition simply use dummy variables, For example I have two fragment with 3 common variable like var0_string, var1_bool and var2_integer but in fragment_aaa I am using var0_string and var1_bool same as fragment1_aaa I will use var0_string and var_integer. So Here point is If you want to use fragments in dynamic then you should have common set of attribute and proper system name (to get fragment in run-time using expression) of fragments.
0
Answers
-
Use Fragment Data Hint and map the inputs.
Choose a fragment as a data hint which has all the inputs required.
The inputs will be resolved correctly during runtime.
0 -
In the Fragment Data Hint, we need to select a particular fragment right? But in my case, I am loading the fragment content dynamically using expression. In the fragment Data Hint, I can chose only one fragment.
0 -
Consider I have 3 fragment...
fragment1_aaa have
var1, var2, var3 as inputs
fragment2_aaa have
var1, var2, var3, var4 and var5 as input
fragment3_aaa have
var1, var2, var3, var4 , var5, var6 and var7
note. here input name are same (var1, var2 ...)
Now if you want to get these fragments dynamically then you should use fragment3_aaa as fragment hint because it only contains the all the inputs of other fragments.. then dynamically the fragment will take the inputs...
0 -
How is it possible? If the inputs are of different types like string, integer and boolean how does it take automatically?
0 -
To achieve your condition simply use dummy variables, For example I have two fragment with 3 common variable like var0_string, var1_bool and var2_integer but in fragment_aaa I am using var0_string and var1_bool same as fragment1_aaa I will use var0_string and var_integer. So Here point is If you want to use fragments in dynamic then you should have common set of attribute and proper system name (to get fragment in run-time using expression) of fragments.
0 -
Categories
- All Categories
- 109 Developer Announcements
- 49 Articles
- 100 General Questions
- 122 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 122 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management