Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Sapphire » Radio Button Group with Possible Value Service
Radio Button Group with Possible Value Service [message #1236476] Mon, 27 January 2014 10:02 Go to next message
Andreas Weise is currently offline Andreas WeiseFriend
Messages: 37
Registered: January 2014
Member
I'm wondering if there exists a way for using the Radio Button Group in conjunction with the Possible Value Service. I only find samples for using it with enumerations, which is ok for static content, but not for dynamic use cases. I've tried to use it, but sapphire ignores the style hint.

Especially for dialogs, there currently seems to be no alternative to Tables for displaying dynamic structures containing nested details. And for small structures it would be great using radio button groups.

Is that something for the 8.0 release?

Andreas
Re: Radio Button Group with Possible Value Service [message #1236491 is a reply to message #1236476] Mon, 27 January 2014 10:44 Go to previous messageGo to next message
Greg Amerson is currently offline Greg AmersonFriend
Messages: 119
Registered: March 2010
Senior Member
Hey Andreas,

I have done exactly that. I have a possible values service extension hooked up to a radio button group. See the code here:

https://github.com/liferay/liferay-ide/blob/master/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/PossibleValuesAuxTextProvider.java

https://github.com/liferay/liferay-ide/blob/master/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/PossibleValuesRadioButtonsGroupBinding.java

https://github.com/liferay/liferay-ide/blob/master/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/PossibleValuesRadioPropertyEditorPresentation.java

All of this code is activated via a sdef setting here:

https://github.com/liferay/liferay-ide/blob/master/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/NewLiferayPluginProjectWizard.sdef#L185-L186

which points to this class

https://github.com/liferay/liferay-ide/blob/master/tools/plugins/com.liferay.ide.project.ui/src/com/liferay/ide/project/ui/wizard/PortletFrameworkPropertyEditorPresentationFactory.java

This factory class using the "PossibleValuesRadioPropertyEditorPresentation"

Re: Radio Button Group with Possible Value Service [message #1236493 is a reply to message #1236491] Mon, 27 January 2014 10:45 Go to previous messageGo to next message
Greg Amerson is currently offline Greg AmersonFriend
Messages: 119
Registered: March 2010
Senior Member
See the attached screenshot. Both of the radio groups in this sapphire wizard page are supported by the possible values radio button presentation.
Re: Radio Button Group with Possible Value Service [message #1236496 is a reply to message #1236493] Mon, 27 January 2014 10:53 Go to previous messageGo to next message
Andreas Weise is currently offline Andreas WeiseFriend
Messages: 37
Registered: January 2014
Member
Looks exactly what I was looking for. Thanks for this quick and good answer!

I will check it out more in detail.

If possible due to IP stuff: Isn't that worth to be contributed to the master branch?
Re: Radio Button Group with Possible Value Service [message #1236497 is a reply to message #1236496] Mon, 27 January 2014 10:55 Go to previous messageGo to next message
Greg Amerson is currently offline Greg AmersonFriend
Messages: 119
Registered: March 2010
Senior Member
If Konstantin is interested in having this in sapphire 8, i'm happy to do the leg work to get it into sapphire UI
Re: Radio Button Group with Possible Value Service [message #1236499 is a reply to message #1236497] Mon, 27 January 2014 10:56 Go to previous messageGo to next message
Greg Amerson is currently offline Greg AmersonFriend
Messages: 119
Registered: March 2010
Senior Member
I think in general the concern might be that 'possible values' service could be hundreds of items. So a radio button group hooked to any possible values service could get crazy. But in my situation I know that the possible values wil always be a manageable number. Since sapphire is flexible enough to do it outside of sapphire-ui in adopter plugins, i didn't originally push to have this be a part of sapphire framework.

[Updated on: Mon, 27 January 2014 10:58]

Report message to a moderator

Re: Radio Button Group with Possible Value Service [message #1236598 is a reply to message #1236499] Mon, 27 January 2014 16:32 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
I would certainly welcome a contribution of this feature to Sapphire. The best way to do this is to rework the existing RadioButtonGroupPropertyEditorPresentation so that it works with the PossibleValuesService instead of assuming enums, similarly to how PopUpListFieldPropertyEditorPresentation is implemented. Please open an enhancement request to track this work further.
Re: Radio Button Group with Possible Value Service [message #1237755 is a reply to message #1236598] Thu, 30 January 2014 14:01 Go to previous messageGo to next message
Andreas Weise is currently offline Andreas WeiseFriend
Messages: 37
Registered: January 2014
Member
Enhancement Request opened: https://bugs.eclipse.org/bugs/show_bug.cgi?id=426994
Re: Radio Button Group with Possible Value Service [message #1242755 is a reply to message #1237755] Mon, 10 February 2014 03:35 Go to previous message
Greg Amerson is currently offline Greg AmersonFriend
Messages: 119
Registered: March 2010
Senior Member
I'll try to get this contributed this month.
Previous Topic:Expression in PossibleValues.invalidValueMessage()
Next Topic:FormPage messages
Goto Forum:
  


Current Time: Thu Dec 26 15:02:21 GMT 2024

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

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

Back to the top