Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JavaServer Faces » How to prevent some tags from showing in palette
How to prevent some tags from showing in palette [message #474189] Wed, 23 May 2007 17:30 Go to next message
Eclipse UserFriend
Originally posted by: dhampson.usa.net

I am working on a JSF project and it includes 2 custom component
libraries. I want prevent tags in one of the component libraries from
showing up in palette of VPD. How can i develop a plugin to do so? Which
extension point to use?

Thanks a lot

Dan
Re: How to prevent some tags from showing in palette [message #474190 is a reply to message #474189] Wed, 23 May 2007 18:31 Go to previous messageGo to next message
Gerry Kessler is currently offline Gerry KesslerFriend
Messages: 125
Registered: July 2009
Senior Member
The palette is controlled by providing xml files of metadata. In fact,
many areas of the JSF Tooling is controlled through these metadata files.
In the org.eclipse.jst.jsf.standard.tagsupport plugin and each of the
pagedesigner plugins, you will find a folder of metadata files. A plugin
registers metadata files using the
org.eclipse.jst.jsf.common.StandardMetaDataFiles extension-point.

Some of the files in the pagedesigner plugins include a "PaletteInfos"
trait, where you can control which palette items are displayed. By
using this trait, if an item is included in the list, it will be displayed
on the palette. If you look at some of the the other "traits" of a tag
"entity", you will see how other aspects of a palette item is controlled.

We hope to produce some developer documentation in the near future on this
topic, but hopefully the above will get you by for now. If not, please
continue to post questions to this newsgroup.
Re: How to prevent some tags from showing in palette [message #474191 is a reply to message #474190] Wed, 23 May 2007 20:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dhampson.usa.net

Thanks. It works.
Re: How to prevent some tags from showing in palette [message #476118 is a reply to message #474190] Thu, 30 April 2009 11:04 Go to previous messageGo to next message
shilpa is currently offline shilpaFriend
Messages: 24
Registered: July 2009
Junior Member
Can you please tell me how to change the behaviour of the below metadata
configuration of palette

<trait id="requires-html-form">
<value>true</value>
</trait>

Currently, this configuration makes the <h:form> tag enclose the dragged
JSF tag. But I want to reuse this functionality to perform the same
behaviour for my custom tag library.
Re: How to prevent some tags from showing in palette [message #476124 is a reply to message #476118] Fri, 01 May 2009 01:41 Go to previous message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 481
Registered: July 2009
Senior Member
Unfortunately, we don't currently offer that in a metadata driven way.
Instead you could use the IElementEdit.getTagCreator to return the
UserCustomizedTagCreator instead of the default tag creator.
UserCustomizedTagCreator allows you to provide a ICustomizationData object
that specifies a list of parent tags that you want dropped with your
target tag. Note that you can can also you use it to add child tags.

This functionality has only been added in Galileo.


Thanks,

Cameron

shilpa wrote:

> Can you please tell me how to change the behaviour of the below metadata
> configuration of palette

> <trait id="requires-html-form">
> <value>true</value>
> </trait>

> Currently, this configuration makes the <h:form> tag enclose the dragged
> JSF tag. But I want to reuse this functionality to perform the same
> behaviour for my custom tag library.
Re: How to prevent some tags from showing in palette [message #610965 is a reply to message #474189] Wed, 23 May 2007 18:31 Go to previous message
Gerry Kessler is currently offline Gerry KesslerFriend
Messages: 125
Registered: July 2009
Senior Member
The palette is controlled by providing xml files of metadata. In fact,
many areas of the JSF Tooling is controlled through these metadata files.
In the org.eclipse.jst.jsf.standard.tagsupport plugin and each of the
pagedesigner plugins, you will find a folder of metadata files. A plugin
registers metadata files using the
org.eclipse.jst.jsf.common.StandardMetaDataFiles extension-point.

Some of the files in the pagedesigner plugins include a "PaletteInfos"
trait, where you can control which palette items are displayed. By
using this trait, if an item is included in the list, it will be displayed
on the palette. If you look at some of the the other "traits" of a tag
"entity", you will see how other aspects of a palette item is controlled.

We hope to produce some developer documentation in the near future on this
topic, but hopefully the above will get you by for now. If not, please
continue to post questions to this newsgroup.
Re: How to prevent some tags from showing in palette [message #610966 is a reply to message #474190] Wed, 23 May 2007 20:22 Go to previous message
Eclipse UserFriend
Originally posted by: dhampson.usa.net

Thanks. It works.
Re: How to prevent some tags from showing in palette [message #618746 is a reply to message #474190] Thu, 30 April 2009 11:04 Go to previous message
shilpa is currently offline shilpaFriend
Messages: 24
Registered: July 2009
Junior Member
Can you please tell me how to change the behaviour of the below metadata
configuration of palette

<trait id="requires-html-form">
<value>true</value>
</trait>

Currently, this configuration makes the <h:form> tag enclose the dragged
JSF tag. But I want to reuse this functionality to perform the same
behaviour for my custom tag library.
Re: How to prevent some tags from showing in palette [message #618752 is a reply to message #476118] Fri, 01 May 2009 01:41 Go to previous message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 481
Registered: July 2009
Senior Member
Unfortunately, we don't currently offer that in a metadata driven way.
Instead you could use the IElementEdit.getTagCreator to return the
UserCustomizedTagCreator instead of the default tag creator.
UserCustomizedTagCreator allows you to provide a ICustomizationData object
that specifies a list of parent tags that you want dropped with your
target tag. Note that you can can also you use it to add child tags.

This functionality has only been added in Galileo.


Thanks,

Cameron

shilpa wrote:

> Can you please tell me how to change the behaviour of the below metadata
> configuration of palette

> <trait id="requires-html-form">
> <value>true</value>
> </trait>

> Currently, this configuration makes the <h:form> tag enclose the dragged
> JSF tag. But I want to reuse this functionality to perform the same
> behaviour for my custom tag library.
Previous Topic:Customize JSP tools in wpe palette
Next Topic:Help required on org.eclipse.osgi
Goto Forum:
  


Current Time: Tue Apr 16 10:21:30 GMT 2024

Powered by FUDForum. Page generated in 0.79833 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top