Re: Select Custome field options

[email protected]
Newsgroups gmane.comp.java.jira.user
Message-ID <5071653.519541309436100550.JavaMail.j2ee_forums.atlassian.com@atlassian12.managed.contegix.com>
ThankYou Nic I will the same as your suggestion.

Yes I am doing my own validator plug-in 

Please see below code that I am writing in Java.

I need those cascading-select fields at the time of adding validator to transition.

So,I have created by useing VM.

*protected void getVelocityParamsForInput(Map<String, Object> velocityParams)* {
		System.out.println("in getVelocityParamsForInput");
		Issue issue = (Issue) velocityParams.get("issue");
					List<CustomField> cField = ManagerFactory.getCustomFieldManager().getCustomFieldTypes();
           
            Iterator it =  cField.iterator();
            if(it.hasNext())
            {
            	System.out.println("CustomeFiled Value:::::::::"+it.next());
            	//String s = (String) it.next();
            }
        
		CustomField customField = ManagerFactory.getCustomFieldManager().getCustomFieldObjectByName(fieldName);
		final List<FieldConfigScheme> configSchemesForCustomField = customField.getConfigurationSchemes();
        FieldConfigScheme fieldConfigdefaultScheme = null;
        for (FieldConfigScheme fieldConfigScheme : configSchemesForCustomField) 
        {
            if (fieldConfigScheme.isBasicMode())
            {
                fieldConfigdefaultScheme = fieldConfigScheme;
                break;
            }
        }
        List cFieldOptions = null;
        Options cFieldOptins =null;
        if (fieldConfigdefaultScheme != null)
        {
            FieldConfig fieldConfig = fieldConfigdefaultScheme.getOneAndOnlyConfig();
            OptionsManager optionManager = (OptionsManager)ComponentManager.getInstance().getComponentInstanceOfType(OptionsManager.class);
            cFieldOptins = optionManager.getOptions(fieldConfig);
            //cFieldOptions.add(options);
            System.out.println("in getting options" + cFieldOptins.size() + "Option Value" + cFieldOptins.get(1));
        }
      
		velocityParams.put("val-cFieldOptions", cFieldOptins);
		velocityParams.put("val-cField", cField);
		
	}


Regards,
Suresh.
--
Post by sureshg - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=55082
_______________________________________________
Jira-user mailing list
[email protected]
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.