Sorry for all of the questions but I'm almost done.
I want a column in an insert form to contain a value but be hidden or readonly (preferably readonly).
When I am successful in making the field readonly it won't bind the value of that field to the table's model bean. I've tryed variations of the following code.
private DataRegion getMyDataRegion()
{
DataRegion rgn = new DataRegion();
TableInfo tableInfo = MySchema.getInstance().getTableInfoMy();
List<ColumnInfo> columns = tableInfo.getColumns("MyId, field1, field2");
//the value for MyId is set after the dataregion is returned.
//columns.get(0).setUserEditable(false); Works but doesn't bind value to bean
//columns.get(0).setIsHidden(true ); Doesn't seem to do anything?
//columns.get(0).setIsUnselectable(true); Doesn't seem to do anything?
//columns.get(0).setReadOnly(true); Works but doesn't bind value to bean
rgn.setColumns(columns);
ActionButton button = new ActionButton("myaction.post", "Submit");
button.setActionType(ActionButton.Action.POST);
rgn.setButtonBar(new ButtonBar().add(button ));
return rgn;
}
Thanks,
Bill |