Hi everyone,
I'm getting started with SmartGWT EE and I'm stuck now for quite a time on an widget-design problem and looking for a best practice advice.
System:
- SmartGWT EE 2.4 evaluation version
- Eclipse Indigo
- GWT 2.3
- SQL Server 2005, Windows 2008 Server
- sqljdbc_3.0.1301.101 from http://www.microsoft.com/downloads/de-de/details.aspx?familyid=a737000d-68d0-4531-b65d-da0f2a735707&displaylang=de
- Tomcat 7.0 (nothing deployed there yet, only hosted mode so far)
- FF 5.01
What I'm trying to do is to get a dropdown control for Foreign-Key data.
I have two DS (mapped to a SQL DB), where one has the following field in the ds.xml:
If I now bind that DS to the widgets in the build-in-ds example, I get a textbox for user_id and have to enter numbers there.
What I'd like is a dropdown-control that offers all the possible parent elements as text for both com.smartgwt.client.widgets.form.DynamicForm and com.smartgwt.client.widgets.grid.ListGrid.
I'm 100% sure that this is easily archived, but I don't know how.
Is there some tag in the .ds.xml file?
Do I have to something like this: boundForm.getField("user_id").setType(xxx)?
Or boundList.getField("user_id").setType(xxx)?
Thanks in advance,
Blama
I'm getting started with SmartGWT EE and I'm stuck now for quite a time on an widget-design problem and looking for a best practice advice.
System:
- SmartGWT EE 2.4 evaluation version
- Eclipse Indigo
- GWT 2.3
- SQL Server 2005, Windows 2008 Server
- sqljdbc_3.0.1301.101 from http://www.microsoft.com/downloads/de-de/details.aspx?familyid=a737000d-68d0-4531-b65d-da0f2a735707&displaylang=de
- Tomcat 7.0 (nothing deployed there yet, only hosted mode so far)
- FF 5.01
What I'm trying to do is to get a dropdown control for Foreign-Key data.
I have two DS (mapped to a SQL DB), where one has the following field in the ds.xml:
Code:
<field name="user_id" foreignKey="users.id" type="integer" required="true"></field>
What I'd like is a dropdown-control that offers all the possible parent elements as text for both com.smartgwt.client.widgets.form.DynamicForm and com.smartgwt.client.widgets.grid.ListGrid.
I'm 100% sure that this is easily archived, but I don't know how.
Is there some tag in the .ds.xml file?
Do I have to something like this: boundForm.getField("user_id").setType(xxx)?
Or boundList.getField("user_id").setType(xxx)?
Thanks in advance,
Blama
Comment