Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Get Default item of a SelectionList
icon5.gif  Get Default item of a SelectionList [message #769805] Thu, 22 December 2011 17:41 Go to next message
Alessio Pollero is currently offline Alessio PolleroFriend
Messages: 74
Registered: August 2011
Member
I have an application that retrieve all parameters and all possible selection of a report with a code like this below :

Collection selectionList = task.getSelectionList( scalar.getName() );
				
				if ( selectionList != null ) {
					
					for ( Iterator sliter = selectionList.iterator(); sliter.hasNext(); ) {
						IParameterSelectionChoice selectionItem = (IParameterSelectionChoice) sliter.next( );
						
						Object value = selectionItem.getValue();
						String label = selectionItem.getLabel();
						//How to retrieve if the IParameterSelectionChoice is the default value ? 
					}
				}



How can i retrieve the flag that indicate if the IParameterSelectionChoice is the default selection ?


Thanks.
Re: Get Default item of a SelectionList [message #771587 is a reply to message #769805] Tue, 27 December 2011 17:34 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Have you tried to compare it to scalar.getDefaultValue()?

Jason

On 12/22/2011 12:41 PM, Alessio Pollero wrote:
> I have an application that retrieve all parameters and all possible
> selection of a report with a code like this below :
> Collection selectionList = task.getSelectionList( scalar.getName() );
>
> if ( selectionList != null ) {
>
> for ( Iterator sliter = selectionList.iterator(); sliter.hasNext(); ) {
> IParameterSelectionChoice selectionItem = (IParameterSelectionChoice)
> sliter.next( );
>
> Object value = selectionItem.getValue();
> String label = selectionItem.getLabel();
> //How to retrieve if the IParameterSelectionChoice is the default value ? }
> }
>
>
> How can i retrieve the flag that indicate if the
> IParameterSelectionChoice is the default selection ?
>
> Thanks.
Previous Topic:Birt Runtime Error
Next Topic:Report parameters not retaining default value
Goto Forum:
  


Current Time: Thu Apr 25 04:02:17 GMT 2024

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

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

Back to the top