Ergänzung Lokalisation, Module sind nicht einsetzbar/insgesamt nicht fertig.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2229 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
0710003090
commit
c26f5b917d
|
|
@ -7,9 +7,11 @@
|
||||||
description="An HTML Form"
|
description="An HTML Form"
|
||||||
objectType="com.arsdigita.cms.contenttypes.HTMLForm"
|
objectType="com.arsdigita.cms.contenttypes.HTMLForm"
|
||||||
classname="com.arsdigita.cms.contenttypes.HTMLForm">
|
classname="com.arsdigita.cms.contenttypes.HTMLForm">
|
||||||
|
|
||||||
<ctd:authoring-kit createComponent="com.arsdigita.cms.ui.authoring.PageCreate">
|
<ctd:authoring-kit createComponent="com.arsdigita.cms.ui.authoring.PageCreate">
|
||||||
<ctd:authoring-step
|
|
||||||
labelKey="cms.contenttypes.shared.basic_properties.title"
|
<ctd:authoring-step
|
||||||
|
labelKey="cms.contenttypes.shared.basic_properties.title"
|
||||||
labelBundle="com.arsdigita.cms.CMSResources"
|
labelBundle="com.arsdigita.cms.CMSResources"
|
||||||
descriptionKey="cms.contenttypes.shared.basic_properties.description"
|
descriptionKey="cms.contenttypes.shared.basic_properties.description"
|
||||||
descriptionBundle="com.arsdigita.cms.CMSResources"
|
descriptionBundle="com.arsdigita.cms.CMSResources"
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
<initializer class="com.arsdigita.cms.Initializer"/>
|
<initializer class="com.arsdigita.cms.Initializer"/>
|
||||||
</requires>
|
</requires>
|
||||||
<provides>
|
<provides>
|
||||||
|
<table name="ct_htmlform"/>
|
||||||
<initializer class="com.arsdigita.cms.contenttypes.HTMLFormInitializer"/>
|
<initializer class="com.arsdigita.cms.contenttypes.HTMLFormInitializer"/>
|
||||||
</provides>
|
</provides>
|
||||||
<scripts>
|
<scripts>
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,10 @@
|
||||||
|
|
||||||
package com.arsdigita.cms.contenttypes;
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
|
import com.arsdigita.cms.ContentType;
|
||||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||||
import com.arsdigita.persistence.DataObject;
|
import com.arsdigita.persistence.DataObject;
|
||||||
import com.arsdigita.persistence.OID;
|
import com.arsdigita.persistence.OID;
|
||||||
import com.arsdigita.cms.ContentType;
|
|
||||||
import com.arsdigita.util.Assert;
|
import com.arsdigita.util.Assert;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
@ -41,8 +41,7 @@ public class HTMLForm extends GenericArticle {
|
||||||
= "com.arsdigita.cms.contenttypes.HTMLForm";
|
= "com.arsdigita.cms.contenttypes.HTMLForm";
|
||||||
|
|
||||||
/** Data object type for this domain object (for CMS compatibility) */
|
/** Data object type for this domain object (for CMS compatibility) */
|
||||||
public static final String TYPE
|
public static final String TYPE = BASE_DATA_OBJECT_TYPE;
|
||||||
= BASE_DATA_OBJECT_TYPE;
|
|
||||||
|
|
||||||
public HTMLForm() {
|
public HTMLForm() {
|
||||||
this( BASE_DATA_OBJECT_TYPE );
|
this( BASE_DATA_OBJECT_TYPE );
|
||||||
|
|
|
||||||
|
|
@ -16,21 +16,33 @@
|
||||||
package com.arsdigita.cms.contenttypes;
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loader.
|
* Loader executes nonrecurring once at install time and loads the
|
||||||
|
* HTMLForm contenttype package persistently into database.
|
||||||
|
*
|
||||||
|
* It uses the base class to create the database schema and the required
|
||||||
|
* table entries for the contenttype.
|
||||||
|
*
|
||||||
*
|
*
|
||||||
* @author Justin Ross <jross@redhat.com>
|
* @author Justin Ross <jross@redhat.com>
|
||||||
* @version $Id: //ps/apps/london/htmlform/dev/src/com/arsdigita/cms/contenttypes/HTMLFormLoader.java#1 $
|
* @version $Id: HTMLFormLoader.java#1 $
|
||||||
*/
|
*/
|
||||||
public class HTMLFormLoader extends AbstractContentTypeLoader {
|
public class HTMLFormLoader extends AbstractContentTypeLoader {
|
||||||
public final static String versionId =
|
|
||||||
"$Id: //ps/apps/london/htmlform/dev/src/com/arsdigita/cms/contenttypes/HTMLFormLoader.java#1 $" +
|
|
||||||
"$Author: mbooth $" +
|
|
||||||
"$DateTime: 2004/03/05 09:47:41 $";
|
|
||||||
|
|
||||||
|
/** Defines the xml file containing the FAQ content types
|
||||||
|
* property definitions. */
|
||||||
private static final String[] TYPES = {
|
private static final String[] TYPES = {
|
||||||
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/HTMLForm.xml"
|
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/HTMLForm.xml"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides the of HTMLForm contenttype property definitions
|
||||||
|
* implementing the parent's class abstract method.
|
||||||
|
*
|
||||||
|
* The file defines the types name as displayed in content center
|
||||||
|
* select box and the authoring steps. These are loaded into database.
|
||||||
|
*
|
||||||
|
* @return String Atring Array of fully qualified file names
|
||||||
|
*/
|
||||||
public String[] getTypes() {
|
public String[] getTypes() {
|
||||||
return TYPES;
|
return TYPES;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,8 +52,10 @@ public class HTMLFormPropertiesStep extends SimpleEditStep {
|
||||||
BasicPageForm editSheet;
|
BasicPageForm editSheet;
|
||||||
|
|
||||||
editSheet = new HTMLFormPropertyForm(itemModel, this);
|
editSheet = new HTMLFormPropertyForm(itemModel, this);
|
||||||
add(EDIT_SHEET_NAME, "Edit", new WorkflowLockedComponentAccess(editSheet, itemModel),
|
add(EDIT_SHEET_NAME,
|
||||||
editSheet.getSaveCancelSection().getCancelButton());
|
GlobalizationUtil.globalize("cms.ui.edit"),
|
||||||
|
new WorkflowLockedComponentAccess(editSheet, itemModel),
|
||||||
|
editSheet.getSaveCancelSection().getCancelButton());
|
||||||
|
|
||||||
setDisplayComponent(getHTMLFormPropertySheet(itemModel));
|
setDisplayComponent(getHTMLFormPropertySheet(itemModel));
|
||||||
}
|
}
|
||||||
|
|
@ -69,26 +71,17 @@ public class HTMLFormPropertiesStep extends SimpleEditStep {
|
||||||
public static Component getHTMLFormPropertySheet(ItemSelectionModel itemModel) {
|
public static Component getHTMLFormPropertySheet(ItemSelectionModel itemModel) {
|
||||||
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
||||||
|
|
||||||
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.name"), HTMLForm.NAME);
|
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.title"),
|
||||||
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.title"), HTMLForm.TITLE);
|
HTMLForm.TITLE);
|
||||||
|
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.name"),
|
||||||
|
HTMLForm.NAME);
|
||||||
if (!ContentSection.getConfig().getHideLaunchDate()) {
|
if (!ContentSection.getConfig().getHideLaunchDate()) {
|
||||||
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.launch_date"),
|
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.launch_date"),
|
||||||
ContentPage.LAUNCH_DATE,
|
ContentPage.LAUNCH_DATE,
|
||||||
new DomainObjectPropertySheet.AttributeFormatter() {
|
new LaunchDateAttributeFormatter() );
|
||||||
|
|
||||||
public String format(DomainObject item,
|
|
||||||
String attribute,
|
|
||||||
PageState state) {
|
|
||||||
ContentPage page = (ContentPage) item;
|
|
||||||
if (page.getLaunchDate() != null) {
|
|
||||||
return DateFormat.getDateInstance(DateFormat.LONG).format(page.getLaunchDate());
|
|
||||||
} else {
|
|
||||||
return (String) GlobalizationUtil.globalize("cms.ui.unknown").localize();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.lead"), HTMLForm.LEAD);
|
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.lead"),
|
||||||
|
HTMLForm.LEAD);
|
||||||
|
|
||||||
return sheet;
|
return sheet;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,10 @@ import com.arsdigita.cms.util.GlobalizationUtil;
|
||||||
* Form to edit the basic properties of an HTMLForm. This form can be
|
* Form to edit the basic properties of an HTMLForm. This form can be
|
||||||
* extended to create forms for HTMLForm subclasses.
|
* extended to create forms for HTMLForm subclasses.
|
||||||
*/
|
*/
|
||||||
public class HTMLFormPropertyForm extends BasicPageForm implements FormProcessListener, FormInitListener, FormSubmissionListener {
|
public class HTMLFormPropertyForm extends BasicPageForm
|
||||||
|
implements FormProcessListener,
|
||||||
|
FormInitListener,
|
||||||
|
FormSubmissionListener {
|
||||||
|
|
||||||
private final static org.apache.log4j.Logger s_log =
|
private final static org.apache.log4j.Logger s_log =
|
||||||
org.apache.log4j.Logger.getLogger(HTMLFormPropertyForm.class);
|
org.apache.log4j.Logger.getLogger(HTMLFormPropertyForm.class);
|
||||||
|
|
@ -64,7 +67,8 @@ public class HTMLFormPropertyForm extends BasicPageForm implements FormProcessLi
|
||||||
* HTMLForm to work on
|
* HTMLForm to work on
|
||||||
* @param step The HTMLFormPropertiesStep which controls this form.
|
* @param step The HTMLFormPropertiesStep which controls this form.
|
||||||
*/
|
*/
|
||||||
public HTMLFormPropertyForm(ItemSelectionModel itemModel, HTMLFormPropertiesStep step) {
|
public HTMLFormPropertyForm(ItemSelectionModel itemModel,
|
||||||
|
HTMLFormPropertiesStep step) {
|
||||||
super(ID, itemModel);
|
super(ID, itemModel);
|
||||||
m_step = step;
|
m_step = step;
|
||||||
addSubmissionListener(this);
|
addSubmissionListener(this);
|
||||||
|
|
@ -81,7 +85,10 @@ public class HTMLFormPropertyForm extends BasicPageForm implements FormProcessLi
|
||||||
ParameterModel leadParam = new StringParameter(LEAD);
|
ParameterModel leadParam = new StringParameter(LEAD);
|
||||||
|
|
||||||
if (ContentSection.getConfig().mandatoryDescriptions()) {
|
if (ContentSection.getConfig().mandatoryDescriptions()) {
|
||||||
leadParam.addParameterListener(new NotEmptyValidationListener(GlobalizationUtil.globalize("cms.contenttypes.ui.description_missing")));
|
leadParam.addParameterListener(new
|
||||||
|
NotEmptyValidationListener(
|
||||||
|
GlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.description_missing")));
|
||||||
}
|
}
|
||||||
//leadParam
|
//leadParam
|
||||||
// .addParameterListener( new NotNullValidationListener() );
|
// .addParameterListener( new NotNullValidationListener() );
|
||||||
|
|
@ -109,7 +116,8 @@ public class HTMLFormPropertyForm extends BasicPageForm implements FormProcessLi
|
||||||
/** Cancels streamlined editing. */
|
/** Cancels streamlined editing. */
|
||||||
public void submitted(FormSectionEvent fse) {
|
public void submitted(FormSectionEvent fse) {
|
||||||
if (m_step != null
|
if (m_step != null
|
||||||
&& getSaveCancelSection().getCancelButton().isSelected(fse.getPageState())) {
|
&& getSaveCancelSection()
|
||||||
|
.getCancelButton().isSelected(fse.getPageState())) {
|
||||||
m_step.cancelStreamlinedCreation(fse.getPageState());
|
m_step.cancelStreamlinedCreation(fse.getPageState());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -122,7 +130,8 @@ public class HTMLFormPropertyForm extends BasicPageForm implements FormProcessLi
|
||||||
|
|
||||||
// save only if save button was pressed
|
// save only if save button was pressed
|
||||||
if (htmlform != null
|
if (htmlform != null
|
||||||
&& getSaveCancelSection().getSaveButton().isSelected(fse.getPageState())) {
|
&& getSaveCancelSection()
|
||||||
|
.getSaveButton().isSelected(fse.getPageState())) {
|
||||||
|
|
||||||
htmlform.setLead((String) data.get(LEAD));
|
htmlform.setLead((String) data.get(LEAD));
|
||||||
htmlform.save();
|
htmlform.save();
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
|
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||||
|
|
||||||
public class MemberPropertiesStep extends GenericPersonPropertiesStep {
|
public class MemberPropertiesStep extends GenericPersonPropertiesStep {
|
||||||
|
|
||||||
|
|
@ -36,9 +37,10 @@ public class MemberPropertiesStep extends GenericPersonPropertiesStep {
|
||||||
protected void createEditSheet(ItemSelectionModel itemModel) {
|
protected void createEditSheet(ItemSelectionModel itemModel) {
|
||||||
BasicPageForm editSheet;
|
BasicPageForm editSheet;
|
||||||
editSheet = new MemberPropertyForm(itemModel, this);
|
editSheet = new MemberPropertyForm(itemModel, this);
|
||||||
add(EDIT_SHEET_NAME, "Edit",
|
add(EDIT_SHEET_NAME,
|
||||||
new WorkflowLockedComponentAccess(editSheet, itemModel), editSheet.
|
GlobalizationUtil.globalize("cms.ui.edit"),
|
||||||
getSaveCancelSection().getCancelButton());
|
new WorkflowLockedComponentAccess(editSheet, itemModel),
|
||||||
|
editSheet.getSaveCancelSection().getCancelButton());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Component getMemberPropertySheet(ItemSelectionModel itemModel) {
|
public static Component getMemberPropertySheet(ItemSelectionModel itemModel) {
|
||||||
|
|
|
||||||
|
|
@ -38,21 +38,29 @@ import org.apache.log4j.Logger;
|
||||||
*
|
*
|
||||||
* @author: Jens Pelzetter
|
* @author: Jens Pelzetter
|
||||||
*/
|
*/
|
||||||
public class MemberPropertyForm
|
public class MemberPropertyForm extends GenericPersonPropertyForm
|
||||||
extends GenericPersonPropertyForm
|
implements FormProcessListener,
|
||||||
implements FormProcessListener,
|
FormInitListener,
|
||||||
FormInitListener,
|
FormSubmissionListener {
|
||||||
FormSubmissionListener {
|
|
||||||
|
|
||||||
private static final Logger s_log = Logger.getLogger(
|
private static final Logger s_log = Logger.getLogger(
|
||||||
MemberPropertyForm.class);
|
MemberPropertyForm.class);
|
||||||
private MemberPropertiesStep m_step;
|
private MemberPropertiesStep m_step;
|
||||||
public static final String ID = "Member_edit";
|
public static final String ID = "Member_edit";
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param itemModel
|
||||||
|
*/
|
||||||
public MemberPropertyForm(ItemSelectionModel itemModel) {
|
public MemberPropertyForm(ItemSelectionModel itemModel) {
|
||||||
this(itemModel, null);
|
this(itemModel, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param itemModel
|
||||||
|
* @param step
|
||||||
|
*/
|
||||||
public MemberPropertyForm(ItemSelectionModel itemModel,
|
public MemberPropertyForm(ItemSelectionModel itemModel,
|
||||||
MemberPropertiesStep step) {
|
MemberPropertiesStep step) {
|
||||||
super(itemModel, step);
|
super(itemModel, step);
|
||||||
|
|
@ -65,12 +73,14 @@ public class MemberPropertyForm
|
||||||
super.addWidgets();
|
super.addWidgets();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void init(FormSectionEvent fse) {
|
public void init(FormSectionEvent fse) {
|
||||||
super.init(fse);
|
super.init(fse);
|
||||||
FormData data = fse.getFormData();
|
FormData data = fse.getFormData();
|
||||||
Member member = (Member) super.initBasicWidgets(fse);
|
Member member = (Member) super.initBasicWidgets(fse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void process(FormSectionEvent fse) {
|
public void process(FormSectionEvent fse) {
|
||||||
super.process(fse);
|
super.process(fse);
|
||||||
FormData data = fse.getFormData();
|
FormData data = fse.getFormData();
|
||||||
|
|
|
||||||
|
|
@ -23,44 +23,53 @@ import org.apache.log4j.Logger;
|
||||||
*/
|
*/
|
||||||
public class ResearchNetworkPropertiesStep extends SimpleEditStep {
|
public class ResearchNetworkPropertiesStep extends SimpleEditStep {
|
||||||
|
|
||||||
private final static Logger s_log = Logger.getLogger(ResearchNetworkPropertiesStep.class);
|
private final static Logger s_log = Logger.getLogger(
|
||||||
|
ResearchNetworkPropertiesStep.class);
|
||||||
public final static String EDIT_SHEET_NAME = "edit";
|
public final static String EDIT_SHEET_NAME = "edit";
|
||||||
|
|
||||||
public ResearchNetworkPropertiesStep(ItemSelectionModel itemModel, AuthoringKitWizard parent) {
|
public ResearchNetworkPropertiesStep(ItemSelectionModel itemModel,
|
||||||
|
AuthoringKitWizard parent) {
|
||||||
super(itemModel, parent);
|
super(itemModel, parent);
|
||||||
|
|
||||||
setDefaultEditKey(EDIT_SHEET_NAME);
|
setDefaultEditKey(EDIT_SHEET_NAME);
|
||||||
BasicPageForm editSheet;
|
BasicPageForm editSheet;
|
||||||
|
|
||||||
editSheet = new ResearchNetworkPropertyForm(itemModel, this);
|
editSheet = new ResearchNetworkPropertyForm(itemModel, this);
|
||||||
add(EDIT_SHEET_NAME, "Edit", new WorkflowLockedComponentAccess(editSheet, itemModel), editSheet.getSaveCancelSection().getCancelButton());
|
add(EDIT_SHEET_NAME,
|
||||||
|
"Edit",
|
||||||
|
new WorkflowLockedComponentAccess(editSheet, itemModel),
|
||||||
|
editSheet.getSaveCancelSection().getCancelButton());
|
||||||
|
|
||||||
setDisplayComponent(getResearchNetworkPropertySheet(itemModel));
|
setDisplayComponent(getResearchNetworkPropertySheet(itemModel));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Component getResearchNetworkPropertySheet(ItemSelectionModel itemModel) {
|
public static Component getResearchNetworkPropertySheet(ItemSelectionModel itemModel) {
|
||||||
|
|
||||||
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
||||||
|
|
||||||
//Display the properties
|
//Display the properties
|
||||||
sheet.add(ResearchNetworkGlobalizationUtil.globalize("cms.contenttypes.researchnetwork.ui.title"), ResearchNetwork.RESEARCHNETWORK_TITLE);
|
sheet.add(ResearchNetworkGlobalizationUtil.globalize(
|
||||||
sheet.add(ResearchNetworkGlobalizationUtil.globalize("cms.contenttypes.researchnetwork.ui.direction"), ResearchNetwork.RESEARCHNETWORK_DIRECTION);
|
"cms.contenttypes.researchnetwork.ui.title"),
|
||||||
sheet.add(ResearchNetworkGlobalizationUtil.globalize("cms.contenttypes.researchnetwork.ui.coordination"), ResearchNetwork.RESEARCHNETWORK_COORDINATION);
|
ResearchNetwork.RESEARCHNETWORK_TITLE);
|
||||||
sheet.add(ResearchNetworkGlobalizationUtil.globalize("cms.contenttypes.researchnetwork.ui.website"), ResearchNetwork.RESEARCHNETWORK_WEBSITE);
|
|
||||||
sheet.add(ResearchNetworkGlobalizationUtil.globalize("cms.contenttypes.researchnetwork.ui.description"), ResearchNetwork.RESEARCHNETWORK_DESCRIPTION);
|
|
||||||
|
|
||||||
if (!ContentSection.getConfig().getHideLaunchDate()) {
|
if (!ContentSection.getConfig().getHideLaunchDate()) {
|
||||||
sheet.add(GlobalizationUtil.globalize("cms.ui.authoring.page_launch_date"), ContentPage.LAUNCH_DATE, new DomainObjectPropertySheet.AttributeFormatter() {
|
sheet.add(com.arsdigita.cms.util.GlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.launch_date"),
|
||||||
public String format(DomainObject obj, String attribute, PageState state) {
|
ContentPage.LAUNCH_DATE,
|
||||||
ContentPage page = (ContentPage) obj;
|
new LaunchDateAttributeFormatter() );
|
||||||
if (page.getLaunchDate() != null) {
|
|
||||||
return DateFormat.getDateInstance(DateFormat.LONG).format(page.getLaunchDate());
|
|
||||||
} else {
|
|
||||||
return (String) GlobalizationUtil.globalize("cms.ui.unknown").localize();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
sheet.add(ResearchNetworkGlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.researchnetwork.ui.description"),
|
||||||
|
ResearchNetwork.RESEARCHNETWORK_DESCRIPTION);
|
||||||
|
sheet.add(ResearchNetworkGlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.researchnetwork.ui.direction"),
|
||||||
|
ResearchNetwork.RESEARCHNETWORK_DIRECTION);
|
||||||
|
sheet.add(ResearchNetworkGlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.researchnetwork.ui.coordination"),
|
||||||
|
ResearchNetwork.RESEARCHNETWORK_COORDINATION);
|
||||||
|
sheet.add(ResearchNetworkGlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.researchnetwork.ui.website"),
|
||||||
|
ResearchNetwork.RESEARCHNETWORK_WEBSITE);
|
||||||
|
|
||||||
|
|
||||||
return sheet;
|
return sheet;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,12 @@ public class ResearchNetworkPropertyForm extends BasicPageForm implements FormPr
|
||||||
researchNetworkTitle.addValidationListener(new NotNullValidationListener());
|
researchNetworkTitle.addValidationListener(new NotNullValidationListener());
|
||||||
add(researchNetworkTitle);
|
add(researchNetworkTitle);
|
||||||
|
|
||||||
|
add(new Label(ResearchNetworkGlobalizationUtil.globalize("cms.contenttypes.researchnetwork.ui.description")));
|
||||||
|
TextArea researchNetworkAreaDescription = new TextArea(RESEARCHNETWORK_DESCRIPTION);
|
||||||
|
researchNetworkAreaDescription.setRows(10);
|
||||||
|
researchNetworkAreaDescription.setCols(30);
|
||||||
|
add(researchNetworkAreaDescription);
|
||||||
|
|
||||||
add(new Label(ResearchNetworkGlobalizationUtil.globalize("cms.contenttypes.researchnetwork.ui.direction")));
|
add(new Label(ResearchNetworkGlobalizationUtil.globalize("cms.contenttypes.researchnetwork.ui.direction")));
|
||||||
TextArea researchNetworkDirection = new TextArea(RESEARCHNETWORK_DIRECTION);
|
TextArea researchNetworkDirection = new TextArea(RESEARCHNETWORK_DIRECTION);
|
||||||
researchNetworkDirection.setRows(5);
|
researchNetworkDirection.setRows(5);
|
||||||
|
|
@ -70,12 +76,6 @@ public class ResearchNetworkPropertyForm extends BasicPageForm implements FormPr
|
||||||
ParameterModel researchNetworkWebsiteParam = new StringParameter(RESEARCHNETWORK_WEBSITE);
|
ParameterModel researchNetworkWebsiteParam = new StringParameter(RESEARCHNETWORK_WEBSITE);
|
||||||
TextField researchNetworkWebsite = new TextField(researchNetworkWebsiteParam);
|
TextField researchNetworkWebsite = new TextField(researchNetworkWebsiteParam);
|
||||||
add(researchNetworkWebsite);
|
add(researchNetworkWebsite);
|
||||||
|
|
||||||
add(new Label(ResearchNetworkGlobalizationUtil.globalize("cms.contenttypes.researchnetwork.ui.description")));
|
|
||||||
TextArea researchNetworkAreaDescription = new TextArea(RESEARCHNETWORK_DESCRIPTION);
|
|
||||||
researchNetworkAreaDescription.setRows(10);
|
|
||||||
researchNetworkAreaDescription.setCols(30);
|
|
||||||
add(researchNetworkAreaDescription);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init(FormSectionEvent e) throws FormProcessException {
|
public void init(FormSectionEvent e) throws FormProcessException {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@ import java.math.BigDecimal;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The content type which allows arbitrary assets to be associated to it.
|
* The content type which allows arbitrary assets to be associated to it as
|
||||||
|
* kind of 'body text'.
|
||||||
* The associations will be 'compositions'
|
* The associations will be 'compositions'
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:slater@arsdigita.com">Michael Slater</a>
|
* @author <a href="mailto:slater@arsdigita.com">Michael Slater</a>
|
||||||
|
|
@ -29,14 +30,14 @@ import java.math.BigDecimal;
|
||||||
public class FreeformContentItem extends ContentPage {
|
public class FreeformContentItem extends ContentPage {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Examples of the different MimeTypes this FreeformContentItem
|
* Examples of the different MimeTypes this FreeformContentItem
|
||||||
* would handle as alternative body assets. Developers would hav
|
* would handle as alternative body assets. Developers would hav
|
||||||
* to supply support for any news mimetype added. This would include:
|
* to supply support for any news mimetype added. This would include:
|
||||||
* TODO: what are all the tasks a developer needs to do to
|
* TODO: what are all the tasks a developer needs to do to
|
||||||
* add a new mimetype support?
|
* add a new mimetype support?
|
||||||
*
|
*
|
||||||
* TODO: this information could be an oracle table
|
* TODO: this information could be persisted in a DB table
|
||||||
**/
|
*/
|
||||||
public static final String HTML = "Text/Html";
|
public static final String HTML = "Text/Html";
|
||||||
public static final String WML = "Text/WirelessHtml";
|
public static final String WML = "Text/WirelessHtml";
|
||||||
public static final String ADOBE = "Adobe/pdf";
|
public static final String ADOBE = "Adobe/pdf";
|
||||||
|
|
@ -60,7 +61,7 @@ public class FreeformContentItem extends ContentPage {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default constructor. This creates a new content page.
|
* Default constructor. This creates a new content page.
|
||||||
**/
|
*/
|
||||||
public FreeformContentItem() {
|
public FreeformContentItem() {
|
||||||
super(BASE_DATA_OBJECT_TYPE);
|
super(BASE_DATA_OBJECT_TYPE);
|
||||||
}
|
}
|
||||||
|
|
@ -122,9 +123,9 @@ public class FreeformContentItem extends ContentPage {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Associate a Freeform[Text|Binary]Asset with this
|
* Associate a Freeform[Text|Binary]Asset with this item and set its rank.
|
||||||
* item and set its rank. Don't handle rank conflicts,
|
* Don't handle rank conflicts, holes here. Handle them in a higher-order
|
||||||
* holes here. Handle them in a higher-order method.
|
* method.
|
||||||
*
|
*
|
||||||
* @param oneAsset The asset to add
|
* @param oneAsset The asset to add
|
||||||
* @param rank The rank for the asset. Setting this to 0 will cause
|
* @param rank The rank for the asset. Setting this to 0 will cause
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package com.arsdigita.london.cms.freeform.assets;
|
package com.arsdigita.london.cms.freeform.asset;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import com.arsdigita.persistence.OID;
|
import com.arsdigita.persistence.OID;
|
||||||
|
|
@ -11,7 +11,7 @@ import com.arsdigita.bebop.event.FormSectionEvent;
|
||||||
import com.arsdigita.bebop.FormProcessException;
|
import com.arsdigita.bebop.FormProcessException;
|
||||||
|
|
||||||
|
|
||||||
import com.arsdigita.london.cms.freeform.assets.FreeformTextAsset;
|
import com.arsdigita.london.cms.freeform.asset.FreeformTextAsset;
|
||||||
import com.arsdigita.bebop.PageState;
|
import com.arsdigita.bebop.PageState;
|
||||||
import com.arsdigita.bebop.SingleSelectionModel;
|
import com.arsdigita.bebop.SingleSelectionModel;
|
||||||
import com.arsdigita.bebop.form.SingleSelect;
|
import com.arsdigita.bebop.form.SingleSelect;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue