Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoritrimble2009-04-29 16:32:36 +0000
committeritrimble2009-04-29 16:32:36 +0000
commit3822813ac3172467b41a31b6069b2a1967497c7b (patch)
tree07ff866db0e5724215c47a0aac29768f3372fb17
parent2f4264d53318bf2927170283901b30d154a3e220 (diff)
downloadwebtools.jsf-3822813ac3172467b41a31b6069b2a1967497c7b.tar.gz
webtools.jsf-3822813ac3172467b41a31b6069b2a1967497c7b.tar.xz
webtools.jsf-3822813ac3172467b41a31b6069b2a1967497c7b.zip
Bug 251638: Feature - Need complete tag library support for Apache MyFaces Trinidad. Add support for "navigationPane" tag.
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/metadata/trinidad_dti.xml13
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/plugin.xml4
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/skinning/minimal.css36
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/skinning/simple.css36
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/Messages.java5
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/converter/operations/CommandNavigationItemOperation.java12
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/converter/operations/NavigationPaneOperation.java431
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/messages.properties1
8 files changed, 499 insertions, 39 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/metadata/trinidad_dti.xml b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/metadata/trinidad_dti.xml
index e3867c031..323e43228 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/metadata/trinidad_dti.xml
+++ b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/metadata/trinidad_dti.xml
@@ -735,6 +735,19 @@
</trait>
</entity>
+ <entity id="navigationPane" type="tag">
+ <trait id="dt-info">
+ <value xsi:type="dti:DTInfo">
+ <tag-convert-info>
+ <operation id="org.eclipse.jst.jsf.apache.trinidad.tagsupport.NavigationPaneOperation"/>
+ </tag-convert-info>
+ <tag-decorate-info id="vpd-decorate-design"
+ needBorderDecorator="true"
+ />
+ </value>
+ </trait>
+ </entity>
+
<entity id="outputFormatted" type="tag">
<trait id="dt-info">
<value xsi:type="dti:DTInfo">
diff --git a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/plugin.xml b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/plugin.xml
index 3c11367b4..a0a4833aa 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/plugin.xml
+++ b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/plugin.xml
@@ -70,6 +70,10 @@
id="InputTextWithIconOperation">
</tagTransformOperation>
<tagTransformOperation
+ class="org.eclipse.jst.jsf.apache.trinidad.tagsupport.converter.operations.NavigationPaneOperation"
+ id="NavigationPaneOperation">
+ </tagTransformOperation>
+ <tagTransformOperation
class="org.eclipse.jst.jsf.apache.trinidad.tagsupport.converter.operations.OutputFormattedOperation"
id="OutputFormattedOperation">
</tagTransformOperation>
diff --git a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/skinning/minimal.css b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/skinning/minimal.css
index b2e980102..2bfe7cd8c 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/skinning/minimal.css
+++ b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/skinning/minimal.css
@@ -26,7 +26,7 @@
.af_dialog_container,.af_panelPopup_container {border-color:#336633;border:1px solid;background-color:white}
.af_dialog_title-bar,.af_panelPopup_title-bar {background-color:#CCCCCC;border-color:#336633;border-bottom:1px solid;padding:2px 2px 2px 2px}
.af_dialog_title-text,.af_panelPopup_title-text {font-family:Arial,Helvetica,Geneva,sans-serif;font-size:11pt;font-weight:normal;white-space:nowrap;overflow:hidden}
-.af_dialog_close-icon {font-family:Arial,Helvetica,Geneva,sans-serif;font-size:11pt;font-weight:normal;margin-left:5px;background-image:url(/trinidad-demo-1.2.5/adf/images/close.gif;jsessionid=8D9ED4C643CCB5A9EEECE4F3C32A2D6B);background-position:center;background-repeat:no-repeat;height:13px;width:13px}
+.af_dialog_close-icon {font-family:Arial,Helvetica,Geneva,sans-serif;font-size:11pt;font-weight:normal;margin-left:5px;background-image:url(images/close.gif);background-position:center;background-repeat:no-repeat;height:13px;width:13px}
.af_dialog_content,.af_panelPopup_content {background-color:#e9e8e8;border:0px}
.af_inputChoice.p_AFDisabled .af_inputChoice_label,.af_inputNumberSpinbox.p_AFDisabled .af_inputNumberSpinbox_label,.af_inputText.p_AFDisabled .af_inputText_label,.af_selectBooleanCheckbox.p_AFDisabled .af_selectBooleanCheckbox_label,.af_selectBooleanRadio.p_AFDisabled .af_selectBooleanRadio_label,.af_inputColor.p_AFDisabled .af_inputColor_label,.af_inputDate.p_AFDisabled .af_inputDate_label,.af_inputListOfValues.p_AFDisabled .af_inputListOfValues_label,.af_selectManyCheckbox.p_AFDisabled .af_selectManyCheckbox_label,.af_selectManyListbox.p_AFDisabled .af_selectManyListbox_label,.af_selectOneChoice.p_AFDisabled .af_selectOneChoice_label,.af_selectOneListbox.p_AFDisabled .af_selectOneListbox_label,.af_selectOneRadio.p_AFDisabled .af_selectOneRadio_label,.af_navigationPane_bar-inactive-enabled .af_navigationPane_bar-content,.af_navigationPane_bar-active-enabled .af_navigationPane_bar-content a,.af_navigationPane_bar-inactive-enabled .af_navigationPane_bar-content a,.af_navigationPane_tabs-inactive .af_navigationPane_tabs-mid A {color:#000000}
.af_inputNumberSpinbox_increment-cell,.af_inputNumberSpinbox_decrement-cell {background-color:#e9e8e8;border-color:#999999;border-width:1px;border-style:solid;width:11px;height:8px}
@@ -51,7 +51,7 @@ button {font-family:Arial,Helvetica,Geneva,sans-serif;font-size:10pt;font-weight
.af_navigationPane_bar-separator {font-family:Arial,Helvetica,Geneva,sans-serif;font-size:10pt;font-weight:normal;padding-left:6px;padding-right:6px;color:gray}
.af_navigationPane_buttons-active-enabled .af_navigationPane_buttons-content,.af_navigationPane_list-active-enabled .af_navigationPane_list-content,.af_navigationPane_tabs-active .af_navigationPane_tabs-mid A,.AFLinkAccessKeyStyle,.af_inputDate_selected,.af_chooseDate_selected {font-weight:bold}
.af_navigationPane_buttons-separator {font-family:Arial,Helvetica,Geneva,sans-serif;font-size:10pt;font-weight:normal;padding-left:6px;padding-right:6px}
-.af_navigationPane_list-bullet {font-family:Arial,Helvetica,Geneva,sans-serif;font-size:10pt;font-weight:normal;vertical-align:middle;width:17px;background-image:url(/trinidad-demo-1.2.5/adf/images/list-bullet.gif;jsessionid=8D9ED4C643CCB5A9EEECE4F3C32A2D6B);background-position:center;background-repeat:no-repeat}
+.af_navigationPane_list-bullet {font-family:Arial,Helvetica,Geneva,sans-serif;font-size:10pt;font-weight:normal;vertical-align:middle;width:17px;background-image:url(images/list-bullet.gif);background-position:center;background-repeat:no-repeat}
.af_navigationPane_tabs {height:26px;overflow:hidden}
.af_navigationPane_tabs-active.p_AFDisabled,.af_navigationPane_tabs-inactive.p_AFDisabled {cursor:default;color:gray}
.af_navigationPane_tabs-start,.af_navigationPane_tabs-start-join {height:22px;width:26px;background-position:top right}
@@ -65,22 +65,22 @@ button {font-family:Arial,Helvetica,Geneva,sans-serif;font-size:10pt;font-weight
.af_navigationPane_tabs-bottom-end-content {height:4px;width:100%;background-repeat:no-repeat}
.af_navigationPane_tabs-mid A {font-family:Arial,Helvetica,Geneva,sans-serif;font-size:10pt;font-weight:normal;color:#000000;text-decoration:none}
.af_navigationPane_tabs-bottom-end-join {background-repeat:repeat-x}
-.af_navigationPane_tabs-active .af_navigationPane_tabs-start {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-start-selected.gif;jsessionid=8D9ED4C643CCB5A9EEECE4F3C32A2D6B)}
-.af_navigationPane_tabs-active .af_navigationPane_tabs-start-join {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-start-join-selected.gif;jsessionid=8D9ED4C643CCB5A9EEECE4F3C32A2D6B)}
-.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-start,.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-mid,.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-end {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-bot-mid-selected.gif;jsessionid=8D9ED4C643CCB5A9EEECE4F3C32A2D6B)}
-.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-start-content {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-bot-start-selected.gif;jsessionid=8D9ED4C643CCB5A9EEECE4F3C32A2D6B)}
-.af_navigationPane_tabs-active .af_navigationPane_tabs-mid {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-mid-selected.gif;jsessionid=8D9ED4C643CCB5A9EEECE4F3C32A2D6B);font-weight:bold}
-.af_navigationPane_tabs-active .af_navigationPane_tabs-end-join-to-inactive {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-end-join-selected-to-deselected.gif;jsessionid=8D9ED4C643CCB5A9EEECE4F3C32A2D6B)}
-.af_navigationPane_tabs-active .af_navigationPane_tabs-end {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-end-selected.gif;jsessionid=8D9ED4C643CCB5A9EEECE4F3C32A2D6B)}
-.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-end-join,.af_navigationPane_tabs-inactive .af_navigationPane_tabs-bottom-start,.af_navigationPane_tabs-inactive .af_navigationPane_tabs-bottom-mid,.af_navigationPane_tabs-inactive .af_navigationPane_tabs-bottom-end,.af_navigationPane_tabs-inactive .af_navigationPane_tabs-bottom-end-join {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-bot-deselected.gif;jsessionid=8D9ED4C643CCB5A9EEECE4F3C32A2D6B)}
-.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-end-content {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-bot-end-selected.gif;jsessionid=8D9ED4C643CCB5A9EEECE4F3C32A2D6B)}
-.af_navigationPane_tabs-inactive .af_navigationPane_tabs-start {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-start-deselected.gif;jsessionid=8D9ED4C643CCB5A9EEECE4F3C32A2D6B)}
+.af_navigationPane_tabs-active .af_navigationPane_tabs-start {background-image:url(images/tab3-start-selected.gif)}
+.af_navigationPane_tabs-active .af_navigationPane_tabs-start-join {background-image:url(images/tab3-start-join-selected.gif)}
+.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-start,.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-mid,.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-end {background-image:url(images/tab3-bot-mid-selected.gif)}
+.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-start-content {background-image:url(images/tab3-bot-start-selected.gif)}
+.af_navigationPane_tabs-active .af_navigationPane_tabs-mid {background-image:url(images/tab3-mid-selected.gif);font-weight:bold}
+.af_navigationPane_tabs-active .af_navigationPane_tabs-end-join-to-inactive {background-image:url(images/tab3-end-join-selected-to-deselected.gif)}
+.af_navigationPane_tabs-active .af_navigationPane_tabs-end {background-image:url(images/tab3-end-selected.gif)}
+.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-end-join,.af_navigationPane_tabs-inactive .af_navigationPane_tabs-bottom-start,.af_navigationPane_tabs-inactive .af_navigationPane_tabs-bottom-mid,.af_navigationPane_tabs-inactive .af_navigationPane_tabs-bottom-end,.af_navigationPane_tabs-inactive .af_navigationPane_tabs-bottom-end-join {background-image:url(images/tab3-bot-deselected.gif)}
+.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-end-content {background-image:url(images/tab3-bot-end-selected.gif)}
+.af_navigationPane_tabs-inactive .af_navigationPane_tabs-start {background-image:url(images/tab3-start-deselected.gif)}
.af_navigationPane_tabs-inactive .af_navigationPane_tabs-bottom-start-content,.af_navigationPane_tabs-inactive .af_navigationPane_tabs-bottom-end-content {background-image:none}
-.af_navigationPane_tabs-inactive .af_navigationPane_tabs-start-join-from-active {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-start-join-selected-to-deselected.gif;jsessionid=8D9ED4C643CCB5A9EEECE4F3C32A2D6B)}
-.af_navigationPane_tabs-inactive .af_navigationPane_tabs-start-join-from-inactive {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-start-join-deselected-to-deselected.gif;jsessionid=8D9ED4C643CCB5A9EEECE4F3C32A2D6B)}
-.af_navigationPane_tabs-inactive .af_navigationPane_tabs-mid {color:#000000;background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-mid-deselected.gif;jsessionid=8D9ED4C643CCB5A9EEECE4F3C32A2D6B)}
-.af_navigationPane_tabs-inactive .af_navigationPane_tabs-end-join-to-inactive {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-end-join-deselected-to-deselected.gif;jsessionid=8D9ED4C643CCB5A9EEECE4F3C32A2D6B)}
-.af_navigationPane_tabs-inactive .af_navigationPane_tabs-end {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-end-deselected.gif;jsessionid=8D9ED4C643CCB5A9EEECE4F3C32A2D6B)}
+.af_navigationPane_tabs-inactive .af_navigationPane_tabs-start-join-from-active {background-image:url(images/tab3-start-join-selected-to-deselected.gif)}
+.af_navigationPane_tabs-inactive .af_navigationPane_tabs-start-join-from-inactive {background-image:url(images/tab3-start-join-deselected-to-deselected.gif)}
+.af_navigationPane_tabs-inactive .af_navigationPane_tabs-mid {color:#000000;background-image:url(images/tab3-mid-deselected.gif)}
+.af_navigationPane_tabs-inactive .af_navigationPane_tabs-end-join-to-inactive {background-image:url(images/tab3-end-join-deselected-to-deselected.gif)}
+.af_navigationPane_tabs-inactive .af_navigationPane_tabs-end {background-image:url(images/tab3-end-deselected.gif)}
.af_panelFormLayout_column,.p_OraTreeIcon {vertical-align:top}
.af_panelFormLayout_separator {background-color:gray;height:1px;font-size:1px;margin-top:3px;margin-bottom:3px}
.af_panelFormLayout_cell,.af_panelFormLayout_content-cell,.af_panelFormLayout_message-cell {padding:1px 0px}
@@ -231,7 +231,7 @@ button {font-family:Arial,Helvetica,Geneva,sans-serif;font-size:10pt;font-weight
.p_OraOnePixelLine {background-color:#CCCCCC;font-size:0pt;overflow:hidden;height:1px;width:100%}
.p_OraDisplayBlock {display:block}
.p_OraHideSkipNaviText {font-size:0pt;margin-top:0px;margin-left:-999px}
-.AFLogo {width:103px;height:13px;background-repeat:no-repeat;background-position:center;vertical-align:middle;background-image:url(/trinidad-demo-1.2.5/images/logo-dark.gif;jsessionid=8D9ED4C643CCB5A9EEECE4F3C32A2D6B)}
+.AFLogo {width:103px;height:13px;background-repeat:no-repeat;background-position:center;vertical-align:middle;background-image:url(images/logo-dark.gif)}
.af_panelBox_content-dark {border-color:#669966}
.af_train_stop.p_AFVisited {border-color:#999999}
.af_panelHeader,.af_showDetailHeader {border-color:#CCCCCC;border-width:0px 0px 1px 0px;border-style:solid;vertical-align:bottom;margin-bottom:3px;padding:0px 3px}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/skinning/simple.css b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/skinning/simple.css
index 2e83dbffc..38fd6941c 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/skinning/simple.css
+++ b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/skinning/simple.css
@@ -26,7 +26,7 @@
.af_dialog_container,.af_panelPopup_container {border-color:#336633;border:1px solid;background-color:white}
.af_dialog_title-bar,.af_panelPopup_title-bar {background-color:#CCCCCC;border-color:#336633;border-bottom:1px solid;padding:2px 2px 2px 2px}
.af_dialog_title-text,.af_panelPopup_title-text {font-family:Arial,Helvetica,Geneva,sans-serif;font-size:11pt;font-weight:normal;white-space:nowrap;overflow:hidden}
-.af_dialog_close-icon {font-family:Arial,Helvetica,Geneva,sans-serif;font-size:11pt;font-weight:normal;margin-left:5px;background-image:url(/trinidad-demo-1.2.5/adf/images/close.gif);background-position:center;background-repeat:no-repeat;height:13px;width:13px}
+.af_dialog_close-icon {font-family:Arial,Helvetica,Geneva,sans-serif;font-size:11pt;font-weight:normal;margin-left:5px;background-image:url(images/close.gif);background-position:center;background-repeat:no-repeat;height:13px;width:13px}
.af_dialog_content,.af_panelPopup_content {background-color:#e9e8e8;border:0px}
.af_inputChoice.p_AFDisabled .af_inputChoice_label,.af_inputNumberSpinbox.p_AFDisabled .af_inputNumberSpinbox_label,.af_inputText.p_AFDisabled .af_inputText_label,.af_selectBooleanCheckbox.p_AFDisabled .af_selectBooleanCheckbox_label,.af_selectBooleanRadio.p_AFDisabled .af_selectBooleanRadio_label,.af_inputColor.p_AFDisabled .af_inputColor_label,.af_inputDate.p_AFDisabled .af_inputDate_label,.af_inputListOfValues.p_AFDisabled .af_inputListOfValues_label,.af_selectManyCheckbox.p_AFDisabled .af_selectManyCheckbox_label,.af_selectManyListbox.p_AFDisabled .af_selectManyListbox_label,.af_selectOneChoice.p_AFDisabled .af_selectOneChoice_label,.af_selectOneListbox.p_AFDisabled .af_selectOneListbox_label,.af_selectOneRadio.p_AFDisabled .af_selectOneRadio_label,.af_navigationPane_bar-inactive-enabled .af_navigationPane_bar-content,.af_navigationPane_bar-active-enabled .af_navigationPane_bar-content a,.af_navigationPane_bar-inactive-enabled .af_navigationPane_bar-content a,.af_navigationPane_tabs-inactive .af_navigationPane_tabs-mid A {color:#000000}
.af_inputNumberSpinbox_increment-cell,.af_inputNumberSpinbox_decrement-cell {background-color:#e9e8e8;border-color:#999999;border-width:1px;border-style:solid;width:11px;height:8px}
@@ -50,7 +50,7 @@ BODY,.portlet-section-body,.portlet-table-body {background-color:#ffffff;font-fa
.af_navigationPane_bar-separator {font-family:Arial,Helvetica,Geneva,sans-serif;font-size:10pt;font-weight:normal;padding-left:6px;padding-right:6px;color:gray}
.af_navigationPane_buttons-active-enabled .af_navigationPane_buttons-content,.af_navigationPane_list-active-enabled .af_navigationPane_list-content,.af_navigationPane_tabs-active .af_navigationPane_tabs-mid A,.AFLinkAccessKeyStyle,.af_inputDate_selected,.af_chooseDate_selected {font-weight:bold}
.af_navigationPane_buttons-separator {font-family:Arial,Helvetica,Geneva,sans-serif;font-size:10pt;font-weight:normal;padding-left:6px;padding-right:6px}
-.af_navigationPane_list-bullet {font-family:Arial,Helvetica,Geneva,sans-serif;font-size:10pt;font-weight:normal;vertical-align:middle;width:17px;background-image:url(/trinidad-demo-1.2.5/adf/images/list-bullet.gif);background-position:center;background-repeat:no-repeat}
+.af_navigationPane_list-bullet {font-family:Arial,Helvetica,Geneva,sans-serif;font-size:10pt;font-weight:normal;vertical-align:middle;width:17px;background-image:url(images/list-bullet.gif);background-position:center;background-repeat:no-repeat}
.af_navigationPane_tabs {height:26px;overflow:hidden}
.af_navigationPane_tabs-active.p_AFDisabled,.af_navigationPane_tabs-inactive.p_AFDisabled {cursor:default;color:gray}
.af_navigationPane_tabs-start,.af_navigationPane_tabs-start-join {height:22px;width:26px;background-position:top right}
@@ -64,22 +64,22 @@ BODY,.portlet-section-body,.portlet-table-body {background-color:#ffffff;font-fa
.af_navigationPane_tabs-bottom-end-content {height:4px;width:100%;background-repeat:no-repeat}
.af_navigationPane_tabs-mid A {font-family:Arial,Helvetica,Geneva,sans-serif;font-size:10pt;font-weight:normal;color:#000000;text-decoration:none}
.af_navigationPane_tabs-bottom-end-join {background-repeat:repeat-x}
-.af_navigationPane_tabs-active .af_navigationPane_tabs-start {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-start-selected.gif)}
-.af_navigationPane_tabs-active .af_navigationPane_tabs-start-join {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-start-join-selected.gif)}
-.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-start,.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-mid,.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-end {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-bot-mid-selected.gif)}
-.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-start-content {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-bot-start-selected.gif)}
-.af_navigationPane_tabs-active .af_navigationPane_tabs-mid {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-mid-selected.gif);font-weight:bold}
-.af_navigationPane_tabs-active .af_navigationPane_tabs-end-join-to-inactive {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-end-join-selected-to-deselected.gif)}
-.af_navigationPane_tabs-active .af_navigationPane_tabs-end {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-end-selected.gif)}
-.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-end-join,.af_navigationPane_tabs-inactive .af_navigationPane_tabs-bottom-start,.af_navigationPane_tabs-inactive .af_navigationPane_tabs-bottom-mid,.af_navigationPane_tabs-inactive .af_navigationPane_tabs-bottom-end,.af_navigationPane_tabs-inactive .af_navigationPane_tabs-bottom-end-join {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-bot-deselected.gif)}
-.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-end-content {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-bot-end-selected.gif)}
-.af_navigationPane_tabs-inactive .af_navigationPane_tabs-start {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-start-deselected.gif)}
+.af_navigationPane_tabs-active .af_navigationPane_tabs-start {background-image:url(images/tab3-start-selected.gif)}
+.af_navigationPane_tabs-active .af_navigationPane_tabs-start-join {background-image:url(images/tab3-start-join-selected.gif)}
+.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-start,.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-mid,.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-end {background-image:url(images/tab3-bot-mid-selected.gif)}
+.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-start-content {background-image:url(images/tab3-bot-start-selected.gif)}
+.af_navigationPane_tabs-active .af_navigationPane_tabs-mid {background-image:url(images/tab3-mid-selected.gif);font-weight:bold}
+.af_navigationPane_tabs-active .af_navigationPane_tabs-end-join-to-inactive {background-image:url(images/tab3-end-join-selected-to-deselected.gif)}
+.af_navigationPane_tabs-active .af_navigationPane_tabs-end {background-image:url(images/tab3-end-selected.gif)}
+.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-end-join,.af_navigationPane_tabs-inactive .af_navigationPane_tabs-bottom-start,.af_navigationPane_tabs-inactive .af_navigationPane_tabs-bottom-mid,.af_navigationPane_tabs-inactive .af_navigationPane_tabs-bottom-end,.af_navigationPane_tabs-inactive .af_navigationPane_tabs-bottom-end-join {background-image:url(images/tab3-bot-deselected.gif)}
+.af_navigationPane_tabs-active .af_navigationPane_tabs-bottom-end-content {background-image:url(images/tab3-bot-end-selected.gif)}
+.af_navigationPane_tabs-inactive .af_navigationPane_tabs-start {background-image:url(images/tab3-start-deselected.gif)}
.af_navigationPane_tabs-inactive .af_navigationPane_tabs-bottom-start-content,.af_navigationPane_tabs-inactive .af_navigationPane_tabs-bottom-end-content {background-image:none}
-.af_navigationPane_tabs-inactive .af_navigationPane_tabs-start-join-from-active {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-start-join-selected-to-deselected.gif)}
-.af_navigationPane_tabs-inactive .af_navigationPane_tabs-start-join-from-inactive {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-start-join-deselected-to-deselected.gif)}
-.af_navigationPane_tabs-inactive .af_navigationPane_tabs-mid {color:#000000;background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-mid-deselected.gif)}
-.af_navigationPane_tabs-inactive .af_navigationPane_tabs-end-join-to-inactive {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-end-join-deselected-to-deselected.gif)}
-.af_navigationPane_tabs-inactive .af_navigationPane_tabs-end {background-image:url(/trinidad-demo-1.2.5/adf/images/tab3-end-deselected.gif)}
+.af_navigationPane_tabs-inactive .af_navigationPane_tabs-start-join-from-active {background-image:url(images/tab3-start-join-selected-to-deselected.gif)}
+.af_navigationPane_tabs-inactive .af_navigationPane_tabs-start-join-from-inactive {background-image:url(images/tab3-start-join-deselected-to-deselected.gif)}
+.af_navigationPane_tabs-inactive .af_navigationPane_tabs-mid {color:#000000;background-image:url(images/tab3-mid-deselected.gif)}
+.af_navigationPane_tabs-inactive .af_navigationPane_tabs-end-join-to-inactive {background-image:url(images/tab3-end-join-deselected-to-deselected.gif)}
+.af_navigationPane_tabs-inactive .af_navigationPane_tabs-end {background-image:url(images/tab3-end-deselected.gif)}
.af_panelFormLayout_column,.p_OraTreeIcon {vertical-align:top}
.af_panelFormLayout_separator {background-color:gray;height:1px;font-size:1px;margin-top:3px;margin-bottom:3px}
.af_panelFormLayout_cell,.af_panelFormLayout_content-cell,.af_panelFormLayout_message-cell {padding:0px}
@@ -219,7 +219,7 @@ BODY,.portlet-section-body,.portlet-table-body {background-color:#ffffff;font-fa
.p_OraDisplayBlock {display:block}
.p_OraHideSkipNaviText {font-size:0pt;margin-top:0px;margin-left:-999px}
.PortletHeaderLink,.PortletSubHeaderLink {color:#ffffff;text-decoration:none}
-.AFLogo {width:103px;height:13px;background-repeat:no-repeat;background-position:center;vertical-align:middle;background-image:url(/trinidad-demo-1.2.5/images/logo-dark.gif)}
+.AFLogo {width:103px;height:13px;background-repeat:no-repeat;background-position:center;vertical-align:middle;background-image:url(images/logo-dark.gif)}
body {margin-top:8px}
.p_OraNav2 {border-color:#99cc99}
.af_navigationPane {height:25px}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/Messages.java b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/Messages.java
index d64c1e635..75e5d7519 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/Messages.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/Messages.java
@@ -34,6 +34,11 @@ public class Messages extends NLS {
/**
* See messages.properties.
*/
+ public static String NavigationPaneOperation_EmptyNavigationPaneTag;
+
+ /**
+ * See messages.properties.
+ */
public static String PanelTabbedOperation_EmptyPanelTabbedTag;
/**
diff --git a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/converter/operations/CommandNavigationItemOperation.java b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/converter/operations/CommandNavigationItemOperation.java
index aff177097..7dc403090 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/converter/operations/CommandNavigationItemOperation.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/converter/operations/CommandNavigationItemOperation.java
@@ -129,7 +129,13 @@ public class CommandNavigationItemOperation extends AbstractTrinidadTransformOpe
return ancestor;
}
- private String getText(Element srcElement) {
+ /**
+ * Gets display text from a commandNavigationItem Element.
+ *
+ * @param srcElement A commmandNavigationItem Element instance.
+ * @return Display text from a commandNavigationItem Element.
+ */
+ public static String getText(Element srcElement) {
String text = "commandNavigationItem"; //$NON-NLS-1$
if (srcElement != null) {
String newText = srcElement.getAttribute(ITrinidadConstants.ATTR_TEXTANDACCESSKEY);
@@ -155,7 +161,7 @@ public class CommandNavigationItemOperation extends AbstractTrinidadTransformOpe
return text;
}
- private boolean isDisabled(Element srcElement) {
+ public static boolean isDisabled(Element srcElement) {
String disabledAttr = srcElement.getAttribute(ITrinidadConstants.ATTR_DISABLED);
return Boolean.TRUE.toString().equalsIgnoreCase(disabledAttr);
}
@@ -183,7 +189,7 @@ public class CommandNavigationItemOperation extends AbstractTrinidadTransformOpe
return ret;
}
- private boolean isSelected(Element srcElement) {
+ public static boolean isSelected(Element srcElement) {
String selectedAttr = srcElement.getAttribute(ITrinidadConstants.ATTR_SELECTED);
return Boolean.TRUE.toString().equalsIgnoreCase(selectedAttr);
}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/converter/operations/NavigationPaneOperation.java b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/converter/operations/NavigationPaneOperation.java
new file mode 100644
index 000000000..d8cdf8af1
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/converter/operations/NavigationPaneOperation.java
@@ -0,0 +1,431 @@
+/**
+ * Copyright (c) 2009 Oracle Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle Corporation - initial API and implementation
+ */
+package org.eclipse.jst.jsf.apache.trinidad.tagsupport.converter.operations;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jst.jsf.apache.trinidad.tagsupport.ITrinidadConstants;
+import org.eclipse.jst.jsf.apache.trinidad.tagsupport.Messages;
+import org.eclipse.jst.pagedesigner.converter.ConvertPosition;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+/**
+ * ITransformOperation implementation specifically for the "navigationPane"
+ * JSF Element.
+ *
+ * <br><b>Note:</b> requires ITransformOperation.setTagConverterContext(...) to
+ * have been called to provide a valid ITagConverterContext instance prior to
+ * a call to the transform(...) method.
+ *
+ * @author Ian Trimble - Oracle
+ */
+public class NavigationPaneOperation extends AbstractTrinidadTransformOperation {
+
+ private static final String STYLECLASS_OUTERDIV = "af_navigationPane"; //$NON-NLS-1$
+
+ private static final String STYLECLASS_BAR_OUTERDIV = "af_navigationPane_bar"; //$NON-NLS-1$
+ private static final String STYLECLASS_BAR_TABLE_INACTIVE_ENABLED = "af_navigationPane_bar-inactive-enabled"; //$NON-NLS-1$
+ private static final String STYLECLASS_BAR_TABLE_ACTIVE_ENABLED = "af_navigationPane_bar-active-enabled"; //$NON-NLS-1$
+ private static final String STYLECLASS_BAR_TABLE_INACTIVE_DISABLED = "af_navigationPane_bar-inactive-disabled"; //$NON-NLS-1$
+ private static final String STYLECLASS_BAR_TABLE_ACTIVE_DISABLED = "af_navigationPane_bar-active-disabled"; //$NON-NLS-1$
+ private static final String STYLECLASS_BAR_DIV_CONTENT = "af_navigationPane_bar-content"; //$NON-NLS-1$
+ private static final String STYLECLASS_BAR_DIV_SEPARATOR = "af_navigationPane_bar-separator"; //$NON-NLS-1$
+
+ private static final String STYLECLASS_BUTTONS_TABLE_INACTIVE_ENABLED = "af_navigationPane_buttons-inactive-enabled"; //$NON-NLS-1$
+ private static final String STYLECLASS_BUTTONS_TABLE_ACTIVE_ENABLED = "af_navigationPane_buttons-active-enabled"; //$NON-NLS-1$
+ private static final String STYLECLASS_BUTTONS_TABLE_INACTIVE_DISABLED = "af_navigationPane_buttons-inactive-disabled"; //$NON-NLS-1$
+ private static final String STYLECLASS_BUTTONS_TABLE_ACTIVE_DISABLED = "af_navigationPane_buttons-active-disabled"; //$NON-NLS-1$
+ private static final String STYLECLASS_BUTTONS_DIV_CONTENT = "af_navigationPane_buttons-content"; //$NON-NLS-1$
+ private static final String STYLECLASS_BUTTONS_DIV_SEPARATOR = "af_navigationPane_buttons-separator"; //$NON-NLS-1$
+
+ private static final String STYLECLASS_CHOICE_SELECT = "af_navigationPane_choice-options"; //$NON-NLS-1$
+ private static final String STYLECLASS_CHOICE_BUTTON = "af_navigationPane_choice-button"; //$NON-NLS-1$
+
+ private static final String STYLECLASS_LIST_TABLE_INACTIVE_ENABLED = "af_navigationPane_list-inactive-enabled"; //$NON-NLS-1$
+ private static final String STYLECLASS_LIST_TABLE_ACTIVE_ENABLED = "af_navigationPane_list-active-enabled"; //$NON-NLS-1$
+ private static final String STYLECLASS_LIST_TABLE_INACTIVE_DISABLED = "af_navigationPane_list-inactive-disabled"; //$NON-NLS-1$
+ private static final String STYLECLASS_LIST_TABLE_ACTIVE_DISABLED = "af_navigationPane_list-active-disabled"; //$NON-NLS-1$
+ private static final String STYLECLASS_LIST_TD_BULLET = "af_navigationPane_list-bullet"; //$NON-NLS-1$
+ private static final String STYLECLASS_LIST_DIV_CONTENT = "af_navigationPane_list-content"; //$NON-NLS-1$
+
+ private static final String STYLECLASS_TABS_OUTERDIV = "af_navigationPane_tabs"; //$NON-NLS-1$
+ private static final String STYLECLASS_TABS_TABLE_INACTIVE_ENABLED = "af_navigationPane_tabs-inactive"; //$NON-NLS-1$
+ private static final String STYLECLASS_TABS_TABLE_ACTIVE_ENABLED = "af_navigationPane_tabs-active"; //$NON-NLS-1$
+ private static final String STYLECLASS_TABS_TABLE_INACTIVE_DISABLED = "af_navigationPane_tabs-inactive p_AFDisabled"; //$NON-NLS-1$
+ private static final String STYLECLASS_TABS_TABLE_ACTIVE_DISABLED = "af_navigationPane_tabs-active p_AFDisabled"; //$NON-NLS-1$
+ private static final String STYLECLASS_TABS_TD_START = "af_navigationPane_tabs-start"; //$NON-NLS-1$
+ private static final String STYLECLASS_TABS_TD_START_JOIN = "af_navigationPane_tabs-start-join"; //$NON-NLS-1$
+ private static final String STYLECLASS_TABS_TD_START_JOINFROMACTIVE = "af_navigationPane_tabs-start-join-from-active"; //$NON-NLS-1$
+ private static final String STYLECLASS_TABS_TD_START_JOINFROMINACTIVE = "af_navigationPane_tabs-start-join-from-inactive"; //$NON-NLS-1$
+ private static final String STYLECLASS_TABS_TD_BOTTOM_START = "af_navigationPane_tabs-bottom-start"; //$NON-NLS-1$
+ private static final String STYLECLASS_TABS_TD_MID = "af_navigationPane_tabs-mid"; //$NON-NLS-1$
+ private static final String STYLECLASS_TABS_TD_BOTTOM_MID = "af_navigationPane_tabs-bottom-mid"; //$NON-NLS-1$
+ private static final String STYLECLASS_TABS_TD_END = "af_navigationPane_tabs-end"; //$NON-NLS-1$
+ private static final String STYLECLASS_TABS_TD_END_JOINTOINACTIVE = "af_navigationPane_tabs-end-join-to-inactive"; //$NON-NLS-1$
+ private static final String STYLECLASS_TABS_TD_BOTTOM_END = "af_navigationPane_tabs-bottom-end"; //$NON-NLS-1$
+ private static final String STYLECLASS_TABS_TD_BOTTOM_END_JOIN = "af_navigationPane_tabs-bottom-end-join"; //$NON-NLS-1$
+ private static final String STYLECLASS_TABS_DIV_BOTTOM_START_CONTENT = "af_navigationPane_tabs-bottom-start-content"; //$NON-NLS-1$
+ private static final String STYLECLASS_TABS_DIV_BOTTOM_MID_CONTENT = "af_navigationPane_tabs-bottom-mid-content"; //$NON-NLS-1$
+ private static final String STYLECLASS_TABS_DIV_BOTTOM_END_CONTENT = "af_navigationPane_tabs-bottom-end-content"; //$NON-NLS-1$
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.dtmanager.converter.operations.AbstractTransformOperation#transform(org.w3c.dom.Element, org.w3c.dom.Element)
+ */
+ @Override
+ public Element transform(Element srcElement, Element curElement) {
+ Element div = null;
+ String hint = getHint(srcElement);
+ if (hint.equalsIgnoreCase("bar")) { //$NON-NLS-1$
+ div = transformAsBar(srcElement);
+ } else if (hint.equalsIgnoreCase("buttons")) { //$NON-NLS-1$
+ div = transformAsButtons(srcElement);
+ } else if (hint.equalsIgnoreCase("choice")) { //$NON-NLS-1$
+ div = transformAsChoice(srcElement);
+ } else if (hint.equalsIgnoreCase("list")) { //$NON-NLS-1$
+ div = transformAsList(srcElement);
+ } else if (hint.equalsIgnoreCase("tabs")) { //$NON-NLS-1$
+ div = transformAsTabs(srcElement);
+ } else {
+ div = transformAsBar(srcElement);
+ }
+ return div;
+ }
+
+ private Element transformAsBar(Element srcElement) {
+ return transformAsBarOrButtons(srcElement, true);
+ }
+
+ private Element transformAsButtons(Element srcElement) {
+ return transformAsBarOrButtons(srcElement, false);
+ }
+
+ private Element transformAsBarOrButtons(Element srcElement, boolean isBar) {
+ Element div = null;
+ String styleClass_outerDiv;
+ String styleClass_tableInactiveEnabled;
+ String styleClass_tableActiveEnabled;
+ String styleClass_tableInactiveDisabled;
+ String styleClass_tableActiveDisabled;
+ String styleClass_divContent;
+ String styleClass_divSeparator;
+ if (isBar) {
+ styleClass_outerDiv = STYLECLASS_BAR_OUTERDIV;
+ styleClass_tableInactiveEnabled = STYLECLASS_BAR_TABLE_INACTIVE_ENABLED;
+ styleClass_tableActiveEnabled = STYLECLASS_BAR_TABLE_ACTIVE_ENABLED;
+ styleClass_tableInactiveDisabled = STYLECLASS_BAR_TABLE_INACTIVE_DISABLED;
+ styleClass_tableActiveDisabled = STYLECLASS_BAR_TABLE_ACTIVE_DISABLED;
+ styleClass_divContent = STYLECLASS_BAR_DIV_CONTENT;
+ styleClass_divSeparator = STYLECLASS_BAR_DIV_SEPARATOR;
+ } else {
+ styleClass_outerDiv = STYLECLASS_OUTERDIV;
+ styleClass_tableInactiveEnabled = STYLECLASS_BUTTONS_TABLE_INACTIVE_ENABLED;
+ styleClass_tableActiveEnabled = STYLECLASS_BUTTONS_TABLE_ACTIVE_ENABLED;
+ styleClass_tableInactiveDisabled = STYLECLASS_BUTTONS_TABLE_INACTIVE_DISABLED;
+ styleClass_tableActiveDisabled = STYLECLASS_BUTTONS_TABLE_ACTIVE_DISABLED;
+ styleClass_divContent = STYLECLASS_BUTTONS_DIV_CONTENT;
+ styleClass_divSeparator = STYLECLASS_BUTTONS_DIV_SEPARATOR;
+ }
+ div = createElement("div"); //$NON-NLS-1$
+ setClassAndStyleAttributes(srcElement, styleClass_outerDiv, div);
+ List<Element> childCmdNavItems = getChildCmdNavItems(srcElement);
+ int index = 0;
+ int numChildCmdNavItems = childCmdNavItems.size();
+ if (numChildCmdNavItems > 0) {
+ for (Element childCmdNavItem: childCmdNavItems) {
+ String styleClass =
+ determineStyleClass(
+ childCmdNavItem,
+ styleClass_tableActiveEnabled,
+ styleClass_tableActiveDisabled,
+ styleClass_tableInactiveEnabled,
+ styleClass_tableInactiveDisabled);
+ Element tbody = appendTableAndTBody(div, true, styleClass);
+ Element tr = appendChildElement("tr", tbody); //$NON-NLS-1$
+ Element contentTD = appendChildElement("td", tr); //$NON-NLS-1$
+ Element contentDiv = appendChildElement("div", contentTD); //$NON-NLS-1$
+ appendAttribute(contentDiv, "class", styleClass_divContent); //$NON-NLS-1$
+ tagConverterContext.addChild(
+ childCmdNavItem,
+ new ConvertPosition(contentDiv, 0));
+ if (index++ < numChildCmdNavItems - 1) {
+ Element separatorTD = appendChildElement("td", tr); //$NON-NLS-1$
+ Element separatorDiv = appendChildElement("div", separatorTD); //$NON-NLS-1$
+ appendAttribute(separatorDiv, "class", styleClass_divSeparator); //$NON-NLS-1$
+ appendChildText("|", separatorDiv); //$NON-NLS-1$
+ }
+ }
+ } else {
+ setEmptyNavPaneMessage(div);
+ }
+ return div;
+ }
+
+ private Element transformAsChoice(Element srcElement) {
+ Element div = null;
+ div = createElement("div"); //$NON-NLS-1$
+ setClassAndStyleAttributes(srcElement, STYLECLASS_OUTERDIV, div);
+ List<Element> childCmdNavItems = getChildCmdNavItems(srcElement);
+ if (childCmdNavItems.size() > 0) {
+ Element select = appendChildElement("select", div); //$NON-NLS-1$
+ appendAttribute(select, "class", STYLECLASS_CHOICE_SELECT); //$NON-NLS-1$
+ for (Element childCmdNavItem: childCmdNavItems) {
+ if (!CommandNavigationItemOperation.isDisabled(childCmdNavItem)) {
+ Element option = appendChildElement("option", select); //$NON-NLS-1$
+ if (CommandNavigationItemOperation.isSelected(childCmdNavItem)) {
+ appendAttribute(option, "selected", "selected"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ appendChildText(CommandNavigationItemOperation.getText(childCmdNavItem), option);
+ }
+ }
+ Element span = appendChildElement("span", div); //$NON-NLS-1$
+ appendAttribute(span, "style", "width: 5px;"); //$NON-NLS-1$ //$NON-NLS-2$
+ appendChildText(" ", span); //$NON-NLS-1$
+ Element button = appendChildElement("button", div); //$NON-NLS-1$
+ appendAttribute(button, "class", STYLECLASS_CHOICE_BUTTON); //$NON-NLS-1$
+ appendAttribute(button, "type", "button"); //$NON-NLS-1$ //$NON-NLS-2$
+ appendChildText("Go", button); //$NON-NLS-1$
+ } else {
+ setEmptyNavPaneMessage(div);
+ }
+ return div;
+ }
+
+ private Element transformAsList(Element srcElement) {
+ Element div = null;
+ div = createElement("div"); //$NON-NLS-1$
+ setClassAndStyleAttributes(srcElement, STYLECLASS_OUTERDIV, div);
+ List<Element> childCmdNavItems = getChildCmdNavItems(srcElement);
+ if (childCmdNavItems.size() > 0) {
+ for (Element childCmdNavItem: childCmdNavItems) {
+ String styleClass =
+ determineStyleClass(
+ childCmdNavItem,
+ STYLECLASS_LIST_TABLE_ACTIVE_ENABLED,
+ STYLECLASS_LIST_TABLE_ACTIVE_DISABLED,
+ STYLECLASS_LIST_TABLE_INACTIVE_ENABLED,
+ STYLECLASS_LIST_TABLE_INACTIVE_DISABLED);
+ Element tbody = appendTableAndTBody(div, false, styleClass);
+ Element tr = appendChildElement("tr", tbody); //$NON-NLS-1$
+ Element bulletTD = appendChildElement("td", tr); //$NON-NLS-1$
+ appendAttribute(bulletTD, "class", STYLECLASS_LIST_TD_BULLET); //$NON-NLS-1$
+ Element bulletDiv = appendChildElement("div", bulletTD); //$NON-NLS-1$
+ appendChildText(" ", bulletDiv); //$NON-NLS-1$
+ Element contentTD = appendChildElement("td", tr); //$NON-NLS-1$
+ Element contentDiv = appendChildElement("div", contentTD); //$NON-NLS-1$
+ appendAttribute(contentDiv, "class", STYLECLASS_LIST_DIV_CONTENT); //$NON-NLS-1$
+ tagConverterContext.addChild(
+ childCmdNavItem,
+ new ConvertPosition(contentDiv, 0));
+ }
+ } else {
+ setEmptyNavPaneMessage(div);
+ }
+ return div;
+ }
+
+ private Element transformAsTabs(Element srcElement) {
+ Element div = null;
+ div = createElement("div"); //$NON-NLS-1$
+ setClassAndStyleAttributes(srcElement, STYLECLASS_TABS_OUTERDIV, div);
+ List<Element> childCmdNavItems = getChildCmdNavItems(srcElement);
+ int index = 0;
+ int numChildCmdNavItems = childCmdNavItems.size();
+ int selectedTabIndex = determineSelectedTabIndex(childCmdNavItems);
+ if (numChildCmdNavItems > 0) {
+ for (Element childCmdNavItem: childCmdNavItems) {
+ String tableStyleClass =
+ determineStyleClass(
+ childCmdNavItem,
+ STYLECLASS_TABS_TABLE_ACTIVE_ENABLED,
+ STYLECLASS_TABS_TABLE_ACTIVE_DISABLED,
+ STYLECLASS_TABS_TABLE_INACTIVE_ENABLED,
+ STYLECLASS_TABS_TABLE_INACTIVE_DISABLED);
+ Element outerTBody = appendTableAndTBody(div, true, ""); //$NON-NLS-1$
+ Element outerTR = appendChildElement("tr", outerTBody); //$NON-NLS-1$
+ Element outerTD = appendChildElement("td", outerTR); //$NON-NLS-1$
+ Element innerTBody = appendTableAndTBody(outerTD, false, tableStyleClass);
+ appendStartColumn(innerTBody, index, selectedTabIndex);
+ outerTD = appendChildElement("td", outerTR); //$NON-NLS-1$
+ innerTBody = appendTableAndTBody(outerTD, false, tableStyleClass);
+ appendMidColumn(innerTBody, childCmdNavItem);
+ if (index + 1 != selectedTabIndex) {
+ outerTD = appendChildElement("td", outerTR); //$NON-NLS-1$
+ innerTBody = appendTableAndTBody(outerTD, false, tableStyleClass);
+ appendEndColumn(innerTBody, index, numChildCmdNavItems);
+ }
+ index++;
+ }
+ } else {
+ setEmptyNavPaneMessage(div);
+ }
+ return div;
+ }
+
+ private List<Element> getChildCmdNavItems(Element srcElement) {
+ List<Element> childCmdNavItems = new ArrayList<Element>();
+ NodeList childElements = srcElement.getElementsByTagNameNS(ITrinidadConstants.URI_CORE, "commandNavigationItem"); //$NON-NLS-1$$
+ if (childElements != null && childElements.getLength() > 0) {
+ for (int i = 0, len = childElements.getLength(); i < len; i++) {
+ childCmdNavItems.add((Element)childElements.item(i));
+ }
+ } else {
+ Element nodeStampFacet = getChildFacetByName(srcElement, "nodeStamp"); //$NON-NLS-1$
+ if (nodeStampFacet != null) {
+ childElements = nodeStampFacet.getElementsByTagNameNS(ITrinidadConstants.URI_CORE, "commandNavigationItem"); //$NON-NLS-1$
+ if (childElements != null && childElements.getLength() > 0) {
+ for (int i = 0, len = childElements.getLength(); i < len; i++) {
+ childCmdNavItems.add((Element)childElements.item(i));
+ }
+ }
+ }
+ }
+ return childCmdNavItems;
+ }
+
+ private String getHint(Element srcElement) {
+ String hint = srcElement.getAttribute("hint"); //$NON-NLS-1$
+ return hint != null ? hint : "bar"; //$NON-NLS-1$
+ }
+
+ private void setClassAndStyleAttributes(Element srcElement, String baseStyleClass, Element curElement) {
+ String styleClass = calculateStyleClass(baseStyleClass, srcElement);
+ if (styleClass != null) {
+ appendAttribute(curElement, "class", styleClass); //$NON-NLS-1$
+ }
+ String style = srcElement.getAttribute("inlineStyle"); //$NON-NLS-1$
+ if (style != null) {
+ appendAttribute(curElement, "style", style); //$NON-NLS-1$
+ }
+ }
+
+ private void setEmptyNavPaneMessage(Element curElement) {
+ appendAttribute(curElement, "style", ITrinidadConstants.STYLE_EMPTYELEMENT); //$NON-NLS-1$
+ appendChildText(Messages.NavigationPaneOperation_EmptyNavigationPaneTag, curElement);
+ }
+
+ private Element appendTableAndTBody(Element parentElement, boolean isInline, String styleClass) {
+ Element table = appendChildElement("table", parentElement); //$NON-NLS-1$
+ appendAttribute(table, "cellpadding", "0"); //$NON-NLS-1$ //$NON-NLS-2$
+ appendAttribute(table, "cellspacing", "0"); //$NON-NLS-1$ //$NON-NLS-2$
+ appendAttribute(table, "border", "0"); //$NON-NLS-1$ //$NON-NLS-2$
+ if (isInline) {
+ appendAttribute(table, "style", "display: inline;"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ appendAttribute(table, "class", styleClass); //$NON-NLS-1$
+ Element tbody = appendChildElement("tbody", table); //$NON-NLS-1$
+ return tbody;
+ }
+
+ private String determineStyleClass(
+ Element cmdNavItem,
+ String styleClass_ActiveEnabled,
+ String styleClass_ActiveDisabled,
+ String styleClass_InactiveEnabled,
+ String styleClass_InactiveDisabled) {
+ String styleClass;
+ if (CommandNavigationItemOperation.isSelected(cmdNavItem)) {
+ if (!CommandNavigationItemOperation.isDisabled(cmdNavItem)) {
+ styleClass = styleClass_ActiveEnabled;
+ } else {
+ styleClass = styleClass_ActiveDisabled;
+ }
+ } else {
+ if (!CommandNavigationItemOperation.isDisabled(cmdNavItem)) {
+ styleClass = styleClass_InactiveEnabled;
+ } else {
+ styleClass = styleClass_InactiveDisabled;
+ }
+ }
+ return styleClass;
+ }
+
+ private int determineSelectedTabIndex(List<Element> childCmdNavItems) {
+ int selectedTabIndex = -2;
+ int curTabIndex = 0;
+ for (Element childCmdNavItem: childCmdNavItems) {
+ if (CommandNavigationItemOperation.isSelected(childCmdNavItem)) {
+ selectedTabIndex = curTabIndex;
+ break;
+ }
+ curTabIndex++;
+ }
+ return selectedTabIndex;
+ }
+
+ private void appendStartColumn(Element parentTBody, int curTabIndex, int selectedTabIndex) {
+ String topTDStyleClass;
+ String bottomTDStyleClass;
+ String divStyleClass;
+ if (curTabIndex == 0) {
+ topTDStyleClass = STYLECLASS_TABS_TD_START;
+ bottomTDStyleClass = STYLECLASS_TABS_TD_BOTTOM_START;
+ divStyleClass = STYLECLASS_TABS_DIV_BOTTOM_START_CONTENT;
+ } else {
+ if (curTabIndex == selectedTabIndex) {
+ topTDStyleClass = STYLECLASS_TABS_TD_START_JOIN;
+ bottomTDStyleClass = STYLECLASS_TABS_TD_BOTTOM_START;
+ divStyleClass = STYLECLASS_TABS_DIV_BOTTOM_START_CONTENT;
+ } else {
+ if (curTabIndex == selectedTabIndex + 1) {
+ topTDStyleClass = STYLECLASS_TABS_TD_START_JOINFROMACTIVE;
+ } else {
+ topTDStyleClass = STYLECLASS_TABS_TD_START_JOINFROMINACTIVE;
+ }
+ bottomTDStyleClass = STYLECLASS_TABS_TD_BOTTOM_END;
+ divStyleClass = STYLECLASS_TABS_DIV_BOTTOM_MID_CONTENT;
+ }
+ }
+ Element topTR = appendChildElement("tr", parentTBody); //$NON-NLS-1$
+ Element topTD = appendChildElement("td", topTR); //$NON-NLS-1$
+ appendAttribute(topTD, "class", topTDStyleClass); //$NON-NLS-1$
+ Element bottomTR = appendChildElement("tr", parentTBody); //$NON-NLS-1$
+ Element bottomTD = appendChildElement("td", bottomTR); //$NON-NLS-1$
+ appendAttribute(bottomTD, "class", bottomTDStyleClass); //$NON-NLS-1$
+ Element div = appendChildElement("div", bottomTD); //$NON-NLS-1$
+ appendAttribute(div, "class", divStyleClass); //$NON-NLS-1$
+ }
+
+ private void appendMidColumn(Element parentTBody, Element cmdNavItem) {
+ Element topTR = appendChildElement("tr", parentTBody); //$NON-NLS-1$
+ Element topTD = appendChildElement("td", topTR); //$NON-NLS-1$
+ appendAttribute(topTD, "class", STYLECLASS_TABS_TD_MID); //$NON-NLS-1$
+ tagConverterContext.addChild(cmdNavItem, new ConvertPosition(topTD, 0));
+ Element bottomTR = appendChildElement("tr", parentTBody); //$NON-NLS-1$
+ Element bottomTD = appendChildElement("td", bottomTR); //$NON-NLS-1$
+ appendAttribute(bottomTD, "class", STYLECLASS_TABS_TD_BOTTOM_MID); //$NON-NLS-1$
+ Element div = appendChildElement("div", bottomTD); //$NON-NLS-1$
+ appendAttribute(div, "class", STYLECLASS_TABS_DIV_BOTTOM_MID_CONTENT); //$NON-NLS-1$
+ }
+
+ private void appendEndColumn(Element parentTBody, int curTabIndex, int numTabs) {
+ String topTDStyleClass;
+ String bottomTDStyleClass;
+ if (curTabIndex < numTabs - 1) {
+ topTDStyleClass = STYLECLASS_TABS_TD_END_JOINTOINACTIVE;
+ bottomTDStyleClass = STYLECLASS_TABS_TD_BOTTOM_END_JOIN;
+ } else {
+ topTDStyleClass = STYLECLASS_TABS_TD_END;
+ bottomTDStyleClass = STYLECLASS_TABS_TD_BOTTOM_END;
+ }
+ Element topTR = appendChildElement("tr", parentTBody); //$NON-NLS-1$
+ Element topTD = appendChildElement("td", topTR); //$NON-NLS-1$
+ appendAttribute(topTD, "class", topTDStyleClass); //$NON-NLS-1$
+ Element bottomTR = appendChildElement("tr", parentTBody); //$NON-NLS-1$
+ Element bottomTD = appendChildElement("td", bottomTR); //$NON-NLS-1$
+ appendAttribute(bottomTD, "class", bottomTDStyleClass); //$NON-NLS-1$
+ Element div = appendChildElement("div", bottomTD); //$NON-NLS-1$
+ appendAttribute(div, "class", STYLECLASS_TABS_DIV_BOTTOM_END_CONTENT); //$NON-NLS-1$
+ }
+
+} \ No newline at end of file
diff --git a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/messages.properties b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/messages.properties
index e882575e0..931da5fac 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/messages.properties
+++ b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/src/org/eclipse/jst/jsf/apache/trinidad/tagsupport/messages.properties
@@ -10,6 +10,7 @@
#
###############################################################################
BreadCrumbsOperation_EmptyBreadCrumbsTag=Empty breadCrumbs tag - add child commandNavigationItem tags or set nodeStamp facet
+NavigationPaneOperation_EmptyNavigationPaneTag=Empty navigationPane tag - add child commandNavigationItem tags or set nodeStamp facet
PanelTabbedOperation_EmptyPanelTabbedTag=Empty panelTabbed tag - add child showDetailItem tags
ShowDetailItemOperation_EmptyShowDetailItemTag=Empty showDetailItem tag - add children
SelectItemModel_SampleItem1Label=Sample Label 1

Back to the top