Hello All!
I have been trying my hand with Rife once again and am a bit confused with
Rife/CRUD. I am using Rife 1.5.1 and CRUD 1.3.1 and my DB is derby just
like in the tutorial. I was more or less following Geert's Tutorial which I
think is absolutely great since I use intellij.
The problem is that my manyToOne constraints are not producing select drop
downs. As an example, I have cities and States. A state can contain many
cities so a city will have a manyToOne constraint. Here is my CityMetaData
class:
public class CityMetaData extends MetaData<ConstrainedBean,
ConstrainedProperty> {
public void activateMetaData() {
addConstraint(new ConstrainedBean()
.defaultOrder("name")
.textualIdentifier(new
AbstractTextualIdentifierGenerator<City>() {
public String generateIdentifier() {
return mBean.getId() + " : " + mBean.getName();
}
}));
addConstraint(new ConstrainedProperty("id")
.editable(false).identifier(true));
addConstraint(new ConstrainedProperty("name")
.editable(true)
.notNull(true)
.listed(true)
.maxLength(255));
addConstraint(new ConstrainedProperty("statId")
.notNull(true).listed(true)
.manyToOne(Stat.class, "id"));
}
}
Notice the manyToOne to statId. Shouldn't that produce a Select drop down
on the add city page like in the tutorial? If not, how do I do it?
Thanks in advance!
-Steve
--
View this message in context:
http://www.nabble.com/ManyToOne-and-Rife-CRUD-tf2777133.html#a7747868
Sent from the RIFE - users mailing list archive at Nabble.com.
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users