Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JavaServer Faces » extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work
extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #474858] Wed, 18 July 2007 15:32 Go to next message
Eclipse User
Originally posted by: liming.wu.icesoft.com

I have tried to use extension point
org.eclipse.jst.pagedesigner.tagCreationFactories but defined custom
TagCreator via org.eclipse.jst.pagedesigner.tagCreationFactories is not
respected.

Do you have example of using the extension point?


Thanks
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #474859 is a reply to message #474858] Wed, 18 July 2007 19:56 Go to previous messageGo to next message
Gerry Kessler is currently offline Gerry Kessler
Messages: 125
Registered: July 2009
Senior Member
It would seem that this extension-point schema was included prematurely.
There is no current support for this.

Sorry about that.

Regards,
Gerry Kessler
WTP JSF Tools Team
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #474860 is a reply to message #474858] Thu, 19 July 2007 00:28 Go to previous messageGo to next message
Cameron Bateman is currently offline Cameron Bateman
Messages: 480
Registered: July 2009
Senior Member
> I have tried to use extension point
> org.eclipse.jst.pagedesigner.tagCreationFactories but defined custom
> TagCreator via org.eclipse.jst.pagedesigner.tagCreationFactories is not
> respected.

Can you describe what you are trying to do? Perhaps we can direct you to
an alternative solution.


--Cam
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #474861 is a reply to message #474860] Thu, 19 July 2007 11:54 Go to previous messageGo to next message
Eclipse User
Originally posted by: liming.wu.icesoft.com

Thanks Cameron.

What I want to do is to customize the behavior of trait
"requires-html-form" so that instead of h:form but my custom form
component gets inserted. Is there an alternative way to do that?

Thanks



Cameron Bateman wrote:
>> I have tried to use extension point
>> org.eclipse.jst.pagedesigner.tagCreationFactories but defined custom
>> TagCreator via org.eclipse.jst.pagedesigner.tagCreationFactories is
>> not respected.
>
> Can you describe what you are trying to do? Perhaps we can direct you
> to an alternative solution.
>
>
> --Cam
>
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #474945 is a reply to message #474861] Mon, 23 July 2007 19:37 Go to previous messageGo to next message
Cameron Bateman is currently offline Cameron Bateman
Messages: 480
Registered: July 2009
Senior Member
Hi Liming,

There is no easy way to do this at present. I can you provide you with a
workaround that should work if you are willing to learn about how GEF edit
policies work.

If a more generalized framework approach is important to you, please log a
bug describing the scenario(s) you need supported.


--Cam


Liming wrote:

> Thanks Cameron.

> What I want to do is to customize the behavior of trait
> "requires-html-form" so that instead of h:form but my custom form
> component gets inserted. Is there an alternative way to do that?

> Thanks
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #474953 is a reply to message #474945] Tue, 31 July 2007 17:06 Go to previous messageGo to next message
Eclipse User
Originally posted by: liming.wu.icesoft.com

Thank you very much.

Could you please provide me with the workaround through editPolicy?

Very appreciated.

Liming

Cameron Bateman wrote:
> Hi Liming,
>
> There is no easy way to do this at present. I can you provide you with
> a workaround that should work if you are willing to learn about how GEF
> edit policies work.
>
> If a more generalized framework approach is important to you, please log
> a bug describing the scenario(s) you need supported.
>
>
> --Cam
>
>
> Liming wrote:
>
>> Thanks Cameron.
>
>> What I want to do is to customize the behavior of trait
>> "requires-html-form" so that instead of h:form but my custom form
>> component gets inserted. Is there an alternative way to do that?
>
>> Thanks
>
>
>
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #475005 is a reply to message #474953] Mon, 06 August 2007 14:40 Go to previous messageGo to next message
Cameron Bateman is currently offline Cameron Bateman
Messages: 480
Registered: July 2009
Senior Member
You will need to use the ElementEdit extension point to override the
default edit policy on the ElementEditPart. To do this you can use the
org.eclipse.jst.pagedesigner.pageDesignerExtension extension point with
"elementEditFactory" sequence to define a factory for creating
ElementEdit's associated with the tag lib URI you are interested in.
There are examples of this in the org.eclipse.jst.pagedesigner.jsf.ui
plugin. Once you have an ElementEdit factory you create new ElementEdit
objects for the tag you are interested in. See JSFHTMLElementEditFactory
for an example of how this is done.

