Some minor formatting, some Globalikzation keys added.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2526 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
648076f171
commit
757675c0e6
|
|
@ -58,9 +58,10 @@ public class Initializer extends CompoundInitializer {
|
|||
final String url = RuntimeConfig.getConfig().getJDBCURL();
|
||||
final int database = DbHelper.getDatabaseFromURL(url);
|
||||
|
||||
add(new PDLInitializer(new ManifestSource("ccm-atoz.pdl.mf",
|
||||
new NameFilter(DbHelper.
|
||||
getDatabaseSuffix(database), "pdl"))));
|
||||
add(new PDLInitializer(new ManifestSource(
|
||||
"ccm-atoz.pdl.mf",
|
||||
new NameFilter(DbHelper.getDatabaseSuffix(database), "pdl"))
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1067,3 +1067,4 @@ cms.ui.remove_home_folder=Remove home folder
|
|||
cms.ui.move.category=Move category "{0}" to
|
||||
cms.ui.category.move=Move category
|
||||
cms.ui.category.cantmoved=This category can't be moved
|
||||
cms.ui.authoring.error_conflicts_with_this_url=There are conflicts with this URL. Specifically, there is at least one item in the same category as this item with the name (url) of
|
||||
|
|
|
|||
|
|
@ -1061,3 +1061,4 @@ cms.ui.remove_home_folder=Start-Ordner zur\u00fccksetzen
|
|||
cms.ui.move.category=Verschiebe Kategorie "{0}" nach
|
||||
cms.ui.category.move=Kategorie verschieben
|
||||
cms.ui.category.cantmoved=Diese Kategorie kann nicht verschoben werden
|
||||
cms.ui.authoring.error_conflicts_with_this_url=Es gibt Konflikte mit dieser URL. Insbesondere gibt es mindestens ein Dokument in der gleichen Kategorie wie dieser mit dem Namen (URL)
|
||||
|
|
|
|||
|
|
@ -115,3 +115,4 @@ cms.ui.remove_home_folder=Remove home folder
|
|||
cms.ui.move.category=Move category "{0}" to
|
||||
cms.ui.category.move=Move category
|
||||
cms.ui.category.cantmoved=This category can't be moved
|
||||
cms.ui.authoring.error_conflicts_with_this_url=There are conflicts with this URL. Specifically, there is at least one item in the same category as this item with the name (url) of
|
||||
|
|
|
|||
|
|
@ -589,3 +589,4 @@ cms.ui.remove_home_folder=
|
|||
cms.ui.move.category=Move category "{0}" to
|
||||
cms.ui.category.move=Move category
|
||||
cms.ui.category.cantmoved=This category can't be moved
|
||||
cms.ui.authoring.error_conflicts_with_this_url=There are conflicts with this URL. Specifically, there is atleast one item in the same category as this item with the name (url) of
|
||||
|
|
|
|||
|
|
@ -139,7 +139,8 @@ public abstract class BasicItemForm extends FormSection
|
|||
|
||||
|
||||
/**
|
||||
* */
|
||||
* Currently, to insert javascript code the Label Widget is "abused".
|
||||
*/
|
||||
private Label m_script = new Label(
|
||||
"<script language=\"javascript\" src=\"/javascript/manipulate-input.js\"></script>",
|
||||
false);
|
||||
|
|
@ -189,7 +190,7 @@ public abstract class BasicItemForm extends FormSection
|
|||
titleWidget.setHint(getTitleHint());
|
||||
add(titleWidget);
|
||||
|
||||
// For some content types it is maybe useful to change the label of
|
||||
// For some content types it may be useful to change the label of
|
||||
// the name (or URL) field to something different than 'name (url)'.
|
||||
// This can now be accomplished by overwriting the getNameLabel() method.
|
||||
// (jensp 2011-01-28)
|
||||
|
|
@ -273,6 +274,13 @@ public abstract class BasicItemForm extends FormSection
|
|||
validateNameUniqueness(parent, event, newName);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parent
|
||||
* @param event
|
||||
* @param newName
|
||||
* @throws FormProcessException
|
||||
*/
|
||||
public void validateNameUniqueness(Folder parent, FormSectionEvent event,
|
||||
String newName)
|
||||
throws FormProcessException {
|
||||
|
|
@ -359,11 +367,9 @@ public abstract class BasicItemForm extends FormSection
|
|||
while (query.next()) {
|
||||
itemID = (BigDecimal) query.get("itemID");
|
||||
if (!list.contains(itemID)) {
|
||||
StringBuffer buffer =
|
||||
new StringBuffer("There are conflicts with this URL. "
|
||||
+ "Specifically, there is at least one item "
|
||||
+ "in the same category as this item with "
|
||||
+ "the name (url) of ");
|
||||
StringBuffer buffer = new StringBuffer((String) GlobalizationUtil
|
||||
.globalize("cms.ui.authoring.error_conflicts_with_this_url")
|
||||
.localize() );
|
||||
buffer.append(url);
|
||||
throw new FormProcessException(buffer.toString());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,6 +124,11 @@ public class CreationSelector extends MetaForm {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param state
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Form buildForm(PageState state) {
|
||||
BigDecimal typeID = (BigDecimal)m_typeSel.getSelectedKey(state);
|
||||
|
|
@ -151,7 +156,11 @@ public class CreationSelector extends MetaForm {
|
|||
return returnForm;
|
||||
}
|
||||
|
||||
// Add the item_id parameter
|
||||
/**
|
||||
* Add the item_id parameter.
|
||||
*
|
||||
* @param p
|
||||
*/
|
||||
@Override
|
||||
public void register(Page p) {
|
||||
super.register(p);
|
||||
|
|
@ -159,7 +168,13 @@ public class CreationSelector extends MetaForm {
|
|||
p.addComponentStateParam(this, m_bundleId);
|
||||
}
|
||||
|
||||
// Get the creation component
|
||||
/**
|
||||
* Get the creation component.
|
||||
*
|
||||
* @param kit
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
protected Component instantiateKitComponent
|
||||
(final AuthoringKit kit, final ContentType type) {
|
||||
String creatorName = kit.getCreateComponent();
|
||||
|
|
@ -197,29 +212,6 @@ public class CreationSelector extends MetaForm {
|
|||
return (Folder) m_folderSel.getSelectedObject(s);
|
||||
}
|
||||
|
||||
// public final void xsetContentBundle(PageState s, ContentBundle bundle) {
|
||||
// m_bundleSel.setSelectedObject(s, bundle);
|
||||
// }
|
||||
|
||||
// public final ContentBundle xgetContentBundle(final PageState state) {
|
||||
// final ContentBundle current = (ContentBundle)
|
||||
// m_bundleSel.getSelectedItem(state);
|
||||
|
||||
// if (current == null) {
|
||||
// final Folder folder = getFolder(state);
|
||||
|
||||
// final ContentBundle bundle = new ContentBundle();
|
||||
// bundle.setParent(folder);
|
||||
// bundle.setContentSection(folder.getContentSection());
|
||||
|
||||
// m_bundleSel.setSelectedObject(state, bundle);
|
||||
|
||||
// return bundle;
|
||||
// } else {
|
||||
// return current;
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* Return the currently selected content section. New items created by
|
||||
* creation components will belong to this section. This is the content
|
||||
|
|
|
|||
|
|
@ -178,15 +178,28 @@ public abstract class NewItemForm extends Form {
|
|||
|
||||
public abstract ContentSection getContentSection(PageState state);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param state
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal getTypeID(PageState state) {
|
||||
return (BigDecimal) m_typeWidget.getValue(state);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public final SingleSelect getTypeSelect() {
|
||||
return m_typeWidget;
|
||||
}
|
||||
|
||||
// Generate XML - show/hide labels/widgets
|
||||
/**
|
||||
* Generate XML - show/hide labels/widgets
|
||||
* @param state
|
||||
* @param parent
|
||||
*/
|
||||
@Override
|
||||
public void generateXML(PageState state, Element parent) {
|
||||
|
||||
|
|
|
|||
|
|
@ -118,8 +118,8 @@ public class PageCreate extends BasicPageForm
|
|||
return m_workflowSection;
|
||||
}
|
||||
|
||||
/** create a new item id
|
||||
*
|
||||
/**
|
||||
* Create a new item id.
|
||||
*/
|
||||
public void init(FormSectionEvent e) throws FormProcessException {
|
||||
// this is currently a no-op
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ import java.util.Date;
|
|||
import java.util.Iterator;
|
||||
import java.util.TooManyListenersException;
|
||||
import javax.servlet.ServletException;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
|
|
@ -208,7 +209,8 @@ public class PageCreateDynamic extends FormSection
|
|||
m_parentComponent = (CreationComponent) tempComponent;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// could not instantiate parent's creation component -- start from scratch...
|
||||
// could not instantiate parent's creation component
|
||||
// -- start from scratch...
|
||||
}
|
||||
} else {
|
||||
m_parentComponent = new PageCreate(m_itemModel, parent);
|
||||
|
|
@ -231,7 +233,8 @@ public class PageCreateDynamic extends FormSection
|
|||
//setMethod(Form.POST);
|
||||
//setEncType("multipart/form-data");
|
||||
} else {
|
||||
add(new Label(GlobalizationUtil.globalize("cms.ui.authoring.invalid_create_component")));
|
||||
add(new Label(GlobalizationUtil.globalize(
|
||||
"cms.ui.authoring.invalid_create_component")));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -383,7 +386,9 @@ public class PageCreateDynamic extends FormSection
|
|||
|
||||
if(getSaveCancelSection().getCancelButton().isSelected(state)) {
|
||||
m_parent.redirectBack(state);
|
||||
throw new FormProcessException( (String) GlobalizationUtil.globalize("cms.ui.authoring.submission_cancelled").localize());
|
||||
throw new FormProcessException( (String) GlobalizationUtil
|
||||
.globalize("cms.ui.authoring.submission_cancelled")
|
||||
.localize());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,13 +28,27 @@ import com.arsdigita.persistence.SessionManager;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
final class ChildUniqueValidationListener implements ParameterListener {
|
||||
|
||||
private final FolderRequestLocal m_parent;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param parent
|
||||
*/
|
||||
public ChildUniqueValidationListener(final FolderRequestLocal parent) {
|
||||
m_parent = parent;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param e
|
||||
* @throws FormProcessException
|
||||
*/
|
||||
public final void validate(final ParameterEvent e)
|
||||
throws FormProcessException {
|
||||
final PageState state = e.getPageState();
|
||||
|
|
@ -45,6 +59,12 @@ final class ChildUniqueValidationListener implements ParameterListener {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parent
|
||||
* @param name
|
||||
* @throws FormProcessException
|
||||
*/
|
||||
private void validateNameUniqueness(final Folder parent,
|
||||
final String name)
|
||||
throws FormProcessException {
|
||||
|
|
|
|||
Loading…
Reference in New Issue