Package org.drools.factconstraints.client.customform

Examples of org.drools.factconstraints.client.customform.CustomFormConfiguration


            switch (constraint.getConstraintValueType()) {
                case SingleFieldConstraint.TYPE_LITERAL:

                    if (this.constraint instanceof SingleFieldConstraint) {
                        final SingleFieldConstraint con = (SingleFieldConstraint) this.constraint;
                        CustomFormConfiguration customFormConfiguration = WorkingSetManager.getInstance().getCustomFormConfiguration(modeller.getAsset().metaData.packageName, pattern.factType, fieldName);
                        if (customFormConfiguration != null) {
                            constraintWidget = new Button(con.getValue(), new ClickHandler() {

                                public void onClick(ClickEvent event) {
                                   showTypeChoice((Widget) event.getSource(), constraint);
View Full Code Here


     */
    private void showTypeChoice(Widget w,
            final BaseSingleFieldConstraint con) {

        /////////////////////
        CustomFormConfiguration customFormConfiguration = WorkingSetManager.getInstance().getCustomFormConfiguration(modeller.getAsset().metaData.packageName, pattern.factType, fieldName);

        if (customFormConfiguration != null) {
            if (!(con instanceof SingleFieldConstraint)) {
                Window.alert("Unexpected constraint type!");
                return;
View Full Code Here

                case SingleFieldConstraint.TYPE_LITERAL :
                case SingleFieldConstraint.TYPE_ENUM :

                    if ( this.constraint instanceof SingleFieldConstraint ) {
                        final SingleFieldConstraint con = (SingleFieldConstraint) this.constraint;
                        CustomFormConfiguration customFormConfiguration = WorkingSetManager.getInstance().getCustomFormConfiguration( modeller.getAsset().metaData.packageName,
                                                                                                                                      pattern.getFactType(),
                                                                                                                                      fieldName );
                        if ( customFormConfiguration != null ) {
                            constraintWidget = new Button( con.getValue(),
                                                           new ClickHandler() {
View Full Code Here

     * Show a list of possibilities for the value type.
     */
    private void showTypeChoice(Widget w,
                                final BaseSingleFieldConstraint con) {

        CustomFormConfiguration customFormConfiguration = WorkingSetManager.getInstance().getCustomFormConfiguration( modeller.getAsset().metaData.packageName,
                                                                                                                      pattern.getFactType(),
                                                                                                                      fieldName );

        if ( customFormConfiguration != null ) {
            if ( !(con instanceof SingleFieldConstraint) ) {
View Full Code Here

                }

                String factType = factsCombo.getItemText(factsCombo.getSelectedIndex());
                String fieldName = fieldsCombo.getItemText(fieldsCombo.getSelectedIndex());
               
                CustomFormConfiguration newCustomFormConfiguration = CustomFormsContainer.getEmptyCustomFormConfiguration();
                newCustomFormConfiguration.setFactType(factType);
                newCustomFormConfiguration.setFieldName(fieldName);
                newCustomFormConfiguration.setCustomFormURL(customFormURL.getText());
                newCustomFormConfiguration.setCustomFormWidth(w);
                newCustomFormConfiguration.setCustomFormHeight(h);

                workingSetEditor.getCustomFormsContainer().putCustomForm(newCustomFormConfiguration);
                ((WorkingSetConfigData) workingSet.content).customForms = workingSetEditor.getCustomFormsContainer().getCustomForms();
            }
        });
View Full Code Here

            String fieldName = fieldsCombo.getItemText(fieldsCombo.getSelectedIndex());
            String factField = factsCombo.getItemText(factsCombo.getSelectedIndex());
            contraintsMap.clear();

            if (this.workingSetEditor.getCustomFormsContainer().containsCustomFormFor(factField, fieldName)){
                CustomFormConfiguration customForm = this.workingSetEditor.getCustomFormsContainer().getCustomForm(factField, fieldName);
                this.customFormURL.setText(customForm.getCustomFormURL());
                this.customFormWidth.setText(String.valueOf(customForm.getCustomFormWidth()));
                this.customFormHeight.setText(String.valueOf(customForm.getCustomFormHeight()));
            }else{
                this.customFormURL.setText("");
                this.customFormWidth.setText("");
                this.customFormHeight.setText("");
            }
View Full Code Here

TOP

Related Classes of org.drools.factconstraints.client.customform.CustomFormConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.