In the ElementEdit object for the tag(s) you are interested in, you will
need to implement the createEditPolicies method and install your own
ItemCreationRequest.REQ_ITEM_CREATION edit policy. To look at the default
one, start at NodeEditPart.createEditPolicies(). Within your own edit
policy for element creation (you can probably sub-class the existing one
called ItemCreationEditPolicy or the common DropEditPolicy) you need to
tailor the creation command returned by the getCommand method.

This is fairly involved I know, but as I said it is a workaround. Let me
know if you have any further questions.


--Cam
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #475013 is a reply to message #475005] Thu, 09 August 2007 17:54 Go to previous messageGo to next message
Eclipse User
Originally posted by: liming.wu.icesoft.com

Cameron,

Thank you very much. Unfortunately I still have problem with
getCommand(request).

I have install EditorPolicy ItemCreationRequest.REQ_ITEM_CREATION with
my ItemCreationEditPolicy object. But the request objects passed in with
getCommand (request) are instances of GroupRequest not
ItemCreationRequest which we expect because the getCommand call with
ItemCreationRequest has been issued before createEditPolicy. Without
ItemCreationRequest and IDomPosition, I couldn't find the way to insert
parent components. Are there other way around?

Thanks again!

Liming



Cameron Bateman wrote:
> You will need to use the ElementEdit extension point to override the
> default edit policy on the ElementEditPart. To do this you can use the
> org.eclipse.jst.pagedesigner.pageDesignerExtension extension point with
> "elementEditFactory" sequence to define a factory for creating
> ElementEdit's associated with the tag lib URI you are interested in.
> There are examples of this in the org.eclipse.jst.pagedesigner.jsf.ui
> plugin. Once you have an ElementEdit factory you create new
> ElementEdit objects for the tag you are interested in. See
> JSFHTMLElementEditFactory for an example of how this is done.
>
> In the ElementEdit object for the tag(s) you are interested in, you will
> need to implement the createEditPolicies method and install your own
> ItemCreationRequest.REQ_ITEM_CREATION edit policy. To look at the
> default one, start at NodeEditPart.createEditPolicies(). Within your own
> edit policy for element creation (you can probably sub-class the
> existing one called ItemCreationEditPolicy or the common DropEditPolicy)
> you need to tailor the creation command returned by the getCommand method.
>
> This is fairly involved I know, but as I said it is a workaround. Let
> me know if you have any further questions.
>
>
> --Cam
>
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #475014 is a reply to message #475013] Thu, 09 August 2007 18:41 Go to previous messageGo to next message
Cameron Bateman is currently offline Cameron Bateman
Messages: 480
Registered: July 2009
Senior Member
You're right! Sorry about that, I forgot that the ITEM_CREATION policy is
created against the target edit part not the one being created. You
*could* use this strategy if you are able to install your edit policy on
all edit parts where the element you are creating may be dropped. Try
dragging something from the palette into the element you have set the edit
policy for and you should the correct request.

I'm afraid I can't think of anything else right now, but will continue to
try to find a workaround.

--Cam
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #475015 is a reply to message #475013] Thu, 09 August 2007 20:04 Go to previous messageGo to next message
Cameron Bateman is currently offline Cameron Bateman
Messages: 480
Registered: July 2009
Senior Member
I'm going to try and escalate a work around for this issue. I don't know
if we'll be able to get it in for 2.0.1 and it won't be a full solution,
but I'm hoping to get something that lets you workaround this issue more
satisfactorily.

If you want to track the issue, you can CC yourself on:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=199295


Regards,

Cameron
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #475017 is a reply to message #475015] Fri, 10 August 2007 12:56 Go to previous messageGo to next message
Eclipse User
Originally posted by: liming.wu.icesoft.com

Thank you much for your help!

I have 2 questions regarding stylesheet to bother you.
1. I have a link stylesheet component and it needs to be dropped into
<head> section but it looks like the section is not droppable. Am I
right? Is there a way around?
2. For <link> tag, the value of href attribute (actually relative path
to a css file) is resolved against webroot which is observed via view
source in preview mode event though in source text it is still a
relative path. What I want is to resolve the relative path based on
plugin's path. Is it possible?


Thank you very much

Liming



Cameron Bateman wrote:
> I'm going to try and escalate a work around for this issue. I don't
> know if we'll be able to get it in for 2.0.1 and it won't be a full
> solution, but I'm hoping to get something that lets you workaround this
> issue more satisfactorily.
>
> If you want to track the issue, you can CC yourself on:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=199295
>
>
> Regards,
>
> Cameron
>
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #475019 is a reply to message #475017] Mon, 13 August 2007 14:40 Go to previous messageGo to next message
Cameron Bateman is currently offline Cameron Bateman
Messages: 480
Registered: July 2009
Senior Member
Liming wrote:

> Thank you much for your help!

> I have 2 questions regarding stylesheet to bother you.
> 1. I have a link stylesheet component and it needs to be dropped into
> <head> section but it looks like the section is not droppable. Am I
> right? Is there a way around?

This is a bug. I have opened an issue.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=199788

> 2. For <link> tag, the value of href attribute (actually relative path
> to a css file) is resolved against webroot which is observed via view
> source in preview mode event though in source text it is still a
> relative path. What I want is to resolve the relative path based on
> plugin's path. Is it possible?

Are you aiming to change the way the <link> tag works or write a custom
tag converter for your own component? How would loading the file relative
to a plugin map to runtime behaviour? What if you copied the file from
the plugin into the web content folder and then point to it?


--Cam
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #475020 is a reply to message #475019] Mon, 13 August 2007 15:41 Go to previous message
Eclipse User
Originally posted by: liming.wu.icesoft.com

Cameron Bateman wrote:
>
> Are you aiming to change the way the <link> tag works or write a custom
> tag converter for your own component?

Yes, you are right.

> How would loading the file
> relative to a plugin map to runtime behaviour? What if you copied the
> file from the plugin into the web content folder and then point to it?
>
> --Cam

Good question. Actually in runtime, default CSS and other resources are
embedded in a jar file. There is no problem in runtime. But in
designtime, WTP doesn't scan for such resources embedded in jar file. So
that the best way for us is to have those resources in plugin map and
customize loading process. We are trying to avoid making duplication of
those resources in web root folder.


Thank you.
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #613097 is a reply to message #474858] Wed, 18 July 2007 19:56 Go to previous message
Gerry Kessler is currently offline Gerry Kessler
Messages: 125
Registered: July 2009
Senior Member
It would seem that this extension-point schema was included prematurely.
There is no current support for this.

Sorry about that.

Regards,
Gerry Kessler
WTP JSF Tools Team
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #613098 is a reply to message #474858] Thu, 19 July 2007 00:28 Go to previous message
Cameron Bateman is currently offline Cameron Bateman
Messages: 480
Registered: July 2009
Senior Member
> I have tried to use extension point
> org.eclipse.jst.pagedesigner.tagCreationFactories but defined custom
> TagCreator via org.eclipse.jst.pagedesigner.tagCreationFactories is not
> respected.

Can you describe what you are trying to do? Perhaps we can direct you to
an alternative solution.


--Cam
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #613099 is a reply to message #474860] Thu, 19 July 2007 11:54 Go to previous message
Eclipse User
Originally posted by: liming.wu.icesoft.com

Thanks Cameron.

What I want to do is to customize the behavior of trait
"requires-html-form" so that instead of h:form but my custom form
component gets inserted. Is there an alternative way to do that?

Thanks



Cameron Bateman wrote:
>> I have tried to use extension point
>> org.eclipse.jst.pagedesigner.tagCreationFactories but defined custom
>> TagCreator via org.eclipse.jst.pagedesigner.tagCreationFactories is
>> not respected.
>
> Can you describe what you are trying to do? Perhaps we can direct you
> to an alternative solution.
>
>
> --Cam
>
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #613244 is a reply to message #474861] Mon, 23 July 2007 19:37 Go to previous message
Cameron Bateman is currently offline Cameron Bateman
Messages: 480
Registered: July 2009
Senior Member
Hi Liming,

There is no easy way to do this at present. I can you provide you with a
workaround that should work if you are willing to learn about how GEF edit
policies work.

If a more generalized framework approach is important to you, please log a
bug describing the scenario(s) you need supported.


--Cam


Liming wrote:

> Thanks Cameron.

> What I want to do is to customize the behavior of trait
> "requires-html-form" so that instead of h:form but my custom form
> component gets inserted. Is there an alternative way to do that?

> Thanks
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #613258 is a reply to message #474945] Tue, 31 July 2007 17:06 Go to previous message
Eclipse User
Originally posted by: liming.wu.icesoft.com

Thank you very much.

Could you please provide me with the workaround through editPolicy?

Very appreciated.

Liming

Cameron Bateman wrote:
> Hi Liming,
>
> There is no easy way to do this at present. I can you provide you with
> a workaround that should work if you are willing to learn about how GEF
> edit policies work.
>
> If a more generalized framework approach is important to you, please log
> a bug describing the scenario(s) you need supported.
>
>
> --Cam
>
>
> Liming wrote:
>
>> Thanks Cameron.
>
>> What I want to do is to customize the behavior of trait
>> "requires-html-form" so that instead of h:form but my custom form
>> component gets inserted. Is there an alternative way to do that?
>
>> Thanks
>
>
>
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #613863 is a reply to message #474953] Mon, 06 August 2007 14:40 Go to previous message
Cameron Bateman is currently offline Cameron Bateman
Messages: 480
Registered: July 2009
Senior Member
You will need to use the ElementEdit extension point to override the
default edit policy on the ElementEditPart. To do this you can use the
org.eclipse.jst.pagedesigner.pageDesignerExtension extension point with
"elementEditFactory" sequence to define a factory for creating
ElementEdit's associated with the tag lib URI you are interested in.
There are examples of this in the org.eclipse.jst.pagedesigner.jsf.ui
plugin. Once you have an ElementEdit factory you create new ElementEdit
objects for the tag you are interested in. See JSFHTMLElementEditFactory
for an example of how this is done.

In the ElementEdit object for the tag(s) you are interested in, you will
need to implement the createEditPolicies method and install your own
ItemCreationRequest.REQ_ITEM_CREATION edit policy. To look at the default
one, start at NodeEditPart.createEditPolicies(). Within your own edit
policy for element creation (you can probably sub-class the existing one
called ItemCreationEditPolicy or the common DropEditPolicy) you need to
tailor the creation command returned by the getCommand method.

This is fairly involved I know, but as I said it is a workaround. Let me
know if you have any further questions.


--Cam
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #613871 is a reply to message #475005] Thu, 09 August 2007 17:54 Go to previous message
Eclipse User
Originally posted by: liming.wu.icesoft.com

Cameron,

Thank you very much. Unfortunately I still have problem with
getCommand(request).

I have install EditorPolicy ItemCreationRequest.REQ_ITEM_CREATION with
my ItemCreationEditPolicy object. But the request objects passed in with
getCommand (request) are instances of GroupRequest not
ItemCreationRequest which we expect because the getCommand call with
ItemCreationRequest has been issued before createEditPolicy. Without
ItemCreationRequest and IDomPosition, I couldn't find the way to insert
parent components. Are there other way around?

Thanks again!

Liming



Cameron Bateman wrote:
> You will need to use the ElementEdit extension point to override the
> default edit policy on the ElementEditPart. To do this you can use the
> org.eclipse.jst.pagedesigner.pageDesignerExtension extension point with
> "elementEditFactory" sequence to define a factory for creating
> ElementEdit's associated with the tag lib URI you are interested in.
> There are examples of this in the org.eclipse.jst.pagedesigner.jsf.ui
> plugin. Once you have an ElementEdit factory you create new
> ElementEdit objects for the tag you are interested in. See
> JSFHTMLElementEditFactory for an example of how this is done.
>
> In the ElementEdit object for the tag(s) you are interested in, you will
> need to implement the createEditPolicies method and install your own
> ItemCreationRequest.REQ_ITEM_CREATION edit policy. To look at the
> default one, start at NodeEditPart.createEditPolicies(). Within your own
> edit policy for element creation (you can probably sub-class the
> existing one called ItemCreationEditPolicy or the common DropEditPolicy)
> you need to tailor the creation command returned by the getCommand method.
>
> This is fairly involved I know, but as I said it is a workaround. Let
> me know if you have any further questions.
>
>
> --Cam
>
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #613872 is a reply to message #475013] Thu, 09 August 2007 18:41 Go to previous message
Cameron Bateman is currently offline Cameron Bateman
Messages: 480
Registered: July 2009
Senior Member
You're right! Sorry about that, I forgot that the ITEM_CREATION policy is
created against the target edit part not the one being created. You
*could* use this strategy if you are able to install your edit policy on
all edit parts where the element you are creating may be dropped. Try
dragging something from the palette into the element you have set the edit
policy for and you should the correct request.

I'm afraid I can't think of anything else right now, but will continue to
try to find a workaround.

--Cam
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #613873 is a reply to message #475013] Thu, 09 August 2007 20:04 Go to previous message
Cameron Bateman is currently offline Cameron Bateman
Messages: 480
Registered: July 2009
Senior Member
I'm going to try and escalate a work around for this issue. I don't know
if we'll be able to get it in for 2.0.1 and it won't be a full solution,
but I'm hoping to get something that lets you workaround this issue more
satisfactorily.

If you want to track the issue, you can CC yourself on:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=199295


Regards,

Cameron
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #613875 is a reply to message #475015] Fri, 10 August 2007 12:56 Go to previous message
Eclipse User
Originally posted by: liming.wu.icesoft.com

Thank you much for your help!

I have 2 questions regarding stylesheet to bother you.
1. I have a link stylesheet component and it needs to be dropped into
<head> section but it looks like the section is not droppable. Am I
right? Is there a way around?
2. For <link> tag, the value of href attribute (actually relative path
to a css file) is resolved against webroot which is observed via view
source in preview mode event though in source text it is still a
relative path. What I want is to resolve the relative path based on
plugin's path. Is it possible?


Thank you very much

Liming



Cameron Bateman wrote:
> I'm going to try and escalate a work around for this issue. I don't
> know if we'll be able to get it in for 2.0.1 and it won't be a full
> solution, but I'm hoping to get something that lets you workaround this
> issue more satisfactorily.
>
> If you want to track the issue, you can CC yourself on:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=199295
>
>
> Regards,
>
> Cameron
>
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #613877 is a reply to message #475017] Mon, 13 August 2007 14:40 Go to previous message
Cameron Bateman is currently offline Cameron Bateman
Messages: 480
Registered: July 2009
Senior Member
Liming wrote:

> Thank you much for your help!

> I have 2 questions regarding stylesheet to bother you.
> 1. I have a link stylesheet component and it needs to be dropped into
> <head> section but it looks like the section is not droppable. Am I
> right? Is there a way around?

This is a bug. I have opened an issue.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=199788

> 2. For <link> tag, the value of href attribute (actually relative path
> to a css file) is resolved against webroot which is observed via view
> source in preview mode event though in source text it is still a
> relative path. What I want is to resolve the relative path based on
> plugin's path. Is it possible?

Are you aiming to change the way the <link> tag works or write a custom
tag converter for your own component? How would loading the file relative
to a plugin map to runtime behaviour? What if you copied the file from
the plugin into the web content folder and then point to it?


--Cam
Re: extension point org.eclipse.jst.pagedesigner.tagCreationFactories doesn't work [message #613878 is a reply to message #475019] Mon, 13 August 2007 15:41 Go to previous message
Eclipse User
Originally posted by: liming.wu.icesoft.com

Cameron Bateman wrote:
>
> Are you aiming to change the way the <link> tag works or write a custom
> tag converter for your own component?

Yes, you are right.

> How would loading the file
> relative to a plugin map to runtime behaviour? What if you copied the
> file from the plugin into the web content folder and then point to it?
>
> --Cam

Good question. Actually in runtime, default CSS and other resources are
embedded in a jar file. There is no problem in runtime. But in
designtime, WTP doesn't scan for such resources embedded in jar file. So
that the best way for us is to have those resources in plugin map and
customize loading process. We are trying to avoid making duplication of
those resources in web root folder.


Thank you.
Previous Topic:resource-bundle defined in faces-config.xml not used by validator and intellisen
Next Topic:AbstractTagConverter#doConvertRefresh
Goto Forum:
  


Current Time: Fri Aug 29 22:22:56 EDT 2014

Powered by FUDForum. Page generated in 0.05080 seconds