Hello - I am extending the OOTB core component by adding it in our project, say, /apps/site/ and using sling:resourceSuperType pointing it to the core component. I wanted to remove some of the dialog fields and modify the behavior of the default selection of the radio or checkbox selection. Let us say, If I remove the field from the custom dialog, it is still loading from the OOTB core component as we are pointing to the core component using sling:resourceSuperType.
Is there any way to restrict the dialog property to load from the core component? I know we have the sling:hideProperties but not sure if this can be used to restrict my use case.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @v1101
Yes, you can remove the fields which ever you want from the proxy component and add the new fields as required.
As you mentioned you will need to use the sling:resourcSuperType property to proxy the core component and add only the new properties that is required in the proxy component. Now to remove the fields which are loading from core component you need to add the property node in proxy component and add the sling:hideResource as true which will hide the current property.
I have extended the title component from core in we-retail and added a new property 'New Property' and removed the existing 'LinkURL' property.
If you see below dialog, the new property is added and the exisitng property 'LinkURL' is removed from my proxy component dialog.
Hope this helps!
Thanks
Hi @v1101
Yes, you can remove the fields which ever you want from the proxy component and add the new fields as required.
As you mentioned you will need to use the sling:resourcSuperType property to proxy the core component and add only the new properties that is required in the proxy component. Now to remove the fields which are loading from core component you need to add the property node in proxy component and add the sling:hideResource as true which will hide the current property.
I have extended the title component from core in we-retail and added a new property 'New Property' and removed the existing 'LinkURL' property.
If you see below dialog, the new property is added and the exisitng property 'LinkURL' is removed from my proxy component dialog.
Hope this helps!
Thanks