Is there a way to create a custom CAF Control in Designer so that we can re-use it as a standard CAF control (by drag and drop from the Palette)?
Adding custom controls to the palette is not supported.
As far as control reuse goes, there are some improvements with the 8.x version of Designer CAF:
1.The Include View Control was enhanced to allow including the same view multiple times on the same page with different parameters.
2. Added support for loading included view from a classpath giving you ability to package reusable views into a library jar and use them in other applications.
3. Snippets. A snippet is a bundle of controls that you quite often need in combination, e.g. a button to open a modal dialog, the modal dialog itself and the button on the modal dialog to close the dialog. Once such a snippet is created it is available in the palette.
Regards,
–mark
Hi,
I tried the following use case with the Import Template Control (v8) but it didn’t work, can anyone tell me why?
1 - One Portlet View (outerView) with the Import Template Control configured to load one Web Application View (inneView) all on the same web app.
2 - The Import Template Control is configured with one control parameter named “subject” and the value is bound to property “outerSubject”.
3 - On the innerView there’s only one input text named “subject” bound to property “innerSubject”.
4 - On the outerView I have included an async button which only prints to log the value of “outerSubject”.
I was expecting the “outerSubject” to change when setting a value for the input text, but this doesn’t happen.
It seems that the “innerView” can only receive data from the “outerView” but not the opposite.
Basically, I need a way to have the layout on a common place and the data on some other place (for instance, a task).
Thanks
Bruno
reusableView.zip (15.7 KB)
Hi,
try using a “complex” data structure. I mean, not just a simple String passing the data (works only in the direction you mentioned), but a data class containing the fields you need (which i suppose is the most usual case).
I attached a simple project showing this (v802).
hope it helps,
Javier
ReusingViews_simple.zip (18.3 KB)