Weitere Verbesserungen Lokalisierung.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2232 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
c62dd99a86
commit
d57a954009
|
|
@ -9,34 +9,36 @@
|
||||||
classname="com.arsdigita.cms.contenttypes.DecisionTree">
|
classname="com.arsdigita.cms.contenttypes.DecisionTree">
|
||||||
|
|
||||||
<ctd:authoring-kit createComponent="com.arsdigita.cms.ui.authoring.PageCreate">
|
<ctd:authoring-kit createComponent="com.arsdigita.cms.ui.authoring.PageCreate">
|
||||||
|
|
||||||
<ctd:authoring-step
|
<ctd:authoring-step
|
||||||
labelKey="cms.contenttypes.shared.basic_properties.title"
|
labelKey="cms.contenttypes.shared.basic_properties.title"
|
||||||
labelBundle="com.arsdigita.cms.ui.CMSResources"
|
labelBundle="com.arsdigita.cms.CMSResources"
|
||||||
descriptionKey="cms.contenttypes.shared.basic_properties.description"
|
descriptionKey="cms.contenttypes.shared.basic_properties.description"
|
||||||
descriptionBundle="com.arsdigita.cms.ui.CMSResources"
|
descriptionBundle="com.arsdigita.cms.CMSResources"
|
||||||
component="com.arsdigita.cms.contenttypes.ui.DecisionTreePropertiesStep"/>
|
component="com.arsdigita.cms.contenttypes.ui.DecisionTreePropertiesStep"/>
|
||||||
|
|
||||||
<ctd:authoring-step
|
<ctd:authoring-step
|
||||||
labelKey="tree_sections.title"
|
labelKey="cms.contenttypes.ui.authoring.decisiontree.tree_sections.title"
|
||||||
labelBundle="com.arsdigita.cms.contenttypes.DecisionTreeResources"
|
labelBundle="com.arsdigita.cms.contenttypes.DecisionTreeResources"
|
||||||
descriptionKey="tree_sections.description"
|
descriptionKey="cms.contenttypes.ui.authoring.decisiontree.tree_sections.description"
|
||||||
descriptionBundle="com.arsdigita.cms.contenttypes.DecisionTreeResources"
|
descriptionBundle="com.arsdigita.cms.contenttypes.DecisionTreeResources"
|
||||||
component="com.arsdigita.cms.contenttypes.ui.DecisionTreeViewSections"/>
|
component="com.arsdigita.cms.contenttypes.ui.DecisionTreeSectionStep"/>
|
||||||
|
|
||||||
<ctd:authoring-step
|
<ctd:authoring-step
|
||||||
labelKey="section_options.title"
|
labelKey="cms.contenttypes.ui.authoring.decisiontree.section_options.title"
|
||||||
labelBundle="com.arsdigita.cms.contenttypes.DecisionTreeResources"
|
labelBundle="com.arsdigita.cms.contenttypes.DecisionTreeResources"
|
||||||
descriptionKey="section_options.description"
|
descriptionKey="cms.contenttypes.ui.authoring.decisiontree.section_options.description"
|
||||||
descriptionBundle="com.arsdigita.cms.contenttypes.DecisionTreeResources"
|
descriptionBundle="com.arsdigita.cms.contenttypes.DecisionTreeResources"
|
||||||
component="com.arsdigita.cms.contenttypes.ui.DecisionTreeViewOptions"/>
|
component="com.arsdigita.cms.contenttypes.ui.DecisionTreeOptionStep"/>
|
||||||
|
|
||||||
<ctd:authoring-step
|
<ctd:authoring-step
|
||||||
labelKey="option_targets.title"
|
labelKey="cms.contenttypes.ui.authoring.decisiontree.option_targets.title"
|
||||||
labelBundle="com.arsdigita.cms.contenttypes.DecisionTreeResources"
|
labelBundle="com.arsdigita.cms.contenttypes.DecisionTreeResources"
|
||||||
descriptionKey="option_targets.description"
|
descriptionKey="cms.contenttypes.ui.authoring.decisiontree.option_targets.description"
|
||||||
descriptionBundle="com.arsdigita.cms.contenttypes.DecisionTreeResources"
|
descriptionBundle="com.arsdigita.cms.contenttypes.DecisionTreeResources"
|
||||||
component="com.arsdigita.cms.contenttypes.ui.DecisionTreeViewTargets" />
|
component="com.arsdigita.cms.contenttypes.ui.DecisionTreeTargetStep" />
|
||||||
<ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/>
|
<ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/>
|
||||||
|
|
||||||
</ctd:authoring-kit>
|
</ctd:authoring-kit>
|
||||||
</ctd:content-type>
|
</ctd:content-type>
|
||||||
</ctd:content-types>
|
</ctd:content-types>
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,7 @@ public class DecisionTree extends ContentPage implements XMLGenerator {
|
||||||
* @return the base PDL object type for this item. Child classes
|
* @return the base PDL object type for this item. Child classes
|
||||||
* should override this method to return the correct value.
|
* should override this method to return the correct value.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getBaseDataObjectType() {
|
public String getBaseDataObjectType() {
|
||||||
return BASE_DATA_OBJECT_TYPE;
|
return BASE_DATA_OBJECT_TYPE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,7 @@ public class DecisionTreeOptionTarget extends ContentItem {
|
||||||
* @return the base PDL object type for this item. Child classes
|
* @return the base PDL object type for this item. Child classes
|
||||||
* should override this method to return the correct value.
|
* should override this method to return the correct value.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getBaseDataObjectType() {
|
public String getBaseDataObjectType() {
|
||||||
return BASE_DATA_OBJECT_TYPE;
|
return BASE_DATA_OBJECT_TYPE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,44 +1,77 @@
|
||||||
error.parameter_name_characters=This parameter can only contain letters, digits, or "-_"
|
cms.contenttypes.ui.decisiontree.error.parameter_name_characters=This parameter can only contain letters, digits, or "-_"
|
||||||
form.none=-- none --
|
cms.contenttypes.ui.decisiontree.targets.form.none=-- none --
|
||||||
form.please_select=-- please select --
|
cms.contenttypes.ui.decisiontree.options.form.please_select=-- please select a section for this option--
|
||||||
form_label.cancel_url=Cancel URL
|
cms.contenttypes.ui.decisiontree.properties.form.description_label=Description
|
||||||
form_label.description=Description
|
cms.contenttypes.ui.decisiontree.sections.form.instructions_label=Instructions
|
||||||
form_label.instructions=Instructions
|
cms.contenttypes.ui.decisiontree.options.form.label=Label
|
||||||
form_label.label=Label
|
cms.contenttypes.ui.decisiontree.targets.form.match_value=Value to Match
|
||||||
form_label.match_value=Value to Match
|
cms.contenttypes.ui.decisiontree.sections.form.parameter_name_label=Parameter Name
|
||||||
form_label.parameter_name=Parameter Name
|
cms.contenttypes.ui.decisiontree.options.form.section=Section
|
||||||
form_label.section=Section
|
cms.contenttypes.ui.decisiontree.targets.form.target_section_label=Target Section
|
||||||
form_label.target_section=Target Section
|
cms.contenttypes.ui.decisiontree.targets.form.target_url_label=Target URL
|
||||||
form_label.target_url=Target URL
|
cms.contenttypes.ui.decisiontree.sections.form.title_label=Title
|
||||||
form_label.title=Title
|
cms.contenttypes.ui.decisiontree.options.form.value=Value
|
||||||
form_label.value=Value
|
cms.contenttypes.ui.decisiontree.targets.form.target_required=Either a target URL or a target section is required.
|
||||||
form_validation.target_required=Either a target URL or a target section is required.
|
cms.contenttypes.ui.decisiontree.targets.form.duplicate_target=Please enter a target URL or a target section, but not both.
|
||||||
form_validation.duplicate_target=Please enter a target URL or a target section, but not both.
|
cms.contenttypes.ui.decisiontree.properties.cancel_url=Cancel URL after user abort:
|
||||||
properties.cancel_url=Cancel URL:
|
cms.contenttypes.ui.decisiontree.options.add_new=Add new option
|
||||||
section_options.add_new_option=Add new option
|
cms.contenttypes.ui.decisiontree.options.add=Add Option
|
||||||
section_options.add_option=Add Option
|
cms.contenttypes.ui.decisiontree.options.delete=Delete option
|
||||||
section_options.delete_option=Delete option
|
cms.contenttypes.ui.authoring.decisiontree.section_options.description=The options that belong to this decision tree's sections.
|
||||||
section_options.description=The options that belong to this decision tree's sections.
|
cms.contenttypes.ui.decisiontree.options.edit=Edit Option
|
||||||
section_options.edit_option=Edit Option
|
cms.contenttypes.ui.decisiontree.options.table.move_option_name=Move option {0}
|
||||||
section_options.move_option_name=Move option
|
cms.contenttypes.ui.decisiontree.options.table.move_to_beginning=Move to beginning
|
||||||
section_options.move_to_beginning=Move to beginning
|
cms.contenttypes.ui.decisiontree.options.none_yet=No options yet
|
||||||
section_options.no_options_yet=No options yet
|
cms.contenttypes.ui.authoring.decisiontree.section_options.title=Decision Options
|
||||||
section_options.title=Section Options
|
cms.contenttypes.ui.decisiontree.options.view_all=View all options
|
||||||
section_options.view_all_options=View all options
|
cms.contenttypes.ui.decisiontree.targets.add_new=Add new target
|
||||||
option_targets.add_new_target=Add new target
|
cms.contenttypes.ui.decisiontree.targets.add=Add Target
|
||||||
option_targets.add_target=Add Target
|
cms.contenttypes.ui.decisiontree.targets.delete=Delete target
|
||||||
option_targets.delete_target=Delete target
|
cms.contenttypes.ui.authoring.decisiontree.option_targets.description=The targets that belong to this decision treeS.
|
||||||
option_targets.description=The targets that belong to this decision treeS.
|
cms.contenttypes.ui.decisiontree.targets.edit=Edit Target
|
||||||
option_targets.edit_target=Edit Target
|
cms.contenttypes.ui.decisiontree.targets.none_yet=No targets yet
|
||||||
option_targets.no_targets_yet=No targets yet
|
cms.contenttypes.ui.authoring.decisiontree.option_targets.title=Decision Option Targets
|
||||||
option_targets.title=Option Targets
|
cms.contenttypes.ui.decisiontree.targets.view_all=View all targets
|
||||||
option_targets.view_all_targets=View all targets
|
cms.contenttypes.ui.decisiontree.options.form.submission_cancelled=Opion submission cancelled
|
||||||
tree_section.submission_cancelled=Submission cancelled
|
cms.contenttypes.ui.decisiontree.sections.add_new_label=Add new section
|
||||||
tree_sections.add_new_section=Add new section
|
cms.contenttypes.ui.decisiontree.sections.add=Add Section
|
||||||
tree_sections.add_section=Add Section
|
cms.contenttypes.ui.decisiontree.sections.delete=Delete section
|
||||||
tree_sections.delete_section=Delete section
|
cms.contenttypes.ui.authoring.decisiontree.tree_sections.description=The sections that belong to this decision tree.
|
||||||
tree_sections.description=The sections that belong to this decision tree.
|
cms.contenttypes.ui.decisiontree.sections.edit=Edit Section
|
||||||
tree_sections.edit_section=Edit Section
|
cms.contenttypes.ui.decisiontree.sections.no_sections_yet=No sections yet
|
||||||
tree_sections.no_sections_yet=No sections yet
|
cms.contenttypes.ui.authoring.decisiontree.tree_sections.title=Decision Sections
|
||||||
tree_sections.title=Tree Sections
|
cms.contenttypes.ui.decisiontree.sections.view_all=View all sections
|
||||||
tree_sections.view_all_sections=View all sections
|
cms.contenttypes.ui.decisiontree.sections.table.header_section=Decision Section
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.header_edit=Edit
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.header_delete=Delete
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.header_first_section=First Section?
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.link_delete=delete
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.link_edit=edit
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.link_set_first=set
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.header_section=Decision Section
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.header_option=Decision Option
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.header_edit=Edit
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.header_move=Move
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.header_delete=Delete
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.link_delete=delete
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.link_move=move
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.link_edit=edit
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.form.please_select=-- please select an option for this option--
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.form.submission_cancelled=Target submission cancelled
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.form.delete.delete_button=Delete
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.form.delete.target_match_value=Target Match Value
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.submission_cancelled=Submission cancelled
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.form.submission_cancelled=Submission cancelled
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.link_move_below=move below
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.link_no_move=leave it here
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.header_section=Decision Section
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.header_match=Decision Option
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.header_edit=Edit
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.header_delete=Delete
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.link_edit=edit
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.link_delete=delete
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.delete_button=Delete
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.delete_section_msg=Section to be deleted: "{0}"
|
||||||
|
cms.contenttypes.ui.decisiontree.options.delete_option_msg=Option to be deleted: "{0}"
|
||||||
|
cms.contenttypes.ui.decisiontree.options.delete_button=Delete
|
||||||
|
cms.contenttypes.ui.decisiontree.options.delete.submission_cancelled=Option Delete submission cancelled
|
||||||
|
|
|
||||||
|
|
@ -1,44 +1,77 @@
|
||||||
error.parameter_name_characters=Dieser Parameter lann nur Buchstaben, Zahlen oder "-_" enthalten.
|
cms.contenttypes.ui.decisiontree.error.parameter_name_characters=Dieser Parameter kann nur Buchstaben, Zahlen oder "-_" enthalten.
|
||||||
form.none=-- keine --
|
cms.contenttypes.ui.decisiontree.targets.form.none=-- keine --
|
||||||
form.please_select=-- bitte ausw\u00e4hlen --
|
cms.contenttypes.ui.decisiontree.options.form.please_select=-- bitte zugeh\u00f6rige Sektion ausw\u00e4hlen --
|
||||||
form_label.cancel_url=URL Abrechen
|
cms.contenttypes.ui.decisiontree.properties.form.description_label=Beschreibung
|
||||||
form_label.description=Beschreibung
|
cms.contenttypes.ui.decisiontree.sections.form.instructions_label=Anweisungen
|
||||||
form_label.instructions=Anweisungen
|
cms.contenttypes.ui.decisiontree.options.form.label=Benennung
|
||||||
form_label.label=Benennung
|
cms.contenttypes.ui.decisiontree.targets.form.match_value=Korrespondierender Wert
|
||||||
form_label.match_value=Korrespondierender Wert
|
cms.contenttypes.ui.decisiontree.sections.form.parameter_name_label=Parameter Name
|
||||||
form_label.parameter_name=Parameter Name
|
cms.contenttypes.ui.decisiontree.options.form.section=Sektion
|
||||||
form_label.section=Sektion
|
cms.contenttypes.ui.decisiontree.targets.form.target_section_label=Zielsektion
|
||||||
form_label.target_section=Zielsektion
|
cms.contenttypes.ui.decisiontree.targets.form.target_url_label=Ziel-URL
|
||||||
form_label.target_url=Ziel-URL
|
cms.contenttypes.ui.decisiontree.sections.form.title_label=Titel
|
||||||
form_label.title=Titel
|
cms.contenttypes.ui.decisiontree.options.form.value=Wert
|
||||||
form_label.value=Wert
|
cms.contenttypes.ui.decisiontree.targets.form.target_required=Entweder eine Ziel-URL oder eine Ziel-Sektion isr erforderlich.
|
||||||
form_validation.target_required=Entweder eine Ziel-URL oder eine Ziel-Sektion isr erforderlich.
|
cms.contenttypes.ui.decisiontree.targets.form.duplicate_target=Bitte eine Ziel-URL oder eine Ziel-Sektion angeben, aber nicht beides.
|
||||||
form_validation.duplicate_target=Bitte eine Ziel-URL oder eine Ziel-Sektion angeben, aber nicht beides.
|
cms.contenttypes.ui.decisiontree.properties.cancel_url=URL nach Benutzer Abbruch:
|
||||||
properties.cancel_url=URL Abbrechen:
|
cms.contenttypes.ui.decisiontree.options.add_new=Eine neue Option hinzuf\u00fcgen
|
||||||
section_options.add_new_option=Eine neue Option hinzuf\u00fcgen
|
cms.contenttypes.ui.decisiontree.options.add=Option hinzuf\u00fcgen
|
||||||
section_options.add_option=Option hinzuf\u00fcgen
|
cms.contenttypes.ui.decisiontree.options.delete=Option l\u00f6schen
|
||||||
section_options.delete_option=Option l\u00f6schen
|
cms.contenttypes.ui.authoring.decisiontree.section_options.description=Optionen, die zu dieser Sektion geh\u00f6ren.
|
||||||
section_options.description=Optionen, die zu dieser Sektion geh\u00f6ren.
|
cms.contenttypes.ui.decisiontree.options.edit=Option bearbeiten
|
||||||
section_options.edit_option=Option bearbeiten
|
cms.contenttypes.ui.decisiontree.options.table.move_option_name=Option verschieben {0}
|
||||||
section_options.move_option_name=Option verschieben
|
cms.contenttypes.ui.decisiontree.options.table.move_to_beginning=An den Anfang verschieben
|
||||||
section_options.move_to_beginning=An den Anfang verschieben
|
cms.contenttypes.ui.decisiontree.options.none_yet=Bisher keine Optionen eingetragen.
|
||||||
section_options.no_options_yet=Bisher keine Optionen eingetragen.
|
cms.contenttypes.ui.authoring.decisiontree.section_options.title=Entscheidungsoptionen
|
||||||
section_options.title=Optionen in der Sektion
|
cms.contenttypes.ui.decisiontree.options.view_all=Alle Optionen anzeigen
|
||||||
section_options.view_all_options=Alle Optionen anzeigen
|
cms.contenttypes.ui.decisiontree.targets.add_new=Ein neues Ziel hinzuf\u00fcgen
|
||||||
option_targets.add_new_target=Ein neues Ziel hinzuf\u00fcgen
|
cms.contenttypes.ui.decisiontree.targets.add=Ziel hinzuf\u00fcgen
|
||||||
option_targets.add_target=Ziel hinzuf\u00fcgen
|
cms.contenttypes.ui.decisiontree.targets.delete=Ziel l\u00f6schen
|
||||||
option_targets.delete_target=Ziel l\u00f6schen
|
cms.contenttypes.ui.authoring.decisiontree.option_targets.description=Ziele, die zu dieser Sektion geh\u00f6ren.
|
||||||
option_targets.description=Ziele, die zu dieser Sektion geh\u00f6ren.
|
cms.contenttypes.ui.decisiontree.targets.edit=Ziel bearbeiten
|
||||||
option_targets.edit_target=Ziel bearbeiten
|
cms.contenttypes.ui.decisiontree.targets.none_yet=Bisher keine Ziele verf\u00fcgbar.
|
||||||
option_targets.no_targets_yet=Bisher keine Ziele verf\u00fcgbar.
|
cms.contenttypes.ui.authoring.decisiontree.option_targets.title=Folgeschritte
|
||||||
option_targets.title=Option Targets
|
cms.contenttypes.ui.decisiontree.targets.view_all=Alle Ziele anzeigen
|
||||||
option_targets.view_all_targets=Alle Ziele anzeigen
|
cms.contenttypes.ui.decisiontree.options.form.submission_cancelled=Speichern der Option abgebrochen
|
||||||
tree_section.submission_cancelled=Speichern abgebrochen
|
cms.contenttypes.ui.decisiontree.sections.add_new_label=Eine neue Sektion hinzuf\u00fcgen
|
||||||
tree_sections.add_new_section=Eine neue Sektion hinzuf\u00fcgen
|
cms.contenttypes.ui.decisiontree.sections.add=Sektion hinzuf\u00fcgen
|
||||||
tree_sections.add_section=Sektion hinzuf\u00fcgen
|
cms.contenttypes.ui.decisiontree.sections.delete=Sektion l\u00f6schen
|
||||||
tree_sections.delete_section=Sektion l\u00f6schen
|
cms.contenttypes.ui.authoring.decisiontree.tree_sections.description=Die Sektionen bearbeiten, die zu diesem Entscheidungsbaum geh\u00f6ren.
|
||||||
tree_sections.description=Die Sektionen, die zu diesem Entscheidungsbaum geh\u00f6ren.
|
cms.contenttypes.ui.decisiontree.sections.edit=Sektion bearbeiten
|
||||||
tree_sections.edit_section=Sektion bearbeiten
|
cms.contenttypes.ui.decisiontree.sections.no_sections_yet=Bisher keine Sektionen verf\u00fcgbar.
|
||||||
tree_sections.no_sections_yet=Bisher keine Sektionen verf\u00fcgbar.
|
cms.contenttypes.ui.authoring.decisiontree.tree_sections.title=Entscheidungsschritte
|
||||||
tree_sections.title=Sektionen
|
cms.contenttypes.ui.decisiontree.sections.view_all=Alle Sektionen anzeigen
|
||||||
tree_sections.view_all_sections=Alle Sektionen anzeigen
|
cms.contenttypes.ui.decisiontree.sections.table.header_section=Entscheidungsschritt
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.header_edit=Bearbeiten
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.header_delete=L\u00f6schen
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.header_first_section=Erste Sektion?
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.link_delete=l\u00f6schen
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.link_edit=bearbeiten
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.link_set_first=festlegen
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.header_section=Entscheidungsschritt
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.header_option=Entscheidungsoption
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.header_edit=Bearbeiten
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.header_move=Verschieben
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.header_delete=Entfernen
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.link_delete=entfernen
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.link_move=verschieben
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.link_edit=bearbeiten
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.form.please_select=-- bitte zugeh\u00f6rige Option ausw\u00e4hlen --
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.form.submission_cancelled=Speichern des Target abgebrochen
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.form.delete.delete_button=L\u00f6schen
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.form.delete.target_match_value=Target Match Value
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.submission_cancelled=Submission cancelled
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.form.submission_cancelled=Submission cancelled
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.link_move_below=unterhalb dieses Eintrags verschieben
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.link_no_move=hier belassen
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.header_section=Entscheidungsschritt
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.header_match=Entscheidungsoption
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.header_edit=Bearbeiten
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.header_delete=Entfernen
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.link_edit=bearbeiten
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.link_delete=entfernen
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.delete_button=L\u00f6schen
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.delete_section_msg=Zu l\u00f6schende Sektion: "{0}"
|
||||||
|
cms.contenttypes.ui.decisiontree.options.delete_option_msg=Zu l\u00f6schende Option: "{0}"
|
||||||
|
cms.contenttypes.ui.decisiontree.options.delete_button=Entfernen
|
||||||
|
cms.contenttypes.ui.decisiontree.options.delete.submission_cancelled=Option Delete submission cancelled
|
||||||
|
|
|
||||||
|
|
@ -1,44 +1,77 @@
|
||||||
error.parameter_name_characters=This parameter can only contain letters, digits, or "-_"
|
cms.contenttypes.ui.decisiontree.error.parameter_name_characters=This parameter can only contain letters, digits, or "-_"
|
||||||
form.none=-- none --
|
cms.contenttypes.ui.decisiontree.targets.form.none=-- none --
|
||||||
form.please_select=-- please select --
|
cms.contenttypes.ui.decisiontree.options.form.please_select=-- please select --
|
||||||
form_label.cancel_url=Cancel URL
|
cms.contenttypes.ui.decisiontree.properties.form.description_label=Description
|
||||||
form_label.description=Description
|
cms.contenttypes.ui.decisiontree.sections.form.instructions_label=Instructions
|
||||||
form_label.instructions=Instructions
|
cms.contenttypes.ui.decisiontree.options.form.label=Label
|
||||||
form_label.label=Label
|
cms.contenttypes.ui.decisiontree.targets.form.match_value=Value to Match
|
||||||
form_label.match_value=Value to Match
|
cms.contenttypes.ui.decisiontree.sections.form.parameter_name_label=Parameter Name
|
||||||
form_label.parameter_name=Parameter Name
|
cms.contenttypes.ui.decisiontree.options.form.section=Section
|
||||||
form_label.section=Section
|
cms.contenttypes.ui.decisiontree.targets.form.target_section_label=Target Section
|
||||||
form_label.target_section=Target Section
|
cms.contenttypes.ui.decisiontree.targets.form.target_url_label=Target URL
|
||||||
form_label.target_url=Target URL
|
cms.contenttypes.ui.decisiontree.sections.form.title_label=Title
|
||||||
form_label.title=Title
|
cms.contenttypes.ui.decisiontree.options.form.value=Value
|
||||||
form_label.value=Value
|
cms.contenttypes.ui.decisiontree.targets.form.target_required=Either a target URL or a target section is required.
|
||||||
form_validation.target_required=Either a target URL or a target section is required.
|
cms.contenttypes.ui.decisiontree.targets.form.duplicate_target=Please enter a target URL or a target section, but not both.
|
||||||
form_validation.duplicate_target=Please enter a target URL or a target section, but not both.
|
cms.contenttypes.ui.decisiontree.properties.cancel_url=Cancel URL after user abort:
|
||||||
properties.cancel_url=Cancel URL:
|
cms.contenttypes.ui.decisiontree.options.add_new=Add new option
|
||||||
section_options.add_new_option=Add new option
|
cms.contenttypes.ui.decisiontree.options.add=Add Option
|
||||||
section_options.add_option=Add Option
|
cms.contenttypes.ui.decisiontree.options.delete=Delete option
|
||||||
section_options.delete_option=Delete option
|
cms.contenttypes.ui.authoring.decisiontree.section_options.description=The options that belong to this decision tree's sections.
|
||||||
section_options.description=The options that belong to this decision tree's sections.
|
cms.contenttypes.ui.decisiontree.options.edit=Edit Option
|
||||||
section_options.edit_option=Edit Option
|
cms.contenttypes.ui.decisiontree.options.table.move_option_name=Move option {0}
|
||||||
section_options.move_option_name=Move option
|
cms.contenttypes.ui.decisiontree.options.table.move_to_beginning=Move to beginning
|
||||||
section_options.move_to_beginning=Move to beginning
|
cms.contenttypes.ui.decisiontree.options.none_yet=No options yet
|
||||||
section_options.no_options_yet=No options yet
|
cms.contenttypes.ui.authoring.decisiontree.section_options.title=Decision Options
|
||||||
section_options.title=Section Options
|
cms.contenttypes.ui.decisiontree.options.view_all=View all options
|
||||||
section_options.view_all_options=View all options
|
cms.contenttypes.ui.decisiontree.targets.add_new=Add new target
|
||||||
option_targets.add_new_target=Add new target
|
cms.contenttypes.ui.decisiontree.targets.add=Add Target
|
||||||
option_targets.add_target=Add Target
|
cms.contenttypes.ui.decisiontree.targets.delete=Delete target
|
||||||
option_targets.delete_target=Delete target
|
cms.contenttypes.ui.authoring.decisiontree.option_targets.description=The targets that belong to this decision treeS.
|
||||||
option_targets.description=The targets that belong to this decision treeS.
|
cms.contenttypes.ui.decisiontree.targets.edit=Edit Target
|
||||||
option_targets.edit_target=Edit Target
|
cms.contenttypes.ui.decisiontree.targets.none_yet=No targets yet
|
||||||
option_targets.no_targets_yet=No targets yet
|
cms.contenttypes.ui.authoring.decisiontree.option_targets.title=Decision Option Targets
|
||||||
option_targets.title=Option Targets
|
cms.contenttypes.ui.decisiontree.targets.view_all=View all targets
|
||||||
option_targets.view_all_targets=View all targets
|
cms.contenttypes.ui.decisiontree.options.form.submission_cancelled=Option submission cancelled
|
||||||
tree_section.submission_cancelled=Submission cancelled
|
cms.contenttypes.ui.decisiontree.sections.add_new_label=Add new section
|
||||||
tree_sections.add_new_section=Add new section
|
cms.contenttypes.ui.decisiontree.sections.add=Add Section
|
||||||
tree_sections.add_section=Add Section
|
cms.contenttypes.ui.decisiontree.sections.delete=Delete section
|
||||||
tree_sections.delete_section=Delete section
|
cms.contenttypes.ui.authoring.decisiontree.tree_sections.description=The sections that belong to this decision tree.
|
||||||
tree_sections.description=The sections that belong to this decision tree.
|
cms.contenttypes.ui.decisiontree.sections.edit=Edit Section
|
||||||
tree_sections.edit_section=Edit Section
|
cms.contenttypes.ui.decisiontree.sections.no_sections_yet=No sections yet
|
||||||
tree_sections.no_sections_yet=No sections yet
|
cms.contenttypes.ui.authoring.decisiontree.tree_sections.title=Decision Sections
|
||||||
tree_sections.title=Tree Sections
|
cms.contenttypes.ui.decisiontree.sections.view_all=View all sections
|
||||||
tree_sections.view_all_sections=View all sections
|
cms.contenttypes.ui.decisiontree.sections.table.header_section=Decision Section
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.header_edit=Edit
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.header_delete=Delete
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.header_first_section=First Section?
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.link_delete=delete
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.link_edit=edit
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.link_set_first=set
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.header_section=Decision Section
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.header_option=Decision Option
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.header_edit=Edit
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.header_move=Move
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.header_delete=Delete
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.link_delete=delete
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.link_move=move
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.link_edit=edit
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.form.please_select=-- please select --
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.form.submission_cancelled=Target submission cancelled
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.form.delete.delete_button=Delete
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.form.delete.target_match_value=Target Match Value
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.submission_cancelled=Submission cancelled
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.form.submission_cancelled=Submission cancelled
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.link_move_below=move below
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.link_no_move=leave it here
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.header_section=Decision Section
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.header_match=Decision Option
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.header_edit=Edit
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.header_delete=Delete
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.link_edit=edit
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.link_delete=delete
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.delete_button=Delete
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.delete_section_msg=Section to be deleted: "{0}"
|
||||||
|
cms.contenttypes.ui.decisiontree.options.delete_option_msg=Option to be deleted: "{0}"
|
||||||
|
cms.contenttypes.ui.decisiontree.options.delete_button=Delete
|
||||||
|
cms.contenttypes.ui.decisiontree.options.delete.submission_cancelled=Option Delete submission cancelled
|
||||||
|
|
|
||||||
|
|
@ -1,44 +1,77 @@
|
||||||
error.parameter_name_characters=This parameter can only contain letters, digits, or "-_"
|
cms.contenttypes.ui.decisiontree.error.parameter_name_characters=This parameter can only contain letters, digits, or "-_"
|
||||||
form.none=-- none --
|
cms.contenttypes.ui.decisiontree.targets.form.none=-- none --
|
||||||
form.please_select=-- please select --
|
cms.contenttypes.ui.decisiontree.options.form.please_select=-- please select --
|
||||||
form_label.cancel_url=Cancel URL
|
cms.contenttypes.ui.decisiontree.properties.form.description_label=Description
|
||||||
form_label.description=Description
|
cms.contenttypes.ui.decisiontree.sections.form.instructions_label=Instructions
|
||||||
form_label.instructions=Instructions
|
cms.contenttypes.ui.decisiontree.options.form.label=Label
|
||||||
form_label.label=Label
|
cms.contenttypes.ui.decisiontree.targets.form.match_value=Value to Match
|
||||||
form_label.match_value=Value to Match
|
cms.contenttypes.ui.decisiontree.sections.form.parameter_name_label=Parameter Name
|
||||||
form_label.parameter_name=Parameter Name
|
cms.contenttypes.ui.decisiontree.options.form.section=Section
|
||||||
form_label.section=Section
|
cms.contenttypes.ui.decisiontree.targets.form.target_section_label=Target Section
|
||||||
form_label.target_section=Target Section
|
cms.contenttypes.ui.decisiontree.targets.form.target_url_label=Target URL
|
||||||
form_label.target_url=Target URL
|
cms.contenttypes.ui.decisiontree.sections.form.title_label=Title
|
||||||
form_label.title=Title
|
cms.contenttypes.ui.decisiontree.options.form.value=Value
|
||||||
form_label.value=Value
|
cms.contenttypes.ui.decisiontree.targets.form.target_required=Either a target URL or a target section is required.
|
||||||
form_validation.target_required=Either a target URL or a target section is required.
|
cms.contenttypes.ui.decisiontree.targets.form.duplicate_target=Please enter a target URL or a target section, but not both.
|
||||||
form_validation.duplicate_target=Please enter a target URL or a target section, but not both.
|
cms.contenttypes.ui.decisiontree.properties.cancel_url=Cancel URL after user abort:
|
||||||
properties.cancel_url=Cancel URL:
|
cms.contenttypes.ui.decisiontree.options.add_new=Add new option
|
||||||
section_options.add_new_option=Add new option
|
cms.contenttypes.ui.decisiontree.options.add=Add Option
|
||||||
section_options.add_option=Add Option
|
cms.contenttypes.ui.decisiontree.options.delete=Delete option
|
||||||
section_options.delete_option=Delete option
|
cms.contenttypes.ui.authoring.decisiontree.section_options.description=The options that belong to this decision tree's sections.
|
||||||
section_options.description=The options that belong to this decision tree's sections.
|
cms.contenttypes.ui.decisiontree.options.edit=Edit Option
|
||||||
section_options.edit_option=Edit Option
|
cms.contenttypes.ui.decisiontree.options.table.move_option_name=Move option {0}
|
||||||
section_options.move_option_name=Move option
|
cms.contenttypes.ui.decisiontree.options.table.move_to_beginning=Move to beginning
|
||||||
section_options.move_to_beginning=Move to beginning
|
cms.contenttypes.ui.decisiontree.options.none_yet=No options yet
|
||||||
section_options.no_options_yet=No options yet
|
cms.contenttypes.ui.authoring.decisiontree.section_options.title=Decision Options
|
||||||
section_options.title=Section Options
|
cms.contenttypes.ui.decisiontree.options.view_all=View all options
|
||||||
section_options.view_all_options=View all options
|
cms.contenttypes.ui.decisiontree.targets.add_new=Add new target
|
||||||
option_targets.add_new_target=Add new target
|
cms.contenttypes.ui.decisiontree.targets.add=Add Target
|
||||||
option_targets.add_target=Add Target
|
cms.contenttypes.ui.decisiontree.targets.delete=Delete target
|
||||||
option_targets.delete_target=Delete target
|
cms.contenttypes.ui.authoring.decisiontree.option_targets.description=The targets that belong to this decision treeS.
|
||||||
option_targets.description=The targets that belong to this decision treeS.
|
cms.contenttypes.ui.decisiontree.targets.edit=Edit Target
|
||||||
option_targets.edit_target=Edit Target
|
cms.contenttypes.ui.decisiontree.targets.none_yet=No targets yet
|
||||||
option_targets.no_targets_yet=No targets yet
|
cms.contenttypes.ui.authoring.decisiontree.option_targets.title=Decision Option Targets
|
||||||
option_targets.title=Option Targets
|
cms.contenttypes.ui.decisiontree.targets.view_all=View all targets
|
||||||
option_targets.view_all_targets=View all targets
|
cms.contenttypes.ui.decisiontree.options.form.submission_cancelled=Option submission cancelled
|
||||||
tree_section.submission_cancelled=Submission cancelled
|
cms.contenttypes.ui.decisiontree.sections.add_new_label=Add new section
|
||||||
tree_sections.add_new_section=Add new section
|
cms.contenttypes.ui.decisiontree.sections.add=Add Section
|
||||||
tree_sections.add_section=Add Section
|
cms.contenttypes.ui.decisiontree.sections.delete=Delete section
|
||||||
tree_sections.delete_section=Delete section
|
cms.contenttypes.ui.authoring.decisiontree.tree_sections.description=The sections that belong to this decision tree.
|
||||||
tree_sections.description=The sections that belong to this decision tree.
|
cms.contenttypes.ui.decisiontree.sections.edit=Edit Section
|
||||||
tree_sections.edit_section=Edit Section
|
cms.contenttypes.ui.decisiontree.sections.no_sections_yet=No sections yet
|
||||||
tree_sections.no_sections_yet=No sections yet
|
cms.contenttypes.ui.authoring.decisiontree.tree_sections.title=Decision Sections
|
||||||
tree_sections.title=Tree Sections
|
cms.contenttypes.ui.decisiontree.sections.view_all=View all sections
|
||||||
tree_sections.view_all_sections=View all sections
|
cms.contenttypes.ui.decisiontree.sections.table.header_section=Decision Section
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.header_edit=Edit
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.header_delete=Delete
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.header_first_section=First Section?
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.link_delete=delete
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.link_edit=edit
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.table.link_set_first=set
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.header_section=Decision Section
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.header_option=Decision Option
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.header_edit=Edit
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.header_move=Move
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.header_delete=Delete
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.link_delete=delete
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.link_move=move
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.link_edit=edit
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.form.please_select=-- please select --
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.form.submission_cancelled=Target submission cancelled
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.form.delete.delete_button=Delete
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.form.delete.target_match_value=Target Match Value
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.submission_cancelled=Submission cancelled
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.form.submission_cancelled=Submission cancelled
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.link_move_below=move below
|
||||||
|
cms.contenttypes.ui.decisiontree.options.table.link_no_move=leave it here
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.header_section=Decision Section
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.header_match=Decision Option
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.header_edit=Edit
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.header_delete=Delete
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.link_edit=edit
|
||||||
|
cms.contenttypes.ui.decisiontree.targets.table.link_delete=delete
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.delete_button=Delete
|
||||||
|
cms.contenttypes.ui.decisiontree.sections.delete_section_msg=Section to be deleted: "{0}"
|
||||||
|
cms.contenttypes.ui.decisiontree.options.delete_option_msg=Option to be deleted: "{0}"
|
||||||
|
cms.contenttypes.ui.decisiontree.options.delete_button=Delete
|
||||||
|
cms.contenttypes.ui.decisiontree.options.delete.submission_cancelled=Option Delete submission cancelled
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,6 @@ import com.arsdigita.persistence.DataCollection;
|
||||||
*/
|
*/
|
||||||
public class DecisionTreeSectionCollection extends DomainCollection {
|
public class DecisionTreeSectionCollection extends DomainCollection {
|
||||||
|
|
||||||
public static final String versionId = "$Id$";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
|
|
@ -55,6 +53,7 @@ public class DecisionTreeSectionCollection extends DomainCollection {
|
||||||
* the collection.
|
* the collection.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
@Override
|
||||||
public DomainObject getDomainObject() {
|
public DomainObject getDomainObject() {
|
||||||
return new DecisionTreeSection(m_dataCollection.getDataObject());
|
return new DecisionTreeSection(m_dataCollection.getDataObject());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ import com.arsdigita.bebop.event.FormProcessListener;
|
||||||
import com.arsdigita.bebop.event.FormSectionEvent;
|
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||||
import com.arsdigita.bebop.event.FormSubmissionListener;
|
import com.arsdigita.bebop.event.FormSubmissionListener;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeSectionOption;
|
import com.arsdigita.cms.contenttypes.DecisionTreeSectionOption;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeUtil;
|
import com.arsdigita.cms.contenttypes.util.DecisionTreeGlobalizationUtil;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -46,17 +46,21 @@ import com.arsdigita.cms.ItemSelectionModel;
|
||||||
public class DecisionTreeOptionDeleteForm extends Form
|
public class DecisionTreeOptionDeleteForm extends Form
|
||||||
implements FormInitListener,
|
implements FormInitListener,
|
||||||
FormSubmissionListener,
|
FormSubmissionListener,
|
||||||
FormProcessListener
|
FormProcessListener {
|
||||||
{
|
|
||||||
private final static Logger s_log = Logger.getLogger(
|
private final static Logger s_log = Logger.getLogger(
|
||||||
DecisionTreeOptionDeleteForm.class.getName());
|
DecisionTreeOptionDeleteForm.class.getName());
|
||||||
|
|
||||||
protected ItemSelectionModel m_selTree;
|
protected ItemSelectionModel m_selTree;
|
||||||
protected ItemSelectionModel m_selOption;
|
protected ItemSelectionModel m_selOption;
|
||||||
protected SaveCancelSection m_saveCancelSection;
|
protected SaveCancelSection m_saveCancelSection;
|
||||||
private Label m_optionLabel;
|
/** Label denoting the name of the option to delete. */
|
||||||
|
private Label optionLabel;
|
||||||
|
/** Value containin the actual name of the option to be deleted. Will be
|
||||||
|
* passed into the Label field above using string formatter */
|
||||||
|
private String[] optionValue = new String[1];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param selTree
|
* @param selTree
|
||||||
* @param selOption
|
* @param selOption
|
||||||
|
|
@ -75,9 +79,12 @@ public class DecisionTreeOptionDeleteForm extends Form
|
||||||
panel.setColumnWidth(2, "80%");
|
panel.setColumnWidth(2, "80%");
|
||||||
panel.setWidth("100%");
|
panel.setWidth("100%");
|
||||||
|
|
||||||
m_optionLabel = new Label("Option Label");
|
optionLabel = new Label( // "Option Label");
|
||||||
add(m_optionLabel, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
DecisionTreeGlobalizationUtil.globalize(
|
||||||
addSaveCancelSection();
|
"cms.contenttypes.ui.decisiontree.options.delete_option_msg",
|
||||||
|
optionValue));
|
||||||
|
add(optionLabel, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
||||||
|
addSaveCancelSection(); // add a save/cancel section to the form
|
||||||
|
|
||||||
addInitListener(this);
|
addInitListener(this);
|
||||||
addSubmissionListener(this);
|
addSubmissionListener(this);
|
||||||
|
|
@ -85,12 +92,14 @@ public class DecisionTreeOptionDeleteForm extends Form
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Create and adjust the label(s) of the SaveCancel button bar.
|
||||||
* @return
|
* @return a new save/cancel bar with customized button labels
|
||||||
*/
|
*/
|
||||||
protected SaveCancelSection addSaveCancelSection () {
|
protected SaveCancelSection addSaveCancelSection () {
|
||||||
m_saveCancelSection = new SaveCancelSection();
|
m_saveCancelSection = new SaveCancelSection();
|
||||||
m_saveCancelSection.getSaveButton().setButtonLabel("Delete");
|
m_saveCancelSection.getSaveButton().setButtonLabel( // "Delete");
|
||||||
|
DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.options.delete_button"));
|
||||||
add(m_saveCancelSection, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
add(m_saveCancelSection, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
||||||
return m_saveCancelSection;
|
return m_saveCancelSection;
|
||||||
}
|
}
|
||||||
|
|
@ -101,21 +110,23 @@ public class DecisionTreeOptionDeleteForm extends Form
|
||||||
* @throws FormProcessException
|
* @throws FormProcessException
|
||||||
*/
|
*/
|
||||||
public void init ( FormSectionEvent event ) throws FormProcessException {
|
public void init ( FormSectionEvent event ) throws FormProcessException {
|
||||||
|
|
||||||
PageState state = event.getPageState();
|
PageState state = event.getPageState();
|
||||||
|
|
||||||
BigDecimal id = new BigDecimal(m_selOption
|
BigDecimal id = new BigDecimal(m_selOption.getSelectedKey(state)
|
||||||
.getSelectedKey(state).toString());
|
.toString());
|
||||||
DecisionTreeSectionOption option = new DecisionTreeSectionOption(id);
|
DecisionTreeSectionOption option = new DecisionTreeSectionOption(id);
|
||||||
|
optionValue[0] = option.getLabel(); //insert the actual name to the label
|
||||||
m_optionLabel.setLabel(option.getLabel(), state);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void submitted ( FormSectionEvent event ) throws FormProcessException {
|
public void submitted ( FormSectionEvent event ) throws FormProcessException {
|
||||||
PageState state = event.getPageState();
|
PageState state = event.getPageState();
|
||||||
|
|
||||||
if ( m_saveCancelSection.getCancelButton().isSelected(state) ) {
|
if ( m_saveCancelSection.getCancelButton().isSelected(state) ) {
|
||||||
throw new FormProcessException( (String) DecisionTreeUtil
|
throw new FormProcessException( (String)
|
||||||
.globalize("tree_section.submission_cancelled").localize());
|
DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.options.delete.submission_cancelled")
|
||||||
|
.localize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ import com.arsdigita.cms.contenttypes.DecisionTree;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeSection;
|
import com.arsdigita.cms.contenttypes.DecisionTreeSection;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeSectionCollection;
|
import com.arsdigita.cms.contenttypes.DecisionTreeSectionCollection;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeSectionOption;
|
import com.arsdigita.cms.contenttypes.DecisionTreeSectionOption;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeUtil;
|
import com.arsdigita.cms.contenttypes.util.DecisionTreeGlobalizationUtil;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -66,7 +66,7 @@ public class DecisionTreeOptionEditForm extends Form
|
||||||
private ItemSelectionModel m_selTree;
|
private ItemSelectionModel m_selTree;
|
||||||
private ItemSelectionModel m_selOption;
|
private ItemSelectionModel m_selOption;
|
||||||
|
|
||||||
private DecisionTreeViewOptions m_container;
|
private DecisionTreeOptionStep m_container;
|
||||||
|
|
||||||
private SaveCancelSection m_saveCancelSection;
|
private SaveCancelSection m_saveCancelSection;
|
||||||
private SingleSelect m_sectionWidget;
|
private SingleSelect m_sectionWidget;
|
||||||
|
|
@ -95,7 +95,8 @@ public class DecisionTreeOptionEditForm extends Form
|
||||||
*/
|
*/
|
||||||
public DecisionTreeOptionEditForm(ItemSelectionModel selTree,
|
public DecisionTreeOptionEditForm(ItemSelectionModel selTree,
|
||||||
ItemSelectionModel selOption,
|
ItemSelectionModel selOption,
|
||||||
DecisionTreeViewOptions container) {
|
DecisionTreeOptionStep container) {
|
||||||
|
|
||||||
super("DecisionTreeOptionEditForm", new ColumnPanel(2));
|
super("DecisionTreeOptionEditForm", new ColumnPanel(2));
|
||||||
m_selTree = selTree;
|
m_selTree = selTree;
|
||||||
m_selOption = selOption;
|
m_selOption = selOption;
|
||||||
|
|
@ -180,10 +181,14 @@ public class DecisionTreeOptionEditForm extends Form
|
||||||
* Add form widgets for a Section.
|
* Add form widgets for a Section.
|
||||||
*/
|
*/
|
||||||
protected void addWidgets() {
|
protected void addWidgets() {
|
||||||
Option pleaseSelect = new Option("", (String)DecisionTreeUtil.globalize("form.please_select").localize());
|
Option pleaseSelect = new Option(
|
||||||
|
"",
|
||||||
|
new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.options.form.please_select")
|
||||||
|
));
|
||||||
|
|
||||||
add(new Label(DecisionTreeUtil
|
add(new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
.globalize("form_label.section")));
|
"cms.contenttypes.ui.decisiontree.options.form.section")));
|
||||||
m_sectionWidget = new SingleSelect(SECTION);
|
m_sectionWidget = new SingleSelect(SECTION);
|
||||||
m_sectionWidget.addValidationListener(new NotNullValidationListener());
|
m_sectionWidget.addValidationListener(new NotNullValidationListener());
|
||||||
m_sectionWidget.addOption(pleaseSelect);
|
m_sectionWidget.addOption(pleaseSelect);
|
||||||
|
|
@ -200,14 +205,15 @@ public class DecisionTreeOptionEditForm extends Form
|
||||||
|
|
||||||
add(m_sectionWidget);
|
add(m_sectionWidget);
|
||||||
|
|
||||||
add(new Label(DecisionTreeUtil
|
add(new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
.globalize("form_label.label")));
|
"cms.contenttypes.ui.decisiontree.options.form.label")));
|
||||||
TextField labelWidget = new TextField(new TrimmedStringParameter(LABEL));
|
TextField labelWidget = new TextField(new TrimmedStringParameter(LABEL));
|
||||||
labelWidget.addValidationListener(new NotNullValidationListener());
|
labelWidget.addValidationListener(new NotNullValidationListener());
|
||||||
labelWidget.setSize(60);
|
labelWidget.setSize(60);
|
||||||
add(labelWidget);
|
add(labelWidget);
|
||||||
|
|
||||||
add(new Label(DecisionTreeUtil.globalize("form_label.value")));
|
add(new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.options.form.value")));
|
||||||
TextField valueWidget = new TextField(new TrimmedStringParameter(VALUE));
|
TextField valueWidget = new TextField(new TrimmedStringParameter(VALUE));
|
||||||
valueWidget.addValidationListener(new NotNullValidationListener());
|
valueWidget.addValidationListener(new NotNullValidationListener());
|
||||||
valueWidget.setSize(60);
|
valueWidget.setSize(60);
|
||||||
|
|
@ -225,11 +231,11 @@ public class DecisionTreeOptionEditForm extends Form
|
||||||
if ( m_saveCancelSection.getCancelButton()
|
if ( m_saveCancelSection.getCancelButton()
|
||||||
.isSelected(state) && m_container != null) {
|
.isSelected(state) && m_container != null) {
|
||||||
m_container.onlyShowComponent(
|
m_container.onlyShowComponent(
|
||||||
state, DecisionTreeViewOptions.OPTION_TABLE +
|
state, DecisionTreeOptionStep.OPTION_TABLE +
|
||||||
m_container.getTypeIDStr());
|
m_container.getTypeIDStr());
|
||||||
throw new FormProcessException(
|
throw new FormProcessException(
|
||||||
(String)DecisionTreeUtil
|
(String)DecisionTreeGlobalizationUtil.globalize(
|
||||||
.globalize("tree_section.submission_cancelled")
|
"cms.contenttypes.ui.decisiontree.options.form.submission_cancelled")
|
||||||
.localize());
|
.localize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -267,11 +273,12 @@ public class DecisionTreeOptionEditForm extends Form
|
||||||
if (m_container != null) {
|
if (m_container != null) {
|
||||||
m_container.onlyShowComponent(
|
m_container.onlyShowComponent(
|
||||||
state,
|
state,
|
||||||
DecisionTreeViewOptions.OPTION_TABLE +
|
DecisionTreeOptionStep.OPTION_TABLE +
|
||||||
m_container.getTypeIDStr());
|
m_container.getTypeIDStr());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void register(Page p) {
|
public void register(Page p) {
|
||||||
super.register(p);
|
super.register(p);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,16 +38,12 @@ import com.arsdigita.bebop.event.PrintListener;
|
||||||
import com.arsdigita.bebop.event.TableActionEvent;
|
import com.arsdigita.bebop.event.TableActionEvent;
|
||||||
import com.arsdigita.bebop.event.TableActionListener;
|
import com.arsdigita.bebop.event.TableActionListener;
|
||||||
import com.arsdigita.bebop.parameters.BigDecimalParameter;
|
import com.arsdigita.bebop.parameters.BigDecimalParameter;
|
||||||
import com.arsdigita.bebop.table.TableColumn;
|
import com.arsdigita.cms.CMS;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTree;
|
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeUtil;
|
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeSectionOption;
|
import com.arsdigita.cms.contenttypes.DecisionTreeSectionOption;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeSection;
|
import com.arsdigita.cms.contenttypes.util.DecisionTreeGlobalizationUtil;
|
||||||
import com.arsdigita.cms.ContentItem;
|
import com.arsdigita.cms.ContentItem;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.SecurityManager;
|
import com.arsdigita.cms.SecurityManager;
|
||||||
import com.arsdigita.cms.contenttypes.ui.ResettableContainer;
|
|
||||||
import com.arsdigita.cms.dispatcher.Utilities;
|
|
||||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
import com.arsdigita.util.Assert;
|
import com.arsdigita.util.Assert;
|
||||||
|
|
||||||
|
|
@ -61,11 +57,14 @@ import com.arsdigita.util.Assert;
|
||||||
* @author Carsten Clasohm
|
* @author Carsten Clasohm
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
public class DecisionTreeViewOptions extends ResettableContainer
|
public class DecisionTreeOptionStep extends ResettableContainer
|
||||||
{
|
{
|
||||||
/** id keys for each editing panel */
|
// id keys for each editing panel
|
||||||
|
/** id key for table panel */
|
||||||
public static final String OPTION_TABLE = "opt_tbl";
|
public static final String OPTION_TABLE = "opt_tbl";
|
||||||
|
/** id key for edit form panel */
|
||||||
public static final String OPTION_EDIT = "opt_edt";
|
public static final String OPTION_EDIT = "opt_edt";
|
||||||
|
/** id key for delete form panel */
|
||||||
public static final String OPTION_DEL = "opt_del";
|
public static final String OPTION_DEL = "opt_del";
|
||||||
|
|
||||||
/** class attributes */
|
/** class attributes */
|
||||||
|
|
@ -78,9 +77,12 @@ public class DecisionTreeViewOptions extends ResettableContainer
|
||||||
protected ItemSelectionModel m_moveOption;
|
protected ItemSelectionModel m_moveOption;
|
||||||
protected BigDecimalParameter m_moveParameter;
|
protected BigDecimalParameter m_moveParameter;
|
||||||
|
|
||||||
/** visual components that do the 'real work' */
|
// visual components that do the 'real work'
|
||||||
|
/** Table visual component that does the 'real work' */
|
||||||
protected DecisionTreeOptionTable m_optionTable;
|
protected DecisionTreeOptionTable m_optionTable;
|
||||||
|
/** EditForm visual component that does the 'real work' */
|
||||||
protected DecisionTreeOptionEditForm m_optionEdit;
|
protected DecisionTreeOptionEditForm m_optionEdit;
|
||||||
|
/** DeleteForm visual component that does the 'real work' */
|
||||||
protected DecisionTreeOptionDeleteForm m_optionDelete;
|
protected DecisionTreeOptionDeleteForm m_optionDelete;
|
||||||
|
|
||||||
protected ActionLink m_beginLink;
|
protected ActionLink m_beginLink;
|
||||||
|
|
@ -88,7 +90,14 @@ public class DecisionTreeViewOptions extends ResettableContainer
|
||||||
|
|
||||||
private String m_typeIDStr;
|
private String m_typeIDStr;
|
||||||
|
|
||||||
public DecisionTreeViewOptions (ItemSelectionModel selTree, AuthoringKitWizard wizard) {
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param selTree
|
||||||
|
* @param wizard
|
||||||
|
*/
|
||||||
|
public DecisionTreeOptionStep (ItemSelectionModel selTree,
|
||||||
|
AuthoringKitWizard wizard) {
|
||||||
super();
|
super();
|
||||||
m_selTree = selTree;
|
m_selTree = selTree;
|
||||||
m_wizard = wizard;
|
m_wizard = wizard;
|
||||||
|
|
@ -111,8 +120,12 @@ public class DecisionTreeViewOptions extends ResettableContainer
|
||||||
c.setBorderColor("#FFFFFF");
|
c.setBorderColor("#FFFFFF");
|
||||||
c.setPadColor("#FFFFFF");
|
c.setPadColor("#FFFFFF");
|
||||||
|
|
||||||
|
// Just create Link to add a new option, to be added below the table body
|
||||||
|
final ActionLink addOptionLink = buildAddLink();
|
||||||
|
|
||||||
m_moveParameter = new BigDecimalParameter("moveOption");
|
m_moveParameter = new BigDecimalParameter("moveOption");
|
||||||
m_moveOption = new ItemSelectionModel(DecisionTreeSectionOption.class.getName(),
|
m_moveOption = new ItemSelectionModel(
|
||||||
|
DecisionTreeSectionOption.class.getName(),
|
||||||
DecisionTreeSectionOption.BASE_DATA_OBJECT_TYPE,
|
DecisionTreeSectionOption.BASE_DATA_OBJECT_TYPE,
|
||||||
m_moveParameter);
|
m_moveParameter);
|
||||||
|
|
||||||
|
|
@ -120,22 +133,24 @@ public class DecisionTreeViewOptions extends ResettableContainer
|
||||||
m_optionTable.setClassAttr(DATA_TABLE);
|
m_optionTable.setClassAttr(DATA_TABLE);
|
||||||
|
|
||||||
// selected option is based on the selection in the OptionTable
|
// selected option is based on the selection in the OptionTable
|
||||||
m_selOption = new ItemSelectionModel(DecisionTreeSectionOption.class.getName(),
|
m_selOption = new ItemSelectionModel(
|
||||||
|
DecisionTreeSectionOption.class.getName(),
|
||||||
DecisionTreeSectionOption.BASE_DATA_OBJECT_TYPE,
|
DecisionTreeSectionOption.BASE_DATA_OBJECT_TYPE,
|
||||||
m_optionTable.getRowSelectionModel());
|
m_optionTable.getRowSelectionModel());
|
||||||
m_optionTable.setOptionModel(m_selOption);
|
m_optionTable.setOptionModel(m_selOption);
|
||||||
|
|
||||||
Label emptyView = new Label(DecisionTreeUtil
|
Label emptyView = new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
.globalize("section_options.no_options_yet"));
|
"cms.contenttypes.ui.decisiontree.options.none_yet"));
|
||||||
m_optionTable.setEmptyView(emptyView);
|
m_optionTable.setEmptyView(emptyView);
|
||||||
|
|
||||||
m_moveOptionLabel = new Label ("Option Name");
|
m_moveOptionLabel = new Label (); //will be set later below
|
||||||
c.add(m_moveOptionLabel, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
c.add(m_moveOptionLabel, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
||||||
|
|
||||||
m_beginLink = new ActionLink(DecisionTreeUtil
|
m_beginLink = new ActionLink(DecisionTreeGlobalizationUtil.globalize(
|
||||||
.globalize("section_options.move_to_beginning"));
|
"cms.contenttypes.ui.decisiontree.options.table.move_to_beginning"));
|
||||||
c.add(m_beginLink);
|
c.add(m_beginLink);
|
||||||
|
|
||||||
|
|
||||||
m_beginLink.addActionListener ( new ActionListener() {
|
m_beginLink.addActionListener ( new ActionListener() {
|
||||||
public void actionPerformed ( ActionEvent event ) {
|
public void actionPerformed ( ActionEvent event ) {
|
||||||
PageState state = event.getPageState();
|
PageState state = event.getPageState();
|
||||||
|
|
@ -155,9 +170,11 @@ public class DecisionTreeViewOptions extends ResettableContainer
|
||||||
if ( m_moveOption.getSelectedKey(state) == null ) {
|
if ( m_moveOption.getSelectedKey(state) == null ) {
|
||||||
m_beginLink.setVisible(state, false);
|
m_beginLink.setVisible(state, false);
|
||||||
m_moveOptionLabel.setVisible(state, false);
|
m_moveOptionLabel.setVisible(state, false);
|
||||||
|
addOptionLink.setVisible(state, true);
|
||||||
} else {
|
} else {
|
||||||
m_beginLink.setVisible(state, true);
|
m_beginLink.setVisible(state, true);
|
||||||
m_moveOptionLabel.setVisible(state, true);
|
m_moveOptionLabel.setVisible(state, true);
|
||||||
|
addOptionLink.setVisible(state, false);
|
||||||
|
|
||||||
DecisionTreeSectionOption option =
|
DecisionTreeSectionOption option =
|
||||||
(DecisionTreeSectionOption) m_moveOption
|
(DecisionTreeSectionOption) m_moveOption
|
||||||
|
|
@ -165,11 +182,12 @@ public class DecisionTreeViewOptions extends ResettableContainer
|
||||||
String optionName = option.getSection().getTitle() + " - "
|
String optionName = option.getSection().getTitle() + " - "
|
||||||
+ option.getLabel();
|
+ option.getLabel();
|
||||||
|
|
||||||
m_moveOptionLabel.setLabel
|
String[] moveOptionValues = {" \"" + optionName + "\""};
|
||||||
( (String)DecisionTreeUtil
|
m_moveOptionLabel.setLabel( // overwrite previously defined empty
|
||||||
.globalize("section_options.move_option_name")
|
DecisionTreeGlobalizationUtil.globalize(
|
||||||
.localize()
|
"cms.contenttypes.ui.decisiontree.options.table.move_option_name",
|
||||||
+ " \"" + optionName + "\"", state);
|
moveOptionValues)
|
||||||
|
, state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -178,14 +196,11 @@ public class DecisionTreeViewOptions extends ResettableContainer
|
||||||
m_optionTable.addTableActionListener (new TableActionListener () {
|
m_optionTable.addTableActionListener (new TableActionListener () {
|
||||||
public void cellSelected (TableActionEvent event) {
|
public void cellSelected (TableActionEvent event) {
|
||||||
PageState state = event.getPageState();
|
PageState state = event.getPageState();
|
||||||
|
int col = event.getColumn();
|
||||||
|
|
||||||
TableColumn col = m_optionTable.getColumnModel()
|
if ( col == DecisionTreeOptionTable.COL_IDX_DEL ) {
|
||||||
.get(event.getColumn().intValue());
|
|
||||||
String colName = (String)col.getHeaderValue();
|
|
||||||
|
|
||||||
if (DecisionTreeOptionTable.COL_DEL.equals(colName)) {
|
|
||||||
onlyShowComponent(state, OPTION_DEL+m_typeIDStr);
|
onlyShowComponent(state, OPTION_DEL+m_typeIDStr);
|
||||||
} else if (DecisionTreeOptionTable.COL_EDIT.equals(colName)) {
|
} else if ( col == DecisionTreeOptionTable.COL_IDX_EDIT ) {
|
||||||
onlyShowComponent(state, OPTION_EDIT+m_typeIDStr);
|
onlyShowComponent(state, OPTION_EDIT+m_typeIDStr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -195,14 +210,16 @@ public class DecisionTreeViewOptions extends ResettableContainer
|
||||||
c.add(m_optionTable);
|
c.add(m_optionTable);
|
||||||
|
|
||||||
// link to add new section
|
// link to add new section
|
||||||
c.add(buildAddLink());
|
c.add(addOptionLink);
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds a container to hold a SectionEditForm and a link
|
* Builds a container to hold a SectionEditForm and a link to return to
|
||||||
* to return to the section list.
|
* the option list.
|
||||||
|
* This container replaces the option table when the "edit" link is
|
||||||
|
* selected {@see buildOptionTable ()} above.
|
||||||
*/
|
*/
|
||||||
protected Container buildOptionEdit () {
|
protected Container buildOptionEdit () {
|
||||||
ColumnPanel c = new ColumnPanel(1);
|
ColumnPanel c = new ColumnPanel(1);
|
||||||
|
|
@ -217,9 +234,11 @@ public class DecisionTreeViewOptions extends ResettableContainer
|
||||||
Label label = (Label)event.getTarget();
|
Label label = (Label)event.getTarget();
|
||||||
|
|
||||||
if (m_selOption.getSelectedKey(state) == null) {
|
if (m_selOption.getSelectedKey(state) == null) {
|
||||||
label.setLabel((String)DecisionTreeUtil.globalize("section_options.add_option").localize());
|
label.setLabel(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.options.add"));
|
||||||
} else {
|
} else {
|
||||||
label.setLabel((String)DecisionTreeUtil.globalize("section_options.edit_option").localize());
|
label.setLabel(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.options.edit"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
@ -229,15 +248,15 @@ public class DecisionTreeViewOptions extends ResettableContainer
|
||||||
c.add(m_optionEdit);
|
c.add(m_optionEdit);
|
||||||
|
|
||||||
c.add(buildViewAllLink());
|
c.add(buildViewAllLink());
|
||||||
// link to add new section
|
c.add(buildAddLink()); // link to add new section
|
||||||
c.add(buildAddLink());
|
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds a container to hold the component to confirm
|
* Builds a container to hold the component to confirm deletion of an option.
|
||||||
* deletion of a section.
|
* This container replaces the option table when the "delete" link is
|
||||||
|
* selected {@see buildOptionTable ()} above.
|
||||||
*/
|
*/
|
||||||
protected Container buildOptionDelete () {
|
protected Container buildOptionDelete () {
|
||||||
ColumnPanel c = new ColumnPanel(1);
|
ColumnPanel c = new ColumnPanel(1);
|
||||||
|
|
@ -245,7 +264,8 @@ public class DecisionTreeViewOptions extends ResettableContainer
|
||||||
c.setBorderColor("#FFFFFF");
|
c.setBorderColor("#FFFFFF");
|
||||||
c.setPadColor("#FFFFFF");
|
c.setPadColor("#FFFFFF");
|
||||||
|
|
||||||
c.add(new Label(DecisionTreeUtil.globalize("section_options.delete_option")));
|
c.add(new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.options.delete")));
|
||||||
m_optionDelete = new DecisionTreeOptionDeleteForm(m_selTree, m_selOption);
|
m_optionDelete = new DecisionTreeOptionDeleteForm(m_selTree, m_selOption);
|
||||||
m_optionDelete.addSubmissionListener ( new FormSubmissionListener () {
|
m_optionDelete.addSubmissionListener ( new FormSubmissionListener () {
|
||||||
public void submitted ( FormSectionEvent e ) {
|
public void submitted ( FormSectionEvent e ) {
|
||||||
|
|
@ -264,7 +284,8 @@ public class DecisionTreeViewOptions extends ResettableContainer
|
||||||
* Utility method to create a link to display the section list.
|
* Utility method to create a link to display the section list.
|
||||||
*/
|
*/
|
||||||
protected ActionLink buildViewAllLink () {
|
protected ActionLink buildViewAllLink () {
|
||||||
ActionLink viewAllLink = new ActionLink( (String) DecisionTreeUtil.globalize("section_options.view_all_options").localize());
|
ActionLink viewAllLink = new ActionLink( DecisionTreeGlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.decisiontree.options.view_all"));
|
||||||
viewAllLink.setClassAttr(ACTION_LINK);
|
viewAllLink.setClassAttr(ACTION_LINK);
|
||||||
viewAllLink.addActionListener( new ActionListener() {
|
viewAllLink.addActionListener( new ActionListener() {
|
||||||
public void actionPerformed ( ActionEvent event ) {
|
public void actionPerformed ( ActionEvent event ) {
|
||||||
|
|
@ -279,13 +300,16 @@ public class DecisionTreeViewOptions extends ResettableContainer
|
||||||
* Utility method to create a link to display the section list.
|
* Utility method to create a link to display the section list.
|
||||||
*/
|
*/
|
||||||
protected ActionLink buildAddLink () {
|
protected ActionLink buildAddLink () {
|
||||||
ActionLink addLink = new ActionLink( (String) DecisionTreeUtil.globalize("section_options.add_new_option").localize()) {
|
ActionLink addLink = new ActionLink( DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.options.add_new")) {
|
||||||
|
@Override
|
||||||
public boolean isVisible(PageState state) {
|
public boolean isVisible(PageState state) {
|
||||||
SecurityManager sm = Utilities.getSecurityManager(state);
|
SecurityManager sm = CMS.getSecurityManager(state);
|
||||||
ContentItem item = (ContentItem)m_selTree.getSelectedObject(state);
|
ContentItem item = (ContentItem)m_selTree.getSelectedObject(state);
|
||||||
|
|
||||||
return super.isVisible(state) &&
|
return super.isVisible(state)
|
||||||
sm.canAccess(state.getRequest(), SecurityManager.EDIT_ITEM,
|
&& sm.canAccess(state.getRequest(),
|
||||||
|
SecurityManager.EDIT_ITEM,
|
||||||
item);
|
item);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -302,6 +326,11 @@ public class DecisionTreeViewOptions extends ResettableContainer
|
||||||
return addLink;
|
return addLink;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param p
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public void register ( Page p ) {
|
public void register ( Page p ) {
|
||||||
super.register(p);
|
super.register(p);
|
||||||
p.addGlobalStateParam(m_moveParameter);
|
p.addGlobalStateParam(m_moveParameter);
|
||||||
|
|
@ -34,6 +34,7 @@ import com.arsdigita.bebop.table.TableColumn;
|
||||||
import com.arsdigita.bebop.table.TableColumnModel;
|
import com.arsdigita.bebop.table.TableColumnModel;
|
||||||
import com.arsdigita.bebop.table.TableModel;
|
import com.arsdigita.bebop.table.TableModel;
|
||||||
import com.arsdigita.bebop.table.TableModelBuilder;
|
import com.arsdigita.bebop.table.TableModelBuilder;
|
||||||
|
import com.arsdigita.cms.CMS;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTree;
|
import com.arsdigita.cms.contenttypes.DecisionTree;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeSection;
|
import com.arsdigita.cms.contenttypes.DecisionTreeSection;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeSectionOption;
|
import com.arsdigita.cms.contenttypes.DecisionTreeSectionOption;
|
||||||
|
|
@ -41,7 +42,7 @@ import com.arsdigita.cms.contenttypes.DecisionTreeSectionOptionCollection;
|
||||||
import com.arsdigita.cms.ContentItem;
|
import com.arsdigita.cms.ContentItem;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.SecurityManager;
|
import com.arsdigita.cms.SecurityManager;
|
||||||
import com.arsdigita.cms.dispatcher.Utilities;
|
import com.arsdigita.cms.contenttypes.util.DecisionTreeGlobalizationUtil;
|
||||||
import com.arsdigita.util.LockableImpl;
|
import com.arsdigita.util.LockableImpl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -53,12 +54,13 @@ import com.arsdigita.util.LockableImpl;
|
||||||
*/
|
*/
|
||||||
public class DecisionTreeOptionTable extends Table
|
public class DecisionTreeOptionTable extends Table
|
||||||
{
|
{
|
||||||
// column headings
|
|
||||||
public static final String COL_SECTION = "Section";
|
// match columns by (symbolic) index, makes for easier reordering
|
||||||
public static final String COL_OPTION = "Option";
|
public static final int COL_IDX_SECTION = 0;
|
||||||
public static final String COL_EDIT = "Edit";
|
public static final int COL_IDX_OPTION = 1;
|
||||||
public static final String COL_MOVE = "Move";
|
public static final int COL_IDX_EDIT = 2;
|
||||||
public static final String COL_DEL = "Delete";
|
public static final int COL_IDX_MOVE = 3;
|
||||||
|
public static final int COL_IDX_DEL = 4;
|
||||||
|
|
||||||
private ItemSelectionModel m_selTree;
|
private ItemSelectionModel m_selTree;
|
||||||
private ItemSelectionModel m_selOption;
|
private ItemSelectionModel m_selOption;
|
||||||
|
|
@ -80,11 +82,31 @@ public class DecisionTreeOptionTable extends Table
|
||||||
m_moveOption = moveOption;
|
m_moveOption = moveOption;
|
||||||
|
|
||||||
TableColumnModel model = getColumnModel();
|
TableColumnModel model = getColumnModel();
|
||||||
model.add(new TableColumn(0, COL_SECTION));
|
model.add(new TableColumn(
|
||||||
model.add(new TableColumn(1, COL_OPTION));
|
COL_IDX_SECTION,
|
||||||
model.add(new TableColumn(2, COL_EDIT));
|
new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
model.add(new TableColumn(3, COL_MOVE));
|
"cms.contenttypes.ui.decisiontree.options.table.header_section")
|
||||||
model.add(new TableColumn(4, COL_DEL));
|
) ));
|
||||||
|
model.add(new TableColumn(
|
||||||
|
COL_IDX_OPTION,
|
||||||
|
new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.options.table.header_option")
|
||||||
|
) ));
|
||||||
|
model.add(new TableColumn(
|
||||||
|
COL_IDX_EDIT,
|
||||||
|
new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.options.table.header_edit")
|
||||||
|
) ));
|
||||||
|
model.add(new TableColumn(
|
||||||
|
COL_IDX_MOVE,
|
||||||
|
new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.options.table.header_move")
|
||||||
|
) ));
|
||||||
|
model.add(new TableColumn(
|
||||||
|
COL_IDX_DEL,
|
||||||
|
new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.options.table.header_delete")
|
||||||
|
) ));
|
||||||
|
|
||||||
model.get(2).setCellRenderer(new SectionTableCellRenderer(true));
|
model.get(2).setCellRenderer(new SectionTableCellRenderer(true));
|
||||||
model.get(3).setCellRenderer(new SectionTableCellRenderer(true));
|
model.get(3).setCellRenderer(new SectionTableCellRenderer(true));
|
||||||
|
|
@ -96,19 +118,24 @@ public class DecisionTreeOptionTable extends Table
|
||||||
public void cellSelected ( TableActionEvent event ) {
|
public void cellSelected ( TableActionEvent event ) {
|
||||||
PageState state = event.getPageState();
|
PageState state = event.getPageState();
|
||||||
|
|
||||||
TableColumn col = getColumnModel()
|
TableColumn col = getColumnModel().get(event.getColumn()
|
||||||
.get(event.getColumn().intValue());
|
.intValue());
|
||||||
String colName = (String)col.getHeaderValue();
|
int colIndex = event.getColumn();
|
||||||
|
|
||||||
if ( COL_MOVE.equals(colName) ) {
|
if ( colIndex == COL_IDX_MOVE ) {
|
||||||
if ( m_moveOption.getSelectedKey(state) == null ) {
|
if ( m_moveOption.getSelectedKey(state) == null ) {
|
||||||
m_moveOption.setSelectedKey(state, m_selOption.getSelectedKey(state));
|
m_moveOption.setSelectedKey(
|
||||||
|
state,
|
||||||
|
m_selOption.getSelectedKey(state));
|
||||||
} else {
|
} else {
|
||||||
BigDecimal id = (BigDecimal) m_moveOption.getSelectedKey(state);
|
BigDecimal id = (BigDecimal) m_moveOption
|
||||||
DecisionTreeSectionOption option = new DecisionTreeSectionOption(id);
|
.getSelectedKey(state);
|
||||||
|
DecisionTreeSectionOption option = new
|
||||||
|
DecisionTreeSectionOption(id);
|
||||||
|
|
||||||
BigDecimal dest = new BigDecimal((String) event.getRowKey());
|
BigDecimal dest = new BigDecimal((String) event.getRowKey());
|
||||||
DecisionTreeSectionOption destOption = new DecisionTreeSectionOption(dest);
|
DecisionTreeSectionOption destOption = new
|
||||||
|
DecisionTreeSectionOption(dest);
|
||||||
|
|
||||||
DecisionTreeSection section = option.getSection();
|
DecisionTreeSection section = option.getSection();
|
||||||
|
|
||||||
|
|
@ -143,15 +170,16 @@ public class DecisionTreeOptionTable extends Table
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The model builder to generate a suitable model for the OptionTable
|
* Internal class model builder to generate a suitable model for the
|
||||||
|
* OptionTable.
|
||||||
*/
|
*/
|
||||||
protected class OptionTableModelBuilder extends LockableImpl
|
protected class OptionTableModelBuilder extends LockableImpl
|
||||||
implements TableModelBuilder
|
implements TableModelBuilder {
|
||||||
{
|
|
||||||
protected ItemSelectionModel m_selTree;
|
protected ItemSelectionModel m_selTree;
|
||||||
protected ItemSelectionModel m_moveOption;
|
protected ItemSelectionModel m_moveOption;
|
||||||
|
|
||||||
public OptionTableModelBuilder(ItemSelectionModel selTree, ItemSelectionModel moveOption) {
|
public OptionTableModelBuilder(ItemSelectionModel selTree,
|
||||||
|
ItemSelectionModel moveOption) {
|
||||||
m_selTree = selTree;
|
m_selTree = selTree;
|
||||||
m_moveOption = moveOption;
|
m_moveOption = moveOption;
|
||||||
}
|
}
|
||||||
|
|
@ -163,8 +191,10 @@ public class DecisionTreeOptionTable extends Table
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected class OptionTableModel implements TableModel
|
/**
|
||||||
{
|
* Internal class
|
||||||
|
*/
|
||||||
|
protected class OptionTableModel implements TableModel {
|
||||||
private TableColumnModel m_colModel;
|
private TableColumnModel m_colModel;
|
||||||
private PageState m_state;
|
private PageState m_state;
|
||||||
private DecisionTreeSectionOptionCollection m_options;
|
private DecisionTreeSectionOptionCollection m_options;
|
||||||
|
|
@ -172,7 +202,8 @@ public class DecisionTreeOptionTable extends Table
|
||||||
private DecisionTreeSectionOption m_option;
|
private DecisionTreeSectionOption m_option;
|
||||||
|
|
||||||
/** Constructor. */
|
/** Constructor. */
|
||||||
public OptionTableModel(Table table, PageState state, DecisionTree tree, ItemSelectionModel moveOption) {
|
public OptionTableModel(Table table, PageState state, DecisionTree tree,
|
||||||
|
ItemSelectionModel moveOption) {
|
||||||
m_colModel = table.getColumnModel();
|
m_colModel = table.getColumnModel();
|
||||||
m_state = state;
|
m_state = state;
|
||||||
m_options = tree.getOptions();
|
m_options = tree.getOptions();
|
||||||
|
|
@ -195,32 +226,53 @@ public class DecisionTreeOptionTable extends Table
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return the data element for the given column and the current row. */
|
/**
|
||||||
|
* Return the data element for the given column and the current row.
|
||||||
|
*/
|
||||||
public Object getElementAt(int columnIndex) {
|
public Object getElementAt(int columnIndex) {
|
||||||
if (m_colModel == null) { return null; }
|
if (m_colModel == null) { return null; }
|
||||||
|
|
||||||
// match columns by name... makes for easier reordering
|
// match columns by (symbolic) index, makes for easier reordering
|
||||||
TableColumn col = m_colModel.get(columnIndex);
|
if ( columnIndex == COL_IDX_SECTION ) {
|
||||||
String colName = (String) col.getHeaderValue();
|
|
||||||
|
|
||||||
if (COL_SECTION.equals(colName)) {
|
|
||||||
return m_option.getSection().getTitle();
|
return m_option.getSection().getTitle();
|
||||||
} else if (COL_OPTION.equals(colName)) {
|
} else if (columnIndex == COL_IDX_OPTION ) {
|
||||||
return m_option.getLabel();
|
return m_option.getLabel();
|
||||||
} else if (COL_EDIT.equals(colName)) {
|
} else if ( columnIndex == COL_IDX_EDIT ) {
|
||||||
return "edit";
|
return new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
} else if (COL_MOVE.equals(colName)) {
|
"cms.contenttypes.ui.decisiontree.options.table.link_edit")
|
||||||
|
);
|
||||||
|
} else if ( columnIndex == COL_IDX_MOVE ) {
|
||||||
if ( m_moveOption.getSelectedKey(m_state) == null ) {
|
if ( m_moveOption.getSelectedKey(m_state) == null ) {
|
||||||
return "move";
|
return new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.options.table.link_move")
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
DecisionTreeSectionOption src = new DecisionTreeSectionOption(new BigDecimal((String) m_moveOption.getSelectedKey(m_state)));
|
DecisionTreeSectionOption src =
|
||||||
if (m_option.getSection().equals(src.getSection()))
|
new DecisionTreeSectionOption(
|
||||||
return "move below here";
|
new BigDecimal((String)m_moveOption
|
||||||
|
.getSelectedKey(m_state)));
|
||||||
|
if (m_option.getSection().equals(src.getSection())) {
|
||||||
|
|
||||||
|
if ( m_option.getLabel().equals(src.getLabel() ) )
|
||||||
|
return new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.options.table.link_no_move")
|
||||||
|
);
|
||||||
else
|
else
|
||||||
return "";
|
// return "move below here";
|
||||||
|
return new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.options.table.link_move_below")
|
||||||
|
);
|
||||||
|
} else
|
||||||
|
// no link should be provided for options not belonging
|
||||||
|
// to the same section as the option to be moved
|
||||||
|
// return anything different from Label to prevent
|
||||||
|
// creation of an ActionLink
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
} else if (COL_DEL.equals(colName)) {
|
} else if ( columnIndex == COL_IDX_DEL ) {
|
||||||
return "delete";
|
return new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.options.table.link_delete")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
@ -245,29 +297,41 @@ public class DecisionTreeOptionTable extends Table
|
||||||
m_active = active;
|
m_active = active;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param table
|
||||||
|
* @param state
|
||||||
|
* @param value
|
||||||
|
* @param isSelected
|
||||||
|
* @param key
|
||||||
|
* @param row
|
||||||
|
* @param column
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public Component getComponent(Table table, PageState state,
|
public Component getComponent(Table table, PageState state,
|
||||||
Object value, boolean isSelected,
|
Object value, boolean isSelected,
|
||||||
Object key, int row, int column) {
|
Object key, int row, int column) {
|
||||||
Component ret = null;
|
Component ret = null;
|
||||||
SecurityManager sm = Utilities.getSecurityManager(state);
|
SecurityManager sm = CMS.getSecurityManager(state);
|
||||||
ContentItem item = (ContentItem)m_selTree.getSelectedObject(state);
|
ContentItem item = (ContentItem)m_selTree.getSelectedObject(state);
|
||||||
|
|
||||||
boolean active = m_active &&
|
boolean active = m_active && sm.canAccess(state.getRequest(),
|
||||||
sm.canAccess(state.getRequest(), SecurityManager.EDIT_ITEM,
|
SecurityManager.EDIT_ITEM,
|
||||||
item);
|
item);
|
||||||
|
|
||||||
if (value instanceof Component) {
|
|
||||||
ret = (Component)value;
|
|
||||||
} else {
|
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
ret = new Label("", false);
|
ret = new Label("", false);
|
||||||
} else {
|
} else if (value instanceof Label) {
|
||||||
if (active) {
|
if (active) {
|
||||||
ret = new ControlLink(value.toString());
|
// ret = new ControlLink(value.toString());
|
||||||
|
ret = new ControlLink( (Component)value );
|
||||||
} else {
|
} else {
|
||||||
ret = new Label(value.toString());
|
// ret = new Label(value.toString());
|
||||||
}
|
ret = (Component)value;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// last resort, should never happen
|
||||||
|
ret = (Component)value;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
||||||
|
|
@ -22,22 +22,21 @@ import com.arsdigita.bebop.FormProcessException;
|
||||||
import com.arsdigita.bebop.event.ParameterEvent;
|
import com.arsdigita.bebop.event.ParameterEvent;
|
||||||
import com.arsdigita.bebop.parameters.GlobalizedParameterListener;
|
import com.arsdigita.bebop.parameters.GlobalizedParameterListener;
|
||||||
import com.arsdigita.bebop.parameters.ParameterData;
|
import com.arsdigita.bebop.parameters.ParameterData;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeUtil;
|
import com.arsdigita.cms.contenttypes.util.DecisionTreeGlobalizationUtil;
|
||||||
import com.arsdigita.globalization.GlobalizedMessage;
|
import com.arsdigita.globalization.GlobalizedMessage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verifies that the
|
* Verifies that the parameter's value contains only letters, digits, "-" and "_".
|
||||||
* parameter's value contains only letters, digits, "-" and "_".
|
|
||||||
*
|
*
|
||||||
* @author Carsten Clasohm
|
* @author Carsten Clasohm
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
**/
|
*/
|
||||||
|
|
||||||
public class DecisionTreeParameterNameValidationListener
|
public class DecisionTreeParameterNameValidationListener
|
||||||
extends GlobalizedParameterListener {
|
extends GlobalizedParameterListener {
|
||||||
|
|
||||||
public DecisionTreeParameterNameValidationListener() {
|
public DecisionTreeParameterNameValidationListener() {
|
||||||
setError(DecisionTreeUtil.globalize("error.parameter_name_characters"));
|
setError(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.error.parameter_name_characters"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public DecisionTreeParameterNameValidationListener(GlobalizedMessage error) {
|
public DecisionTreeParameterNameValidationListener(GlobalizedMessage error) {
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ import com.arsdigita.bebop.form.TextField;
|
||||||
import com.arsdigita.bebop.parameters.StringParameter;
|
import com.arsdigita.bebop.parameters.StringParameter;
|
||||||
import com.arsdigita.bebop.parameters.TrimmedStringParameter;
|
import com.arsdigita.bebop.parameters.TrimmedStringParameter;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTree;
|
import com.arsdigita.cms.contenttypes.DecisionTree;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeUtil;
|
import com.arsdigita.cms.contenttypes.util.DecisionTreeGlobalizationUtil;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
|
|
||||||
|
|
@ -65,17 +65,20 @@ public class DecisionTreePropertiesForm extends BasicPageForm implements
|
||||||
addSubmissionListener(this);
|
addSubmissionListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected void addWidgets() {
|
protected void addWidgets() {
|
||||||
super.addWidgets();
|
super.addWidgets();
|
||||||
|
|
||||||
add(new Label(DecisionTreeUtil.globalize("form_label.description")));
|
add(new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.properties.form.description_label")));
|
||||||
|
|
||||||
TextArea description = new TextArea(new TrimmedStringParameter(DESCRIPTION));
|
TextArea description = new TextArea(new TrimmedStringParameter(DESCRIPTION));
|
||||||
description.setRows(5);
|
description.setRows(5);
|
||||||
description.setCols(30);
|
description.setCols(30);
|
||||||
add(description);
|
add(description);
|
||||||
|
|
||||||
add(new Label(DecisionTreeUtil.globalize("form_label.cancel_url")));
|
add(new Label(DecisionTreeGlobalizationUtil.globalize
|
||||||
|
("cms.contenttypes.ui.decisiontree.properties.cancel_url")));
|
||||||
TextField cancelURL = new TextField(new StringParameter(CANCEL_URL));
|
TextField cancelURL = new TextField(new StringParameter(CANCEL_URL));
|
||||||
cancelURL.setSize(60);
|
cancelURL.setSize(60);
|
||||||
add(cancelURL);
|
add(cancelURL);
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,10 @@
|
||||||
package com.arsdigita.cms.contenttypes.ui;
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
import com.arsdigita.bebop.Component;
|
import com.arsdigita.bebop.Component;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeUtil;
|
|
||||||
import com.arsdigita.cms.ContentItem;
|
import com.arsdigita.cms.ContentItem;
|
||||||
import com.arsdigita.cms.ContentPage;
|
import com.arsdigita.cms.ContentPage;
|
||||||
|
import com.arsdigita.cms.ContentSection;
|
||||||
|
import com.arsdigita.cms.contenttypes.util.DecisionTreeGlobalizationUtil;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
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;
|
||||||
|
|
@ -44,6 +45,7 @@ public class DecisionTreePropertiesStep extends SimpleEditStep {
|
||||||
|
|
||||||
public DecisionTreePropertiesStep(ItemSelectionModel itemModel,
|
public DecisionTreePropertiesStep(ItemSelectionModel itemModel,
|
||||||
AuthoringKitWizard parent) {
|
AuthoringKitWizard parent) {
|
||||||
|
|
||||||
super(itemModel, parent);
|
super(itemModel, parent);
|
||||||
|
|
||||||
setDefaultEditKey(EDIT_SHEET_NAME);
|
setDefaultEditKey(EDIT_SHEET_NAME);
|
||||||
|
|
@ -51,27 +53,42 @@ public class DecisionTreePropertiesStep extends SimpleEditStep {
|
||||||
BasicPageForm editSheet;
|
BasicPageForm editSheet;
|
||||||
|
|
||||||
editSheet = new DecisionTreePropertiesForm( itemModel, this );
|
editSheet = new DecisionTreePropertiesForm( itemModel, this );
|
||||||
add(EDIT_SHEET_NAME, "Edit", new WorkflowLockedComponentAccess(editSheet, itemModel),
|
add(EDIT_SHEET_NAME,
|
||||||
|
GlobalizationUtil.globalize("cms.ui.edit"),
|
||||||
|
new WorkflowLockedComponentAccess(editSheet, itemModel),
|
||||||
editSheet.getSaveCancelSection().getCancelButton() );
|
editSheet.getSaveCancelSection().getCancelButton() );
|
||||||
|
|
||||||
setDisplayComponent(getPropertySheet(itemModel));
|
setDisplayComponent(getPropertySheet(itemModel));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a component that displays the properties of the
|
* Returns a component that displays the properties of the DecisionTree
|
||||||
* Article specified by the ItemSelectionModel passed in.
|
* specified by the ItemSelectionModel passed in.
|
||||||
|
*
|
||||||
* @param itemModel The ItemSelectionModel to use
|
* @param itemModel The ItemSelectionModel to use
|
||||||
* @pre itemModel != null
|
* @pre itemModel != null
|
||||||
* @return A component to display the state of the basic properties
|
* @return A component to display the state of the basic
|
||||||
* of the release
|
* properties of the release
|
||||||
*/
|
*/
|
||||||
public static Component getPropertySheet( ItemSelectionModel itemModel ) {
|
public static Component getPropertySheet( ItemSelectionModel itemModel ) {
|
||||||
|
|
||||||
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
||||||
|
|
||||||
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.name"), ContentItem.NAME);
|
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.title"),
|
||||||
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.title"), ContentPage.TITLE);
|
ContentPage.TITLE);
|
||||||
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.description"), ContentPage.DESCRIPTION);
|
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.name"),
|
||||||
sheet.add(DecisionTreeUtil.globalize("properties.cancel_url"), CANCEL_URL);
|
ContentItem.NAME);
|
||||||
|
if (!ContentSection.getConfig().getHideLaunchDate()) {
|
||||||
|
sheet.add(GlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.launch_date"),
|
||||||
|
ContentPage.LAUNCH_DATE,
|
||||||
|
new LaunchDateAttributeFormatter() );
|
||||||
|
}
|
||||||
|
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.description"),
|
||||||
|
ContentPage.DESCRIPTION);
|
||||||
|
sheet.add(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.properties.cancel_url"),
|
||||||
|
CANCEL_URL);
|
||||||
|
|
||||||
return sheet;
|
return sheet;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,8 @@ import com.arsdigita.bebop.event.FormProcessListener;
|
||||||
import com.arsdigita.bebop.event.FormSectionEvent;
|
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||||
import com.arsdigita.bebop.event.FormSubmissionListener;
|
import com.arsdigita.bebop.event.FormSubmissionListener;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTree;
|
import com.arsdigita.cms.contenttypes.DecisionTree;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeUtil;
|
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeSection;
|
import com.arsdigita.cms.contenttypes.DecisionTreeSection;
|
||||||
|
import com.arsdigita.cms.contenttypes.util.DecisionTreeGlobalizationUtil;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.util.Assert;
|
import com.arsdigita.util.Assert;
|
||||||
|
|
||||||
|
|
@ -44,18 +44,24 @@ import com.arsdigita.util.Assert;
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
public class DecisionTreeSectionDeleteForm extends Form
|
public class DecisionTreeSectionDeleteForm extends Form
|
||||||
implements FormInitListener, FormSubmissionListener, FormProcessListener
|
implements FormInitListener,
|
||||||
{
|
FormSubmissionListener,
|
||||||
|
FormProcessListener {
|
||||||
private final static Logger log = Logger.getLogger(
|
private final static Logger log = Logger.getLogger(
|
||||||
DecisionTreeSectionDeleteForm.class.getName());
|
DecisionTreeSectionDeleteForm.class.getName());
|
||||||
|
|
||||||
protected ItemSelectionModel m_selTree;
|
protected ItemSelectionModel m_selTree;
|
||||||
protected ItemSelectionModel m_selSection;
|
protected ItemSelectionModel m_selSection;
|
||||||
protected SaveCancelSection m_saveCancelSection;
|
protected SaveCancelSection m_saveCancelSection;
|
||||||
|
/** Label denoting the name of the section to delete. */
|
||||||
private Label m_sectionNameLabel;
|
private Label m_sectionNameLabel;
|
||||||
|
/** Value containin the name of the section to be deleted. Will be passed
|
||||||
|
* into the Label field above using string formatter */
|
||||||
|
private String[] m_sectionNameValue = new String[1];
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param selArticle
|
* @param selArticle
|
||||||
* @param selSection
|
* @param selSection
|
||||||
|
|
@ -73,40 +79,62 @@ public class DecisionTreeSectionDeleteForm extends Form
|
||||||
panel.setColumnWidth(2, "80%");
|
panel.setColumnWidth(2, "80%");
|
||||||
panel.setWidth("100%");
|
panel.setWidth("100%");
|
||||||
|
|
||||||
m_sectionNameLabel = new Label ("Section Name");
|
m_sectionNameLabel = new Label ( // Section name
|
||||||
|
DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.sections.delete_section_msg",
|
||||||
|
m_sectionNameValue));
|
||||||
add(m_sectionNameLabel, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
add(m_sectionNameLabel, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
||||||
addSaveCancelSection();
|
addSaveCancelSection(); // add a save/cancel section to the form
|
||||||
|
|
||||||
addInitListener(this);
|
addInitListener(this);
|
||||||
addSubmissionListener(this);
|
addSubmissionListener(this);
|
||||||
addProcessListener(this);
|
addProcessListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create and adjust the label(s) of the SaveCancel button bar.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
protected SaveCancelSection addSaveCancelSection () {
|
protected SaveCancelSection addSaveCancelSection () {
|
||||||
m_saveCancelSection = new SaveCancelSection();
|
m_saveCancelSection = new SaveCancelSection();
|
||||||
m_saveCancelSection.getSaveButton().setButtonLabel("Delete");
|
m_saveCancelSection.getSaveButton().setButtonLabel(
|
||||||
|
DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.sections.delete_button"));
|
||||||
add(m_saveCancelSection, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
add(m_saveCancelSection, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
||||||
return m_saveCancelSection;
|
return m_saveCancelSection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param event
|
||||||
|
* @throws FormProcessException
|
||||||
|
*/
|
||||||
public void init ( FormSectionEvent event ) throws FormProcessException {
|
public void init ( FormSectionEvent event ) throws FormProcessException {
|
||||||
|
|
||||||
|
String sectionTitle = " ";
|
||||||
PageState state = event.getPageState();
|
PageState state = event.getPageState();
|
||||||
|
|
||||||
DecisionTreeSection section =
|
DecisionTreeSection section = (DecisionTreeSection)
|
||||||
(DecisionTreeSection)m_selSection.getSelectedObject(state);
|
m_selSection.getSelectedObject(state);
|
||||||
|
|
||||||
if ( section == null ) {
|
if ( section == null ) {
|
||||||
log.error("No section selected");
|
log.error("No section selected");
|
||||||
} else {
|
} else {
|
||||||
m_sectionNameLabel.setLabel(section.getTitle(),state);
|
// Just be be sure, null should never happen because section it
|
||||||
|
// meant to have a title.
|
||||||
|
if (section.getTitle() != null) sectionTitle = section.getTitle();
|
||||||
}
|
}
|
||||||
|
m_sectionNameValue[0] = sectionTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void submitted ( FormSectionEvent event ) throws FormProcessException {
|
public void submitted ( FormSectionEvent event ) throws FormProcessException {
|
||||||
PageState state = event.getPageState();
|
PageState state = event.getPageState();
|
||||||
|
|
||||||
if ( m_saveCancelSection.getCancelButton().isSelected(state) ) {
|
if ( m_saveCancelSection.getCancelButton().isSelected(state) ) {
|
||||||
throw new FormProcessException( (String) DecisionTreeUtil.globalize("tree_section.submission_cancelled").localize());
|
throw new FormProcessException( (String)
|
||||||
|
DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.sections.form.submission_cancelled")
|
||||||
|
.localize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -121,6 +149,6 @@ public class DecisionTreeSectionDeleteForm extends Form
|
||||||
|
|
||||||
article.removeSection(section);
|
article.removeSection(section);
|
||||||
|
|
||||||
log.info("section " + m_selSection.getSelectedKey(state) + " delete");
|
log.debug("section " + m_selSection.getSelectedKey(state) + " delete");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,11 +38,10 @@ import com.arsdigita.bebop.event.FormSubmissionListener;
|
||||||
import com.arsdigita.bebop.form.TextField;
|
import com.arsdigita.bebop.form.TextField;
|
||||||
import com.arsdigita.bebop.parameters.BigDecimalParameter;
|
import com.arsdigita.bebop.parameters.BigDecimalParameter;
|
||||||
import com.arsdigita.bebop.parameters.NotEmptyValidationListener;
|
import com.arsdigita.bebop.parameters.NotEmptyValidationListener;
|
||||||
import com.arsdigita.bebop.parameters.StringIsLettersOrDigitsValidationListener;
|
|
||||||
import com.arsdigita.bebop.parameters.TrimmedStringParameter;
|
import com.arsdigita.bebop.parameters.TrimmedStringParameter;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTree;
|
import com.arsdigita.cms.contenttypes.DecisionTree;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeSection;
|
import com.arsdigita.cms.contenttypes.DecisionTreeSection;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeUtil;
|
import com.arsdigita.cms.contenttypes.util.DecisionTreeGlobalizationUtil;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.TextAsset;
|
import com.arsdigita.cms.TextAsset;
|
||||||
import com.arsdigita.cms.ui.CMSDHTMLEditor;
|
import com.arsdigita.cms.ui.CMSDHTMLEditor;
|
||||||
|
|
@ -51,7 +50,7 @@ import com.arsdigita.util.UncheckedWrapperException;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Form to edit a TreeSection for a DecisionTree.
|
* Form to edit a Section of a DecisionTree.
|
||||||
*
|
*
|
||||||
* @author Carsten Clasohm
|
* @author Carsten Clasohm
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
|
|
@ -69,7 +68,7 @@ public class DecisionTreeSectionEditForm extends Form
|
||||||
|
|
||||||
private BigDecimalParameter m_instructionsParam;
|
private BigDecimalParameter m_instructionsParam;
|
||||||
private ItemSelectionModel m_selInstructions;
|
private ItemSelectionModel m_selInstructions;
|
||||||
private DecisionTreeViewSections m_container;
|
private DecisionTreeSectionStep m_container;
|
||||||
|
|
||||||
private SaveCancelSection m_saveCancelSection;
|
private SaveCancelSection m_saveCancelSection;
|
||||||
|
|
||||||
|
|
@ -80,7 +79,7 @@ public class DecisionTreeSectionEditForm extends Form
|
||||||
private static final String INSTRUCTIONS_PARAM = "instructionsParam";
|
private static final String INSTRUCTIONS_PARAM = "instructionsParam";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor creates an emnpty section form.
|
||||||
*
|
*
|
||||||
* @param selTree the current article
|
* @param selTree the current article
|
||||||
* @param selSection the current section
|
* @param selSection the current section
|
||||||
|
|
@ -90,7 +89,7 @@ public class DecisionTreeSectionEditForm extends Form
|
||||||
this(selTree, selSection, null);
|
this(selTree, selSection, null);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor creates an emnpty section form.
|
||||||
*
|
*
|
||||||
* @param selArticle the current article
|
* @param selArticle the current article
|
||||||
* @param selSection the current section
|
* @param selSection the current section
|
||||||
|
|
@ -98,7 +97,7 @@ public class DecisionTreeSectionEditForm extends Form
|
||||||
*/
|
*/
|
||||||
public DecisionTreeSectionEditForm(ItemSelectionModel selTree,
|
public DecisionTreeSectionEditForm(ItemSelectionModel selTree,
|
||||||
ItemSelectionModel selSection,
|
ItemSelectionModel selSection,
|
||||||
DecisionTreeViewSections container) {
|
DecisionTreeSectionStep container) {
|
||||||
super("SectionEditForm", new ColumnPanel(2));
|
super("SectionEditForm", new ColumnPanel(2));
|
||||||
m_selTree = selTree;
|
m_selTree = selTree;
|
||||||
m_selSection = selSection;
|
m_selSection = selSection;
|
||||||
|
|
@ -150,18 +149,21 @@ public class DecisionTreeSectionEditForm extends Form
|
||||||
* Add form widgets for a Section.
|
* Add form widgets for a Section.
|
||||||
*/
|
*/
|
||||||
protected void addWidgets() {
|
protected void addWidgets() {
|
||||||
add(new Label(DecisionTreeUtil.globalize("form_label.title")));
|
add(new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.sections.form.title_label")));
|
||||||
TextField titleWidget = new TextField(new TrimmedStringParameter(TITLE));
|
TextField titleWidget = new TextField(new TrimmedStringParameter(TITLE));
|
||||||
titleWidget.addValidationListener(new NotEmptyValidationListener());
|
titleWidget.addValidationListener(new NotEmptyValidationListener());
|
||||||
add(titleWidget);
|
add(titleWidget);
|
||||||
|
|
||||||
add(new Label(DecisionTreeUtil.globalize("form_label.parameter_name")));
|
add(new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.sections.form.parameter_name_label")));
|
||||||
TextField parameterWidget = new TextField(new TrimmedStringParameter(PARAMETER_NAME));
|
TextField parameterWidget = new TextField(new TrimmedStringParameter(PARAMETER_NAME));
|
||||||
parameterWidget.addValidationListener(new NotEmptyValidationListener());
|
parameterWidget.addValidationListener(new NotEmptyValidationListener());
|
||||||
parameterWidget.addValidationListener(new DecisionTreeParameterNameValidationListener());
|
parameterWidget.addValidationListener(new DecisionTreeParameterNameValidationListener());
|
||||||
add(parameterWidget);
|
add(parameterWidget);
|
||||||
|
|
||||||
add(new Label(DecisionTreeUtil.globalize("form_label.instructions")),
|
add(new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.sections.form.instructions_label")),
|
||||||
ColumnPanel.LEFT | ColumnPanel.FULL_WIDTH);
|
ColumnPanel.LEFT | ColumnPanel.FULL_WIDTH);
|
||||||
CMSDHTMLEditor textWidget =
|
CMSDHTMLEditor textWidget =
|
||||||
new CMSDHTMLEditor(new TrimmedStringParameter(INSTRUCTIONS));
|
new CMSDHTMLEditor(new TrimmedStringParameter(INSTRUCTIONS));
|
||||||
|
|
@ -217,11 +219,11 @@ public class DecisionTreeSectionEditForm extends Form
|
||||||
if ( m_saveCancelSection.getCancelButton()
|
if ( m_saveCancelSection.getCancelButton()
|
||||||
.isSelected(state) && m_container != null) {
|
.isSelected(state) && m_container != null) {
|
||||||
m_container.onlyShowComponent(
|
m_container.onlyShowComponent(
|
||||||
state, DecisionTreeViewSections.SECTION_TABLE +
|
state, DecisionTreeSectionStep.SECTION_TABLE +
|
||||||
m_container.getTypeIDStr());
|
m_container.getTypeIDStr());
|
||||||
throw new FormProcessException(
|
throw new FormProcessException(
|
||||||
(String)DecisionTreeUtil
|
(String)DecisionTreeGlobalizationUtil.globalize(
|
||||||
.globalize("tree_section.submission_cancelled")
|
"cms.contenttypes.ui.decisiontree.sections.form.submission_cancelled")
|
||||||
.localize());
|
.localize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -273,7 +275,7 @@ public class DecisionTreeSectionEditForm extends Form
|
||||||
if ( m_container != null) {
|
if ( m_container != null) {
|
||||||
m_container.onlyShowComponent(
|
m_container.onlyShowComponent(
|
||||||
state,
|
state,
|
||||||
DecisionTreeViewSections.SECTION_TABLE +
|
DecisionTreeSectionStep.SECTION_TABLE +
|
||||||
m_container.getTypeIDStr());
|
m_container.getTypeIDStr());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,15 +32,14 @@ import com.arsdigita.bebop.event.PrintEvent;
|
||||||
import com.arsdigita.bebop.event.PrintListener;
|
import com.arsdigita.bebop.event.PrintListener;
|
||||||
import com.arsdigita.bebop.event.TableActionEvent;
|
import com.arsdigita.bebop.event.TableActionEvent;
|
||||||
import com.arsdigita.bebop.event.TableActionListener;
|
import com.arsdigita.bebop.event.TableActionListener;
|
||||||
import com.arsdigita.bebop.table.TableColumn;
|
import com.arsdigita.cms.CMS;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTree;
|
import com.arsdigita.cms.contenttypes.DecisionTree;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeUtil;
|
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeSection;
|
import com.arsdigita.cms.contenttypes.DecisionTreeSection;
|
||||||
|
import com.arsdigita.cms.contenttypes.util.DecisionTreeGlobalizationUtil;
|
||||||
import com.arsdigita.cms.ContentItem;
|
import com.arsdigita.cms.ContentItem;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.SecurityManager;
|
import com.arsdigita.cms.SecurityManager;
|
||||||
import com.arsdigita.cms.contenttypes.ui.ResettableContainer;
|
import com.arsdigita.cms.contenttypes.ui.ResettableContainer;
|
||||||
import com.arsdigita.cms.dispatcher.Utilities;
|
|
||||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
import com.arsdigita.util.Assert;
|
import com.arsdigita.util.Assert;
|
||||||
|
|
||||||
|
|
@ -54,7 +53,7 @@ import com.arsdigita.util.Assert;
|
||||||
* @author Carsten Clasohm
|
* @author Carsten Clasohm
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
public class DecisionTreeViewSections extends ResettableContainer
|
public class DecisionTreeSectionStep extends ResettableContainer
|
||||||
{
|
{
|
||||||
/** id keys for each editing panel */
|
/** id keys for each editing panel */
|
||||||
public static final String SECTION_TABLE = "sec_tbl";
|
public static final String SECTION_TABLE = "sec_tbl";
|
||||||
|
|
@ -76,7 +75,12 @@ public class DecisionTreeViewSections extends ResettableContainer
|
||||||
|
|
||||||
private String m_typeIDStr;
|
private String m_typeIDStr;
|
||||||
|
|
||||||
public DecisionTreeViewSections (ItemSelectionModel selTree,
|
/**
|
||||||
|
*
|
||||||
|
* @param selTree
|
||||||
|
* @param wizard
|
||||||
|
*/
|
||||||
|
public DecisionTreeSectionStep (ItemSelectionModel selTree,
|
||||||
AuthoringKitWizard wizard) {
|
AuthoringKitWizard wizard) {
|
||||||
super();
|
super();
|
||||||
m_selTree = selTree;
|
m_selTree = selTree;
|
||||||
|
|
@ -110,24 +114,24 @@ public class DecisionTreeViewSections extends ResettableContainer
|
||||||
|
|
||||||
m_sectionTable.setSectionModel(m_selSection);
|
m_sectionTable.setSectionModel(m_selSection);
|
||||||
|
|
||||||
Label emptyView = new Label(DecisionTreeUtil
|
Label emptyView = new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
.globalize("tree_sections.no_sections_yet"));
|
"cms.contenttypes.ui.decisiontree.sections.no_sections_yet"));
|
||||||
m_sectionTable.setEmptyView(emptyView);
|
m_sectionTable.setEmptyView(emptyView);
|
||||||
|
|
||||||
// handle clicks to delete a Section
|
// handle clicks to edit, delete or make a Section first
|
||||||
m_sectionTable.addTableActionListener (new TableActionListener () {
|
m_sectionTable.addTableActionListener (new TableActionListener () {
|
||||||
public void cellSelected (TableActionEvent event) {
|
public void cellSelected (TableActionEvent event) {
|
||||||
|
|
||||||
PageState state = event.getPageState();
|
PageState state = event.getPageState();
|
||||||
|
|
||||||
TableColumn col = m_sectionTable.getColumnModel()
|
int col = event.getColumn();
|
||||||
.get(event.getColumn().intValue());
|
if ( col == DecisionTreeSectionTable.COL_IDX_DEL ) {
|
||||||
String colName = (String)col.getHeaderValue();
|
|
||||||
|
|
||||||
if (DecisionTreeSectionTable.COL_DEL.equals(colName)) {
|
|
||||||
onlyShowComponent(state, SECTION_DEL+m_typeIDStr);
|
onlyShowComponent(state, SECTION_DEL+m_typeIDStr);
|
||||||
} else if (DecisionTreeSectionTable.COL_EDIT.equals(colName)) {
|
|
||||||
|
} else if ( col == DecisionTreeSectionTable.COL_IDX_EDIT ) {
|
||||||
onlyShowComponent(state, SECTION_EDIT+m_typeIDStr);
|
onlyShowComponent(state, SECTION_EDIT+m_typeIDStr);
|
||||||
} else if (DecisionTreeSectionTable.COL_FIRST.equals(colName)) {
|
|
||||||
|
} else if ( col == DecisionTreeSectionTable.COL_IDX_FIRST ) {
|
||||||
DecisionTree tree = (DecisionTree)m_selTree
|
DecisionTree tree = (DecisionTree)m_selTree
|
||||||
.getSelectedObject(state);
|
.getSelectedObject(state);
|
||||||
DecisionTreeSection section = (DecisionTreeSection)m_selSection
|
DecisionTreeSection section = (DecisionTreeSection)m_selSection
|
||||||
|
|
@ -164,11 +168,11 @@ public class DecisionTreeViewSections extends ResettableContainer
|
||||||
Label label = (Label)event.getTarget();
|
Label label = (Label)event.getTarget();
|
||||||
|
|
||||||
if (m_selSection.getSelectedKey(state) == null) {
|
if (m_selSection.getSelectedKey(state) == null) {
|
||||||
label.setLabel(DecisionTreeUtil
|
label.setLabel(DecisionTreeGlobalizationUtil.globalize(
|
||||||
.globalize("tree_sections.add_section"));
|
"cms.contenttypes.ui.decisiontree.sections.add"));
|
||||||
} else {
|
} else {
|
||||||
label.setLabel(DecisionTreeUtil
|
label.setLabel(DecisionTreeGlobalizationUtil.globalize(
|
||||||
.globalize("tree_sections.edit_section"));
|
"cms.contenttypes.ui.decisiontree.sections.edit"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
@ -194,7 +198,8 @@ public class DecisionTreeViewSections extends ResettableContainer
|
||||||
c.setBorderColor("#FFFFFF");
|
c.setBorderColor("#FFFFFF");
|
||||||
c.setPadColor("#FFFFFF");
|
c.setPadColor("#FFFFFF");
|
||||||
|
|
||||||
c.add(new Label(DecisionTreeUtil.globalize("tree_sections.delete_section")));
|
c.add(new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.sections.delete")));
|
||||||
m_sectionDelete = new DecisionTreeSectionDeleteForm(m_selTree, m_selSection);
|
m_sectionDelete = new DecisionTreeSectionDeleteForm(m_selTree, m_selSection);
|
||||||
m_sectionDelete.addSubmissionListener ( new FormSubmissionListener () {
|
m_sectionDelete.addSubmissionListener ( new FormSubmissionListener () {
|
||||||
public void submitted ( FormSectionEvent e ) {
|
public void submitted ( FormSectionEvent e ) {
|
||||||
|
|
@ -213,8 +218,8 @@ public class DecisionTreeViewSections extends ResettableContainer
|
||||||
* Utility method to create a link to display the section list.
|
* Utility method to create a link to display the section list.
|
||||||
*/
|
*/
|
||||||
protected ActionLink buildViewAllLink () {
|
protected ActionLink buildViewAllLink () {
|
||||||
ActionLink viewAllLink = new ActionLink(DecisionTreeUtil
|
ActionLink viewAllLink = new ActionLink(DecisionTreeGlobalizationUtil.globalize(
|
||||||
.globalize("tree_sections.view_all_sections"));
|
"cms.contenttypes.ui.decisiontree.sections.view_all"));
|
||||||
viewAllLink.setClassAttr(ACTION_LINK);
|
viewAllLink.setClassAttr(ACTION_LINK);
|
||||||
viewAllLink.addActionListener( new ActionListener() {
|
viewAllLink.addActionListener( new ActionListener() {
|
||||||
public void actionPerformed ( ActionEvent event ) {
|
public void actionPerformed ( ActionEvent event ) {
|
||||||
|
|
@ -229,11 +234,11 @@ public class DecisionTreeViewSections extends ResettableContainer
|
||||||
* Utility method to create a link to display the section list.
|
* Utility method to create a link to display the section list.
|
||||||
*/
|
*/
|
||||||
protected ActionLink buildAddLink () {
|
protected ActionLink buildAddLink () {
|
||||||
ActionLink addLink = new ActionLink(DecisionTreeUtil
|
ActionLink addLink = new ActionLink(DecisionTreeGlobalizationUtil.globalize(
|
||||||
.globalize("tree_sections.add_new_section")) {
|
"cms.contenttypes.ui.decisiontree.sections.add_new_label")) {
|
||||||
@Override
|
@Override
|
||||||
public boolean isVisible(PageState state) {
|
public boolean isVisible(PageState state) {
|
||||||
SecurityManager sm = Utilities.getSecurityManager(state);
|
SecurityManager sm = CMS.getSecurityManager(state);
|
||||||
ContentItem item = (ContentItem)m_selTree.getSelectedObject(state);
|
ContentItem item = (ContentItem)m_selTree.getSelectedObject(state);
|
||||||
|
|
||||||
return super.isVisible(state) &&
|
return super.isVisible(state) &&
|
||||||
|
|
@ -19,8 +19,6 @@
|
||||||
package com.arsdigita.cms.contenttypes.ui;
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
import com.arsdigita.bebop.Component;
|
import com.arsdigita.bebop.Component;
|
||||||
import com.arsdigita.bebop.ControlLink;
|
import com.arsdigita.bebop.ControlLink;
|
||||||
import com.arsdigita.bebop.Label;
|
import com.arsdigita.bebop.Label;
|
||||||
|
|
@ -31,30 +29,35 @@ import com.arsdigita.bebop.table.TableColumn;
|
||||||
import com.arsdigita.bebop.table.TableColumnModel;
|
import com.arsdigita.bebop.table.TableColumnModel;
|
||||||
import com.arsdigita.bebop.table.TableModel;
|
import com.arsdigita.bebop.table.TableModel;
|
||||||
import com.arsdigita.bebop.table.TableModelBuilder;
|
import com.arsdigita.bebop.table.TableModelBuilder;
|
||||||
|
import com.arsdigita.cms.CMS;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTree;
|
import com.arsdigita.cms.contenttypes.DecisionTree;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeSection;
|
import com.arsdigita.cms.contenttypes.DecisionTreeSection;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeSectionCollection;
|
import com.arsdigita.cms.contenttypes.DecisionTreeSectionCollection;
|
||||||
|
import com.arsdigita.cms.contenttypes.util.DecisionTreeGlobalizationUtil;
|
||||||
import com.arsdigita.cms.ContentItem;
|
import com.arsdigita.cms.ContentItem;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.SecurityManager;
|
import com.arsdigita.cms.SecurityManager;
|
||||||
import com.arsdigita.cms.dispatcher.Utilities;
|
|
||||||
import com.arsdigita.util.LockableImpl;
|
import com.arsdigita.util.LockableImpl;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A table that displays the sections for the currently
|
* A table that displays the sections for the currently selected DecisionTree.
|
||||||
* selected DecisionTree.
|
*
|
||||||
|
* If no sections are created / exists, it prints an empty section statement
|
||||||
|
* and a link to add new sections. Otherwise
|
||||||
*
|
*
|
||||||
* @author Carsten Clasohm
|
* @author Carsten Clasohm
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
public class DecisionTreeSectionTable extends Table
|
public class DecisionTreeSectionTable extends Table {
|
||||||
{
|
|
||||||
// column headings
|
// match columns by (symbolic) index, makes for easier reordering
|
||||||
public static final String COL_TITLE = "Section";
|
public static final int COL_IDX_TITLE = 0; // title section
|
||||||
public static final String COL_EDIT = "Edit";
|
public static final int COL_IDX_EDIT = 1; // edit section link
|
||||||
public static final String COL_DEL = "Delete";
|
public static final int COL_IDX_DEL = 2; // delete section link
|
||||||
public static final String COL_FIRST = "First Section?";
|
public static final int COL_IDX_FIRST = 3; // first section link
|
||||||
|
|
||||||
private ItemSelectionModel m_selTree;
|
private ItemSelectionModel m_selTree;
|
||||||
|
|
||||||
|
|
@ -72,18 +75,38 @@ public class DecisionTreeSectionTable extends Table
|
||||||
m_selTree = selArticle;
|
m_selTree = selArticle;
|
||||||
|
|
||||||
TableColumnModel model = getColumnModel();
|
TableColumnModel model = getColumnModel();
|
||||||
model.add( new TableColumn(0, COL_TITLE));
|
model.add( new TableColumn(
|
||||||
model.add( new TableColumn(1, COL_EDIT));
|
COL_IDX_TITLE,
|
||||||
model.add( new TableColumn(2, COL_DEL));
|
new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
model.add( new TableColumn(3, COL_FIRST));
|
"cms.contenttypes.ui.decisiontree.sections.table.header_section")
|
||||||
|
) ));
|
||||||
|
model.add( new TableColumn(
|
||||||
|
COL_IDX_EDIT,
|
||||||
|
new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.sections.table.header_edit")
|
||||||
|
) ));
|
||||||
|
model.add( new TableColumn(
|
||||||
|
COL_IDX_DEL,
|
||||||
|
new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.sections.table.header_delete")
|
||||||
|
) ));
|
||||||
|
model.add( new TableColumn(
|
||||||
|
COL_IDX_FIRST,
|
||||||
|
new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.sections.table.header_first_section")
|
||||||
|
) ));
|
||||||
|
|
||||||
model.get(1).setCellRenderer(new SectionTableCellRenderer(true));
|
model.get(COL_IDX_EDIT).setCellRenderer(new SectionTableCellRenderer(true));
|
||||||
model.get(2).setCellRenderer(new SectionTableCellRenderer(true));
|
model.get(COL_IDX_DEL).setCellRenderer(new SectionTableCellRenderer(true));
|
||||||
model.get(3).setCellRenderer(new SectionTableCellRenderer(true));
|
model.get(COL_IDX_FIRST).setCellRenderer(new SectionTableCellRenderer(true));
|
||||||
|
|
||||||
setModelBuilder(new SectionTableModelBuilder(m_selTree));
|
setModelBuilder(new SectionTableModelBuilder(m_selTree));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param selSection
|
||||||
|
*/
|
||||||
public void setSectionModel ( ItemSelectionModel selSection ) {
|
public void setSectionModel ( ItemSelectionModel selSection ) {
|
||||||
if ( selSection == null ) {
|
if ( selSection == null ) {
|
||||||
s_log.warn("null item model");
|
s_log.warn("null item model");
|
||||||
|
|
@ -94,37 +117,49 @@ public class DecisionTreeSectionTable extends Table
|
||||||
* The model builder to generate a suitable model for the SectionTable
|
* The model builder to generate a suitable model for the SectionTable
|
||||||
*/
|
*/
|
||||||
protected class SectionTableModelBuilder extends LockableImpl
|
protected class SectionTableModelBuilder extends LockableImpl
|
||||||
implements TableModelBuilder
|
implements TableModelBuilder {
|
||||||
{
|
|
||||||
protected ItemSelectionModel m_selTree;
|
protected ItemSelectionModel m_selTree;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Internal class constructor.
|
||||||
|
*/
|
||||||
public SectionTableModelBuilder (ItemSelectionModel selTree) {
|
public SectionTableModelBuilder (ItemSelectionModel selTree) {
|
||||||
m_selTree = selTree;
|
m_selTree = selTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Internal class worker method.
|
||||||
|
*
|
||||||
|
* @param table
|
||||||
|
* @param state
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public TableModel makeModel(Table table, PageState state) {
|
public TableModel makeModel(Table table, PageState state) {
|
||||||
table.getRowSelectionModel().clearSelection(state);
|
|
||||||
|
|
||||||
|
table.getRowSelectionModel().clearSelection(state);
|
||||||
DecisionTree tree = (DecisionTree)m_selTree.getSelectedObject(state);
|
DecisionTree tree = (DecisionTree)m_selTree.getSelectedObject(state);
|
||||||
|
|
||||||
return new SectionTableModel(table, state, tree);
|
return new SectionTableModel(table, state, tree);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected class SectionTableModel
|
/**
|
||||||
implements TableModel
|
* Internal protected class.
|
||||||
{
|
*/
|
||||||
|
protected class SectionTableModel implements TableModel {
|
||||||
|
|
||||||
private TableColumnModel m_colModel;
|
private TableColumnModel m_colModel;
|
||||||
private DecisionTreeSectionCollection m_sections;
|
private DecisionTreeSectionCollection m_sections;
|
||||||
private DecisionTreeSection m_section;
|
private DecisionTreeSection m_section;
|
||||||
|
|
||||||
/** Constructor. */
|
/** Internal class' Constructor. */
|
||||||
public SectionTableModel (Table table, PageState state, DecisionTree tree) {
|
public SectionTableModel (Table table, PageState state, DecisionTree tree) {
|
||||||
m_colModel = table.getColumnModel();
|
m_colModel = table.getColumnModel();
|
||||||
m_sections = tree.getSections();
|
m_sections = tree.getSections();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return the number of columsn this TableModel has. */
|
/** Return the number of columns this TableModel has. */
|
||||||
public int getColumnCount () {
|
public int getColumnCount () {
|
||||||
return m_colModel.size();
|
return m_colModel.size();
|
||||||
}
|
}
|
||||||
|
|
@ -140,27 +175,31 @@ public class DecisionTreeSectionTable extends Table
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return the data element for the given column and the current row. */
|
/**
|
||||||
|
* Return the data element for the given column and the current row.
|
||||||
|
*/
|
||||||
public Object getElementAt(int columnIndex) {
|
public Object getElementAt(int columnIndex) {
|
||||||
|
|
||||||
if (m_colModel == null) { return null; }
|
if (m_colModel == null) { return null; }
|
||||||
|
|
||||||
// match columns by name... makes for easier reordering
|
if ( columnIndex == COL_IDX_TITLE ) {
|
||||||
TableColumn col = m_colModel.get(columnIndex);
|
|
||||||
String colName = (String)col.getHeaderValue();
|
|
||||||
|
|
||||||
if ( COL_TITLE.equals(colName) ) {
|
|
||||||
return m_section.getTitle();
|
return m_section.getTitle();
|
||||||
} else if ( COL_EDIT.equals(colName) ) {
|
} else if ( columnIndex == COL_IDX_EDIT ) {
|
||||||
return "edit";
|
return new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
} else if ( COL_DEL.equals(colName) ) {
|
"cms.contenttypes.ui.decisiontree.sections.table.link_edit"));
|
||||||
return "delete";
|
} else if ( columnIndex == COL_IDX_DEL ) {
|
||||||
} else if ( COL_FIRST.equals(colName) ) {
|
return new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.sections.table.link_delete"));
|
||||||
|
} else if ( columnIndex == COL_IDX_FIRST ) {
|
||||||
DecisionTree tree = m_section.getTree();
|
DecisionTree tree = m_section.getTree();
|
||||||
DecisionTreeSection firstSection = tree.getFirstSection();
|
DecisionTreeSection firstSection = tree.getFirstSection();
|
||||||
if (firstSection != null && firstSection.getID() == m_section.getID()) {
|
if (firstSection != null && firstSection.getID() == m_section.getID()) {
|
||||||
return "";
|
// return anything different from Label to prevent the
|
||||||
|
// construction of a link
|
||||||
|
return null;
|
||||||
} else {
|
} else {
|
||||||
return "set";
|
return new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.sections.table.link_set_first"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -173,42 +212,61 @@ public class DecisionTreeSectionTable extends Table
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class SectionTableCellRenderer extends LockableImpl
|
public class SectionTableCellRenderer extends LockableImpl
|
||||||
implements TableCellRenderer
|
implements TableCellRenderer {
|
||||||
{
|
|
||||||
private boolean m_active;
|
private boolean m_active;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Internal class constructor.
|
||||||
|
*/
|
||||||
public SectionTableCellRenderer () {
|
public SectionTableCellRenderer () {
|
||||||
this(false);
|
this(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Internal class constructor.
|
||||||
|
* @param active
|
||||||
|
*/
|
||||||
public SectionTableCellRenderer ( boolean active ) {
|
public SectionTableCellRenderer ( boolean active ) {
|
||||||
m_active = active;
|
m_active = active;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param table
|
||||||
|
* @param state
|
||||||
|
* @param value
|
||||||
|
* @param isSelected
|
||||||
|
* @param key
|
||||||
|
* @param row
|
||||||
|
* @param column
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public Component getComponent ( Table table, PageState state,
|
public Component getComponent ( Table table, PageState state,
|
||||||
Object value, boolean isSelected,
|
Object value, boolean isSelected,
|
||||||
Object key, int row, int column ) {
|
Object key, int row, int column ) {
|
||||||
Component ret = null;
|
Component ret = null;
|
||||||
SecurityManager sm = Utilities.getSecurityManager(state);
|
SecurityManager sm = CMS.getSecurityManager(state);
|
||||||
ContentItem item = (ContentItem)m_selTree.getSelectedObject(state);
|
ContentItem item = (ContentItem)m_selTree.getSelectedObject(state);
|
||||||
|
|
||||||
boolean active = m_active &&
|
boolean active = m_active && sm.canAccess(state.getRequest(),
|
||||||
sm.canAccess(state.getRequest(), SecurityManager.EDIT_ITEM,
|
SecurityManager.EDIT_ITEM,
|
||||||
item);
|
item);
|
||||||
|
|
||||||
if (value instanceof Component) {
|
|
||||||
ret = (Component)value;
|
|
||||||
} else {
|
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
ret = new Label("", false);
|
ret = new Label("", false);
|
||||||
} else {
|
} else if (value instanceof Label) {
|
||||||
if (active) {
|
if (active) {
|
||||||
ret = new ControlLink(value.toString());
|
ret = new ControlLink( (Component)value );
|
||||||
} else {
|
} else {
|
||||||
ret = new Label(value.toString());
|
ret = (Component)value;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// last resort, should never happen
|
||||||
|
ret = (Component)value;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,8 @@ import com.arsdigita.bebop.event.FormInitListener;
|
||||||
import com.arsdigita.bebop.event.FormProcessListener;
|
import com.arsdigita.bebop.event.FormProcessListener;
|
||||||
import com.arsdigita.bebop.event.FormSectionEvent;
|
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||||
import com.arsdigita.bebop.event.FormSubmissionListener;
|
import com.arsdigita.bebop.event.FormSubmissionListener;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeUtil;
|
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeOptionTarget;
|
import com.arsdigita.cms.contenttypes.DecisionTreeOptionTarget;
|
||||||
|
import com.arsdigita.cms.contenttypes.util.DecisionTreeGlobalizationUtil;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -71,7 +71,9 @@ public class DecisionTreeTargetDeleteForm extends Form
|
||||||
panel.setColumnWidth(2, "80%");
|
panel.setColumnWidth(2, "80%");
|
||||||
panel.setWidth("100%");
|
panel.setWidth("100%");
|
||||||
|
|
||||||
m_targetMatchValue = new Label("Target Match Value");
|
m_targetMatchValue = new Label(
|
||||||
|
DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.targets.form.delete.target_match_value"));
|
||||||
add(m_targetMatchValue, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
add(m_targetMatchValue, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
||||||
addSaveCancelSection();
|
addSaveCancelSection();
|
||||||
|
|
||||||
|
|
@ -82,7 +84,9 @@ public class DecisionTreeTargetDeleteForm extends Form
|
||||||
|
|
||||||
protected SaveCancelSection addSaveCancelSection () {
|
protected SaveCancelSection addSaveCancelSection () {
|
||||||
m_saveCancelSection = new SaveCancelSection();
|
m_saveCancelSection = new SaveCancelSection();
|
||||||
m_saveCancelSection.getSaveButton().setButtonLabel("Delete");
|
m_saveCancelSection.getSaveButton().setButtonLabel(
|
||||||
|
DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.targets.form.delete.delete_button"));
|
||||||
add(m_saveCancelSection, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
add(m_saveCancelSection, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
||||||
return m_saveCancelSection;
|
return m_saveCancelSection;
|
||||||
}
|
}
|
||||||
|
|
@ -102,7 +106,8 @@ public class DecisionTreeTargetDeleteForm extends Form
|
||||||
|
|
||||||
if ( m_saveCancelSection.getCancelButton().isSelected(state) ) {
|
if ( m_saveCancelSection.getCancelButton().isSelected(state) ) {
|
||||||
throw new FormProcessException( (String)
|
throw new FormProcessException( (String)
|
||||||
DecisionTreeUtil.globalize("tree_section.submission_cancelled")
|
DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.targets.submission_cancelled")
|
||||||
.localize());
|
.localize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,12 +43,12 @@ import com.arsdigita.bebop.form.SingleSelect;
|
||||||
import com.arsdigita.bebop.form.TextField;
|
import com.arsdigita.bebop.form.TextField;
|
||||||
import com.arsdigita.bebop.parameters.NotNullValidationListener;
|
import com.arsdigita.bebop.parameters.NotNullValidationListener;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTree;
|
import com.arsdigita.cms.contenttypes.DecisionTree;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeUtil;
|
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeSectionOption;
|
import com.arsdigita.cms.contenttypes.DecisionTreeSectionOption;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeSectionOptionCollection;
|
import com.arsdigita.cms.contenttypes.DecisionTreeSectionOptionCollection;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeOptionTarget;
|
import com.arsdigita.cms.contenttypes.DecisionTreeOptionTarget;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeSection;
|
import com.arsdigita.cms.contenttypes.DecisionTreeSection;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeSectionCollection;
|
import com.arsdigita.cms.contenttypes.DecisionTreeSectionCollection;
|
||||||
|
import com.arsdigita.cms.contenttypes.util.DecisionTreeGlobalizationUtil;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -68,10 +68,10 @@ public class DecisionTreeTargetEditForm extends Form
|
||||||
private ItemSelectionModel m_selTree;
|
private ItemSelectionModel m_selTree;
|
||||||
private ItemSelectionModel m_selTarget;
|
private ItemSelectionModel m_selTarget;
|
||||||
|
|
||||||
private DecisionTreeViewTargets m_container;
|
private DecisionTreeTargetStep m_container;
|
||||||
|
|
||||||
private SaveCancelSection m_saveCancelSection;
|
private SaveCancelSection m_saveCancelSection;
|
||||||
private SingleSelect m_sectionWidget;
|
// private SingleSelect m_sectionWidget;
|
||||||
private SingleSelect m_matchValueWidget;
|
private SingleSelect m_matchValueWidget;
|
||||||
private SingleSelect m_targetSectionWidget;
|
private SingleSelect m_targetSectionWidget;
|
||||||
private TextField m_targetURLWidget;
|
private TextField m_targetURLWidget;
|
||||||
|
|
@ -100,7 +100,8 @@ public class DecisionTreeTargetEditForm extends Form
|
||||||
*/
|
*/
|
||||||
public DecisionTreeTargetEditForm(ItemSelectionModel selTree,
|
public DecisionTreeTargetEditForm(ItemSelectionModel selTree,
|
||||||
ItemSelectionModel selTarget,
|
ItemSelectionModel selTarget,
|
||||||
DecisionTreeViewTargets container) {
|
DecisionTreeTargetStep container) {
|
||||||
|
|
||||||
super("DecisionTreeTargetEditForm", new ColumnPanel(2));
|
super("DecisionTreeTargetEditForm", new ColumnPanel(2));
|
||||||
m_selTree = selTree;
|
m_selTree = selTree;
|
||||||
m_selTarget = selTarget;
|
m_selTarget = selTarget;
|
||||||
|
|
@ -198,9 +199,12 @@ public class DecisionTreeTargetEditForm extends Form
|
||||||
DecisionTreeSectionOptionCollection sectionOptions = tree.getOptions();
|
DecisionTreeSectionOptionCollection sectionOptions = tree.getOptions();
|
||||||
if (sectionOptions != null) {
|
if (sectionOptions != null) {
|
||||||
while (sectionOptions.next()) {
|
while (sectionOptions.next()) {
|
||||||
DecisionTreeSectionOption sectionOption = sectionOptions.getOption();
|
DecisionTreeSectionOption sectionOption = sectionOptions
|
||||||
String label = sectionOption.getSection().getTitle() + " : " + sectionOption.getLabel();
|
.getOption();
|
||||||
Option option = new Option(sectionOption.getID().toString(), label);
|
String label = sectionOption.getSection().getTitle() +
|
||||||
|
" : " + sectionOption.getLabel();
|
||||||
|
Option option = new Option(sectionOption.getID().toString(),
|
||||||
|
label);
|
||||||
target.addOption(option, state);
|
target.addOption(option, state);
|
||||||
}
|
}
|
||||||
sectionOptions.close();
|
sectionOptions.close();
|
||||||
|
|
@ -215,7 +219,8 @@ public class DecisionTreeTargetEditForm extends Form
|
||||||
FormData data = fse.getFormData();
|
FormData data = fse.getFormData();
|
||||||
|
|
||||||
if (m_selTarget.getSelectedKey(state) != null) {
|
if (m_selTarget.getSelectedKey(state) != null) {
|
||||||
BigDecimal id = new BigDecimal(m_selTarget.getSelectedKey(state).toString());
|
BigDecimal id = new BigDecimal(m_selTarget.getSelectedKey(state)
|
||||||
|
.toString());
|
||||||
DecisionTreeOptionTarget target = new DecisionTreeOptionTarget(id);
|
DecisionTreeOptionTarget target = new DecisionTreeOptionTarget(id);
|
||||||
|
|
||||||
data.put(MATCH_OPTION, target.getMatchOption().getID());
|
data.put(MATCH_OPTION, target.getMatchOption().getID());
|
||||||
|
|
@ -231,10 +236,17 @@ public class DecisionTreeTargetEditForm extends Form
|
||||||
* Add form widgets for a Section.
|
* Add form widgets for a Section.
|
||||||
*/
|
*/
|
||||||
protected void addWidgets() {
|
protected void addWidgets() {
|
||||||
Option pleaseSelect = new Option("", (String)DecisionTreeUtil.globalize("form.please_select").localize());
|
Option pleaseSelect = new Option(
|
||||||
Option none = new Option("", (String)DecisionTreeUtil.globalize("form.none").localize());
|
"",
|
||||||
|
new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.targets.form.please_select") ));
|
||||||
|
Option none = new Option(
|
||||||
|
"",
|
||||||
|
new Label( DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.targets.form.none")));
|
||||||
|
|
||||||
add(new Label(DecisionTreeUtil.globalize("form_label.match_value")));
|
add(new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.targets.form.match_value")));
|
||||||
m_matchValueWidget = new SingleSelect(MATCH_OPTION);
|
m_matchValueWidget = new SingleSelect(MATCH_OPTION);
|
||||||
m_matchValueWidget.addValidationListener(new NotNullValidationListener());
|
m_matchValueWidget.addValidationListener(new NotNullValidationListener());
|
||||||
m_matchValueWidget.addOption(pleaseSelect);
|
m_matchValueWidget.addOption(pleaseSelect);
|
||||||
|
|
@ -251,12 +263,14 @@ public class DecisionTreeTargetEditForm extends Form
|
||||||
|
|
||||||
add(m_matchValueWidget);
|
add(m_matchValueWidget);
|
||||||
|
|
||||||
add(new Label(DecisionTreeUtil.globalize("form_label.target_url")));
|
add(new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.targets.form.target_url_label")));
|
||||||
m_targetURLWidget = new TextField(TARGET_URL);
|
m_targetURLWidget = new TextField(TARGET_URL);
|
||||||
m_targetURLWidget.setSize(60);
|
m_targetURLWidget.setSize(60);
|
||||||
add(m_targetURLWidget);
|
add(m_targetURLWidget);
|
||||||
|
|
||||||
add(new Label(DecisionTreeUtil.globalize("form_label.target_section")));
|
add(new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.targets.form.target_section_label")));
|
||||||
m_targetSectionWidget = new SingleSelect(TARGET_SECTION);
|
m_targetSectionWidget = new SingleSelect(TARGET_SECTION);
|
||||||
m_targetSectionWidget.addOption(none);
|
m_targetSectionWidget.addOption(none);
|
||||||
|
|
||||||
|
|
@ -276,13 +290,19 @@ public class DecisionTreeTargetEditForm extends Form
|
||||||
public final void validate(final FormSectionEvent event)
|
public final void validate(final FormSectionEvent event)
|
||||||
throws FormProcessException {
|
throws FormProcessException {
|
||||||
final PageState state = event.getPageState();
|
final PageState state = event.getPageState();
|
||||||
if ("".equals(m_targetURLWidget.getValue(state)) && "".equals(m_targetSectionWidget.getValue(state))) {
|
if ("".equals(m_targetURLWidget.getValue(state))
|
||||||
String msg = (String) DecisionTreeUtil.globalize("form_validation.target_required").localize();
|
&& "".equals(m_targetSectionWidget.getValue(state))) {
|
||||||
|
String msg = (String) DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.targets.form.target_required")
|
||||||
|
.localize();
|
||||||
throw new FormProcessException(msg);
|
throw new FormProcessException(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!"".equals(m_targetURLWidget.getValue(state)) && !"".equals(m_targetSectionWidget.getValue(state))) {
|
if (!"".equals(m_targetURLWidget.getValue(state))
|
||||||
String msg = (String) DecisionTreeUtil.globalize("form_validation.duplicate_target").localize();
|
&& !"".equals(m_targetSectionWidget.getValue(state))) {
|
||||||
|
String msg = (String) DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.targets.form.duplicate_target")
|
||||||
|
.localize();
|
||||||
throw new FormProcessException(msg);
|
throw new FormProcessException(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -300,18 +320,18 @@ public class DecisionTreeTargetEditForm extends Form
|
||||||
if ( m_saveCancelSection.getCancelButton()
|
if ( m_saveCancelSection.getCancelButton()
|
||||||
.isSelected(state) && m_container != null) {
|
.isSelected(state) && m_container != null) {
|
||||||
m_container.onlyShowComponent(
|
m_container.onlyShowComponent(
|
||||||
state, DecisionTreeViewTargets.TARGET_TABLE +
|
state, DecisionTreeTargetStep.TARGET_TABLE +
|
||||||
m_container.getTypeIDStr());
|
m_container.getTypeIDStr());
|
||||||
throw new FormProcessException(
|
throw new FormProcessException(
|
||||||
(String)DecisionTreeUtil
|
(String)DecisionTreeGlobalizationUtil.globalize(
|
||||||
.globalize("tree_section.submission_cancelled")
|
"cms.contenttypes.ui.decisiontree.targets.form.submission_cancelled")
|
||||||
.localize());
|
.localize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called after form has been validated. Create the new DecisionTreeOptionTarget and
|
* Called after form has been validated. Create the new
|
||||||
* assign it to the current DecisionTree.
|
* DecisionTreeOptionTarget and assign it to the current DecisionTree.
|
||||||
*/
|
*/
|
||||||
public void process(FormSectionEvent event) throws FormProcessException {
|
public void process(FormSectionEvent event) throws FormProcessException {
|
||||||
PageState state = event.getPageState();
|
PageState state = event.getPageState();
|
||||||
|
|
@ -344,11 +364,12 @@ public class DecisionTreeTargetEditForm extends Form
|
||||||
if (m_container != null) {
|
if (m_container != null) {
|
||||||
m_container.onlyShowComponent(
|
m_container.onlyShowComponent(
|
||||||
state,
|
state,
|
||||||
DecisionTreeViewTargets.TARGET_TABLE +
|
DecisionTreeTargetStep.TARGET_TABLE +
|
||||||
m_container.getTypeIDStr());
|
m_container.getTypeIDStr());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void register(Page p) {
|
public void register(Page p) {
|
||||||
super.register(p);
|
super.register(p);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,15 +33,13 @@ import com.arsdigita.bebop.event.PrintEvent;
|
||||||
import com.arsdigita.bebop.event.PrintListener;
|
import com.arsdigita.bebop.event.PrintListener;
|
||||||
import com.arsdigita.bebop.event.TableActionEvent;
|
import com.arsdigita.bebop.event.TableActionEvent;
|
||||||
import com.arsdigita.bebop.event.TableActionListener;
|
import com.arsdigita.bebop.event.TableActionListener;
|
||||||
import com.arsdigita.bebop.table.TableColumn;
|
import com.arsdigita.cms.CMS;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTree;
|
import com.arsdigita.cms.contenttypes.DecisionTree;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeUtil;
|
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeSection;
|
import com.arsdigita.cms.contenttypes.DecisionTreeSection;
|
||||||
|
import com.arsdigita.cms.contenttypes.util.DecisionTreeGlobalizationUtil;
|
||||||
import com.arsdigita.cms.ContentItem;
|
import com.arsdigita.cms.ContentItem;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.SecurityManager;
|
import com.arsdigita.cms.SecurityManager;
|
||||||
import com.arsdigita.cms.contenttypes.ui.ResettableContainer;
|
|
||||||
import com.arsdigita.cms.dispatcher.Utilities;
|
|
||||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
import com.arsdigita.util.Assert;
|
import com.arsdigita.util.Assert;
|
||||||
|
|
||||||
|
|
@ -55,7 +53,7 @@ import com.arsdigita.util.Assert;
|
||||||
* @author Carsten Clasohm
|
* @author Carsten Clasohm
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
public class DecisionTreeViewTargets extends ResettableContainer
|
public class DecisionTreeTargetStep extends ResettableContainer
|
||||||
{
|
{
|
||||||
/** id keys for each editing panel */
|
/** id keys for each editing panel */
|
||||||
public static final String TARGET_TABLE = "tgt_tbl";
|
public static final String TARGET_TABLE = "tgt_tbl";
|
||||||
|
|
@ -82,7 +80,7 @@ public class DecisionTreeViewTargets extends ResettableContainer
|
||||||
* @param selTree
|
* @param selTree
|
||||||
* @param wizard
|
* @param wizard
|
||||||
*/
|
*/
|
||||||
public DecisionTreeViewTargets (ItemSelectionModel selTree,
|
public DecisionTreeTargetStep (ItemSelectionModel selTree,
|
||||||
AuthoringKitWizard wizard) {
|
AuthoringKitWizard wizard) {
|
||||||
super();
|
super();
|
||||||
m_selTree = selTree;
|
m_selTree = selTree;
|
||||||
|
|
@ -116,30 +114,20 @@ public class DecisionTreeViewTargets extends ResettableContainer
|
||||||
|
|
||||||
m_targetTable.setSectionModel(m_selTarget);
|
m_targetTable.setSectionModel(m_selTarget);
|
||||||
|
|
||||||
Label emptyView = new Label(DecisionTreeUtil
|
Label emptyView = new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
.globalize("option_targets.no_targets_yet"));
|
"cms.contenttypes.ui.decisiontree.targets.none_yet"));
|
||||||
m_targetTable.setEmptyView(emptyView);
|
m_targetTable.setEmptyView(emptyView);
|
||||||
|
|
||||||
// handle clicks to preview or delete a Section
|
// handle clicks to preview or delete a Target
|
||||||
m_targetTable.addTableActionListener (new TableActionListener () {
|
m_targetTable.addTableActionListener (new TableActionListener () {
|
||||||
public void cellSelected (TableActionEvent event) {
|
public void cellSelected (TableActionEvent event) {
|
||||||
PageState state = event.getPageState();
|
PageState state = event.getPageState();
|
||||||
|
int col = event.getColumn();
|
||||||
|
|
||||||
TableColumn col = m_targetTable.getColumnModel()
|
if ( col == DecisionTreeTargetTable.COL_IDX_DEL ) {
|
||||||
.get(event.getColumn().intValue());
|
|
||||||
String colName = (String)col.getHeaderValue();
|
|
||||||
|
|
||||||
if (DecisionTreeSectionTable.COL_DEL.equals(colName)) {
|
|
||||||
onlyShowComponent(state, TARGET_DEL+m_typeIDStr);
|
onlyShowComponent(state, TARGET_DEL+m_typeIDStr);
|
||||||
} else if (DecisionTreeSectionTable.COL_EDIT.equals(colName)) {
|
} else if ( col == DecisionTreeTargetTable.COL_IDX_EDIT ) {
|
||||||
onlyShowComponent(state, TARGET_EDIT+m_typeIDStr);
|
onlyShowComponent(state, TARGET_EDIT+m_typeIDStr);
|
||||||
} else if (DecisionTreeSectionTable.COL_FIRST.equals(colName)) {
|
|
||||||
DecisionTree tree =
|
|
||||||
(DecisionTree)m_selTree.getSelectedObject(state);
|
|
||||||
DecisionTreeSection section =
|
|
||||||
(DecisionTreeSection)m_selTarget.getSelectedItem(state);
|
|
||||||
tree.setFirstSection(section);
|
|
||||||
tree.save();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -147,7 +135,7 @@ public class DecisionTreeViewTargets extends ResettableContainer
|
||||||
});
|
});
|
||||||
c.add(m_targetTable);
|
c.add(m_targetTable);
|
||||||
|
|
||||||
// link to add new section
|
// link to add new target
|
||||||
c.add(buildAddLink());
|
c.add(buildAddLink());
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
|
|
@ -170,21 +158,21 @@ public class DecisionTreeViewTargets extends ResettableContainer
|
||||||
Label label = (Label)event.getTarget();
|
Label label = (Label)event.getTarget();
|
||||||
|
|
||||||
if (m_selTarget.getSelectedKey(state) == null) {
|
if (m_selTarget.getSelectedKey(state) == null) {
|
||||||
label.setLabel(DecisionTreeUtil
|
label.setLabel(DecisionTreeGlobalizationUtil.globalize(
|
||||||
.globalize("option_targets.add_target"));
|
"cms.contenttypes.ui.decisiontree.targets.add"));
|
||||||
} else {
|
} else {
|
||||||
label.setLabel(DecisionTreeUtil
|
label.setLabel(DecisionTreeGlobalizationUtil.globalize(
|
||||||
.globalize("option_targets.edit_target"));
|
"cms.contenttypes.ui.decisiontree.targets.edit"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// form to edit a Section
|
// form to edit a Target
|
||||||
m_targetEdit = new DecisionTreeTargetEditForm(m_selTree, m_selTarget, this);
|
m_targetEdit = new DecisionTreeTargetEditForm(m_selTree, m_selTarget, this);
|
||||||
c.add(m_targetEdit);
|
c.add(m_targetEdit);
|
||||||
|
|
||||||
c.add(buildViewAllLink());
|
c.add(buildViewAllLink());
|
||||||
// link to add new section
|
// link to add new target
|
||||||
c.add(buildAddLink());
|
c.add(buildAddLink());
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
|
|
@ -192,7 +180,7 @@ public class DecisionTreeViewTargets extends ResettableContainer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds a container to hold the component to confirm
|
* Builds a container to hold the component to confirm
|
||||||
* deletion of a section.
|
* deletion of a target.
|
||||||
*/
|
*/
|
||||||
protected Container buildTargetDelete () {
|
protected Container buildTargetDelete () {
|
||||||
ColumnPanel c = new ColumnPanel(1);
|
ColumnPanel c = new ColumnPanel(1);
|
||||||
|
|
@ -200,7 +188,8 @@ public class DecisionTreeViewTargets extends ResettableContainer
|
||||||
c.setBorderColor("#FFFFFF");
|
c.setBorderColor("#FFFFFF");
|
||||||
c.setPadColor("#FFFFFF");
|
c.setPadColor("#FFFFFF");
|
||||||
|
|
||||||
c.add(new Label(DecisionTreeUtil.globalize("option_targets.delete_target")));
|
c.add(new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.targets.delete")));
|
||||||
m_targetDelete = new DecisionTreeTargetDeleteForm(m_selTree, m_selTarget);
|
m_targetDelete = new DecisionTreeTargetDeleteForm(m_selTree, m_selTarget);
|
||||||
m_targetDelete.addSubmissionListener ( new FormSubmissionListener () {
|
m_targetDelete.addSubmissionListener ( new FormSubmissionListener () {
|
||||||
public void submitted ( FormSectionEvent e ) {
|
public void submitted ( FormSectionEvent e ) {
|
||||||
|
|
@ -216,11 +205,12 @@ public class DecisionTreeViewTargets extends ResettableContainer
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility method to create a link to display the section list.
|
* Utility method to create a link to display the targets list.
|
||||||
*/
|
*/
|
||||||
protected ActionLink buildViewAllLink () {
|
protected ActionLink buildViewAllLink () {
|
||||||
ActionLink viewAllLink = new
|
ActionLink viewAllLink = new
|
||||||
ActionLink( DecisionTreeUtil.globalize("option_targets.view_all_targets"));
|
ActionLink( DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.targets.view_all"));
|
||||||
viewAllLink.setClassAttr(ACTION_LINK);
|
viewAllLink.setClassAttr(ACTION_LINK);
|
||||||
viewAllLink.addActionListener( new ActionListener() {
|
viewAllLink.addActionListener( new ActionListener() {
|
||||||
public void actionPerformed ( ActionEvent event ) {
|
public void actionPerformed ( ActionEvent event ) {
|
||||||
|
|
@ -236,15 +226,16 @@ public class DecisionTreeViewTargets extends ResettableContainer
|
||||||
*/
|
*/
|
||||||
protected ActionLink buildAddLink () {
|
protected ActionLink buildAddLink () {
|
||||||
|
|
||||||
ActionLink addLink = new ActionLink( DecisionTreeUtil
|
ActionLink addLink = new ActionLink( DecisionTreeGlobalizationUtil
|
||||||
.globalize("option_targets.add_new_target")) {
|
.globalize("cms.contenttypes.ui.decisiontree.targets.add_new")) {
|
||||||
@Override
|
@Override
|
||||||
public boolean isVisible(PageState state) {
|
public boolean isVisible(PageState state) {
|
||||||
SecurityManager sm = Utilities.getSecurityManager(state);
|
SecurityManager sm = CMS.getSecurityManager(state);
|
||||||
ContentItem item = (ContentItem)m_selTree.getSelectedObject(state);
|
ContentItem item = (ContentItem)m_selTree.getSelectedObject(state);
|
||||||
|
|
||||||
return super.isVisible(state) &&
|
return super.isVisible(state) && sm.canAccess(
|
||||||
sm.canAccess(state.getRequest(), SecurityManager.EDIT_ITEM,
|
state.getRequest(),
|
||||||
|
SecurityManager.EDIT_ITEM,
|
||||||
item);
|
item);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -31,12 +31,14 @@ import com.arsdigita.bebop.table.TableColumn;
|
||||||
import com.arsdigita.bebop.table.TableColumnModel;
|
import com.arsdigita.bebop.table.TableColumnModel;
|
||||||
import com.arsdigita.bebop.table.TableModel;
|
import com.arsdigita.bebop.table.TableModel;
|
||||||
import com.arsdigita.bebop.table.TableModelBuilder;
|
import com.arsdigita.bebop.table.TableModelBuilder;
|
||||||
|
import com.arsdigita.cms.CMS;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTree;
|
import com.arsdigita.cms.contenttypes.DecisionTree;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeOptionTarget;
|
import com.arsdigita.cms.contenttypes.DecisionTreeOptionTarget;
|
||||||
import com.arsdigita.cms.contenttypes.DecisionTreeOptionTargetCollection;
|
import com.arsdigita.cms.contenttypes.DecisionTreeOptionTargetCollection;
|
||||||
import com.arsdigita.cms.ContentItem;
|
import com.arsdigita.cms.ContentItem;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.SecurityManager;
|
import com.arsdigita.cms.SecurityManager;
|
||||||
|
import com.arsdigita.cms.contenttypes.util.DecisionTreeGlobalizationUtil;
|
||||||
import com.arsdigita.cms.dispatcher.Utilities;
|
import com.arsdigita.cms.dispatcher.Utilities;
|
||||||
import com.arsdigita.util.LockableImpl;
|
import com.arsdigita.util.LockableImpl;
|
||||||
|
|
||||||
|
|
@ -54,10 +56,10 @@ public class DecisionTreeTargetTable extends Table
|
||||||
DecisionTreeTargetTable.class);
|
DecisionTreeTargetTable.class);
|
||||||
|
|
||||||
// column headings
|
// column headings
|
||||||
public static final String COL_SECTION = "Section";
|
public static final int COL_IDX_SECTION = 0;
|
||||||
public static final String COL_MATCH = "Match";
|
public static final int COL_IDX_MATCH = 1;
|
||||||
public static final String COL_EDIT = "Edit";
|
public static final int COL_IDX_EDIT = 2;
|
||||||
public static final String COL_DEL = "Delete";
|
public static final int COL_IDX_DEL = 3;
|
||||||
|
|
||||||
private ItemSelectionModel m_selTree;
|
private ItemSelectionModel m_selTree;
|
||||||
|
|
||||||
|
|
@ -72,13 +74,29 @@ public class DecisionTreeTargetTable extends Table
|
||||||
m_selTree = selArticle;
|
m_selTree = selArticle;
|
||||||
|
|
||||||
TableColumnModel model = getColumnModel();
|
TableColumnModel model = getColumnModel();
|
||||||
model.add(new TableColumn(0, COL_SECTION));
|
model.add(new TableColumn(
|
||||||
model.add(new TableColumn(1, COL_MATCH));
|
COL_IDX_SECTION,
|
||||||
model.add(new TableColumn(2, COL_EDIT));
|
new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
model.add(new TableColumn(3, COL_DEL));
|
"cms.contenttypes.ui.decisiontree.targets.table.header_section")
|
||||||
|
) ));
|
||||||
|
model.add(new TableColumn(
|
||||||
|
COL_IDX_MATCH,
|
||||||
|
new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.targets.table.header_match")
|
||||||
|
) ));
|
||||||
|
model.add(new TableColumn(
|
||||||
|
COL_IDX_EDIT,
|
||||||
|
new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.targets.table.header_edit")
|
||||||
|
) ));
|
||||||
|
model.add(new TableColumn(
|
||||||
|
COL_IDX_DEL,
|
||||||
|
new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.targets.table.header_delete")
|
||||||
|
) ));
|
||||||
|
|
||||||
model.get(2).setCellRenderer(new SectionTableCellRenderer(true));
|
model.get(COL_IDX_EDIT).setCellRenderer(new SectionTableCellRenderer(true));
|
||||||
model.get(3).setCellRenderer(new SectionTableCellRenderer(true));
|
model.get(COL_IDX_DEL).setCellRenderer(new SectionTableCellRenderer(true));
|
||||||
|
|
||||||
setModelBuilder(new OptionTableModelBuilder(m_selTree));
|
setModelBuilder(new OptionTableModelBuilder(m_selTree));
|
||||||
}
|
}
|
||||||
|
|
@ -147,18 +165,20 @@ public class DecisionTreeTargetTable extends Table
|
||||||
public Object getElementAt(int columnIndex) {
|
public Object getElementAt(int columnIndex) {
|
||||||
if (m_colModel == null) { return null; }
|
if (m_colModel == null) { return null; }
|
||||||
|
|
||||||
// match columns by name... makes for easier reordering
|
if ( columnIndex == COL_IDX_SECTION ) {
|
||||||
TableColumn col = m_colModel.get(columnIndex);
|
|
||||||
String colName = (String) col.getHeaderValue();
|
|
||||||
|
|
||||||
if (COL_SECTION.equals(colName)) {
|
|
||||||
return m_target.getMatchOption().getSection().getTitle();
|
return m_target.getMatchOption().getSection().getTitle();
|
||||||
} else if (COL_MATCH.equals(colName)) {
|
} else if ( columnIndex == COL_IDX_MATCH ) {
|
||||||
return m_target.getMatchOption().getLabel();
|
return m_target.getMatchOption().getLabel();
|
||||||
} else if (COL_EDIT.equals(colName)) {
|
} else if ( columnIndex == COL_IDX_EDIT ) {
|
||||||
return "edit";
|
// return "edit";
|
||||||
} else if (COL_DEL.equals(colName)) {
|
return new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
return "delete";
|
"cms.contenttypes.ui.decisiontree.targets.table.link_edit")
|
||||||
|
);
|
||||||
|
} else if ( columnIndex == COL_IDX_DEL ) {
|
||||||
|
// return "delete";
|
||||||
|
return new Label(DecisionTreeGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.decisiontree.targets.table.link_delete")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
@ -189,30 +209,39 @@ public class DecisionTreeTargetTable extends Table
|
||||||
m_active = active;
|
m_active = active;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** */
|
/**
|
||||||
|
*
|
||||||
|
* @param table
|
||||||
|
* @param state
|
||||||
|
* @param value
|
||||||
|
* @param isSelected
|
||||||
|
* @param key
|
||||||
|
* @param row
|
||||||
|
* @param column
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public Component getComponent(Table table, PageState state,
|
public Component getComponent(Table table, PageState state,
|
||||||
Object value, boolean isSelected,
|
Object value, boolean isSelected,
|
||||||
Object key, int row, int column) {
|
Object key, int row, int column) {
|
||||||
Component ret = null;
|
Component ret = null;
|
||||||
SecurityManager sm = Utilities.getSecurityManager(state);
|
SecurityManager sm = CMS.getSecurityManager(state);
|
||||||
ContentItem item = (ContentItem)m_selTree.getSelectedObject(state);
|
ContentItem item = (ContentItem)m_selTree.getSelectedObject(state);
|
||||||
|
|
||||||
boolean active = m_active &&
|
boolean active = m_active && sm.canAccess(state.getRequest(),
|
||||||
sm.canAccess(state.getRequest(), SecurityManager.EDIT_ITEM,
|
SecurityManager.EDIT_ITEM,
|
||||||
item);
|
item);
|
||||||
|
|
||||||
if (value instanceof Component) {
|
|
||||||
ret = (Component)value;
|
|
||||||
} else {
|
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
ret = new Label("", false);
|
ret = (Component)value;
|
||||||
} else {
|
} else if (value instanceof Label) {
|
||||||
if (active) {
|
if (active) {
|
||||||
ret = new ControlLink(value.toString());
|
ret = new ControlLink( (Component)value );
|
||||||
} else {
|
} else {
|
||||||
ret = new Label(value.toString());
|
ret = (Component)value;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// last resort, should never happen
|
||||||
|
ret = (Component)value;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.cms.contenttypes;
|
package com.arsdigita.cms.contenttypes.util;
|
||||||
|
|
||||||
import com.arsdigita.globalization.Globalized;
|
import com.arsdigita.globalization.Globalized;
|
||||||
import com.arsdigita.globalization.GlobalizedMessage;
|
import com.arsdigita.globalization.GlobalizedMessage;
|
||||||
|
|
@ -31,14 +31,14 @@ import com.arsdigita.globalization.GlobalizedMessage;
|
||||||
* @author Carsten Clasohm
|
* @author Carsten Clasohm
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
public class DecisionTreeUtil implements Globalized {
|
public class DecisionTreeGlobalizationUtil implements Globalized {
|
||||||
|
|
||||||
/** Name of Java resource files to handle DecisionTree's globalisation. */
|
/** Name of Java resource files to handle DecisionTree's globalisation. */
|
||||||
public static final String BUNDLE_NAME =
|
public static final String BUNDLE_NAME =
|
||||||
"com.arsdigita.cms.contenttypes.DecisionTreeResources";
|
"com.arsdigita.cms.contenttypes.DecisionTreeResources";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This returns a globalized message using the package specific bundle,
|
* Returns a globalized message using the package specific bundle,
|
||||||
* provided by BUNDLE_NAME.
|
* provided by BUNDLE_NAME.
|
||||||
*/
|
*/
|
||||||
public static GlobalizedMessage globalize(String key) {
|
public static GlobalizedMessage globalize(String key) {
|
||||||
|
|
@ -319,7 +319,8 @@ public class SectionTable extends Table
|
||||||
this(false);
|
this(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SectionTableCellRenderer ( boolean active ) {
|
public SectionTableCellRenderer
|
||||||
|
( boolean active ) {
|
||||||
m_active = active;
|
m_active = active;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,18 +31,19 @@ import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
import com.arsdigita.cms.contenttypes.util.SimpleAddressGlobalizationUtil;
|
import com.arsdigita.cms.contenttypes.util.SimpleAddressGlobalizationUtil;
|
||||||
|
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||||
|
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Authoring step to edit the simple attributes of the SimpleAddress content type
|
* Authoring step to edit the simple attributes of the SimpleAddress content
|
||||||
* (and its subclasses). This authoring step replaces the
|
* type (and its subclasses). This authoring step replaces the
|
||||||
* <code>com.arsdigita.ui.authoring.PageEdit</code> step for this type.
|
* <code>com.arsdigita.ui.authoring.PageEdit</code> step for this type.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:dominik@redhat.com">Dominik Kacprzak</a>
|
* @author <a href="mailto:dominik@redhat.com">Dominik Kacprzak</a>
|
||||||
* @version $Revision: #6 $ $Date: 2004/08/17 $
|
* @version $Revision: #6 $ $Date: 2004/08/17 $
|
||||||
*
|
*
|
||||||
**/
|
*/
|
||||||
public class SimpleAddressPropertiesStep extends SimpleEditStep {
|
public class SimpleAddressPropertiesStep extends SimpleEditStep {
|
||||||
|
|
||||||
/** The name of the editing sheet added to this step */
|
/** The name of the editing sheet added to this step */
|
||||||
|
|
@ -56,7 +57,8 @@ public class SimpleAddressPropertiesStep extends SimpleEditStep {
|
||||||
BasicPageForm editSheet;
|
BasicPageForm editSheet;
|
||||||
|
|
||||||
editSheet = new SimpleAddressPropertyForm(itemModel, this);
|
editSheet = new SimpleAddressPropertyForm(itemModel, this);
|
||||||
add(EDIT_SHEET_NAME, "Edit",
|
add(EDIT_SHEET_NAME,
|
||||||
|
GlobalizationUtil.globalize("cms.ui.edit"),
|
||||||
new WorkflowLockedComponentAccess(editSheet, itemModel),
|
new WorkflowLockedComponentAccess(editSheet, itemModel),
|
||||||
editSheet.getSaveCancelSection().getCancelButton() );
|
editSheet.getSaveCancelSection().getCancelButton() );
|
||||||
|
|
||||||
|
|
@ -76,38 +78,22 @@ public class SimpleAddressPropertiesStep extends SimpleEditStep {
|
||||||
itemModel ) {
|
itemModel ) {
|
||||||
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
||||||
|
|
||||||
sheet.add( (String) SimpleAddressGlobalizationUtil.globalize
|
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.title"),
|
||||||
("cms.contenttypes.ui.name").localize(),
|
|
||||||
SimpleAddress.NAME );
|
|
||||||
sheet.add( (String) SimpleAddressGlobalizationUtil.globalize
|
|
||||||
("cms.contenttypes.ui.title").localize(),
|
|
||||||
SimpleAddress.TITLE);
|
SimpleAddress.TITLE);
|
||||||
|
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.name"),
|
||||||
|
SimpleAddress.NAME );
|
||||||
if (!ContentSection.getConfig().getHideLaunchDate()) {
|
if (!ContentSection.getConfig().getHideLaunchDate()) {
|
||||||
sheet.add( (String) SimpleAddressGlobalizationUtil.globalize
|
sheet.add(GlobalizationUtil
|
||||||
("cms.ui.authoring.page_launch_date").localize(),
|
.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)SimpleAddressGlobalizationUtil
|
|
||||||
.globalize("cms.ui.unknown").localize();
|
|
||||||
}
|
}
|
||||||
}
|
sheet.add(SimpleAddressGlobalizationUtil.globalize(
|
||||||
});
|
"cms.contenttypes.ui.simpleaddress.address"),
|
||||||
}
|
|
||||||
sheet.add( (String) SimpleAddressGlobalizationUtil.globalize
|
|
||||||
("cms.contenttypes.ui.simpleaddress.address").localize(),
|
|
||||||
SimpleAddress.ADDRESS);
|
SimpleAddress.ADDRESS);
|
||||||
if (!SimpleAddress.getConfig().getHideCountryCodeSelection()) {
|
if (!SimpleAddress.getConfig().getHideCountryCodeSelection()) {
|
||||||
sheet.add( (String) SimpleAddressGlobalizationUtil.globalize
|
sheet.add(SimpleAddressGlobalizationUtil.globalize(
|
||||||
("cms.contenttypes.ui.simpleaddress.iso_country_code")
|
"cms.contenttypes.ui.simpleaddress.iso_country_code"),
|
||||||
.localize(),
|
|
||||||
SimpleAddress.ISO_COUNTRY_CODE,
|
SimpleAddress.ISO_COUNTRY_CODE,
|
||||||
new DomainObjectPropertySheet.AttributeFormatter() {
|
new DomainObjectPropertySheet.AttributeFormatter() {
|
||||||
public String format( DomainObject item,
|
public String format( DomainObject item,
|
||||||
|
|
@ -117,37 +103,37 @@ public class SimpleAddressPropertiesStep extends SimpleEditStep {
|
||||||
if ( address.getCountryIsoCode() != null ) {
|
if ( address.getCountryIsoCode() != null ) {
|
||||||
return address.getCountryIsoCode();
|
return address.getCountryIsoCode();
|
||||||
} else {
|
} else {
|
||||||
return (String)SimpleAddressGlobalizationUtil
|
return (String)GlobalizationUtil
|
||||||
.globalize
|
.globalize("cms.ui.unknown")
|
||||||
("cms.ui.unknown").localize();
|
.localize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (!SimpleAddress.getConfig().getHidePostalCode()) {
|
if (!SimpleAddress.getConfig().getHidePostalCode()) {
|
||||||
sheet.add( (String) SimpleAddressGlobalizationUtil.globalize
|
sheet.add(SimpleAddressGlobalizationUtil.globalize(
|
||||||
("cms.contenttypes.ui.simpleaddress.postal_code").localize(),
|
"cms.contenttypes.ui.simpleaddress.postal_code"),
|
||||||
SimpleAddress.POSTAL_CODE);
|
SimpleAddress.POSTAL_CODE);
|
||||||
}
|
}
|
||||||
sheet.add((String) SimpleAddressGlobalizationUtil
|
sheet.add(SimpleAddressGlobalizationUtil.globalize(
|
||||||
.globalize("cms.contenttypes.ui.simpleaddress.phone").localize(),
|
"cms.contenttypes.ui.simpleaddress.phone"),
|
||||||
SimpleAddress.PHONE);
|
SimpleAddress.PHONE);
|
||||||
sheet.add((String) SimpleAddressGlobalizationUtil.globalize
|
sheet.add(SimpleAddressGlobalizationUtil.globalize(
|
||||||
("cms.contenttypes.ui.simpleaddress.mobile").localize(),
|
"cms.contenttypes.ui.simpleaddress.mobile"),
|
||||||
SimpleAddress.MOBILE);
|
SimpleAddress.MOBILE);
|
||||||
sheet.add((String) SimpleAddressGlobalizationUtil.globalize
|
sheet.add(SimpleAddressGlobalizationUtil.globalize(
|
||||||
("cms.contenttypes.ui.simpleaddress.fax").localize(),
|
"cms.contenttypes.ui.simpleaddress.fax"),
|
||||||
SimpleAddress.FAX);
|
SimpleAddress.FAX);
|
||||||
sheet.add((String) SimpleAddressGlobalizationUtil.globalize
|
sheet.add(SimpleAddressGlobalizationUtil.globalize(
|
||||||
("cms.contenttypes.ui.simpleaddress.email").localize(),
|
"cms.contenttypes.ui.simpleaddress.email"),
|
||||||
SimpleAddress.EMAIL);
|
SimpleAddress.EMAIL);
|
||||||
|
|
||||||
sheet.add((String) SimpleAddressGlobalizationUtil.globalize
|
sheet.add(SimpleAddressGlobalizationUtil.globalize(
|
||||||
("cms.contenttypes.ui.simpleaddress.uri").localize(),
|
"cms.contenttypes.ui.simpleaddress.uri"),
|
||||||
SimpleAddress.URI);
|
SimpleAddress.URI);
|
||||||
|
|
||||||
sheet.add((String) SimpleAddressGlobalizationUtil.globalize
|
sheet.add(SimpleAddressGlobalizationUtil.globalize(
|
||||||
("cms.contenttypes.ui.simpleaddress.notes").localize(),
|
"cms.contenttypes.ui.simpleaddress.notes"),
|
||||||
SimpleAddress.NOTES);
|
SimpleAddress.NOTES);
|
||||||
|
|
||||||
return sheet;
|
return sheet;
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ import com.arsdigita.cms.contenttypes.SimpleAddress;
|
||||||
import com.arsdigita.cms.contenttypes.util.SimpleAddressGlobalizationUtil;
|
import com.arsdigita.cms.contenttypes.util.SimpleAddressGlobalizationUtil;
|
||||||
import com.arsdigita.cms.contenttypes.IsoCountry;
|
import com.arsdigita.cms.contenttypes.IsoCountry;
|
||||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
|
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||||
import com.arsdigita.domain.DomainCollection;
|
import com.arsdigita.domain.DomainCollection;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
|
|
@ -55,7 +56,7 @@ import org.apache.log4j.Logger;
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:dominik@redhat.com">Dominik Kacprzak</a>
|
* @author <a href="mailto:dominik@redhat.com">Dominik Kacprzak</a>
|
||||||
* @version $Revision: $ $Date: $
|
* @version $Revision: $ $Date: $
|
||||||
**/
|
*/
|
||||||
public class SimpleAddressPropertyForm extends BasicPageForm
|
public class SimpleAddressPropertyForm extends BasicPageForm
|
||||||
implements FormProcessListener, FormInitListener, FormSubmissionListener {
|
implements FormProcessListener, FormInitListener, FormSubmissionListener {
|
||||||
|
|
||||||
|
|
@ -79,7 +80,7 @@ public class SimpleAddressPropertyForm extends BasicPageForm
|
||||||
public static final String EMAIL = SimpleAddress.EMAIL;
|
public static final String EMAIL = SimpleAddress.EMAIL;
|
||||||
/** SimpleAddress notes parameter name */
|
/** SimpleAddress notes parameter name */
|
||||||
public static final String NOTES = SimpleAddress.NOTES;
|
public static final String NOTES = SimpleAddress.NOTES;
|
||||||
/** SimpleAddress URI parameter name*/
|
/** SimpleAddress URI parameter name */
|
||||||
public static final String URI = SimpleAddress.URI;
|
public static final String URI = SimpleAddress.URI;
|
||||||
|
|
||||||
/** Name of this form */
|
/** Name of this form */
|
||||||
|
|
@ -89,9 +90,9 @@ public class SimpleAddressPropertyForm extends BasicPageForm
|
||||||
* Creates a new form to edit the SimpleAddress object specified by the item
|
* Creates a new form to edit the SimpleAddress object specified by the item
|
||||||
* selection model passed in.
|
* selection model passed in.
|
||||||
*
|
*
|
||||||
* @param itemModel The ItemSelectionModel to use to obtain the SimpleAddress to
|
* @param itemModel The ItemSelectionModel to use to obtain the SimpleAddress
|
||||||
* work on
|
* to work on
|
||||||
**/
|
*/
|
||||||
public SimpleAddressPropertyForm( ItemSelectionModel itemModel ) {
|
public SimpleAddressPropertyForm( ItemSelectionModel itemModel ) {
|
||||||
this(itemModel,null);
|
this(itemModel,null);
|
||||||
}
|
}
|
||||||
|
|
@ -99,11 +100,12 @@ public class SimpleAddressPropertyForm extends BasicPageForm
|
||||||
* Creates a new form to edit the SimpleAddress object specified by the item
|
* Creates a new form to edit the SimpleAddress object specified by the item
|
||||||
* selection model passed in.
|
* selection model passed in.
|
||||||
*
|
*
|
||||||
* @param itemModel The ItemSelectionModel to use to obtain the SimpleAddress to
|
* @param itemModel The ItemSelectionModel to use to obtain the SimpleAddress
|
||||||
* work on
|
* to work on
|
||||||
* @param step The SimpleAddressPropertiesStep which controls this form.
|
* @param step The SimpleAddressPropertiesStep which controls this form.
|
||||||
**/
|
*/
|
||||||
public SimpleAddressPropertyForm( ItemSelectionModel itemModel, SimpleAddressPropertiesStep step ) {
|
public SimpleAddressPropertyForm( ItemSelectionModel itemModel,
|
||||||
|
SimpleAddressPropertiesStep step ) {
|
||||||
super( ID, itemModel );
|
super( ID, itemModel );
|
||||||
m_step = step;
|
m_step = step;
|
||||||
addSubmissionListener(this);
|
addSubmissionListener(this);
|
||||||
|
|
@ -111,24 +113,25 @@ public class SimpleAddressPropertyForm extends BasicPageForm
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds widgets to the form.
|
* Adds widgets to the form.
|
||||||
**/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void addWidgets() {
|
protected void addWidgets() {
|
||||||
super.addWidgets();
|
super.addWidgets();
|
||||||
|
|
||||||
add( new Label( (String)SimpleAddressGlobalizationUtil.globalize
|
add( new Label( SimpleAddressGlobalizationUtil.globalize(
|
||||||
( "cms.contenttypes.ui.simpleaddress.address" ).localize() ) );
|
"cms.contenttypes.ui.simpleaddress.address" ) ) );
|
||||||
ParameterModel addressBodyParam = new StringParameter( ADDRESS );
|
ParameterModel addressBodyParam = new StringParameter( ADDRESS );
|
||||||
addressBodyParam.addParameterListener( new NotNullValidationListener( ) );
|
addressBodyParam.addParameterListener( new NotNullValidationListener( ) );
|
||||||
addressBodyParam.addParameterListener( new StringInRangeValidationListener(0, 1000) );
|
addressBodyParam.addParameterListener(
|
||||||
|
new StringInRangeValidationListener(0, 1000) );
|
||||||
TextArea addressBody = new TextArea( addressBodyParam );
|
TextArea addressBody = new TextArea( addressBodyParam );
|
||||||
addressBody.setRows(5);
|
addressBody.setRows(5);
|
||||||
addressBody.setCols(30);
|
addressBody.setCols(30);
|
||||||
add( addressBody );
|
add( addressBody );
|
||||||
|
|
||||||
if (!SimpleAddress.getConfig().getHideCountryCodeSelection()) {
|
if (!SimpleAddress.getConfig().getHideCountryCodeSelection()) {
|
||||||
add( new Label( (String)SimpleAddressGlobalizationUtil.globalize
|
add( new Label(SimpleAddressGlobalizationUtil.globalize(
|
||||||
( "cms.contenttypes.ui.simpleaddress.iso_country_code" ).localize() ) );
|
"cms.contenttypes.ui.simpleaddress.iso_country_code") ));
|
||||||
ParameterModel isoCountryCodeParam = new StringParameter( ISO_COUNTRY_CODE );
|
ParameterModel isoCountryCodeParam = new StringParameter( ISO_COUNTRY_CODE );
|
||||||
//isoCountryCodeParam.addParameterListener( new NotNullValidationListener( ) );
|
//isoCountryCodeParam.addParameterListener( new NotNullValidationListener( ) );
|
||||||
// Don't assume submission via drop-down menu isoCountryCode
|
// Don't assume submission via drop-down menu isoCountryCode
|
||||||
|
|
@ -137,8 +140,8 @@ public class SimpleAddressPropertyForm extends BasicPageForm
|
||||||
SingleSelect isoCountryCode = new SingleSelect( isoCountryCodeParam );
|
SingleSelect isoCountryCode = new SingleSelect( isoCountryCodeParam );
|
||||||
|
|
||||||
isoCountryCode.addOption( new Option( "",
|
isoCountryCode.addOption( new Option( "",
|
||||||
new Label( (String)SimpleAddressGlobalizationUtil.globalize
|
new Label(GlobalizationUtil.globalize(
|
||||||
("cms.ui.select_one" ).localize() ) ) );
|
"cms.ui.select_one" )) ));
|
||||||
|
|
||||||
|
|
||||||
// retrieve country iso codes
|
// retrieve country iso codes
|
||||||
|
|
@ -158,9 +161,9 @@ public class SimpleAddressPropertyForm extends BasicPageForm
|
||||||
s_log.debug("ISO code is : " + isoCode);
|
s_log.debug("ISO code is : " + isoCode);
|
||||||
if (isoCode == null || isoCode.length() == 0) {
|
if (isoCode == null || isoCode.length() == 0) {
|
||||||
data.addError(
|
data.addError(
|
||||||
(String)SimpleAddressGlobalizationUtil.globalize(
|
SimpleAddressGlobalizationUtil.globalize(
|
||||||
"cms.contenttypes.ui.simpleaddress.error_iso_country")
|
"cms.contenttypes.ui.simpleaddress.error_iso_country")
|
||||||
.localize());
|
);
|
||||||
}
|
}
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
|
@ -168,8 +171,8 @@ public class SimpleAddressPropertyForm extends BasicPageForm
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SimpleAddress.getConfig().getHidePostalCode()) {
|
if (!SimpleAddress.getConfig().getHidePostalCode()) {
|
||||||
add( new Label( (String)SimpleAddressGlobalizationUtil.globalize
|
add( new Label(SimpleAddressGlobalizationUtil.globalize(
|
||||||
( "cms.contenttypes.ui.simpleaddress.postal_code" ).localize() ) );
|
"cms.contenttypes.ui.simpleaddress.postal_code") ) );
|
||||||
ParameterModel postalCodeParam = new StringParameter( POSTAL_CODE );
|
ParameterModel postalCodeParam = new StringParameter( POSTAL_CODE );
|
||||||
// postalCodeParam.addParameterListener( new NotNullValidationListener( ) );
|
// postalCodeParam.addParameterListener( new NotNullValidationListener( ) );
|
||||||
postalCodeParam.addParameterListener(
|
postalCodeParam.addParameterListener(
|
||||||
|
|
@ -188,8 +191,8 @@ public class SimpleAddressPropertyForm extends BasicPageForm
|
||||||
phone.setMaxLength( 20 );
|
phone.setMaxLength( 20 );
|
||||||
add( phone );
|
add( phone );
|
||||||
|
|
||||||
add( new Label( (String)SimpleAddressGlobalizationUtil.globalize
|
add( new Label(SimpleAddressGlobalizationUtil.globalize(
|
||||||
( "cms.contenttypes.ui.simpleaddress.mobile" ).localize() ) );
|
"cms.contenttypes.ui.simpleaddress.mobile" ) ) );
|
||||||
ParameterModel mobileParam = new StringParameter( MOBILE );
|
ParameterModel mobileParam = new StringParameter( MOBILE );
|
||||||
mobileParam.addParameterListener( new StringInRangeValidationListener(0, 20) );
|
mobileParam.addParameterListener( new StringInRangeValidationListener(0, 20) );
|
||||||
TextField mobile = new TextField( mobileParam );
|
TextField mobile = new TextField( mobileParam );
|
||||||
|
|
@ -197,8 +200,8 @@ public class SimpleAddressPropertyForm extends BasicPageForm
|
||||||
mobile.setMaxLength( 20 );
|
mobile.setMaxLength( 20 );
|
||||||
add( mobile );
|
add( mobile );
|
||||||
|
|
||||||
add( new Label( (String)SimpleAddressGlobalizationUtil.globalize
|
add( new Label(SimpleAddressGlobalizationUtil.globalize(
|
||||||
( "cms.contenttypes.ui.simpleaddress.fax" ).localize() ) );
|
"cms.contenttypes.ui.simpleaddress.fax") ) );
|
||||||
ParameterModel faxParam = new StringParameter( FAX );
|
ParameterModel faxParam = new StringParameter( FAX );
|
||||||
faxParam.addParameterListener( new StringInRangeValidationListener(0, 20) );
|
faxParam.addParameterListener( new StringInRangeValidationListener(0, 20) );
|
||||||
TextField fax = new TextField( faxParam );
|
TextField fax = new TextField( faxParam );
|
||||||
|
|
@ -206,8 +209,8 @@ public class SimpleAddressPropertyForm extends BasicPageForm
|
||||||
fax.setMaxLength( 20 );
|
fax.setMaxLength( 20 );
|
||||||
add( fax );
|
add( fax );
|
||||||
|
|
||||||
add( new Label( (String)SimpleAddressGlobalizationUtil.globalize
|
add( new Label(SimpleAddressGlobalizationUtil.globalize(
|
||||||
( "cms.contenttypes.ui.simpleaddress.email" ).localize() ) );
|
"cms.contenttypes.ui.simpleaddress.email" ) ) );
|
||||||
ParameterModel emailParam = new StringParameter( EMAIL );
|
ParameterModel emailParam = new StringParameter( EMAIL );
|
||||||
emailParam.addParameterListener( new StringInRangeValidationListener(0, 75) );
|
emailParam.addParameterListener( new StringInRangeValidationListener(0, 75) );
|
||||||
TextField email = new TextField( emailParam );
|
TextField email = new TextField( emailParam );
|
||||||
|
|
@ -218,12 +221,11 @@ public class SimpleAddressPropertyForm extends BasicPageForm
|
||||||
.localize().toString());
|
.localize().toString());
|
||||||
add( email );
|
add( email );
|
||||||
add(new Label(""));
|
add(new Label(""));
|
||||||
add(new Label( (String)SimpleAddressGlobalizationUtil.globalize
|
add(new Label(SimpleAddressGlobalizationUtil.globalize(
|
||||||
( "cms.contenttypes.ui.simpleaddress.email_desc" )
|
"cms.contenttypes.ui.simpleaddress.email_desc") ) );
|
||||||
.localize() ) );
|
|
||||||
|
|
||||||
add( new Label( (String)SimpleAddressGlobalizationUtil.globalize
|
add( new Label(SimpleAddressGlobalizationUtil.globalize(
|
||||||
( "cms.contenttypes.ui.simpleaddress.uri" ).localize() ) );
|
"cms.contenttypes.ui.simpleaddress.uri") ) );
|
||||||
ParameterModel uriParam = new StringParameter( URI );
|
ParameterModel uriParam = new StringParameter( URI );
|
||||||
uriParam.addParameterListener( new StringInRangeValidationListener(0,250) );
|
uriParam.addParameterListener( new StringInRangeValidationListener(0,250) );
|
||||||
TextField uri = new TextField( uriParam );
|
TextField uri = new TextField( uriParam );
|
||||||
|
|
@ -245,11 +247,11 @@ public class SimpleAddressPropertyForm extends BasicPageForm
|
||||||
.localize().toString());
|
.localize().toString());
|
||||||
add( uri );
|
add( uri );
|
||||||
add(new Label(""));
|
add(new Label(""));
|
||||||
add(new Label((String)SimpleAddressGlobalizationUtil.globalize
|
add(new Label(SimpleAddressGlobalizationUtil.globalize(
|
||||||
( "cms.contenttypes.ui.simpleaddress.uri_desc" ).localize() ) );
|
"cms.contenttypes.ui.simpleaddress.uri_desc") ) );
|
||||||
|
|
||||||
add( new Label( (String)SimpleAddressGlobalizationUtil.globalize
|
add( new Label(SimpleAddressGlobalizationUtil.globalize(
|
||||||
( "cms.contenttypes.ui.simpleaddress.notes" ).localize() ) );
|
"cms.contenttypes.ui.simpleaddress.notes") ) );
|
||||||
ParameterModel notesParam = new StringParameter( NOTES );
|
ParameterModel notesParam = new StringParameter( NOTES );
|
||||||
TextArea notes = new TextArea( notesParam );
|
TextArea notes = new TextArea( notesParam );
|
||||||
notes.setRows(8);
|
notes.setRows(8);
|
||||||
|
|
@ -259,7 +261,7 @@ public class SimpleAddressPropertyForm extends BasicPageForm
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Form initialization hook. Fills widgets with data.
|
* Form initialization hook. Fills widgets with data.
|
||||||
**/
|
*/
|
||||||
public void init(FormSectionEvent fse) {
|
public void init(FormSectionEvent fse) {
|
||||||
FormData data = fse.getFormData();
|
FormData data = fse.getFormData();
|
||||||
SimpleAddress address = ( SimpleAddress ) super.initBasicWidgets(fse);
|
SimpleAddress address = ( SimpleAddress ) super.initBasicWidgets(fse);
|
||||||
|
|
@ -301,7 +303,7 @@ public class SimpleAddressPropertyForm extends BasicPageForm
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Form processing hook. Saves SimpleAddress object.
|
* Form processing hook. Saves SimpleAddress object.
|
||||||
**/
|
*/
|
||||||
public void process(FormSectionEvent fse) {
|
public void process(FormSectionEvent fse) {
|
||||||
FormData data = fse.getFormData();
|
FormData data = fse.getFormData();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -283,7 +283,7 @@ cms.ui.authoring.remove_image=Bild entfernen
|
||||||
cms.ui.authoring.select_an_existing_image=Vorhandenes Bild ausw\u00c4hlen
|
cms.ui.authoring.select_an_existing_image=Vorhandenes Bild ausw\u00c4hlen
|
||||||
cms.ui.authoring.sql_error_in_getting_byte_content=SQL Fehler beim Holen von Bin\u00e4rinhalt!
|
cms.ui.authoring.sql_error_in_getting_byte_content=SQL Fehler beim Holen von Bin\u00e4rinhalt!
|
||||||
cms.ui.authoring.sqle=SQLE
|
cms.ui.authoring.sqle=SQLE
|
||||||
cms.ui.authoring.steps=Authoring steps
|
cms.ui.authoring.steps=Bearbeitungsschritte
|
||||||
cms.ui.authoring.submission_cancelled=Submission Cancelled
|
cms.ui.authoring.submission_cancelled=Submission Cancelled
|
||||||
cms.ui.authoring.text_type=Art des Textes:
|
cms.ui.authoring.text_type=Art des Textes:
|
||||||
cms.ui.authoring.this_article_does_not_have_an_image=Dieser Artikel hat kein Bild.
|
cms.ui.authoring.this_article_does_not_have_an_image=Dieser Artikel hat kein Bild.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package com.arsdigita.cms.contenttypes.ui;
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
import com.arsdigita.bebop.PageState;
|
|
||||||
import com.arsdigita.cms.ContentPage;
|
import com.arsdigita.cms.ContentPage;
|
||||||
import com.arsdigita.cms.ContentSection;
|
import com.arsdigita.cms.ContentSection;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
|
@ -8,7 +7,6 @@ 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.authoring.SimpleEditStep;
|
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
import com.arsdigita.domain.DomainObject;
|
|
||||||
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
||||||
import com.arsdigita.cms.util.GlobalizationUtil;
|
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||||
import com.arsdigita.bebop.Component;
|
import com.arsdigita.bebop.Component;
|
||||||
|
|
@ -17,7 +15,6 @@ import com.arsdigita.bebop.SegmentedPanel;
|
||||||
import com.arsdigita.cms.contenttypes.GenericContact;
|
import com.arsdigita.cms.contenttypes.GenericContact;
|
||||||
import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
|
import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
|
||||||
|
|
||||||
import java.text.DateFormat;
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ import com.arsdigita.toolbox.ui.Section;
|
||||||
import com.arsdigita.util.Assert;
|
import com.arsdigita.util.Assert;
|
||||||
import com.arsdigita.util.SequentialMap;
|
import com.arsdigita.util.SequentialMap;
|
||||||
import com.arsdigita.util.UncheckedWrapperException;
|
import com.arsdigita.util.UncheckedWrapperException;
|
||||||
import com.arsdigita.globalization.GlobalizedMessage;
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,7 @@ class ContactPhonesTable extends Table implements TableActionListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* Just returns the label without underlying link */
|
/* Just returns the object as a componment */
|
||||||
ret = (Component)value;
|
ret = (Component)value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue