Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [wtp-jsf-dev] Extension point in Visual Page editor of JSF

Hello,

I tried using option "elementEditFactory" of extension
"org.eclipse.jst.pagedesigner.pageDesignerExtension"

I created a factory similar to
org.eclipse.jst.pagedesigner.jsf.ui.elementedit.jsfhtml.JSFHTMLElementEd
itFactory which returns instances of AbstractElementEdit, but it did not
worked for me.

It looks like call to fillContextMenu() of SingleElementActionGroup from
ContextMenuListener calls createElementEdit of
ElementEditFactoryRegistry

This createElementEdit method of ElementEditFactoryRegistry returns a
single instance of IElementEdit depending on Tag URI and factory, so
even if I create another factory with same Tag URI
("http://java.sun.com/jsf/html"; or return null from getSupportedURI) I
get only one IElementEdit.

This result in either the already available options in context menu for
"html" JSF tags to be displayed or the new one's which I need to create.

What I need is some new options to be added on the already available
context menu of "html" JSF tags.

Thanks.

Neeraj








-----Original Message-----
From: wtp-jsf-dev-bounces@xxxxxxxxxxx
[mailto:wtp-jsf-dev-bounces@xxxxxxxxxxx] On Behalf Of Cameron Bateman
Sent: Wednesday, February 27, 2008 12:02 AM
To: Java Server Faces Tools developer discussion
Cc: Ankit Kakkar; marco.dubbeld@xxxxxxxxxx; Abhishek Jain
Subject: RE: [wtp-jsf-dev] Extension point in Visual Page editor of JSF

There is an extension used in pagedesigner.jsf.ui called
"org.eclipse.jst.pagedesigner.pageDesignerExtension".  It has an option
called "elementEditFactory".  An example is
org.eclipse.jst.pagedesigner.jsf.ui.elementedit.jsfhtml.JSFHTMLElementEd
itFactory used for the "html" JSF tag library.  If you create such a
factory, you can return instances of AbstractElementEdit for tags.  The
fillContextMenu callback on AbstractElementEdit should provide what you
want.  If not let me know.


--Cam

-----Original Message-----
From: wtp-jsf-dev-bounces@xxxxxxxxxxx
[mailto:wtp-jsf-dev-bounces@xxxxxxxxxxx]On Behalf Of Neeraj Bhatt
Sent: Tuesday, February 26, 2008 12:14 AM
To: Java Server Faces Tools developer discussion
Cc: Ankit Kakkar; marco.dubbeld@xxxxxxxxxx; Abhishek Jain
Subject: RE: [wtp-jsf-dev] Extension point in Visual Page editor of JSF


Hello

I need to add more options on the right click of JSF UI components
available in palette like Command Button. 

In the plugin org.eclipse.jst.pagedesigner.jsf.ui (Version 20070912) I
am not able to see any available extension points.

Basically all the options on the right click of UI components come from
addJSFAddItems method in org.eclipse.jst.pagedesigner.jsf.ui.actions.
JSFAddActionGroup, so I am trying to add an extension point which will
be called in addJSFAddItems as below

IExtension[] extensions = Platform.getExtensionRegistry()
	      .getExtensionPoint("xyz").getExtensions();

And subsequently adding in context menu and doing the required action.
(The action will open a tree which will display all the methods of some
specific java bean classes)

Are there any better approaches/available extension point to do this
task?

Thanks

		   



-----Original Message-----
From: wtp-jsf-dev-bounces@xxxxxxxxxxx
[mailto:wtp-jsf-dev-bounces@xxxxxxxxxxx] On Behalf Of
CAMERON.BATEMAN@xxxxxxxxxx
Sent: Tuesday, February 26, 2008 12:33 AM
To: wtp-jsf-dev@xxxxxxxxxxx
Cc: Ankit Kakkar; marco.dubbeld@xxxxxxxxxx; Abhishek Jain
Subject: Re: [wtp-jsf-dev] Extension point in Visual Page editor of JSF

Can you expand a bit on what you are trying to do and what extension
points you would like?  The Visual page editor already has extensive
extension points for extending such things as the context menus used on
the design canvas.

--Cam

--- Original Message ---
> 
> 
> <head>
> <meta http-equiv=Content-Type content="text/html; charset=us-ascii">
> 
> <!--[if gte mso 9]><xml>
>  <o:shapedefaults v:ext="edit" spidmax="1026" />
> </xml><![endif]--><!--[if gte mso 9]><xml>
>  <o:shapelayout v:ext="edit">
>   <o:idmap v:ext="edit" data="1" />
>  </o:shapelayout></xml><![endif]-->
> </head>
> 
> 
> 
> <div class=Section1>
> 
> <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> font-family:Arial'>Hi,<o:p></o:p></span></font></p>
> 
> <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
> 
> <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> font-family:Arial'>I am trying to add some features in the
> palette of &nbsp;the
> Visual page editor of JSF which is provided as part of
> WTP.<o:p></o:p></span></font></p>
> 
> <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
> 
> <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> font-family:Arial'>For example I need to add extra option in
> the right click of
> command button, so that I can browse all the beans and their
> methods (in a tree
> format) available in the project.<o:p></o:p></span></font></p>
> 
> <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
> 
> <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> font-family:Arial'>Once a particular method is available the
> underlying jsf
> code should change to incorporate the method name in the command
> tag like <o:p></o:p></span></font></p>
> 
> <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
> 
> <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> font-family:Arial'>&lt;h:commandButton
>
action=&quot;#{whistleblowerBean.getPerson}&quot;&gt;&lt;/h:commandButto
n&gt;&nbsp;&nbsp;
> (Seam Specific action binding)<o:p></o:p></span></font></p>
> 
> <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> font-family:Arial'>&nbsp;<o:p></o:p></span></font></p>
> 
> <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> font-family:Arial'>I have implemented it by changing the
> org.eclipse.jst.pagedesigner.jsf.ui
> &amp; &nbsp;org.eclipse.jst.pagedesigner plugin code, but it
> would be a cleaner
> and extensible approach if I can do it through extension point
> mechanism<o:p></o:p></span></font></p>
> 
> <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
> 
> <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> font-family:Arial'>If anyone can provide some help on extension
> point approach,
> it would be greatly appreciated<o:p></o:p></span></font></p>
> 
> <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
> 
> <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
> 
> <p class=MsoNormal><font size=2 face=Arial><span
> style='font-size:10.0pt;
> font-family:Arial'>Neeraj Bhatt<o:p></o:p></span></font></p>
> 
> </div>
> 
> 
> 
> 
> 
> 
> --------_______________________________________________
> wtp-jsf-dev mailing list
> wtp-jsf-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/wtp-jsf-dev
> 

_______________________________________________
wtp-jsf-dev mailing list
wtp-jsf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-jsf-dev
_______________________________________________
wtp-jsf-dev mailing list
wtp-jsf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-jsf-dev

_______________________________________________
wtp-jsf-dev mailing list
wtp-jsf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-jsf-dev


Back to the top