Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    #16
    Can you get a dev console snapshot (like your others) where the replacement widget is shown? If the log you mention is correct, it should have been removed to make way for another of the same name.
    Last edited by Isomorphic; 5 Jun 2013, 08:33.

    Comment


      #17
      I have enough images to upload that I need to do this in multiple parts.

      I have attached to this message three images that show the AskValueFormDialog before I click the upload button that is on that form. (the watch window spread across three images)

      The interesting part of this is the Part1 image that shows the label isc_AskValueFormDialog_0_headerLabelParent_label object.
      Attached Files

      Comment


        #18
        The 4 images attached to this message are from the watch Window after I click upload and the PleaseWaitDialog appears.

        The interesting parts of this are:

        1. the Part1 image where it no longer has a isc_AskValueFormDialog_0_headerLabelParent_label under the headerLabelParent canvas.

        2. the PleaseWaitDialog_After_Click_Upload image where it shows the isc_AskValueFormDialog_0_headerLabelParent_label is now under isc_VLayout_16.
        Attached Files

        Comment


          #19
          Any new updates on this issue?

          Comment


            #20
            We've been investigating this issue on our end but we are still unable to reproduce the problem. It seems you have some kind of configuration in place within your app which is a required condition for making the bug occur, and without a way to reproduce the problem (or a clear picture of the code path that leads to the bad state) there's not much we can do.

            We'll continue to look but at this stage we probably just need to see a way to reproduce this -- in other words, a test case we can run on our end that causes the problem.

            Regards
            Isomorphic Software

            Comment


              #21
              Please run your app in SuperDevMode, and set a breakpoint in com.smartgwt.client.core.BaseClass in the method

              Code:
              protected void error(String attribute, String value, boolean allowPostCreate) throws IllegalStateException {
                      if (allowPostCreate) {
                          error("Cannot change configuration property '" + attribute + "' to " + value + " after the component has been rendered.");
                      } else {
                          error("Cannot change configuration property '" + attribute + "' to " + value + " after the component has been created.");
                      }
                  }
              at the line that raises the error "Cannot change configuration property after the component has been created."

              Once the breakpoint is hit in your app, please capture the call stack and the relevant variables and post it here.

              Thanks,
              Sanjiv

              Comment


                #22
                I've tracked it down that I can now provide a sample to help you debug the issue. It occurs when the application sets default canvas properties (which we do in our app). Here is some sample code (I used HibernateDS as a base for the sample)

                The main class:
                Code:
                package com.smartgwt.sample.client;
                
                import com.google.gwt.core.client.EntryPoint;
                import com.google.gwt.core.client.GWT;
                import com.smartgwt.client.core.KeyIdentifier;
                import com.smartgwt.client.data.DataSource;
                import com.smartgwt.client.rpc.RPCManager;
                import com.smartgwt.client.data.Record;
                import com.smartgwt.client.data.fields.*;
                import com.smartgwt.client.types.Alignment;
                import com.smartgwt.client.util.KeyCallback;
                import com.smartgwt.client.util.Page;
                import com.smartgwt.client.util.SC;
                import com.smartgwt.client.widgets.Canvas;
                import com.smartgwt.client.widgets.IButton;
                import com.smartgwt.client.widgets.Label;
                import com.smartgwt.client.widgets.Window;
                import com.smartgwt.client.widgets.events.ClickEvent;
                import com.smartgwt.client.widgets.events.ClickHandler;
                import com.smartgwt.client.widgets.events.CloseClickEvent;
                import com.smartgwt.client.widgets.events.CloseClickHandler;
                import com.smartgwt.client.widgets.form.DynamicForm;
                import com.smartgwt.client.widgets.grid.ListGrid;
                import com.smartgwt.client.widgets.grid.events.RecordClickEvent;
                import com.smartgwt.client.widgets.grid.events.RecordClickHandler;
                import com.smartgwt.client.widgets.layout.HLayout;
                import com.smartgwt.client.widgets.layout.VStack;
                import com.smartgwt.client.widgets.toolbar.ToolStrip;
                import com.smartgwt.client.widgets.viewer.DetailViewer;
                
                /**
                 * Entry point classes define <code>onModuleLoad()</code>.
                 */
                public class HibernateDS implements EntryPoint {
                    private ListGrid boundList;
                    private DynamicForm boundForm;
                    private IButton saveBtn;
                    private DetailViewer boundViewer;
                
                    private Window winModal;
                    private IButton okbtn = null;
                	private IButton cancelbtn = null;
                
                    
                    /**
                     * This is the entry point method.
                     */
                    public void onModuleLoad() {
                    	Canvas canvasProperties = new Canvas();
                    	canvasProperties.setAlign(Alignment.RIGHT);
                    	Canvas.setDefaultProperties( canvasProperties );
                        
                		KeyIdentifier debugKey = new KeyIdentifier();
                		debugKey.setCtrlKey(true);
                		debugKey.setKeyName("D");
                
                		Page.registerKey(debugKey, new KeyCallback() {
                			public void execute(String keyName) {
                				SC.showConsole();
                			}
                		});
                
                
                        
                		RPCManager.setActionURL(GWT.getModuleBaseURL() + "supplyItemHibernateOperations.rpc");
                		
                        // instantiate DataSource on the client only (this example explicitly bypasses
                        // ISC server-side DataSource management)
                
                        DataSource dataSource = new DataSource();
                        dataSource.setID("supplyItem");
                
                        DataSourceSequenceField itemID = new DataSourceSequenceField("itemID");
                        itemID.setPrimaryKey(true);
                        itemID.setHidden(true);
                
                        DataSourceTextField itemName = new DataSourceTextField("itemName", "Item", 128, true);
                
                        DataSourceTextField SKU = new DataSourceTextField("SKU", "SKU", 10);
                
                        DataSourceTextField description = new DataSourceTextField("description", "Description");        
                        DataSourceTextField category = new DataSourceTextField("category", "Category", 128);
                        DataSourceTextField units = new DataSourceTextField("units", "Units", 5);
                
                        DataSourceFloatField unitCost = new DataSourceFloatField("unitCost", "Unit Cost");
                        DataSourceBooleanField inStock = new DataSourceBooleanField("inStock", "In Stock");
                
                        DataSourceDateField nextShipment = new DataSourceDateField("nextShipment", "Next Shipment");
                
                        dataSource.setFields(itemID, itemName, SKU, description, category, units, unitCost, inStock, nextShipment);
                
                
                        VStack vStack = new VStack();
                        vStack.setLeft(175);
                        vStack.setTop(75);
                        vStack.setWidth("70%");
                        vStack.setMembersMargin(20);
                
                        Label label = new Label();
                        label.setContents("<ul>" +
                                "<li>click a record in the grid to view and edit that record in the form</li>" +
                                "<li>click <b>New</b> to start editing a new record in the form</li>" +
                                "<li>click <b>Save</b> to save changes to a new or edited record in the form</li>" +
                                "<li>click <b>Clear</b> to clear all fields in the form</li>" +
                                "<li>click <b>Filter</b> to filter (substring match) the grid based on form values</li>" +
                                "<li>click <b>Fetch</b> to fetch records (exact match) for the grid based on form values</li>" +
                                "<li>double-click a record in the grid to edit inline (press Return, or arrow/tab to another record, to save)</li>" +
                                "</ul>");
                        vStack.addMember(label);
                
                        boundList = new ListGrid();
                        boundList.setHeight(200);
                        boundList.setCanEdit(true);
                        boundList.setDataSource(dataSource);
                
                        boundList.addRecordClickHandler(new RecordClickHandler() {
                            public void onRecordClick(RecordClickEvent event) {
                                Record record = event.getRecord();
                                boundForm.editRecord(record);
                                saveBtn.enable();
                                boundViewer.viewSelectedData(boundList);
                            }
                        });
                        vStack.addMember(boundList);
                
                        boundForm = new DynamicForm();
                        boundForm.setDataSource(dataSource);
                        boundForm.setNumCols(6);
                        boundForm.setAutoFocus(false);
                        vStack.addMember(boundForm);
                
                        ToolStrip toolbar = new ToolStrip();
                        toolbar.setMembersMargin(10);
                        toolbar.setHeight(22);
                
                        saveBtn = new IButton("Save");
                        saveBtn.addClickHandler(new ClickHandler() {
                            public void onClick(ClickEvent event) {
                                boundForm.saveData();
                                if (!boundForm.hasErrors()) {
                                    boundForm.clearValues();
                                    saveBtn.disable();
                                }
                            }
                        });
                        toolbar.addMember(saveBtn);
                
                        IButton clearBtn = new IButton("Clear");
                        clearBtn.addClickHandler(new ClickHandler() {
                            public void onClick(ClickEvent event) {
                                boundForm.clearValues();
                                saveBtn.disable();
                            }
                        });
                        toolbar.addMember(clearBtn);
                
                        IButton filterBtn = new IButton("Filter");
                        filterBtn.addClickHandler(new ClickHandler() {
                            public void onClick(ClickEvent event) {
                                boundList.filterData(boundForm.getValuesAsCriteria());
                                saveBtn.disable();
                            }
                        });
                        toolbar.addMember(filterBtn);
                
                        IButton fetchBtn = new IButton("Fetch");
                        fetchBtn.addClickHandler(new ClickHandler() {
                            public void onClick(ClickEvent event) {
                                boundList.fetchData(boundForm.getValuesAsCriteria());
                                saveBtn.disable();
                            }
                        });
                        toolbar.addMember(fetchBtn);
                
                        IButton deleteBtn = new IButton("Delete");
                        deleteBtn.addClickHandler(new ClickHandler() {
                            public void onClick(ClickEvent event) {
                                boundList.removeSelectedData();
                                boundList.deselectAllRecords();
                            }
                        });
                        toolbar.addMember(deleteBtn);
                
                        vStack.addMember(toolbar);
                
                        boundViewer = new DetailViewer();
                        boundViewer.setDataSource(dataSource);
                        vStack.addMember(boundViewer);
                
                        vStack.draw();
                
                        boundList.filterData(null);
                        
                        
                        Window y = new MyTestWindow();
                        y.setTitle("y");
                        y.show();
                        y.destroy();
                        
                        
                        this.winModal = new Window();
                		this.winModal.setWidth( 550 );
                		this.winModal.setHeight( 580 );
                		this.winModal.setTitle("Test Modal Dialog");
                		this.winModal.setShowMinimizeButton( false );
                		this.winModal.setIsModal( true );
                		this.winModal.setShowModalMask( true );
                		this.winModal.centerInPage();
                
                		this.winModal.addCloseClickHandler( new CloseClickHandler() {
                
                			@Override
                			public void onCloseClick( final CloseClickEvent event ) {
                				HibernateDS.this.winModal.destroy();
                			}
                		} );
                
                		this.okbtn = new IButton();
                		this.okbtn.setTitle( "OK" );
                
                		this.cancelbtn = new IButton();
                		this.cancelbtn.setTitle( "Cancel" );
                
                		final HLayout buttonLayout = new HLayout();
                		buttonLayout.setAlign( Alignment.CENTER );
                		buttonLayout.setMargin( 10 );
                		buttonLayout.setMembersMargin( 20 );
                		buttonLayout.addMember( this.okbtn );
                		buttonLayout.addMember( this.cancelbtn );
                		
                		this.winModal.addItem( buttonLayout );
                
                		this.okbtn.addClickHandler(
                				new ClickHandler() {
                
                					@Override
                					public void onClick( final ClickEvent event ) {
                						final MyPopupTestWithLabel waitDialog = new MyPopupTestWithLabel( "Importing" );
                						waitDialog.show();
                					}
                				}
                				);
                        
                		this.winModal.show();
                    }
                  
                    
                
                }
                The test window class which is used to simply cause the winModal dialog to pick up its discarded ID:
                Code:
                package com.smartgwt.sample.client;
                
                import com.smartgwt.client.widgets.Window;
                
                public class MyTestWindow extends Window {
                
                	public MyTestWindow() {
                		super();
                	}
                }
                The test popup dialog. When the OK button is pressed on the winModal dialog in the main class, the label on this dialog ends up reusing the label header from the modal dialog:
                Code:
                package com.smartgwt.sample.client;
                
                import com.smartgwt.client.types.Alignment;
                import com.smartgwt.client.widgets.Button;
                import com.smartgwt.client.widgets.Dialog;
                import com.smartgwt.client.widgets.Label;
                import com.smartgwt.client.widgets.events.ClickEvent;
                import com.smartgwt.client.widgets.events.ClickHandler;
                import com.smartgwt.client.widgets.layout.VLayout;
                
                
                public class MyPopupTestWithLabel extends Dialog {
                
                	public MyPopupTestWithLabel( final String title ) {
                		this.setWidth( 260 );
                		this.setHeight( 130 );
                		this.setTitle( title );
                		this.setIsModal( true );
                		this.setShowModalMask( true );
                		final Button cancelButton = new Button( "Cancel" );
                		this.setToolbarButtons( cancelButton );
                		cancelButton.addClickHandler( new ClickHandler() {
                
                			@Override
                			public void onClick( final ClickEvent event ) {
                				MyPopupTestWithLabel.this.cancelClick();
                				MyPopupTestWithLabel.this.destroy();
                			}
                		} );
                		final VLayout body = new VLayout();
                		body.setAlign( Alignment.CENTER );
                		final Label theLabel = new Label( "the label" );
                		theLabel.setAlign( Alignment.CENTER );
                		theLabel.setHeight( "*" );
                		body.setMembers( theLabel );
                		this.addItem( body );
                		this.setShowCloseButton( false );
                	}
                
                	/*
                	 * (non-Javadoc)
                	 * @see com.smartgwt.client.widgets.Dialog#cancelClick()
                	 */
                	@Override
                	public void cancelClick() {
                		super.cancelClick();
                		destroy();
                	}
                }
                If the following code is removed from the main class, then the problem goes away:
                Code:
                Canvas canvasProperties = new Canvas();
                    	canvasProperties.setAlign(Alignment.RIGHT);
                    	Canvas.setDefaultProperties( canvasProperties );

                Comment


                  #23
                  Originally posted by sjivan View Post
                  Please run your app in SuperDevMode, and set a breakpoint in com.smartgwt.client.core.BaseClass in the method

                  Code:
                  protected void error(String attribute, String value, boolean allowPostCreate) throws IllegalStateException {
                          if (allowPostCreate) {
                              error("Cannot change configuration property '" + attribute + "' to " + value + " after the component has been rendered.");
                          } else {
                              error("Cannot change configuration property '" + attribute + "' to " + value + " after the component has been created.");
                          }
                      }
                  at the line that raises the error "Cannot change configuration property after the component has been created."

                  Once the breakpoint is hit in your app, please capture the call stack and the relevant variables and post it here.

                  Thanks,
                  Sanjiv

                  Now that I have a sample, do you still need this?

                  Comment


                    #24
                    We will take a look at the attached sample and let you know what we find. Assuming we can reproduce it we shouldn't need the additional debugging info from you

                    Thanks
                    Isomorphic Software

                    Comment


                      #25
                      Are there any updates on this? Were you able to get the sample working?

                      Comment


                        #26
                        This should now be resolved. The change actually went in a couple of days ago and we failed to follow up on the thread.
                        Please try the latest nightly build and let us know if you're still able to reproduce the problem

                        Thanks
                        Isomorphic Software

                        Comment


                          #27
                          Thank you! I have confirmed that the issue has been resolved.

                          Comment


                            #28
                            i have faced that error but i can't find a solution for it till now would any one please tell me how to solve it

                            Comment


                              #29
                              I haven't seen this issue since it was fixed in 2013.
                              Are you sure it's the same issue? There are some items you cannot change after the component has been created. Check the order in which your code is doing things.
                              Last edited by sderouchie; 17 Aug 2017, 04:25.

                              Comment

                              Working...
                              X