Announcement

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

  • Isomorphic
    replied
    There is no plausible mechanism by which framework code could be storing this value permanently at the JVM level (we do not put anything in the HttpSession at all) so you should investigate any custom logic you have added server-side - this is not a framework issue.

    Leave a comment:


  • edulid
    replied
    Hi Isomorphic,

    the steps you mentioned are correct.
    The behavior I'm observing is that, after the last step, so after hitting the update button, the form item shows "abc" (the added value) instead of the updated value "xxx" which, as you mentioned, is modified correctly.

    From this moment on, I see "abc" every time I hit the update button after selecting some row.
    EVEN WITH ANOTHER BROWSER, so this is very strange. Say, AFTER the mentioned steps, I do the following:

    - Load the application with another browser
    - Click on a value to load it onto the form item.
    - Optionally change the value, but this is not necessary.
    - Hit update
    I then see "abc"! So this value is saved somewhere in the server, since I changed the browser!
    The only way to stop this behavior is to restart Apache.
    Last edited by edulid; 3 Sep 2014, 22:42.

    Leave a comment:


  • Isomorphic
    replied
    Just a note to say we're looking into this, but our initial investigation isn't reproducing the problem.
    Can we just clarify the steps

    - load the app. Assume you have a few lines of data.
    - enter a value (say "abc") and hit "Add" (a new row is successfully added)
    - select a row other than the new "abc" row - form item value changes to reflect this.
    - Modify the value (say enter "xxx") and hit update

    At this stage in our testing the selected record is modified correctly and the form item continues to show the saved value ("xxx"). Can you confirm exactly what behavior you're seeing?

    Thanks
    Isomorphic Software

    Leave a comment:


  • Blama
    replied
    Hello edulid, Hello Isomorphic,

    the chances that this is related are low, but I'll add the link to this thread anyway. I think I couldn't solve it at that time. Afterwards I changed the code for other reasons, so I can't retest now.

    Best regards,
    Blama

    Leave a comment:


  • edulid
    started a topic Bug when updating a form having valuesManager

    Bug when updating a form having valuesManager

    I have a big problem with the newest SmartGWT versions and I think there is a bug.

    My testcase:
    Code:
    public class TestingModule implements EntryPoint {
    
    	ListGrid lg = new ListGrid();
    
    	public void onModuleLoad() {
    
    		final ValuesManager mainFormValuesManager = new ValuesManager();
    		mainFormValuesManager.setDataSource(DataSource.get("table"));
    		mainFormValuesManager.setSaveOperationType(DSOperationType.ADD);
    
    		DynamicForm singleFieldForm = new DynamicForm();
    		TextItem formItem = new TextItem("f_name", "Name");
    		singleFieldForm.setFields(formItem);
    		singleFieldForm.setDataSource(mainFormValuesManager.getDataSource());
    		singleFieldForm.setValuesManager(mainFormValuesManager);
    		mainFormValuesManager.addMember(singleFieldForm);
    
    		VLayout vlayout = new VLayout();
    		vlayout.setHeight100();
    		vlayout.setWidth100();
    		vlayout.addMember(singleFieldForm);
    
    		final IButton button = new IButton("Add");
    		button.addClickHandler(new ClickHandler() {
    
    			@Override
    			public void onClick(ClickEvent event) {
    				if (mainFormValuesManager.validate()) {
    					mainFormValuesManager.saveData(new DSCallback() {
    
    						@Override
    						public void execute(DSResponse dsResponse, Object data,
    								DSRequest dsRequest) {
    							SC.say("Correctly saved");
    						}
    					});
    				}
    			}
    		});
    
    		ListGrid lg = new ListGrid();
    		ListGridField idField = new ListGridField("f_schueler_id");
    		idField.setHidden(true);
    		ListGridField nameField = new ListGridField("f_name", "Name");
    		lg.setFields(nameField);
    		lg.setHeight100();
    		lg.setWidth100();
    		lg.setDataSource(DataSource.get("table"));
    		lg.setAutoFetchData(true);
    		lg.setSortField("f_name");
    
    		lg.addCellClickHandler(new CellClickHandler() {
    
    			@Override
    			public void onCellClick(CellClickEvent event) {
    				ListGridRecord clicked = event.getRecord();
    				Integer id = clicked.getAttributeAsInt("f_schueler_id");
    
    				mainFormValuesManager
    						.setSaveOperationType(DSOperationType.UPDATE);
    				Criteria c = new Criteria();
    				c.addCriteria("f_schueler_id", id);
    
    				mainFormValuesManager.fetchData(c);
    				button.setTitle("Update");
    			}
    		});
    
    		vlayout.addMember(button);
    		vlayout.addMember(lg);
    
    		vlayout.draw();
    	}
    
    }
    The datasource:
    Code:
    <DataSource ID="table" serverType="sql" tableName="t_schueler" 
    	 >
    
    	<fields>
    		<field name="f_schueler_id" type="sequence" primaryKey="true" />
    		<field name="f_name" type="text" required="true" />
    		
    	</fields>
    </DataSource>
    You have to have some values in the table.. There is nothing special about it.

    In order to reproduce the bug:
    1) Write some value to the "Name" field, e.g. "abc".
    2) Click on "Add". The value is added to the table.
    3) Double click on ANOTHER value of the listGrid. In my case, I double clicked on "Bob".
    The value "Bob" is shown in the form and the button text updated to "Update". The form is not longer an "add" form, but an "update" form.
    4) Click on the button "update". It should update the "Bob" record.

    The value "abc" is shown in the form after clicking on "update" !!!!!!!
    From now on, every time you click on "update", you will see "abc".
    This is NOT correct!
    And was not the case with earlier SmartGWT versions. I testet with the libs in my client's computer, and everything worked correctly. Unfortunately, I cannot downgrade to those old smartGWT libs because there I found another smartGWT bug, which was solved when upgrading smartGWT... so I am in a deadlock now!

    Using SmartGWT 4.1p Power (SmartClient Version: v9.1p_2014-08-19/PowerEdition Deployment (built 2014-08-19).
    I also tested with the latest SmartGWT Version (2014-09-03) but the bug is still there...
    Last edited by edulid; 3 Sep 2014, 13:13.
Working...
X