0

我有一个对象追随者,其中包含对象等级(类:等级,成员:$uid,$abelGrade)。我想在数据库表“成绩”中显示所有成绩。所以我为我的视图分配了一个成绩(一个成绩数组),我写了这个代码:

<f:form.select property="grade" value="{adherent.grade.labelGrade}" options="{grades}" optionValueField="uid" optionLabelField="labelGrade" size="1" id="category" />

但问题是它没有显示任何内容。可能是什么问题呢?

4

1 回答 1

0

The problem could be missing $grade->getUid() and $grade->getLabelGrade() methods. These are called due to the optionValueField and optionLabelField. If thats not the problem, set a breakpoint where you assign the {grades} array to the view and check if it's really an array or an ObjectStorage. Thats everything I can think of right now, maybe you'd like to provide some further code.

于 2013-04-24T06:41:40.533 回答