Announcement

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

    Editor type dominant over chosen Form Item

    Hi,

    In the example below i set an editor type on a datasource field. And create a form with a "special" formitem to render that datasource field. I would expect to see SmartGwt use the specified FormItem but instead it chooses the EditorType.

    Thanks,

    Ruben


    Code:
    Code:
    package test.client;
    
    import com.google.gwt.core.client.EntryPoint;
    import com.smartgwt.client.data.DataSource;
    import com.smartgwt.client.data.DataSourceField;
    import com.smartgwt.client.widgets.form.DynamicForm;
    import com.smartgwt.client.widgets.form.fields.TextAreaItem;
    import com.smartgwt.client.widgets.form.fields.TextItem;
    
    public class EditorTypeTest implements EntryPoint {
    	
    	public void onModuleLoad() {
    		DataSource ds = DataSource.get("Customer");
    		DataSourceField dsField = ds.getField("cstm_name");
    		TextAreaItem textAreaItem = new TextAreaItem("cstm_name", "cstm_name");
    		textAreaItem.setValue("I am a textarea");
    		dsField.setEditorType(textAreaItem);
    		
    		DynamicForm form = new DynamicForm();
    		form.setDataSource(ds);
    		TextItem formItem = new TextItem("cstm_name", "cstm_name");
    		form.setFields(formItem);
    		form.draw();
    	}
    }
    DataSource:

    Code:
    <DataSource 
    	serverType="sql"
    	dbName="Mysql"
    	tableName="Customer"
    	ID="Customer"
    >
    	<fields>
    		<field primaryKey="true" type="sequence" name="cstm_pk" hidden="true"></field>
    		<field type="integer" length="10" name="cstm_number" title="" required="true" export="true"></field>
    		<field type="text" length="45" name="cstm_name" title="" required="true" export="true"></field>
    		<field type="text" length="4000" name="cstm_description" title="" export="true"></field>
    		<field type="text" length="100" name="cstm_address" title="" export="true"></field>
    		<field type="text" length="45" name="cstm_city" title="" export="true"></field>
    		<field type="text" length="10" name="cstm_zip" title="" export="true"></field>
    		<field type="text" length="45" name="cstm_country" title="" export="true"></field>
    		<field type="text" length="100" name="cstm_email" title="" export="true"></field>
    		<field type="text" length="45" name="cstm_createdBy" canEdit="false" title="" export="true"></field>
    		<field type="text" length="45" name="cstm_modifiedBy" canEdit="false" title="" export="true"></field>
    		<field type="datetime" name="cstm_createdOn" canEdit="false" title="" export="true"></field>
    		<field type="datetime" name="cstm_modifiedOn" canEdit="false" title="" export="true"></field>		
    	</fields>
    </DataSource>
    Attached Files

    #2
    That's a bug. Thanks for the clear test case and explanation. This will most likely be addressed next week.

    Comment


      #3
      Hi,

      Is this fixed in the nightly builds?

      Thanks,

      Ruben

      Comment


        #4
        I checked this in the latest nightly, but it is not a fix is not yet implemented. Is there someway for me to track this? Or can I make a ticket on google code?

        Comment


          #5
          I just tested this in the nightly of SC_SNAPSHOT-2010-11-29/PowerEdition Deployment (built 2010-11-29) and it was not fixed yet. Any news on this?

          Comment


            #6
            Any news on this? I tested it in the latest nightly (SC_SNAPSHOT-2010-12-14/PowerEdition Deployment (built 2010-12-14)) but it does not seem to be fixed.

            Thanks,
            David

            Comment


              #7
              This has been fixed and the fix will be present in the next nightly build.

              Comment

              Working...
              X