RelatedLink

Nun aber. Der LinkListName wird auf "NONE" gesetzt. Die Variabeln linkListName und contentType sind nun wieder normale Instanz-Variablen, die mit null initialisiert werden. Wenn die Werte für diese Variablen überschrieben werden sollen, muß das in der Methode setLinkSelectionModel() passieren.

git-svn-id: https://svn.libreccm.org/ccm/trunk@831 8810af33-2d31-482b-a856-94f89814c4df
master
quasi 2011-04-05 15:27:45 +00:00
parent baa2f1d2a5
commit 95284248cc
2 changed files with 29 additions and 31 deletions

View File

@ -29,8 +29,8 @@ import com.arsdigita.cms.contenttypes.ui.LinkTable;
*/
public class RelatedLinkPropertiesStep extends LinkPropertiesStep {
protected static String s_linkListName = "genericLink";
protected static ContentType s_contentType = null;
protected String linkListName;
protected ContentType contentType;
/**
* Constructor. Creates a <code>RelatedLinkPropertiesStep</code> given an
@ -49,11 +49,12 @@ public class RelatedLinkPropertiesStep extends LinkPropertiesStep {
/**
* Sets a RelatedLinkSelectionModel as the
* LinkSelectionModel for this authoring step.
* Also, set the linkListName and contentType if neccessary
*/
@Override
protected void setLinkSelectionModel() {
setLinkSelectionModel(
new RelatedLinkSelectionModel(getLinkParam()));
linkListName = "NONE";
setLinkSelectionModel(new RelatedLinkSelectionModel(getLinkParam()));
}
/**
@ -68,9 +69,9 @@ public class RelatedLinkPropertiesStep extends LinkPropertiesStep {
LinkTable table;
if (ContentSection.getConfig().isHideAdditionalResourceFields()) {
table = new LinkTable(getItemSelectionModel(), getLinkSelectionModel());
table.setModelBuilder(new RelatedLinkTableModelBuilder(getItemSelectionModel(), s_linkListName));
table.setModelBuilder(new RelatedLinkTableModelBuilder(getItemSelectionModel(), linkListName));
} else {
table = new RelatedLinkTable(getItemSelectionModel(), getLinkSelectionModel(), s_linkListName);
table = new RelatedLinkTable(getItemSelectionModel(), getLinkSelectionModel(), linkListName);
}
container.add(table);
@ -86,8 +87,7 @@ public class RelatedLinkPropertiesStep extends LinkPropertiesStep {
protected FormSection getEditSheet() {
return new RelatedLinkPropertyForm(getItemSelectionModel(),
getLinkSelectionModel(),
s_linkListName,
s_contentType);
linkListName,
contentType);
}
}

View File

@ -39,7 +39,6 @@ import com.arsdigita.cms.ui.workflow.WorkflowLockedContainer;
public abstract class LinkPropertiesStep extends ResettableContainer {
private AuthoringKitWizard m_parent;
private ItemSelectionModel m_itemModel;
private BigDecimalParameter m_linkParam = new BigDecimalParameter("link");
private LinkSelectionModel m_linkModel = new LinkSelectionModel(m_linkParam);
@ -149,4 +148,3 @@ public abstract class LinkPropertiesStep extends ResettableContainer {
p.addComponentStateParam(this, m_linkParam);
}
}