Fixed another PrintListener usage
git-svn-id: https://svn.libreccm.org/ccm/trunk@2841 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
4d1900db5a
commit
cd02aaafee
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
package com.arsdigita.cms.ui.formbuilder;
|
||||
|
||||
import com.arsdigita.bebop.Label;
|
||||
import com.arsdigita.bebop.event.PrintEvent;
|
||||
import com.arsdigita.bebop.event.PrintListener;
|
||||
import com.arsdigita.bebop.form.Option;
|
||||
|
|
@ -27,25 +28,25 @@ import com.arsdigita.cms.ContentPage;
|
|||
import com.arsdigita.cms.ContentSection;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.formbuilder.FormSectionItem;
|
||||
import com.arsdigita.formbuilder.util.GlobalizationUtil;
|
||||
import com.arsdigita.persistence.DataCollection;
|
||||
import com.arsdigita.persistence.DataObject;
|
||||
import com.arsdigita.persistence.Session;
|
||||
import com.arsdigita.persistence.SessionManager;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class FormSectionModelBuilder implements PrintListener {
|
||||
|
||||
/** */
|
||||
/**
|
||||
* */
|
||||
private ItemSelectionModel m_item;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param item
|
||||
*/
|
||||
public FormSectionModelBuilder(ItemSelectionModel item) {
|
||||
|
|
@ -66,6 +67,12 @@ public class FormSectionModelBuilder implements PrintListener {
|
|||
sections.addOrder(ContentPage.TITLE);
|
||||
|
||||
OptionGroup group = (OptionGroup) e.getTarget();
|
||||
group.clearOptions();
|
||||
|
||||
group.addOption(new Option("",
|
||||
new Label(GlobalizationUtil.globalize(
|
||||
"formbuilder.ui.form_section.select_one"))
|
||||
));
|
||||
|
||||
while (sections.next()) {
|
||||
DataObject obj = sections.getDataObject();
|
||||
|
|
@ -74,4 +81,5 @@ public class FormSectionModelBuilder implements PrintListener {
|
|||
obj.get(ContentPage.TITLE).toString()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue