Package smilehouse.gui.html.fieldbased

Examples of smilehouse.gui.html.fieldbased.GUIContext


        content.addElement(new HR());
       
        if( component instanceof GUIConfigurationIF) {
           
            GUIContext guiContext = ((GUIConfigurationIF) component).getGUIContext();

            if(guiContext != null) {

            // Component might have it's own labels...
               
            LabelResource customLabelResource = PipeComponentUtils.getCustomLabelResource(new Locale(
                environment.getLanguage(session)), labels, component.getClass());

            Map fields = guiContext.makeFields(component, customLabelResource, req);

            // -----------
            // Handle post
            // -----------
            if(requestType == POST_REQUEST && parameters.wasGiven(ACTION)) {
                int action = parameters.getInt(ACTION);
                if(action == 1) {
                    if(guiContext.hasBeenEdited(fields)) {
                        guiContext.commitFields(fields);
                        //System.out.println("Saving PipeComponentData, ID: " + componentData.getId());
                        pers.update(componentData);
                    }
                } else
                    guiContext.revertFields(fields);
            }

            // -----------------------
            // Print the field editors
            // -----------------------
            String guiHtml;

            // Use template if the component provides one
            String templateStr = ((GUIConfigurationIF) component).getGUITemplate();
            if(templateStr != null) {
                Template template = Template.createTemplate(templateStr);
                guiContext.writeEditors(fields, template)
                template.write();
                guiHtml = template.toString();
            }
            // Else just print them...
            else {
View Full Code Here


          return pipe;
      }
  public void init(ServletConfig config) throws ServletException {
        try {
            generalFieldsContext = new GUIContext();
            {
                // ----------
                // Name field
                // ----------
                String id = NAME;
View Full Code Here

        private GUIContext context;

        public GUIContextContainer() {
            try {
                this.context = new GUIContext();
                //set unique id and description labelkey
                String id = "xslt";
                String label = "xslt";

                ModelModifier modifier = new DefaultModelModifier() {
View Full Code Here

            {OrderSource.NEW_STATUS_NAME_ATTR, new Integer(30)}};
        //{ OrderSource.PAYMENT_STATUS_NAME_NOT_IN_ATTR, new Integer(70) } };

    public OrderSourceGUIContextContainer() {
        try {
            this.context = new GUIContext();


            // --------------------------
            // First, the simple cases...
            // --------------------------
View Full Code Here

            {CustomerSource.CUSTOMER_GROUP_ATTR, new Integer(50)}
            };

    public CustomerSourceGUIContextContainer() {
        try {
            this.context = new GUIContext();

            // --------------------------
            // First, the simple cases...
            // --------------------------
            for(int i = 0; i < SIMPLE_CASES.length; i++) {
View Full Code Here

        }
    }

    public void init(ServletConfig config) throws ServletException {
        try {
            generalFieldsContext = new GUIContext();
           
            {
                // --------------------------------------------------------------------
                // Converter list field. Actually we handle PipeComponentData-instances
                // instead of PipeComponentIFs so that Hibernate doesn't get confused...
View Full Code Here

        private GUIContext context;

        public GUIContextContainer() {
            try {
                this.context = new GUIContext();
                //set unique id and description labelkey
                String id = "xslt";
                String label = "xslt";

                ModelModifier modifier = new DefaultModelModifier() {
View Full Code Here

TOP

Related Classes of smilehouse.gui.html.fieldbased.GUIContext

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.