Currently evaluating SmartGWT client and server packages. I've been over the Quick Start and many of the samples (300 is a lot to look at) in the showcase, and thought I had a handle on DataSources and their relationships with DataBoundComponents. Turns out, I must have missed something(s) along the way. Apologies in advance for what I'm sure are all stupid questions.
Let's suppose the Animals datasource in the BuiltInDS example has 100 fields in it instead of 7. I want to display 5 of them in my listGrid, and maybe 30 in my edit form. I thought the easy way to do that might be with an operationBinding(s) on the datasource, where I'd set 'outputs' equal to the fields in question. What I thought that would do is influence the columns in my grid for me, but what I think I see is that this only affects the data returned from the fetch. Fair enough, if that's all it's supposed to do, but can someone verify that?
So I guess what I'd do now (for e.g., the grid) is declare 5 ListGridFields explicitly and drop them on the grid. Not difficult, but now I'm not sure I see the point of 'outputs', unless it was just to restrict the amount of data coming across the wire... Do I have that right?
So I'll define those ListGridFields like I see it in nearly every sample
But now SmartGWT thinks I'm trying to override "foo_co_nm", if I have that right, and that's not what I want. I don't want to have to redefine the title, for example - it's already on the ds definition. All I want is to refer to the field already defined on the datasource, so I can say for example 'show only these 5 fields out of the 100 defined', or 'put these 15 fields on tab 1, another 15 on tab 2, and ignore the other 70.' Surely I'm missing some fundamental concept here, and I'm quite happy to have another look at a sample or documentation if someone can point me in the right direction.
Many thanks in advance.
Bill
Let's suppose the Animals datasource in the BuiltInDS example has 100 fields in it instead of 7. I want to display 5 of them in my listGrid, and maybe 30 in my edit form. I thought the easy way to do that might be with an operationBinding(s) on the datasource, where I'd set 'outputs' equal to the fields in question. What I thought that would do is influence the columns in my grid for me, but what I think I see is that this only affects the data returned from the fetch. Fair enough, if that's all it's supposed to do, but can someone verify that?
So I guess what I'd do now (for e.g., the grid) is declare 5 ListGridFields explicitly and drop them on the grid. Not difficult, but now I'm not sure I see the point of 'outputs', unless it was just to restrict the amount of data coming across the wire... Do I have that right?
So I'll define those ListGridFields like I see it in nearly every sample
Code:
/* my db column names are really ugly and mostly unsuitable for titles */ ListGridField commonName = new ListGridField("foo_co_nm");
Many thanks in advance.
Bill
Comment