nijogeorgep / smartgwt

Automatically exported from code.google.com/p/smartgwt
0 stars 0 forks source link

setDefaultToFirstOption in ListGridField editor #612

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
* What steps will reproduce the problem?

In the provided testcase.java:

1. Enter into 'edition mode' by double-clicking the first record of the ListGrid
2. Change the value of the first SelectItem
3. The value of the second one changes as expected, and is set to the first 
available option ('1')
4. When edition ends, the value of the second field remains unchanged ('2')

* What is the expected output? What do you see instead?

The second field value remains unchanged. Looks like the 
'setDefaultToFirstOption' does not work properly.

* What version of the product are you using? On what operating system?

The last nightly build, August 1st, in Ubuntu 10.04.

* What browser(s) does this happen in?  Are there any browsers where the
issue does not occur?

I'm using Firefox for development.

Please provide any additional information below.

Original issue reported on code.google.com by bsvazq...@gmail.com on 2 Aug 2011 at 11:15

Attachments:

GoogleCodeExporter commented 8 years ago
Just wanted to add that this only happens when the value of the second dropdown 
isn't changed. Once you select a different option from the second dropdown, 
looks like the mechanism works fine.

The issue happens when trying to let the default value as the desired one.

Original comment by bsvazq...@gmail.com on 2 Aug 2011 at 11:29

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Rather than direct access to the filterEditor form, try doing this through the 
proper APIs for manipulating criteria, specifically, setCriteria() / 
setFilterEditorCriteria().  If you reproduce a similar behavior this way it 
would be considered a bug.

Marking Invalid until such a test case is provided.

Original comment by smartgwt...@gmail.com on 2 Aug 2011 at 5:20

GoogleCodeExporter commented 8 years ago
I don't agree. I can't use setCriteria() or setFilterEditorCriteria()

I'm not using datasources. In my 'real' case, I'm fetching the second dropdown 
contents from database through RPCs and I need direct access to populate them 
depending on the first dropdown value...

Isn't there a way of doing that?

Original comment by bsvazq...@gmail.com on 2 Aug 2011 at 6:02

GoogleCodeExporter commented 8 years ago
The FilterEditor requires a DataSource, so looks like this is invalid in a 
second way, sorry.

Original comment by smartgwt...@gmail.com on 2 Aug 2011 at 6:04

GoogleCodeExporter commented 8 years ago
But I'm not talking about filtering the contents of a grid at all. I'm 
implementing dependent selects inside a listgrid row (setting the editorType 
property).

There's a fully working example in the attached file.

Original comment by bsvazq...@gmail.com on 2 Aug 2011 at 6:08

GoogleCodeExporter commented 8 years ago
Not sure what's unclear: you should be using setCriteria() / 
setFilterEditorCriteria() to manipulate the values in the FilterEditor.  If you 
instead directly manipulate the underlying form, that's not going to be 
considered a bug.

If this means you have to add a DataSource to your test case to make it work 
because the FilterEditor requires it, then that is what's required to make a 
valid test case.

The reason we insist upon this is because this looks like something that 
affects you and only you.  We have other bugs and features to tackle, so you 
should focus on making a case that this is a real and common problem, otherwise 
we'll move on to tasks that would clearly impact other users. 

Original comment by smartgwt...@gmail.com on 2 Aug 2011 at 6:16