Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sapphire-dev] java type action customizations

Hey Konstantin,

For Browse, 

I got the filter hooked up, no problem and am now contributing my own browse actions instead.  However, one thing I haven't figured out is how to disable one of my "browse" action on a particular property based on the state of the model, i.e. if another property has a value or not.  Can you do this with a Condition class?  I tried at first but I don't see the condition class get recalcuated based on a change in the model.  I am also using the @DependsOn annotation at the model level if that makes a difference.




On Wed, Nov 9, 2011 at 11:09 PM, Konstantin Komissarchik <konstantin.komissarchik@xxxxxxxxxx> wrote:

For Browse, 

 

I was wondering if it is possible to modify the filtering capabilities of the dialog.  In one case I need to filter from a list of classnames based on a regex pattern.  In another case I would like to filter classes shown based on the value of another property in the sapphire model.  So is there currently a method for plugging in arbitrary filtering logic for the browse action?   Or maybe overriding the default browse action and be able to extend it?

 

[kosta] There isn’t a built-in system to do what you are after, but you can use a filter to remove the system-provided action handler and attach your own implementation.

 

For Create,

 

I was wondering if there is a way to modify the "create" action to dynamically provide the value of the superclass to use for the new java type?   

 

I know that I add my own custom actions for "browse" and "create" but I wanted to see if we should add this type of capabilities to the framework instead before I wrote my own.  Thanks so much!

 

[kosta] Currently, @JavaTypeConstraint is read directly, so there isn’t a way to substitute dynamic behavior. I can see adding JavaTypeConstraintService like we’ve done in other similar situations. Please open an enhancement request.

 

 

 

From: sapphire-dev-bounces@xxxxxxxxxxx [mailto:sapphire-dev-bounces@xxxxxxxxxxx] On Behalf Of Greg Amerson
Sent: Wednesday, November 09, 2011 1:47 AM
To: Sapphire project
Subject: [sapphire-dev] java type action customizations

 

Hello again,

 

In case you haven't figured this out from all of my recent questions, I am in the process of migrating one of our big wizards that has lots of custom dialogs that needs enhancements and instead of fixing my current stuff, I want to move it all to a new sapphire based editor instead.  :)  I already asked one question about being able to toggle the enablement or disablement of java type actions in another post, so I wont add that in here.

 

This latest question has to do with customizing the default java type browse/create actions. Here is what I would like to do:

 

For Browse, 

 

I was wondering if it is possible to modify the filtering capabilities of the dialog.  In one case I need to filter from a list of classnames based on a regex pattern.  In another case I would like to filter classes shown based on the value of another property in the sapphire model.  So is there currently a method for plugging in arbitrary filtering logic for the browse action?   Or maybe overriding the default browse action and be able to extend it?

 

For Create,

 

I was wondering if there is a way to modify the "create" action to dynamically provide the value of the superclass to use for the new java type?   

 

I know that I add my own custom actions for "browse" and "create" but I wanted to see if we should add this type of capabilities to the framework instead before I wrote my own.  Thanks so much!

 

--

Greg Amerson

Liferay, Inc.


_______________________________________________
sapphire-dev mailing list
sapphire-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/sapphire-dev




--
Greg Amerson
Liferay, Inc.


Back to the top