Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoritrimble2006-10-30 19:06:33 +0000
committeritrimble2006-10-30 19:06:33 +0000
commitd5ad6fbad4ead67c331428e157c6fca504084396 (patch)
treefe08fe9dca60ffc67053f672547367a33f1cd9ae
parent38bf0b94a9097fc95b4b875bc8f1c9c881bd53e8 (diff)
downloadwebtools.jsf-d5ad6fbad4ead67c331428e157c6fca504084396.tar.gz
webtools.jsf-d5ad6fbad4ead67c331428e157c6fca504084396.tar.xz
webtools.jsf-d5ad6fbad4ead67c331428e157c6fca504084396.zip
Initial contribution.
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/.classpath7
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/.project28
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/META-INF/MANIFEST.MF42
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/build.properties8
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/cm/jsfcore.properties25
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/cm/jsfcore.xml227
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/cm/jsfhtml.properties102
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/cm/jsfhtml.xml713
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/jsfcore_pi.xml43
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/jsfhtml_pi.xml82
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_ACTIONLISTENER.gifbin0 -> 697 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_ATTRIBUTE.gifbin0 -> 479 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_CONVERTDATETIME.gifbin0 -> 1264 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_CONVERTER.gifbin0 -> 712 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_CONVERTNUMBER.gifbin0 -> 1167 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_FACET.gifbin0 -> 744 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_LOADBUNDLE.gifbin0 -> 713 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_PARAM.gifbin0 -> 636 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_SELECTITEM.gifbin0 -> 467 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_SELECTITEMS.gifbin0 -> 730 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_SUBVIEW.gifbin0 -> 757 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VALIDATEDOUBLERANGE.gifbin0 -> 1105 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VALIDATELENGTH.gifbin0 -> 1105 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VALIDATELONGRANGE.gifbin0 -> 1105 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VALIDATOR.gifbin0 -> 1105 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VALUECHANGELISTENER.gifbin0 -> 782 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VERBATIM.gifbin0 -> 447 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VIEW.gifbin0 -> 502 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_ACTIONLISTENER.gifbin0 -> 222 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_ATTRIBUTE.gifbin0 -> 169 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_CONVERTDATETIME.gifbin0 -> 1005 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_CONVERTER.gifbin0 -> 226 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_CONVERTNUMBER.gifbin0 -> 932 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_FACET.gifbin0 -> 950 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_LOADBUNDLE.gifbin0 -> 415 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_PARAM.gifbin0 -> 333 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_SELECTITEM.gifbin0 -> 914 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_SELECTITEMS.gifbin0 -> 931 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_SUBVIEW.gifbin0 -> 964 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VALIDATEDOUBLERANGE.gifbin0 -> 358 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VALIDATELENGTH.gifbin0 -> 358 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VALIDATELONGRANGE.gifbin0 -> 358 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VALIDATOR.gifbin0 -> 358 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VALUECHANGELISTENER.gifbin0 -> 958 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VERBATIM.gifbin0 -> 122 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VIEW.gifbin0 -> 368 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_COLUMN.gifbin0 -> 471 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_COMMANDBUTTON.gifbin0 -> 325 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_COMMANDLINK.gifbin0 -> 1039 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_DATATABLE.gifbin0 -> 467 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_FORM.gifbin0 -> 788 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_GRAPHICIMAGE.gifbin0 -> 1141 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_INPUTHIDDEN.gifbin0 -> 1109 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_INPUTSECRET.gifbin0 -> 1087 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_INPUTTEXT.gifbin0 -> 358 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_INPUTTEXTAREA.gifbin0 -> 704 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_MESSAGE.gifbin0 -> 490 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_MESSAGES.gifbin0 -> 528 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_OUTPUTFORMAT.gifbin0 -> 759 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_OUTPUTLABEL.gifbin0 -> 804 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_OUTPUTLINK.gifbin0 -> 823 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_OUTPUTTEXT.gifbin0 -> 800 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_PANELGRID.gifbin0 -> 316 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_PANELGROUP.gifbin0 -> 438 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTBOOLEANCHECKBOX.gifbin0 -> 418 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTMANYCHECKBOX.gifbin0 -> 1154 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTMANYLISTBOX.gifbin0 -> 493 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTMANYMENU.gifbin0 -> 731 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTONELISTBOX.gifbin0 -> 500 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTONEMENU.gifbin0 -> 663 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTONERADIO.gifbin0 -> 663 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_COLUMN.gifbin0 -> 162 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_COMMANDBUTTON.gifbin0 -> 150 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_COMMANDLINK.gifbin0 -> 218 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_DATATABLE.gifbin0 -> 343 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_FORM.gifbin0 -> 959 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_GRAPHICIMAGE.gifbin0 -> 601 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_INPUTHIDDEN.gifbin0 -> 341 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_INPUTSECRET.gifbin0 -> 227 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_INPUTTEXT.gifbin0 -> 117 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_INPUTTEXTAREA.gifbin0 -> 139 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_MESSAGE.gifbin0 -> 163 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_MESSAGES.gifbin0 -> 175 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_OUTPUTFORMAT.gifbin0 -> 954 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_OUTPUTLABEL.gifbin0 -> 956 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_OUTPUTLINK.gifbin0 -> 958 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_OUTPUTTEXT.gifbin0 -> 954 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_PANELGRID.gifbin0 -> 123 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_PANELGROUP.gifbin0 -> 206 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTBOOLEANCHECKBOX.gifbin0 -> 149 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTMANYCHECKBOX.gifbin0 -> 352 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTMANYLISTBOX.gifbin0 -> 926 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTMANYMENU.gifbin0 -> 177 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTONELISTBOX.gifbin0 -> 924 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTONEMENU.gifbin0 -> 160 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTONERADIO.gifbin0 -> 166 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/plugin.properties5
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/plugin.xml678
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/core/dom/JSFDOMUtil.java108
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/JSFUIPlugin.java153
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/JSFUIPluginResources.properties40
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/JSFUIResources.properties2
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/ActionsResources.java43
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/ActionsResources.properties18
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddActionListenerAction.java41
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddAttributeAction.java76
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddConvertDateTimeAction.java44
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddConvertNumberAction.java44
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddConverterAction.java51
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddParamAction.java44
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddSelectItemAction.java45
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddSelectItemsAction.java40
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddValidateDoubleRangeAction.java45
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddValidateLengthAction.java45
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddValidateLongRangeAction.java45
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddValidatorAction.java51
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddValueChangeListenerAction.java44
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/DeleteHColumnHeaderFooterAction.java46
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/DeleteHeaderFooterAction.java46
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/ExpressionAction.java120
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/IJSFCoreSupport.java56
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/InsertHColumnHeaderFooterAction.java47
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/InsertHeaderFooterAction.java47
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/JSFAddActionGroup.java203
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/JSFAddChildAction.java67
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/JSFCommandLinkCreator.java108
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/JSFNavigationGroup.java98
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/JSFOutputLinkCreator.java111
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/PageFlowContributor.java109
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/attributegroup/AttributeData.java42
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/attributegroup/CommonDialogFieldGroup.java152
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/attributegroup/CommonDialogFieldWizard.java60
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/attributegroup/DialogFieldFactory.java125
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/celleditors/ConverterValidatorIdDialogField.java77
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/celleditors/JSFAttributeCellEditorFactory.java118
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/AddJSFCoreChildCommand.java115
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/CommandResources.java42
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/CommandResources.properties17
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableDeleteColumnCommand.java89
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableDeleteColumnHeaderCommand.java110
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableDeleteHeaderCommand.java86
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableInsertColumnCommand.java164
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableInsertColumnHeaderCommand.java145
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableInsertHeaderCommand.java128
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridDeleteColumnCommand.java106
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridDeleteRowCommand.java150
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridInsertColumnCommand.java151
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridInsertFooterCommand.java84
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridInsertHeaderCommand.java73
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridInsertRowCommand.java168
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfcore/JSFCoreConverterFactory.java91
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfcore/LoadBundleTagConverter.java137
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfcore/ViewTagConverter.java67
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/ColumnTagConverter.java138
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/CommandButtonTagConverter.java109
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/CommandLinkTagConverter.java147
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/DataTableTagConverter.java297
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/GraphicImageTagConveter.java106
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/InputTagConverter.java102
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/InputTextAreaTagConverter.java73
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/JSFFormTagConverter.java94
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/JSFHTMLConverterFactory.java166
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/MessageTagConverter.java148
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/MessagesTagConverter.java181
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/OutputLabelTagConverter.java119
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/OutputLinkTagConverter.java138
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/OutputTextTagConverter.java114
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/PanelGridTagConverter.java210
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/PanelGroupTagConverter.java93
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectBasedTagConverter.java83
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectBooleanCheckboxTagConverter.java72
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectItemModel.java132
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectManyListboxTagConverter.java56
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectManyMenuTagConverter.java46
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectOneListboxTagConverter.java55
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectOneMenuTagConverter.java43
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectTagConverter.java129
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/TableBasedSelectTagConverter.java173
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfcore/FacetElementEdit.java34
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfcore/JSFCoreElementEditFactory.java51
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfcore/JarEntryEditorInput.java124
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfcore/LoadBundleAction.java155
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfcore/LoadBundleElementEdit.java54
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfhtml/ColumnElementEdit.java47
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfhtml/DataTableElementEdit.java280
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfhtml/DefaultJSFHTMLElementEdit.java95
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfhtml/JSFHTMLElementEditFactory.java55
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfhtml/PanelGridElementEdit.java300
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/request/DeleteHColumnHeaderFooterRequest.java45
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/request/DeleteHeaderFooterRequest.java45
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/request/InsertHColumnHeaderFooterRequest.java45
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/request/InsertHeaderFooterRequest.java45
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/util/DataTableUtil.java82
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/util/PanelGridUtil.java166
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreActionListenerSection.java30
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreAttributeSection.java31
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreConvertDateTimeGroup.java283
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreConvertNumberGroup.java220
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreConverterSection.java30
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreFacetSection.java30
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreLoadBundleSection.java31
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreParamSection.java33
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreSelectItemSection.java32
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreSelectItemsSection.java32
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreSubviewSection.java30
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreValidateDoubleRangeSection.java31
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreValidateLengthSection.java31
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreValidateLongRangeSection.java31
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreValidatorSection.java30
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreValueChangeListenerSection.java30
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreVerbatimSection.java30
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreViewSection.java30
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlActionListenerSection.java308
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlColumnSection.java30
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlCommandButtonSection.java35
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlCommandLinkSection.java34
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlDataTableColumnsSection.java380
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlDataTableSection.java36
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlFormSection.java31
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlGraphicImageSection.java34
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlInputHiddenSection.java31
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlInputHiddenTypeSection.java164
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlInputOthersSection.java852
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlInputSecretSection.java32
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlInputSecretTypeSection.java163
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlInputTextSection.java32
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlInputTextTypeSection.java164
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlInputTextareaSection.java32
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlInputTextareaTypeSection.java165
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlMessageSection.java32
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlMessagesSection.java33
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlOutputFormatParamsSection.java394
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlOutputFormatSection.java32
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlOutputLabelSection.java32
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlOutputLinkSection.java32
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlOutputTextConverterSection.java314
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlOutputTextSection.java33
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlPanelGridSection.java33
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlPanelGroupSection.java32
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlSelectBooleanCheckboxSection.java32
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlSelectChoicesSection.java371
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlSelectManyCheckboxSection.java33
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlSelectManyListboxSection.java33
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlSelectManyMenuSection.java32
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlSelectOneListboxSection.java33
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlSelectOneMenuSection.java32
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlSelectOneRadioSection.java33
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/SectionResources.java43
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/SectionResources.properties68
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/util/JSFUIPluginResourcesUtil.java50
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/.classpath10
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/.project28
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/META-INF/MANIFEST.MF39
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/about.html22
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/build.properties7
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/lib/commons-el.jarbin0 -> 112341 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/lib/jsp-api.jarbin0 -> 50493 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/lib/servlet-api.jarbin0 -> 97693 bytes
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/plugin.properties5
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/plugin.xml5
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/schema/pageVar.exsd172
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/src/org/eclipse/jst/pagedesigner/jsp/core/IJSPCoreConstants.java124
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/src/org/eclipse/jst/pagedesigner/jsp/core/JSPCorePlugin.java88
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/src/org/eclipse/jst/pagedesigner/jsp/core/ListenerList.java141
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/src/org/eclipse/jst/pagedesigner/jsp/core/el/ELParser.java65
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/src/org/eclipse/jst/pagedesigner/jsp/core/el/JSFELParserHelper.java247
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/src/org/eclipse/jst/pagedesigner/jsp/core/el/LoadBundleUtil.java142
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/src/org/eclipse/jst/pagedesigner/jsp/core/internal/pagevar/DocumentPageVariableAdapter.java205
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/src/org/eclipse/jst/pagedesigner/jsp/core/internal/pagevar/PageVariableAdapter.java162
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/src/org/eclipse/jst/pagedesigner/jsp/core/internal/pagevar/PageVariableAdatperRegistry.java214
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/src/org/eclipse/jst/pagedesigner/jsp/core/internal/pagevar/TagVarDescriptor.java81
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/src/org/eclipse/jst/pagedesigner/jsp/core/internal/pagevar/VariableInfo.java88
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/src/org/eclipse/jst/pagedesigner/jsp/core/pagevar/IChangeListener.java22
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/src/org/eclipse/jst/pagedesigner/jsp/core/pagevar/IPageVariablesProvider.java26
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/src/org/eclipse/jst/pagedesigner/jsp/core/pagevar/IVariableInfo.java38
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/src/org/eclipse/jst/pagedesigner/jsp/core/pagevar/adapter/IDocumentPageVariableAdapter.java26
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/src/org/eclipse/jst/pagedesigner/jsp/core/pagevar/adapter/IPageVariableAdapter.java48
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/src/org/eclipse/jst/pagedesigner/jsp/core/pagevar/adapter/PageVariableAdapterFactory.java43
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner.jsp.core/src/org/eclipse/jst/pagedesigner/jsp/core/util/CMUtil.java93
279 files changed, 18527 insertions, 0 deletions
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/.classpath b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/.classpath
new file mode 100644
index 000000000..751c8f2e5
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/.project b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/.project
new file mode 100644
index 000000000..2cf98382c
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.pagedesigner.jsf.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/META-INF/MANIFEST.MF b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..1797b026b
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,42 @@
+Manifest-Version: 1.0
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.jst.pagedesigner.jsf.ui;singleton:=true
+Bundle-Version: 1.5.0
+Bundle-ClassPath: jsfui.jar
+Bundle-Activator: org.eclipse.jst.pagedesigner.jsf.ui.JSFUIPlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.jst.jsf.facesconfig.ui,
+ org.eclipse.jst.jsf.facesconfig,
+ org.eclipse.jst.pagedesigner,
+ org.eclipse.jst.pagedesigner.jsp.core,
+ org.eclipse.wst.common.modulecore
+Eclipse-LazyStart: true
+Provide-Package: org.eclipse.jst.pagedesigner.jsf.core.dom,
+ org.eclipse.jst.pagedesigner.jsf.ui,
+ org.eclipse.jst.pagedesigner.jsf.ui.actions,
+ org.eclipse.jst.pagedesigner.jsf.ui.attributegroup,
+ org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml,
+ org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfcore,
+ org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml,
+ org.eclipse.jst.pagedesigner.jsf.ui.elementedit.jsfcore,
+ org.eclipse.jst.pagedesigner.jsf.ui.elementedit.jsfhtml,
+ org.eclipse.jst.pagedesigner.jsf.ui.elementedit.request,
+ org.eclipse.jst.pagedesigner.jsf.ui.elementedit.util,
+ org.eclipse.jst.pagedesigner.jsf.ui.sections,
+ org.eclipse.jst.pagedesigner.jsf.ui.util
+Bundle-ManifestVersion: 2
+Export-Package: org.eclipse.jst.pagedesigner.jsf.core.dom,
+ org.eclipse.jst.pagedesigner.jsf.ui,
+ org.eclipse.jst.pagedesigner.jsf.ui.actions,
+ org.eclipse.jst.pagedesigner.jsf.ui.attributegroup,
+ org.eclipse.jst.pagedesigner.jsf.ui.celleditors,
+ org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml,
+ org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfcore,
+ org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml,
+ org.eclipse.jst.pagedesigner.jsf.ui.elementedit.jsfcore,
+ org.eclipse.jst.pagedesigner.jsf.ui.elementedit.jsfhtml,
+ org.eclipse.jst.pagedesigner.jsf.ui.elementedit.request,
+ org.eclipse.jst.pagedesigner.jsf.ui.elementedit.util,
+ org.eclipse.jst.pagedesigner.jsf.ui.sections,
+ org.eclipse.jst.pagedesigner.jsf.ui.util
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/build.properties b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/build.properties
new file mode 100644
index 000000000..c7f1d2b96
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/build.properties
@@ -0,0 +1,8 @@
+source.jsfui.jar = src/
+output.jsfui.jar = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ jsfui.jar,\
+ configs/,\
+ icons/
+jars.compile.order = jsfui.jar
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/cm/jsfcore.properties b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/cm/jsfcore.properties
new file mode 100644
index 000000000..dc28f0dec
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/cm/jsfcore.properties
@@ -0,0 +1,25 @@
+Attribute.Label.basename=Basename
+Attribute.Label.binding=Binding
+Attribute.Label.converterId=Converter ID
+Attribute.Label.dateStyle=Date Style
+Attribute.Label.escape=Escape
+Attribute.Label.currencyCode=Currency Code
+Attribute.Label.groupingUsed=Grouping Used
+Attribute.Label.id=ID
+Attribute.Label.integerOnly=Integer Only
+Attribute.Label.itemDisabled=Item Disabled
+Attribute.Label.locale=Locale
+Attribute.Label.maximum=Maximum
+Attribute.Label.minimum=Minimum
+Attribute.Label.name=Name
+Attribute.Label.pattern=Pattern
+Attribute.Label.rendered=Rendered
+Attribute.Label.timeStyle=Time Style
+Attribute.Label.timeZone=Time Zone
+Attribute.Label.type=Type
+Attribute.Label.validatorId=Validator ID
+Attribute.Label.value=Value
+Attribute.Label.var=Var
+Category.Label.Constraint=Constraint
+Category.Label.General=General
+Category.Label.Other=Other
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/cm/jsfcore.xml b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/cm/jsfcore.xml
new file mode 100644
index 000000000..d5f3094f4
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/cm/jsfcore.xml
@@ -0,0 +1,227 @@
+<?xml version="1.0" ?>
+<taglib uri="http://java.sun.com/jsf/core">
+ <tag name="actionListener">
+ <category name="General"
+ displaylabel="%Category.Label.General">
+ <attribute name="type" type="CLASSNAME" required="required"
+ typeparam="superType=I:javax.faces.event.ActionListener"
+ displaylabel="%Attribute.Label.type" />
+ </category>
+ </tag>
+ <tag name="attribute">
+ <category name="General"
+ displaylabel="%Category.Label.General">
+ <attribute name="name" displaylabel="%Attribute.Label.name" required="required"/>
+ <attribute name="value" required="required"
+ displaylabel="%Attribute.Label.value" />
+ </category>
+ </tag>
+ <tag name="convertDateTime">
+ <category name="General"
+ displaylabel="%Category.Label.General">
+ <attribute name="dateStyle" type="ENUMERATED"
+ displaylabel="%Attribute.Label.dateStyle">
+ <option key="short" value="short" />
+ <option key="medium" value="medium" />
+ <option key="long" value="long" />
+ <option key="full" value="full" />
+ <option key="default" value="default" default="default"/>
+ </attribute>
+ <attribute name="locale" type="LOCALE"
+ displaylabel="%Attribute.Label.locale" />
+ <attribute name="pattern" type="ENUMERATED"
+ displaylabel="%Attribute.Label.pattern">
+ <option key="M/d/yy" value="M/d/yy" />
+ <option key="EEE, M/d/yy" value="EEE, M/d/yy" />
+ <option key="MM/dd/yyyy" value="MM/dd/yyyy" />
+ <option key="EEE, MM/dd/yyyy" value="EEE, MM/dd/yyyy" />
+ <option key="MMM d, yyyy" value="MMM d, yyyy" />
+ <option key="EEE, MMM d, yyyy" value="EEE, MMM d, yyyy" />
+ <option key="MMMM d, yyyy" value="MMMM d, yyyy" />
+ <option key="EEEE, MMMM d, yyyy"
+ value="EEEE, MMMM d, yyyy" />
+ <option key="MMMM yyyy" value="MMMM yyyy" />
+ <option key="hh:mm" value="hh:mm" />
+ <option key="hh:mm z" value="hh:mm z" />
+ <option key="HH:mm z" value="HH:mm z" />
+ <option key="HH:mm:ss z" value="HH:mm:ss z" />
+ <option key="M/d/yy hh:mm" value="M/d/yy hh:mm" />
+ <option key="EEE, M/d/yy hh:mm"
+ value="EEE, M/d/yy hh:mm" />
+ <option key="MM/dd/yyyy HH:mm:ss z"
+ value="MM/dd/yyyy HH:mm:ss z" />
+ <option key="EEE, MM/dd/yyyy HH:mm:ss z"
+ value="EEE, MM/dd/yyyy HH:mm:ss z" />
+ <option key="MMM d, yyyy HH:mm z"
+ value="MMM d, yyyy HH:mm z" />
+ <option key="EEE, MMM d, yyyy HH:mm z"
+ value="EEE, MMM d, yyyy HH:mm z" />
+ <option key="MMMM d, yyyy HH:mm z"
+ value="MMMM d, yyyy HH:mm z" />
+ <option key="EEEE, MMMM d, yyyy HH:mm z"
+ value="EEEE, MMMM d, yyyy HH:mm z" />
+ </attribute>
+ <attribute name="timeStyle" type="ENUMERATED"
+ displaylabel="%Attribute.Label.timeStyle">
+ <option key="short" value="short" />
+ <option key="medium" value="medium" />
+ <option key="long" value="long" />
+ <option key="full" value="full" />
+ <option key="default" value="default" default="default"/>
+ </attribute>
+ <attribute name="timeZone" type="TIMEZONE"
+ displaylabel="%Attribute.Label.timeZone" />
+ <attribute name="type" type="ENUMERATED"
+ displaylabel="%Attribute.Label.type">
+ <option key="date" value="date" default="default"/>
+ <option key="time" value="time" />
+ <option key="both" value="both" />
+ </attribute>
+ </category>
+ </tag>
+ <tag name="converter">
+ <category name="General"
+ displaylabel="%Category.Label.General">
+ <attribute name="converterId" required="required"
+ displaylabel="%Attribute.Label.converterId" type="converterId"/>
+ </category>
+ </tag>
+ <tag name="convertNumber">
+ <category name="General"
+ displaylabel="%Category.Label.General">
+ <attribute name="locale" type="LOCALE"
+ displaylabel="%Attribute.Label.locale" />
+ <attribute name="type" displaylabel="%Attribute.Label.type"
+ type="ENUMERATED">
+ <option key="number" value="number" default="default"/>
+ <option key="currency" value="currency" />
+ <option key="percentage" value="percentage" />
+ </attribute>
+ </category>
+ <category name="Other" displaylabel="%Category.Label.Other">
+ <attribute name="currencyCode"
+ displaylabel="%Attribute.Label.currencyCode" type="CURRENCYCODE" />
+ <attribute name="groupingUsed"
+ displaylabel="%Attribute.Label.groupingUsed" type="BOOLEAN" />
+ <attribute name="integerOnly"
+ displaylabel="%Attribute.Label.integerOnly" type="BOOLEAN" />
+ <attribute name="pattern"
+ displaylabel="%Attribute.Label.pattern" type="ENUMERATED">
+ <option key="0" value="0" />
+ <option key="0.00" value="0.00" />
+ <option key="#,##0" value="#,##0" />
+ <option key="#,##0.00" value="#,##0.00" />
+ <option key="#,##0;(#,##0)" value="#,##0;(#,##0)" />
+ <option key="#,##0.00;(#,##0.00)"
+ value="#,##0.00;(#,##0.00)" />
+ <option key="0.##E0" value="0.##E0" />
+ <option key="0%" value="0%" />
+ <option key="0.00%" value="0.00%" />
+ </attribute>
+ </category>
+ </tag>
+ <tag name="facet">
+ <category name="General"
+ displaylabel="%Category.Label.General">
+ <attribute name="name" displaylabel="%Attribute.Label.name" required="required"/>
+ </category>
+ </tag>
+ <tag name="loadBundle">
+ <category name="General"
+ displaylabel="%Category.Label.General">
+ <attribute name="basename" type="CLASSPATH_RESOURCE" required="required"
+ displaylabel="%Attribute.Label.basename" />
+ <attribute name="var" displaylabel="%Attribute.Label.var" required="required"/>
+ </category>
+ </tag>
+ <tag name="param">
+ <referedcategory ref="General">
+ <includeattrs>
+ <attribute name="name"
+ displaylabel="%Attribute.Label.name" />
+ <attribute name="value"
+ displaylabel="%Attribute.Label.value" required="required"/>
+ </includeattrs>
+ </referedcategory>
+ </tag>
+ <tag name="selectItem">
+ <referedcategory ref="General" />
+ <category name="Other" displaylabel="%Category.Label.Other">
+ <attribute name="itemDisabled"
+ displaylabel="%Attribute.Label.itemDisabled" type="BOOLEAN" typeparam="default=false" />
+ </category>
+ </tag>
+ <tag name="selectItems">
+ <referedcategory ref="General" />
+ </tag>
+ <tag name="subview">
+ <referedcategory ref="General">
+ <includeattrs>
+ <attribute name="id" displaylabel="%Attribute.Label.id" required="required"/>
+ </includeattrs>
+ <excludeattrs refs="value" />
+
+ </referedcategory>
+ <category name="Other" displaylabel="%Category.Label.Other">
+ <attribute name="rendered" type="BOOLEAN"
+ displaylabel="%Attribute.Label.rendered" />
+ </category>
+ </tag>
+ <tag name="validateDoubleRange">
+ <referedcategory ref="Constraint" />
+ </tag>
+ <tag name="validateLength">
+ <referedcategory ref="Constraint" />
+ </tag>
+ <tag name="validateLongRange">
+ <referedcategory ref="Constraint" />
+ </tag>
+ <tag name="validator">
+ <category name="General"
+ displaylabel="%Category.Label.General">
+ <attribute name="validatorId"
+ displaylabel="%Attribute.Label.validatorId" type="validatorId" required="required"/>
+ </category>
+ </tag>
+ <tag name="valueChangeListener">
+ <category name="General"
+ displaylabel="%Category.Label.General">
+ <attribute name="type" type="CLASSNAME" required="required"
+ typeparam="superType=I:javax.faces.event.ValueChangeListener"
+ displaylabel="%Attribute.Label.type" />
+ </category>
+ </tag>
+ <tag name="verbatim">
+ <category name="General"
+ displaylabel="%Category.Label.General">
+ <attribute name="escape" type="BOOLEAN" typeparam="default=false"
+ displaylabel="%Attribute.Label.escape" />
+ </category>
+ </tag>
+ <tag name="view">
+ <category name="General"
+ displaylabel="%Category.Label.General">
+ <attribute name="locale" type="LOCALE"
+ displaylabel="%Attribute.Label.locale" />
+ </category>
+ </tag>
+ <definition>
+ <categories>
+ <category name="General"
+ displaylabel="%Category.Label.General">
+ <attribute name="id" displaylabel="%Attribute.Label.id" />
+ <attribute name="value"
+ displaylabel="%Attribute.Label.value" />
+ <attribute name="binding" type="PROPERTYBINDING"
+ displaylabel="%Attribute.Label.binding" />
+ </category>
+ <category name="Constraint"
+ displaylabel="%Category.Label.Constraint">
+ <attribute name="minimum"
+ displaylabel="%Attribute.Label.minimum" />
+ <attribute name="maximum"
+ displaylabel="%Attribute.Label.maximum" />
+ </category>
+ </categories>
+ </definition>
+</taglib> \ No newline at end of file
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/cm/jsfhtml.properties b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/cm/jsfhtml.properties
new file mode 100644
index 000000000..034564874
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/cm/jsfhtml.properties
@@ -0,0 +1,102 @@
+Attribute.Label.accept=Accept
+Attribute.Label.acceptcharset=Accept Charset
+Attribute.Label.accesskey=Access Key
+Attribute.Label.action=Action
+Attribute.Label.actionListener=ActionListener
+Attribute.Label.alt=Alt
+Attribute.Label.bgcolor=BG Color
+Attribute.Label.binding=Binding
+Attribute.Label.border=Border
+Attribute.Label.cellpadding=Cell Padding
+Attribute.Label.cellspacing=Cell Spacing
+Attribute.Label.charset=Charset
+Attribute.Label.cols=Cols
+Attribute.Label.columnClasses=Column Classes
+Attribute.Label.columns=Columns
+Attribute.Label.converter=Converter
+Attribute.Label.coords=Coords
+Attribute.Label.dir=Dir
+Attribute.Label.disabled=Disabled
+Attribute.Label.disabledClass=Disabled Class
+Attribute.Label.enabledClass=Enabled Class
+Attribute.Label.enctype=Enctype
+Attribute.Label.errorClass=Error Class
+Attribute.Label.errorStyle=Error Style
+Attribute.Label.escape=Escape
+Attribute.Label.fatalClass=Fatal Class
+Attribute.Label.fatalStyle=Fatal Style
+Attribute.Label.first=First
+Attribute.Label.footerClass=Footer Class
+Attribute.Label.for=For
+Attribute.Label.frame=Frame
+Attribute.Label.globalOnly=Global Only
+Attribute.Label.headerClass=Header Class
+Attribute.Label.height=Height
+Attribute.Label.hreflang=Hreflang
+Attribute.Label.id=ID
+Attribute.Label.image=Image
+Attribute.Label.immediate=Immediate
+Attribute.Label.infoClass=Info Class
+Attribute.Label.infoStyle=Info Style
+Attribute.Label.ismap=Ismap
+Attribute.Label.lang=Lang
+Attribute.Label.layout=Layout
+Attribute.Label.link=Link
+Attribute.Label.longdesc=Longdesc
+Attribute.Label.maxlength=Max Length
+Attribute.Label.onblur=Onblur
+Attribute.Label.onchange=Onchange
+Attribute.Label.onclick=Onclick
+Attribute.Label.ondblclick=Ondblclick
+Attribute.Label.onfocus=Onfocus
+Attribute.Label.onkeydown=Onkeydown
+Attribute.Label.onkeypress=Onkeypress
+Attribute.Label.onkeyup=Onkeyup
+Attribute.Label.onmousedown=Onmousedown
+Attribute.Label.onmousemove=Onmousemove
+Attribute.Label.onmouseout=Onmouseout
+Attribute.Label.onmouseover=Onmouseover
+Attribute.Label.onmouseup=Onmouseup
+Attribute.Label.onreset=Onreset
+Attribute.Label.onselect=Onselect
+Attribute.Label.onsubmit=Onsubmit
+Attribute.Label.readonly=Read Only
+Attribute.Label.redisplay=Redisplay
+Attribute.Label.rel=Rel
+Attribute.Label.rendered=Rendered
+Attribute.Label.required=Required
+Attribute.Label.rev=Rev
+Attribute.Label.rowClasses=Row Classes
+Attribute.Label.rows=Rows
+Attribute.Label.rules=Rules
+Attribute.Label.shape=Shape
+Attribute.Label.showDetail=Show Detail
+Attribute.Label.showSummary=Show Summary
+Attribute.Label.size=Size
+Attribute.Label.style=Style
+Attribute.Label.styleClass=Style Class
+Attribute.Label.summary=Summary
+Attribute.Label.tabindex=Tab Index
+Attribute.Label.target=Target
+Attribute.Label.title=Title
+Attribute.Label.tooltip=Tooltip
+Attribute.Label.type=Type
+Attribute.Label.url=URL
+Attribute.Label.usemap=Usemap
+Attribute.Label.validator=Validator
+Attribute.Label.value=Value
+Attribute.Label.valueChangeListener=ValueChangeListener
+Attribute.Label.var=Var
+Attribute.Label.warnClass=Warn Class
+Attribute.Label.warnStyle=Warn Style
+Attribute.Label.width=Width
+Category.Label.CSS=CSS
+Category.Label.CSS2=CSS2
+Category.Label.CSS3=CSS3
+Category.Label.CSS4=CSS4
+Category.Label.Event=Event
+Category.Label.HTML=HTML
+Category.Label.JSF=JSF
+Category.Label.Language=Language
+Category.Label.Link=Link
+Category.Label.Table=Table
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/cm/jsfhtml.xml b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/cm/jsfhtml.xml
new file mode 100644
index 000000000..6ccfbcf56
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/cm/jsfhtml.xml
@@ -0,0 +1,713 @@
+<?xml version="1.0" ?>
+<taglib uri="http://java.sun.com/jsf/html">
+ <tag name="column">
+ <category name="JSF" displaylabel="%Category.Label.JSF">
+ <attribute name="id" displaylabel="%Attribute.Label.id" />
+ <attribute name="binding" type="PROPERTYBINDING"
+ displaylabel="%Attribute.Label.binding" />
+ <attribute name="rendered" type="BOOLEAN"
+ displaylabel="%Attribute.Label.rendered" />
+ </category>
+ </tag>
+ <tag name="commandButton">
+ <referedcategory ref="JSF">
+ <includeattrs>
+ <attribute name="action"
+ displaylabel="%Attribute.Label.action" description="action"/>
+ <attribute name="actionListener" type="METHODBINDING"
+ displaylabel="%Attribute.Label.actionListener" />
+ </includeattrs>
+ <excludeattrs
+ refs="converter,validator,valueChangeListener,required" />
+ </referedcategory>
+ <referedcategory ref="Language" />
+ <referedcategory ref="CSS" />
+ <referedcategory ref="Event" />
+ <referedcategory ref="HTML">
+ <includeattrs>
+ <attribute name="type" type="ENUMERATED"
+ displaylabel="%Attribute.Label.type">
+ <option key="submit" value="submit" default="default"/>
+ <option key="reset" value="reset" />
+ </attribute>
+ <attribute name="image" type="RELATIVEPATH"
+ typeparam="suffix=jpg;gif;png"
+ displaylabel="%Attribute.Label.image" />
+ <attribute name="alt"
+ displaylabel="%Attribute.Label.alt" />
+ </includeattrs>
+ </referedcategory>
+ </tag>
+ <tag name="commandLink">
+ <referedcategory ref="JSF">
+ <includeattrs>
+ <attribute name="action"
+ displaylabel="%Attribute.Label.action" />
+ <attribute name="actionListener" type="METHODBINDING"
+ displaylabel="%Attribute.Label.actionListener" />
+ </includeattrs>
+ <excludeattrs
+ refs="converter,validator,valueChangeListener,required" />
+ </referedcategory>
+ <referedcategory ref="Language" />
+ <referedcategory ref="CSS" />
+ <referedcategory ref="Event">
+ <excludeattrs refs="onchange,onclick,onselect" />
+ </referedcategory>
+ <referedcategory ref="Link" displaylabel="%Category.Label.HTML" />
+ </tag>
+ <tag name="dataTable">
+ <category name="JSF" displaylabel="%Category.Label.JSF">
+ <attribute name="id" displaylabel="%Attribute.Label.id" />
+ <attribute name="value"
+ displaylabel="%Attribute.Label.value" />
+ <attribute name="binding" type="PROPERTYBINDING"
+ displaylabel="%Attribute.Label.binding" />
+ <attribute name="var" displaylabel="%Attribute.Label.var" />
+ <attribute name="rendered" type="BOOLEAN"
+ displaylabel="%Attribute.Label.rendered" />
+ <attribute name="rows" displaylabel="%Attribute.Label.rows" />
+ <attribute name="first"
+ displaylabel="%Attribute.Label.first" />
+ </category>
+ <referedcategory ref="Language" />
+ <referedcategory ref="CSS3" displaylabel="%Category.Label.CSS" />
+ <referedcategory ref="Event">
+ <excludeattrs refs="onblur,onchange,onfocus,onselect" />
+ </referedcategory>
+ <referedcategory ref="Table"
+ displaylabel="%Category.Label.HTML" />
+ </tag>
+ <tag name="form">
+ <category name="JSF" displaylabel="%Category.Label.JSF">
+ <attribute name="id" displaylabel="%Attribute.Label.id" />
+ <attribute name="binding" type="PROPERTYBINDING"
+ displaylabel="%Attribute.Label.binding" />
+ <attribute name="rendered" type="BOOLEAN"
+ displaylabel="%Attribute.Label.rendered" />
+ </category>
+ <referedcategory ref="Language" />
+ <referedcategory ref="CSS" />
+ <referedcategory ref="Event">
+ <includeattrs>
+ <attribute name="onreset"
+ displaylabel="%Attribute.Label.onreset" />
+ <attribute name="onsubmit"
+ displaylabel="%Attribute.Label.onsubmit" />
+ </includeattrs>
+ <excludeattrs refs="onblur,onchange,onfocus,onselect" />
+ </referedcategory>
+ <category name="HTML" displaylabel="%Category.Label.HTML">
+ <attribute name="target" type="ENUMERATED"
+ displaylabel="%Attribute.Label.target">
+ <option key="_self" value="_self" />
+ <option key="_blank" value="_blank" />
+ <option key="_parent" value="_parent" />
+ <option key="_top" value="_top" />
+ </attribute>
+ <attribute name="accept"
+ displaylabel="%Attribute.Label.accept" />
+ <attribute name="acceptcharset"
+ displaylabel="%Attribute.Label.acceptcharset" />
+ <attribute name="enctype"
+ displaylabel="%Attribute.Label.enctype" type="ENUMERATED">
+ <option key="application/x-www-form-urlencoded"
+ value="application/x-www-form-urlencoded" default="default"/>
+ </attribute>
+ <attribute name="title"
+ displaylabel="%Attribute.Label.title" />
+ </category>
+ </tag>
+ <tag name="graphicImage">
+ <category name="JSF" displaylabel="%Category.Label.JSF">
+ <attribute name="value" type="WEBPATH"
+ typeparam="suffix=jpg;gif;png"
+ displaylabel="%Attribute.Label.value" />
+ <attribute name="url" type="WEBPATH"
+ typeparam="suffix=jpg;gif;png" displaylabel="%Attribute.Label.url" />
+ <attribute name="binding" type="PROPERTYBINDING"
+ displaylabel="%Attribute.Label.binding" />
+ <attribute name="id" displaylabel="%Attribute.Label.id" />
+ <attribute name="rendered" type="BOOLEAN"
+ displaylabel="%Attribute.Label.rendered" />
+ </category>
+ <referedcategory ref="Language" />
+ <referedcategory ref="CSS" />
+ <referedcategory ref="Event">
+ <excludeattrs refs="onblur,onchange,onfocus,onselect" />
+ </referedcategory>
+ <category name="HTML" displaylabel="%Category.Label.HTML">
+ <attribute name="ismap" type="NAMED-BOOLEAN"
+ displaylabel="%Attribute.Label.ismap" />
+ <attribute name="longdesc" type="RELATIVEPATH"
+ displaylabel="%Attribute.Label.longdesc" />
+ <attribute name="alt" displaylabel="%Attribute.Label.alt" />
+ <attribute name="height"
+ displaylabel="%Attribute.Label.height" />
+ <attribute name="title"
+ displaylabel="%Attribute.Label.title" />
+ <attribute name="usemap"
+ displaylabel="%Attribute.Label.usemap" />
+ <attribute name="width"
+ displaylabel="%Attribute.Label.width" />
+ </category>
+ </tag>
+ <tag name="inputHidden">
+ <referedcategory ref="JSF" />
+ </tag>
+ <tag name="inputSecret">
+ <referedcategory ref="JSF" />
+ <referedcategory ref="Language" />
+ <referedcategory ref="CSS" />
+ <referedcategory ref="Event" />
+ <referedcategory ref="HTML">
+ <includeattrs>
+ <attribute name="maxlength"
+ displaylabel="%Attribute.Label.maxlength" />
+ <attribute name="redisplay" type="BOOLEAN"
+ displaylabel="%Attribute.Label.redisplay" />
+ <attribute name="alt"
+ displaylabel="%Attribute.Label.alt" />
+ <attribute name="size"
+ displaylabel="%Attribute.Label.size" />
+ </includeattrs>
+ </referedcategory>
+ </tag>
+ <tag name="inputText">
+ <referedcategory ref="JSF" />
+ <referedcategory ref="Language" />
+ <referedcategory ref="CSS" />
+ <referedcategory ref="Event" />
+ <referedcategory ref="HTML">
+ <includeattrs>
+ <attribute name="maxlength"
+ displaylabel="%Attribute.Label.maxlength" />
+ <attribute name="alt"
+ displaylabel="%Attribute.Label.alt" />
+ <attribute name="size"
+ displaylabel="%Attribute.Label.size" />
+ </includeattrs>
+ </referedcategory>
+ </tag>
+ <tag name="inputTextarea">
+ <referedcategory ref="JSF" />
+ <referedcategory ref="Language" />
+ <referedcategory ref="CSS" />
+ <referedcategory ref="Event" />
+ <referedcategory ref="HTML">
+ <includeattrs>
+ <attribute name="cols"
+ displaylabel="%Attribute.Label.cols" />
+ <attribute name="rows"
+ displaylabel="%Attribute.Label.rows" />
+ </includeattrs>
+ </referedcategory>
+ </tag>
+ <tag name="message">
+ <category name="JSF" displaylabel="%Category.Label.JSF">
+ <attribute name="id" displaylabel="%Attribute.Label.id" />
+ <attribute name="binding" type="PROPERTYBINDING"
+ displaylabel="%Attribute.Label.binding" />
+ <attribute name="for" displaylabel="%Attribute.Label.for" required="required"/>
+ <attribute name="rendered" type="BOOLEAN"
+ displaylabel="%Attribute.Label.rendered" />
+ <attribute name="showDetail" type="BOOLEAN"
+ typeparam="default=true" displaylabel="%Attribute.Label.showDetail" />
+ <attribute name="showSummary" type="BOOLEAN"
+ typeparam="default=false"
+ displaylabel="%Attribute.Label.showSummary" />
+ </category>
+ <referedcategory ref="CSS2" displaylabel="%Category.Label.CSS" />
+ <category name="HTML" displaylabel="%Category.Label.HTML">
+ <attribute name="tooltip" type="BOOLEAN"
+ displaylabel="%Attribute.Label.tooltip" />
+ <attribute name="title"
+ displaylabel="%Attribute.Label.title" />
+ </category>
+ </tag>
+ <tag name="messages">
+ <category name="JSF" displaylabel="%Category.Label.JSF">
+ <attribute name="id" displaylabel="%Attribute.Label.id" />
+ <attribute name="binding" type="PROPERTYBINDING"
+ displaylabel="%Attribute.Label.binding" />
+ <attribute name="globalOnly" type="BOOLEAN"
+ typeparam="default=false"
+ displaylabel="%Attribute.Label.globalOnly" />
+ <attribute name="rendered" type="BOOLEAN"
+ displaylabel="%Attribute.Label.rendered" />
+ <attribute name="showDetail" type="BOOLEAN"
+ typeparam="default=false"
+ displaylabel="%Attribute.Label.showDetail" />
+ <attribute name="showSummary" type="BOOLEAN"
+ typeparam="default=true"
+ displaylabel="%Attribute.Label.showSummary" />
+ </category>
+ <referedcategory ref="CSS2" displaylabel="%Category.Label.CSS" />
+ <category name="HTML" displaylabel="%Category.Label.HTML">
+ <attribute name="layout" type="ENUMERATED"
+ displaylabel="%Attribute.Label.layout">
+ <option key="list" value="list" default="default"/>
+ <option key="table" value="table" />
+ </attribute>
+ <attribute name="tooltip" type="BOOLEAN"
+ displaylabel="%Attribute.Label.tooltip" />
+ <attribute name="title"
+ displaylabel="%Attribute.Label.title" />
+ </category>
+ </tag>
+ <tag name="outputFormat">
+ <referedcategory ref="JSF">
+ <excludeattrs
+ refs="validator,valueChangeListener,immediate,required" />
+ </referedcategory>
+ <referedcategory ref="CSS" />
+ <category name="HTML" displaylabel="%Category.Label.HTML">
+ <attribute name="escape" type="BOOLEAN"
+ typeparam="default=true" displaylabel="%Attribute.Label.escape" />
+ <attribute name="title"
+ displaylabel="%Attribute.Label.title" />
+ </category>
+ </tag>
+ <tag name="outputLabel">
+ <referedcategory ref="JSF">
+ <excludeattrs
+ refs="validator,valueChangeListener,immediate,required" />
+ </referedcategory>
+ <referedcategory ref="Language" />
+ <referedcategory ref="CSS" />
+ <referedcategory ref="Event">
+ <excludeattrs refs="onchange,onselect" />
+ </referedcategory>
+ <referedcategory ref="HTML">
+ <includeattrs>
+ <attribute name="for"
+ displaylabel="%Attribute.Label.for" />
+ </includeattrs>
+ <excludeattrs refs="disabled,readonly" />
+ </referedcategory>
+ </tag>
+ <tag name="outputLink">
+ <referedcategory ref="JSF">
+ <includeattrs>
+ <attribute name="value" type="RELATIVEPATH"
+ displaylabel="%Attribute.Label.value" />
+ </includeattrs>
+ <excludeattrs
+ refs="validator,valueChangeListener,immediate,required" />
+ </referedcategory>
+ <referedcategory ref="Language" />
+ <referedcategory ref="CSS" />
+ <referedcategory ref="Event">
+ <excludeattrs refs="onchange,onselect" />
+ </referedcategory>
+ <referedcategory ref="Link" displaylabel="%Category.Label.HTML" />
+ </tag>
+ <tag name="outputText">
+ <referedcategory ref="JSF">
+ <excludeattrs
+ refs="validator,valueChangeListener,immediate,required" />
+ </referedcategory>
+ <referedcategory ref="CSS" />
+ <category name="HTML" displaylabel="%Category.Label.HTML">
+ <attribute name="escape" type="BOOLEAN"
+ typeparam="default=true" displaylabel="%Attribute.Label.escape" />
+ <attribute name="title"
+ displaylabel="%Attribute.Label.title" />
+ </category>
+ </tag>
+ <tag name="panelGrid">
+ <category name="JSF" displaylabel="%Category.Label.JSF">
+ <attribute name="id" displaylabel="%Attribute.Label.id" />
+ <attribute name="binding" type="PROPERTYBINDING"
+ displaylabel="%Attribute.Label.binding" />
+ <attribute name="rendered" type="BOOLEAN"
+ displaylabel="%Attribute.Label.rendered" />
+ </category>
+ <referedcategory ref="Language" />
+ <referedcategory ref="CSS3" displaylabel="%Category.Label.CSS" />
+ <referedcategory ref="Event">
+ <excludeattrs refs="onblur,onchange,onfocus,onselect" />
+ </referedcategory>
+ <referedcategory ref="Table"
+ displaylabel="%Category.Label.HTML">
+ <includeattrs>
+ <attribute name="columns"
+ displaylabel="%Attribute.Label.columns" />
+ </includeattrs>
+ </referedcategory>
+ </tag>
+ <tag name="panelGroup">
+ <category name="JSF" displaylabel="%Category.Label.JSF">
+ <attribute name="id" displaylabel="%Attribute.Label.id" />
+ <attribute name="binding" type="PROPERTYBINDING"
+ displaylabel="%Attribute.Label.binding" />
+ <attribute name="rendered" type="BOOLEAN"
+ displaylabel="%Attribute.Label.rendered" />
+ </category>
+ <referedcategory ref="CSS" />
+ </tag>
+ <tag name="selectBooleanCheckbox">
+ <referedcategory ref="JSF" />
+ <referedcategory ref="Language" />
+ <referedcategory ref="CSS" />
+ <referedcategory ref="Event" />
+ <referedcategory ref="HTML" />
+ </tag>
+ <tag name="selectManyCheckbox">
+ <referedcategory ref="JSF" />
+ <referedcategory ref="Language" />
+ <referedcategory ref="CSS4" displaylabel="%Category.Label.CSS" />
+ <referedcategory ref="Event" />
+ <referedcategory ref="HTML">
+ <includeattrs>
+ <attribute name="layout" type="ENUMERATED"
+ displaylabel="%Attribute.Label.layout">
+ <option key="lineDirection" value="lineDirection" default="default" />
+ <option key="pageDirection" value="pageDirection" />
+ </attribute>
+ <attribute name="border"
+ displaylabel="%Attribute.Label.border" />
+ </includeattrs>
+ </referedcategory>
+ </tag>
+ <tag name="selectManyListbox">
+ <referedcategory ref="JSF" />
+ <referedcategory ref="Language" />
+ <referedcategory ref="CSS4" displaylabel="%Category.Label.CSS" />
+ <referedcategory ref="Event" />
+ <referedcategory ref="HTML">
+ <includeattrs>
+ <attribute name="size"
+ displaylabel="%Attribute.Label.size" />
+ </includeattrs>
+ </referedcategory>
+ </tag>
+ <tag name="selectManyMenu">
+ <referedcategory ref="JSF" />
+ <referedcategory ref="Language" />
+ <referedcategory ref="CSS4" displaylabel="%Category.Label.CSS" />
+ <referedcategory ref="Event" />
+ <referedcategory ref="HTML" />
+ </tag>
+ <tag name="selectOneListbox">
+ <referedcategory ref="JSF" />
+ <referedcategory ref="Language" />
+ <referedcategory ref="CSS4" displaylabel="%Category.Label.CSS" />
+ <referedcategory ref="Event" />
+ <referedcategory ref="HTML">
+ <includeattrs>
+ <attribute name="size"
+ displaylabel="%Attribute.Label.size" />
+ </includeattrs>
+ </referedcategory>
+ </tag>
+ <tag name="selectOneMenu">
+ <referedcategory ref="JSF" />
+ <referedcategory ref="Language" />
+ <referedcategory ref="CSS4" displaylabel="%Category.Label.CSS" />
+ <referedcategory ref="Event" />
+ <referedcategory ref="HTML" />
+ </tag>
+ <tag name="selectOneRadio">
+ <referedcategory ref="JSF" />
+ <referedcategory ref="Language" />
+ <referedcategory ref="CSS4" displaylabel="%Category.Label.CSS" />
+ <referedcategory ref="Event" />
+ <referedcategory ref="HTML">
+ <includeattrs>
+ <attribute name="layout" type="ENUMERATED"
+ displaylabel="%Attribute.Label.layout">
+ <option key="lineDirection" value="lineDirection" default="default" />
+ <option key="pageDirection" value="pageDirection" />
+ </attribute>
+ <attribute name="border"
+ displaylabel="%Attribute.Label.border" />
+ </includeattrs>
+ </referedcategory>
+ </tag>
+ <definition>
+ <categories>
+ <category name="JSF" displaylabel="%Category.Label.JSF">
+ <attribute name="id" displaylabel="%Attribute.Label.id" />
+ <attribute name="value"
+ displaylabel="%Attribute.Label.value" />
+ <attribute name="binding" type="PROPERTYBINDING"
+ displaylabel="%Attribute.Label.binding" />
+ <attribute name="converter"
+ displaylabel="%Attribute.Label.converter" />
+ <attribute name="validator" type="METHODBINDING"
+ displaylabel="%Attribute.Label.validator" />
+ <attribute name="valueChangeListener"
+ type="METHODBINDING"
+ displaylabel="%Attribute.Label.valueChangeListener" />
+ <attribute name="immediate" type="BOOLEAN"
+ displaylabel="%Attribute.Label.immediate" />
+ <attribute name="rendered" type="BOOLEAN"
+ displaylabel="%Attribute.Label.rendered" />
+ <attribute name="required" type="BOOLEAN"
+ displaylabel="%Attribute.Label.required" />
+ </category>
+ <category name="Language"
+ displaylabel="%Category.Label.Language">
+ <referedattribute ref="lang" />
+ <attribute name="dir" type="ENUMERATED"
+ displaylabel="%Attribute.Label.dir">
+ <option key="RTL" value="RTL" />
+ <option key="LTR" value="LTR" />
+ </attribute>
+ </category>
+ <category name="CSS" displaylabel="%Category.Label.CSS">
+ <attribute name="style" type="CSSSTYLE"
+ typeparam="style=STYLE" displaylabel="%Attribute.Label.style" />
+ <attribute name="styleClass" type="CSSCLASS"
+ typeparam=" " displaylabel="%Attribute.Label.styleClass" />
+ </category>
+ <category name="Event"
+ displaylabel="%Category.Label.Event">
+ <attribute name="onblur" type="JAVASCRIPT"
+ displaylabel="%Attribute.Label.onblur" />
+ <attribute name="onchange" type="JAVASCRIPT"
+ displaylabel="%Attribute.Label.onchange" />
+ <attribute name="onclick" type="JAVASCRIPT"
+ displaylabel="%Attribute.Label.onclick" />
+ <attribute name="ondblclick" type="JAVASCRIPT"
+ displaylabel="%Attribute.Label.ondblclick" />
+ <attribute name="onfocus" type="JAVASCRIPT"
+ displaylabel="%Attribute.Label.onfocus" />
+ <attribute name="onkeydown" type="JAVASCRIPT"
+ displaylabel="%Attribute.Label.onkeydown" />
+ <attribute name="onkeypress" type="JAVASCRIPT"
+ displaylabel="%Attribute.Label.onkeypress" />
+ <attribute name="onkeyup" type="JAVASCRIPT"
+ displaylabel="%Attribute.Label.onkeyup" />
+ <attribute name="onmousedown" type="JAVASCRIPT"
+ displaylabel="%Attribute.Label.onmousedown" />
+ <attribute name="onmousemove" type="JAVASCRIPT"
+ displaylabel="%Attribute.Label.onmousemove" />
+ <attribute name="onmouseout" type="JAVASCRIPT"
+ displaylabel="%Attribute.Label.onmouseout" />
+ <attribute name="onmouseover" type="JAVASCRIPT"
+ displaylabel="%Attribute.Label.onmouseover" />
+ <attribute name="onmouseup" type="JAVASCRIPT"
+ displaylabel="%Attribute.Label.onmouseup" />
+ <attribute name="onselect" type="JAVASCRIPT"
+ displaylabel="%Attribute.Label.onselect" />
+ </category>
+ <category name="HTML" displaylabel="%Category.Label.HTML">
+ <attribute name="accesskey"
+ displaylabel="%Attribute.Label.accesskey" />
+ <attribute name="disabled" type="BOOLEAN"
+ displaylabel="%Attribute.Label.disabled" />
+ <attribute name="readonly" type="BOOLEAN"
+ displaylabel="%Attribute.Label.readonly" />
+ <attribute name="title"
+ displaylabel="%Attribute.Label.title" />
+ <attribute name="tabindex"
+ displaylabel="%Attribute.Label.tabindex" />
+ </category>
+ <category name="Link" displaylabel="%Category.Label.Link">
+ <attribute name="accesskey"
+ displaylabel="%Attribute.Label.accesskey" />
+ <attribute name="title"
+ displaylabel="%Attribute.Label.title" />
+ <attribute name="tabindex"
+ displaylabel="%Attribute.Label.tabindex" />
+ <attribute name="charset"
+ displaylabel="%Attribute.Label.charset" />
+ <referedattribute ref="lang" overridename="hreflang"
+ displaylabel="%Attribute.Label.hreflang" />
+ <referedattribute ref="link" overridename="rel"
+ displaylabel="%Attribute.Label.rel" />
+ <attribute name="shape" type="ENUMERATED"
+ displaylabel="%Attribute.Label.shape">
+ <option key="default"
+ value="Entire region" default="default"/>
+ <option key="circle" value="Circular region" />
+ <option key="rect" value="Rectangular region" />
+ <option key="poly" value="Polygonal region" />
+ </attribute>
+ <attribute name="target" type="ENUMERATED"
+ displaylabel="%Attribute.Label.target">
+ <option key="_self" value="_self" />
+ <option key="_blank" value="_blank" />
+ <option key="_parent" value="_parent" />
+ <option key="_top" value="_top" />
+ </attribute>
+ <attribute name="coords"
+ displaylabel="%Attribute.Label.coords" />
+ <referedattribute ref="link" overridename="rev"
+ displaylabel="%Attribute.Label.rev" />
+ <attribute name="type"
+ displaylabel="%Attribute.Label.type" />
+ </category>
+ <category name="CSS2" displaylabel="%Category.Label.CSS2">
+ <attribute name="style" type="CSSSTYLE"
+ typeparam="style=STYLE" displaylabel="%Attribute.Label.style" />
+ <attribute name="styleClass" type="CSSCLASS"
+ typeparam=" " displaylabel="%Attribute.Label.styleClass" />
+ <attribute name="infoStyle" type="CSSSTYLE"
+ displaylabel="%Attribute.Label.infoStyle" />
+ <attribute name="infoClass" type="CSSCLASS"
+ typeparam=" " displaylabel="%Attribute.Label.infoClass" />
+ <attribute name="warnStyle" type="CSSSTYLE"
+ displaylabel="%Attribute.Label.warnStyle" />
+ <attribute name="warnClass" type="CSSCLASS"
+ typeparam=" " displaylabel="%Attribute.Label.warnClass" />
+ <attribute name="errorStyle" type="CSSSTYLE"
+ displaylabel="%Attribute.Label.errorStyle" />
+ <attribute name="errorClass" type="CSSCLASS"
+ typeparam=" " displaylabel="%Attribute.Label.errorClass" />
+ <attribute name="fatalStyle" type="CSSSTYLE"
+ displaylabel="%Attribute.Label.fatalStyle" />
+ <attribute name="fatalClass" type="CSSCLASS"
+ typeparam=" " displaylabel="%Attribute.Label.fatalClass" />
+ </category>
+ <category name="CSS3" displaylabel="%Category.Label.CSS3">
+ <attribute name="style" type="CSSSTYLE"
+ typeparam="style=STYLE" displaylabel="%Attribute.Label.style" />
+ <attribute name="styleClass" type="CSSCLASS"
+ typeparam=" " displaylabel="%Attribute.Label.styleClass" />
+ <attribute name="columnClasses" type="CSSCLASS"
+ typeparam="," displaylabel="%Attribute.Label.columnClasses" />
+ <attribute name="footerClass" type="CSSCLASS"
+ typeparam=" " displaylabel="%Attribute.Label.footerClass" />
+ <attribute name="headerClass" type="CSSCLASS"
+ typeparam=" " displaylabel="%Attribute.Label.headerClass" />
+ <attribute name="rowClasses" type="CSSCLASS"
+ typeparam="separator=," displaylabel="%Attribute.Label.rowClasses" />
+ </category>
+ <category name="CSS4" displaylabel="%Category.Label.CSS4">
+ <attribute name="style" type="CSSSTYLE"
+ typeparam="style=STYLE" displaylabel="%Attribute.Label.style" />
+ <attribute name="styleClass" type="CSSCLASS"
+ typeparam=" " displaylabel="%Attribute.Label.styleClass" />
+ <attribute name="disabledClass" type="CSSCLASS"
+ typeparam="" displaylabel="%Attribute.Label.disabledClass" />
+ <attribute name="enabledClass" type="CSSCLASS"
+ typeparam="" displaylabel="%Attribute.Label.enabledClass" />
+ </category>
+ <category name="Table"
+ displaylabel="%Category.Label.Table">
+ <attribute name="bgcolor" type="COLOR"
+ displaylabel="%Attribute.Label.bgcolor" />
+ <attribute name="border"
+ displaylabel="%Attribute.Label.border" />
+ <attribute name="cellpadding"
+ displaylabel="%Attribute.Label.cellpadding" />
+ <attribute name="cellspacing"
+ displaylabel="%Attribute.Label.cellspacing" />
+ <attribute name="width"
+ displaylabel="%Attribute.Label.width" />
+ <attribute name="frame" type="ENUMERATED"
+ displaylabel="%Attribute.Label.frame">
+ <option key="lhs" value="Left hand side only" />
+ <option key="above" value="Top side only" />
+ <option key="none" value="No sides" default="default"/>
+ <option key="box" value="All four sides" />
+ <option key="vsides"
+ value="Right and left sides only" />
+ <option key="below" value="Bottom side only" />
+ <option key="border" value="All four sides" />
+ <option key="rhs" value="Right hand side only" />
+ <option key="hsides"
+ value="Top and bottom sides only" />
+ </attribute>
+ <attribute name="rules" type="ENUMERATED"
+ displaylabel="%Attribute.Label.rules">
+ <option key="cols" value="Between columns only" />
+ <option key="groups" value="Between row groups" />
+ <option key="rows" value="Between rows only" />
+ <option key="none" value="No rules" default="default"/>
+ <option key="all"
+ value="Between all rows and columns" />
+ </attribute>
+ <attribute name="summary"
+ displaylabel="%Attribute.Label.summary" />
+ <attribute name="title"
+ displaylabel="%Attribute.Label.title" />
+ </category>
+ </categories>
+ <attributes>
+ <attribute name="lang" type="ENUMERATED"
+ displaylabel="%Attribute.Label.lang">
+ <option key="af" value="af Afrikaans" />
+ <option key="ar" value="ar Arabic (needs subtype)" />
+ <option key="be" value="be Belarusian" />
+ <option key="bg" value="bg Bulgarian" />
+ <option key="br" value="br Breton" />
+ <option key="ca" value="ca Catalan" />
+ <option key="cs" value="cs Czech" />
+ <option key="da" value="da Danish" />
+ <option key="de" value="de German (Standard)" />
+ <option key="el" value="el Greek" />
+ <option key="en" value="en English" />
+ <option key="es" value="es Spanish (Spain)" />
+ <option key="et" value="et Estonian" />
+ <option key="eu" value="eu Basque" />
+ <option key="fa" value="fa Farsi" />
+ <option key="fi" value="fi Finnish" />
+ <option key="fo" value="fo Faeroese" />
+ <option key="fr" value="fr French (Standard)" />
+ <option key="gd" value="gd Gaelic (Scotland)" />
+ <option key="he" value="he Hebrew" />
+ <option key="hi" value="hi Hindi" />
+ <option key="hr" value="hr Croatian" />
+ <option key="hu" value="hu Hungarian" />
+ <option key="id" value="id Indonesian" />
+ <option key="is" value="is Icelandic" />
+ <option key="it" value="it Italian (Standard)" />
+ <option key="ja" value="ja Japanese" />
+ <option key="ko" value="ko Korean" />
+ <option key="lt" value="lt Lithuanian" />
+ <option key="lv" value="lv Latvian" />
+ <option key="mk" value="mk Macedonian" />
+ <option key="ms" value="ms Malaysian" />
+ <option key="mt" value="mt Maltese" />
+ <option key="nl" value="nl Dutch (Standard)" />
+ <option key="no" value="no Norwegian (Bokmal/Nynorsk)" />
+ <option key="pl" value="pl Polish" />
+ <option key="pt" value="pt Portuguese (Standard)" />
+ <option key="rm" value="rm Rhaeto-Romanic" />
+ <option key="ro" value="ro Romanian" />
+ <option key="ru" value="ru Russian" />
+ <option key="sk" value="sk Slovak" />
+ <option key="sl" value="sl Slovenian" />
+ <option key="sq" value="sq Albanian" />
+ <option key="sr" value="sr Serbian (Cyrillic/Latin)" />
+ <option key="sv" value="sv Swedish" />
+ <option key="sx" value="sx Sutu" />
+ <option key="sz" value="sz Sami (Lappish)" />
+ <option key="th" value="th Thai" />
+ <option key="tn" value="tn Setswana" />
+ <option key="tr" value="tr Turkish" />
+ <option key="ts" value="ts Tsonga" />
+ <option key="uk" value="uk Ukrainian" />
+ <option key="ur" value="ur Urdu" />
+ <option key="vi" value="vi Vietnamese" />
+ <option key="xh" value="xh Xhosa" />
+ <option key="yi" value="yi Yiddish" />
+ <option key="zh" value="zh Chinese (needs subtype)" />
+ <option key="zu" value="zu Zulu" />
+ </attribute>
+ <attribute name="link" type="MULTICHOICE" typeparam=" "
+ displaylabel="%Attribute.Label.link">
+ <option key="index" value="index" />
+ <option key="subsection" value="subsection" />
+ <option key="bookmark" value="bookmark" />
+ <option key="start" value="start" />
+ <option key="next" value="next" />
+ <option key="stylesheet" value="stylesheet" />
+ <option key="chapter" value="chapter" />
+ <option key="help" value="help" />
+ <option key="alternate" value="alternate" />
+ <option key="appendix" value="appendix" />
+ <option key="contents" value="contents" />
+ <option key="section" value="section" />
+ <option key="prev" value="prev" />
+ <option key="glossary" value="glossary" />
+ <option key="copyright" value="copyright" />
+ </attribute>
+ </attributes>
+ </definition>
+
+</taglib>
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/jsfcore_pi.xml b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/jsfcore_pi.xml
new file mode 100644
index 000000000..45976c608
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/jsfcore_pi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<palette-item>
+ <category label="JSF Core" uri="http://java.sun.com/jsf/core" iconPrefix="icons/palette/JSFCORE/" jsfComponentCategory="true">
+ <item tagName="actionListener" label="ActionListener" smallIcon="small/JSF_ACTIONLISTENER.gif" largeIcon="large/JSF_ACTIONLISTENER.gif">
+ <attribute name="type" value="" />
+ </item>
+ <item tagName="attribute" label="Attribute" smallIcon="small/JSF_ATTRIBUTE.gif" largeIcon="large/JSF_ATTRIBUTE.gif">
+ <attribute name="name" value="" />
+ <attribute name="value" value="" />
+ </item>
+ <item tagName="convertDateTime" label="ConvertDateTime" smallIcon="small/JSF_CONVERTDATETIME.gif" largeIcon="large/JSF_CONVERTDATETIME.gif"/>
+ <item tagName="converter" label="Converter" smallIcon="small/JSF_CONVERTER.gif" largeIcon="large/JSF_CONVERTER.gif">
+ <attribute name="converterId" value="" />
+ </item>
+ <item tagName="convertNumber" label="ConvertNumber" smallIcon="small/JSF_CONVERTNUMBER.gif" largeIcon="large/JSF_CONVERTNUMBER.gif"/>
+ <item tagName="facet" label="Facet" smallIcon="small/JSF_FACET.gif" largeIcon="large/JSF_FACET.gif">
+ <attribute name="name" value="" />
+ </item>
+ <item tagName="loadBundle" label="LoadBundle" smallIcon="small/JSF_LOADBUNDLE.gif" largeIcon="large/JSF_LOADBUNDLE.gif">
+ <attribute name="basename" value="" />
+ <attribute name="var" value="" />
+ </item>
+ <item tagName="param" label="Param" smallIcon="small/JSF_PARAM.gif" largeIcon="large/JSF_PARAM.gif">
+ <attribute name="value" value="" />
+ </item>
+ <item tagName="selectItem" label="SelectItem" smallIcon="small/JSF_SELECTITEM.gif" largeIcon="large/JSF_SELECTITEM.gif"/>
+ <item tagName="selectItems" label="SelectItems" smallIcon="small/JSF_SELECTITEMS.gif" largeIcon="large/JSF_SELECTITEMS.gif"/>
+ <item tagName="subview" label="Subview" smallIcon="small/JSF_SUBVIEW.gif" largeIcon="large/JSF_SUBVIEW.gif" >
+ <attribute name="id" value="" />
+ </item>
+ <item tagName="validateDoubleRange" label="ValidateDoubleRange" smallIcon="small/JSF_VALIDATEDOUBLERANGE.gif" largeIcon="large/JSF_VALIDATEDOUBLERANGE.gif"/>
+ <item tagName="validateLength" label="ValidateLength" smallIcon="small/JSF_VALIDATELENGTH.gif" largeIcon="large/JSF_VALIDATELENGTH.gif"/>
+ <item tagName="validateLongRange" label="ValidateLongRange" smallIcon="small/JSF_VALIDATELONGRANGE.gif" largeIcon="large/JSF_VALIDATELONGRANGE.gif"/>
+ <item tagName="validator" label="Validator" smallIcon="small/JSF_VALIDATOR.gif" largeIcon="large/JSF_VALIDATOR.gif">
+ <attribute name="validatorId" value="" />
+ </item>
+ <item tagName="valueChangeListener" label="ValueChangeListener" smallIcon="small/JSF_VALUECHANGELISTENER.gif" largeIcon="large/JSF_VALUECHANGELISTENER.gif">
+ <attribute name="type" value="" />
+ </item>
+ <item tagName="verbatim" label="Verbatim" smallIcon="small/JSF_VERBATIM.gif" largeIcon="large/JSF_VERBATIM.gif"/>
+ <item tagName="view" label="View" smallIcon="small/JSF_VIEW.gif" largeIcon="large/JSF_VIEW.gif"/>
+ </category>
+</palette-item>
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/jsfhtml_pi.xml b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/jsfhtml_pi.xml
new file mode 100644
index 000000000..a4dac4a1b
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/configs/jsfhtml_pi.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<palette-item>
+ <category label="JSF HTML" uri="http://java.sun.com/jsf/html"
+ iconPrefix="icons/palette/JSFHTML/" jsfComponentCategory="true">
+ <item tagName="column" label="Column" smallIcon="small/JSF_COLUMN.gif" largeIcon="large/JSF_COLUMN.gif" />
+ <item tagName="commandButton" label="CommandButton" smallIcon="small/JSF_COMMANDBUTTON.gif" largeIcon="large/JSF_COMMANDBUTTON.gif" requireHForm="true">
+ <attribute name="value" value="CommandButton" />
+ </item>
+ <item tagName="commandLink" label="CommandLink" smallIcon="small/JSF_COMMANDLINK.gif" largeIcon="large/JSF_COMMANDLINK.gif" requireHForm="true">
+ <template>
+ <outputText value="CommandLink"
+ uri="http://java.sun.com/jsf/html" />
+ </template>
+ </item>
+ <item tagName="dataTable" label="DataTable" smallIcon="small/JSF_DATATABLE.gif" largeIcon="large/JSF_DATATABLE.gif">
+ <attribute name="border" value="1" />
+ <template>
+ <column id="column1"
+ uri="http://java.sun.com/jsf/html">
+ <facet name="header"
+ uri="http://java.sun.com/jsf/core">
+ <outputText value="column1"
+ uri="http://java.sun.com/jsf/html" />
+ </facet>
+ </column>
+ <column id="column2"
+ uri="http://java.sun.com/jsf/html">
+ <facet name="header"
+ uri="http://java.sun.com/jsf/core">
+ <outputText value="column2"
+ uri="http://java.sun.com/jsf/html" />
+ </facet>
+ </column>
+ </template>
+ </item>
+ <item tagName="form" label="Form" smallIcon="small/JSF_FORM.gif" largeIcon="large/JSF_FORM.gif" />
+ <item tagName="graphicImage" label="GraphicImage" smallIcon="small/JSF_GRAPHICIMAGE.gif" largeIcon="large/JSF_GRAPHICIMAGE.gif" />
+ <item tagName="inputHidden" label="InputHidden" smallIcon="small/JSF_INPUTHIDDEN.gif" largeIcon="large/JSF_INPUTHIDDEN.gif" requireHForm="true" />
+ <item tagName="inputSecret" label="InputSecret" smallIcon="small/JSF_INPUTSECRET.gif" largeIcon="large/JSF_INPUTSECRET.gif" requireHForm="true" />
+ <item tagName="inputText" label="InputText" smallIcon="small/JSF_INPUTTEXT.gif" largeIcon="large/JSF_INPUTTEXT.gif" requireHForm="true" />
+ <item tagName="inputTextarea" label="InputTextarea" smallIcon="small/JSF_INPUTTEXTAREA.gif" largeIcon="large/JSF_INPUTTEXTAREA.gif" requireHForm="true" />
+ <item tagName="message" label="Message" smallIcon="small/JSF_MESSAGE.gif" largeIcon="large/JSF_MESSAGE.gif">
+ <attribute name="for" value="" />
+ </item>
+ <item tagName="messages" label="Messages" smallIcon="small/JSF_MESSAGES.gif" largeIcon="large/JSF_MESSAGES.gif" />
+ <item tagName="outputFormat" label="OutputFormat" smallIcon="small/JSF_OUTPUTFORMAT.gif" largeIcon="large/JSF_OUTPUTFORMAT.gif">
+ <attribute name="value" value="OutputFormat" />
+ </item>
+ <item tagName="outputLabel" label="OutputLabel" smallIcon="small/JSF_OUTPUTLABEL.gif" largeIcon="large/JSF_OUTPUTLABEL.gif">
+ <attribute name="for" value="" />
+ </item>
+ <item tagName="outputLink" label="OutputLink" smallIcon="small/JSF_OUTPUTLINK.gif" largeIcon="large/JSF_OUTPUTLINK.gif">
+ <template>
+ <outputText value="OutputLink"
+ uri="http://java.sun.com/jsf/html" />
+ </template>
+ </item>
+ <item tagName="outputText" label="OutputText" smallIcon="small/JSF_OUTPUTTEXT.gif" largeIcon="large/JSF_OUTPUTTEXT.gif" />
+ <item tagName="panelGrid" label="PanelGrid" smallIcon="small/JSF_PANELGRID.gif" largeIcon="large/JSF_PANELGRID.gif">
+ <attribute name="border" value="1" />
+ <attribute name="columns" value="2" />
+ <template>
+ <outputText value="item1"
+ uri="http://java.sun.com/jsf/html" />
+ <outputText value="item2"
+ uri="http://java.sun.com/jsf/html" />
+ <outputText value="item3"
+ uri="http://java.sun.com/jsf/html" />
+ <outputText value="item4"
+ uri="http://java.sun.com/jsf/html" />
+ </template>
+ </item>
+ <item tagName="panelGroup" label="PanelGroup" smallIcon="small/JSF_PANELGROUP.gif" largeIcon="large/JSF_PANELGROUP.gif" />
+ <item tagName="selectBooleanCheckbox" label="SelectBooleanCheckbox" smallIcon="small/JSF_SELECTBOOLEANCHECKBOX.gif" largeIcon="large/JSF_SELECTBOOLEANCHECKBOX.gif" requireHForm="true" />
+ <item tagName="selectManyCheckbox" label="SelectManyCheckbox" smallIcon="small/JSF_SELECTMANYCHECKBOX.gif" largeIcon="large/JSF_SELECTMANYCHECKBOX.gif" requireHForm="true" />
+ <item tagName="selectManyListbox" label="SelectManyListbox" smallIcon="small/JSF_SELECTMANYLISTBOX.gif" largeIcon="large/JSF_SELECTMANYLISTBOX.gif" requireHForm="true" />
+ <item tagName="selectManyMenu" label="SelectManyMenu" smallIcon="small/JSF_SELECTMANYMENU.gif" largeIcon="large/JSF_SELECTMANYMENU.gif" />
+ <item tagName="selectOneListbox" label="SelectOneListbox" smallIcon="small/JSF_SELECTONELISTBOX.gif" largeIcon="large/JSF_SELECTONELISTBOX.gif" requireHForm="true" />
+ <item tagName="selectOneMenu" label="SelectOneMenu" smallIcon="small/JSF_SELECTONEMENU.gif" largeIcon="large/JSF_SELECTONEMENU.gif" requireHForm="true" />
+ <item tagName="selectOneRadio" label="SelectOneRadio" smallIcon="small/JSF_SELECTONERADIO.gif" largeIcon="large/JSF_SELECTONERADIO.gif" requireHForm="true" />
+ </category>
+</palette-item>
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_ACTIONLISTENER.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_ACTIONLISTENER.gif
new file mode 100644
index 000000000..5dc1abc6c
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_ACTIONLISTENER.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_ATTRIBUTE.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_ATTRIBUTE.gif
new file mode 100644
index 000000000..d99d2eba7
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_ATTRIBUTE.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_CONVERTDATETIME.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_CONVERTDATETIME.gif
new file mode 100644
index 000000000..f9f3409e9
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_CONVERTDATETIME.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_CONVERTER.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_CONVERTER.gif
new file mode 100644
index 000000000..a8f5d3a78
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_CONVERTER.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_CONVERTNUMBER.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_CONVERTNUMBER.gif
new file mode 100644
index 000000000..21b24f031
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_CONVERTNUMBER.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_FACET.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_FACET.gif
new file mode 100644
index 000000000..6424c7faf
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_FACET.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_LOADBUNDLE.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_LOADBUNDLE.gif
new file mode 100644
index 000000000..e1cd4e1bb
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_LOADBUNDLE.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_PARAM.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_PARAM.gif
new file mode 100644
index 000000000..79e07c22c
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_PARAM.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_SELECTITEM.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_SELECTITEM.gif
new file mode 100644
index 000000000..3831d9583
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_SELECTITEM.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_SELECTITEMS.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_SELECTITEMS.gif
new file mode 100644
index 000000000..b2a1c43df
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_SELECTITEMS.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_SUBVIEW.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_SUBVIEW.gif
new file mode 100644
index 000000000..f37f41273
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_SUBVIEW.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VALIDATEDOUBLERANGE.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VALIDATEDOUBLERANGE.gif
new file mode 100644
index 000000000..afee57bcf
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VALIDATEDOUBLERANGE.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VALIDATELENGTH.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VALIDATELENGTH.gif
new file mode 100644
index 000000000..afee57bcf
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VALIDATELENGTH.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VALIDATELONGRANGE.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VALIDATELONGRANGE.gif
new file mode 100644
index 000000000..afee57bcf
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VALIDATELONGRANGE.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VALIDATOR.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VALIDATOR.gif
new file mode 100644
index 000000000..afee57bcf
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VALIDATOR.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VALUECHANGELISTENER.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VALUECHANGELISTENER.gif
new file mode 100644
index 000000000..2fafdebbc
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VALUECHANGELISTENER.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VERBATIM.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VERBATIM.gif
new file mode 100644
index 000000000..d284eb9f5
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VERBATIM.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VIEW.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VIEW.gif
new file mode 100644
index 000000000..98294c189
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/large/JSF_VIEW.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_ACTIONLISTENER.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_ACTIONLISTENER.gif
new file mode 100644
index 000000000..67b2d33f6
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_ACTIONLISTENER.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_ATTRIBUTE.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_ATTRIBUTE.gif
new file mode 100644
index 000000000..b77c75004
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_ATTRIBUTE.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_CONVERTDATETIME.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_CONVERTDATETIME.gif
new file mode 100644
index 000000000..779d8205f
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_CONVERTDATETIME.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_CONVERTER.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_CONVERTER.gif
new file mode 100644
index 000000000..16466edfd
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_CONVERTER.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_CONVERTNUMBER.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_CONVERTNUMBER.gif
new file mode 100644
index 000000000..938f364f4
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_CONVERTNUMBER.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_FACET.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_FACET.gif
new file mode 100644
index 000000000..b9cb1485b
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_FACET.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_LOADBUNDLE.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_LOADBUNDLE.gif
new file mode 100644
index 000000000..8f40ee135
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_LOADBUNDLE.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_PARAM.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_PARAM.gif
new file mode 100644
index 000000000..b3e0727e8
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_PARAM.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_SELECTITEM.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_SELECTITEM.gif
new file mode 100644
index 000000000..247efe030
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_SELECTITEM.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_SELECTITEMS.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_SELECTITEMS.gif
new file mode 100644
index 000000000..7fb0974db
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_SELECTITEMS.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_SUBVIEW.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_SUBVIEW.gif
new file mode 100644
index 000000000..974801573
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_SUBVIEW.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VALIDATEDOUBLERANGE.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VALIDATEDOUBLERANGE.gif
new file mode 100644
index 000000000..86196e996
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VALIDATEDOUBLERANGE.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VALIDATELENGTH.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VALIDATELENGTH.gif
new file mode 100644
index 000000000..86196e996
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VALIDATELENGTH.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VALIDATELONGRANGE.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VALIDATELONGRANGE.gif
new file mode 100644
index 000000000..86196e996
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VALIDATELONGRANGE.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VALIDATOR.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VALIDATOR.gif
new file mode 100644
index 000000000..86196e996
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VALIDATOR.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VALUECHANGELISTENER.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VALUECHANGELISTENER.gif
new file mode 100644
index 000000000..a1cd624a9
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VALUECHANGELISTENER.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VERBATIM.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VERBATIM.gif
new file mode 100644
index 000000000..f12c9df68
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VERBATIM.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VIEW.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VIEW.gif
new file mode 100644
index 000000000..c81630a08
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFCORE/small/JSF_VIEW.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_COLUMN.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_COLUMN.gif
new file mode 100644
index 000000000..381154d55
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_COLUMN.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_COMMANDBUTTON.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_COMMANDBUTTON.gif
new file mode 100644
index 000000000..9ead4e44a
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_COMMANDBUTTON.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_COMMANDLINK.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_COMMANDLINK.gif
new file mode 100644
index 000000000..4c57d0e22
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_COMMANDLINK.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_DATATABLE.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_DATATABLE.gif
new file mode 100644
index 000000000..9873b0928
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_DATATABLE.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_FORM.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_FORM.gif
new file mode 100644
index 000000000..cc27deb97
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_FORM.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_GRAPHICIMAGE.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_GRAPHICIMAGE.gif
new file mode 100644
index 000000000..ad341a5af
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_GRAPHICIMAGE.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_INPUTHIDDEN.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_INPUTHIDDEN.gif
new file mode 100644
index 000000000..d14d09fa9
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_INPUTHIDDEN.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_INPUTSECRET.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_INPUTSECRET.gif
new file mode 100644
index 000000000..60c0a5d44
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_INPUTSECRET.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_INPUTTEXT.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_INPUTTEXT.gif
new file mode 100644
index 000000000..4cc147e98
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_INPUTTEXT.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_INPUTTEXTAREA.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_INPUTTEXTAREA.gif
new file mode 100644
index 000000000..25f22d860
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_INPUTTEXTAREA.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_MESSAGE.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_MESSAGE.gif
new file mode 100644
index 000000000..fb737eb84
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_MESSAGE.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_MESSAGES.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_MESSAGES.gif
new file mode 100644
index 000000000..ca050e65f
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_MESSAGES.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_OUTPUTFORMAT.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_OUTPUTFORMAT.gif
new file mode 100644
index 000000000..ac5920dd5
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_OUTPUTFORMAT.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_OUTPUTLABEL.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_OUTPUTLABEL.gif
new file mode 100644
index 000000000..348aa17b2
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_OUTPUTLABEL.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_OUTPUTLINK.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_OUTPUTLINK.gif
new file mode 100644
index 000000000..03b2bf908
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_OUTPUTLINK.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_OUTPUTTEXT.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_OUTPUTTEXT.gif
new file mode 100644
index 000000000..295ecc4e8
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_OUTPUTTEXT.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_PANELGRID.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_PANELGRID.gif
new file mode 100644
index 000000000..a31479c3f
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_PANELGRID.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_PANELGROUP.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_PANELGROUP.gif
new file mode 100644
index 000000000..da85fe9e8
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_PANELGROUP.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTBOOLEANCHECKBOX.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTBOOLEANCHECKBOX.gif
new file mode 100644
index 000000000..4a02dde9c
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTBOOLEANCHECKBOX.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTMANYCHECKBOX.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTMANYCHECKBOX.gif
new file mode 100644
index 000000000..31b1f37c5
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTMANYCHECKBOX.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTMANYLISTBOX.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTMANYLISTBOX.gif
new file mode 100644
index 000000000..0ed94433f
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTMANYLISTBOX.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTMANYMENU.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTMANYMENU.gif
new file mode 100644
index 000000000..dc1dbbc8b
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTMANYMENU.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTONELISTBOX.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTONELISTBOX.gif
new file mode 100644
index 000000000..a1c257e59
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTONELISTBOX.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTONEMENU.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTONEMENU.gif
new file mode 100644
index 000000000..3686b5cc1
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTONEMENU.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTONERADIO.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTONERADIO.gif
new file mode 100644
index 000000000..f6aeac0f5
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/large/JSF_SELECTONERADIO.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_COLUMN.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_COLUMN.gif
new file mode 100644
index 000000000..5a3db49aa
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_COLUMN.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_COMMANDBUTTON.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_COMMANDBUTTON.gif
new file mode 100644
index 000000000..8e721c512
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_COMMANDBUTTON.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_COMMANDLINK.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_COMMANDLINK.gif
new file mode 100644
index 000000000..5fd9c9494
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_COMMANDLINK.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_DATATABLE.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_DATATABLE.gif
new file mode 100644
index 000000000..d11c996e5
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_DATATABLE.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_FORM.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_FORM.gif
new file mode 100644
index 000000000..3081f3235
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_FORM.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_GRAPHICIMAGE.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_GRAPHICIMAGE.gif
new file mode 100644
index 000000000..a988c1d5f
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_GRAPHICIMAGE.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_INPUTHIDDEN.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_INPUTHIDDEN.gif
new file mode 100644
index 000000000..f18865b9a
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_INPUTHIDDEN.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_INPUTSECRET.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_INPUTSECRET.gif
new file mode 100644
index 000000000..13dbf621a
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_INPUTSECRET.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_INPUTTEXT.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_INPUTTEXT.gif
new file mode 100644
index 000000000..7f506d902
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_INPUTTEXT.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_INPUTTEXTAREA.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_INPUTTEXTAREA.gif
new file mode 100644
index 000000000..a2fa616a9
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_INPUTTEXTAREA.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_MESSAGE.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_MESSAGE.gif
new file mode 100644
index 000000000..7d0c261e2
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_MESSAGE.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_MESSAGES.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_MESSAGES.gif
new file mode 100644
index 000000000..6f43980a3
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_MESSAGES.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_OUTPUTFORMAT.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_OUTPUTFORMAT.gif
new file mode 100644
index 000000000..29dcd77f4
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_OUTPUTFORMAT.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_OUTPUTLABEL.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_OUTPUTLABEL.gif
new file mode 100644
index 000000000..b957bca24
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_OUTPUTLABEL.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_OUTPUTLINK.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_OUTPUTLINK.gif
new file mode 100644
index 000000000..521695662
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_OUTPUTLINK.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_OUTPUTTEXT.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_OUTPUTTEXT.gif
new file mode 100644
index 000000000..084514528
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_OUTPUTTEXT.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_PANELGRID.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_PANELGRID.gif
new file mode 100644
index 000000000..dd22a9991
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_PANELGRID.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_PANELGROUP.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_PANELGROUP.gif
new file mode 100644
index 000000000..0a13d8cca
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_PANELGROUP.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTBOOLEANCHECKBOX.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTBOOLEANCHECKBOX.gif
new file mode 100644
index 000000000..00da14ec8
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTBOOLEANCHECKBOX.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTMANYCHECKBOX.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTMANYCHECKBOX.gif
new file mode 100644
index 000000000..2e2370d31
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTMANYCHECKBOX.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTMANYLISTBOX.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTMANYLISTBOX.gif
new file mode 100644
index 000000000..a20aed559
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTMANYLISTBOX.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTMANYMENU.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTMANYMENU.gif
new file mode 100644
index 000000000..4cfeaa84b
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTMANYMENU.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTONELISTBOX.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTONELISTBOX.gif
new file mode 100644
index 000000000..f6445ed39
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTONELISTBOX.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTONEMENU.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTONEMENU.gif
new file mode 100644
index 000000000..04a0d4304
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTONEMENU.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTONERADIO.gif b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTONERADIO.gif
new file mode 100644
index 000000000..2598367c8
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/icons/palette/JSFHTML/small/JSF_SELECTONERADIO.gif
Binary files differ
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/plugin.properties b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/plugin.properties
new file mode 100644
index 000000000..8c7cf1ded
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/plugin.properties
@@ -0,0 +1,5 @@
+####################################################
+# Plugin XML information.
+####################################################
+pluginName=Pagedesigner JavaServer Faces UI Plug-in
+providerName=Eclipse.org
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/plugin.xml b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/plugin.xml
new file mode 100644
index 000000000..d90a17d96
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/plugin.xml
@@ -0,0 +1,678 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.eclipse.jst.pagedesigner.pageDesignerExtension">
+ <tagConverterFactory class="org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfcore.JSFCoreConverterFactory"/>
+ <attributeCellEditorFactory class="org.eclipse.jst.pagedesigner.jsf.ui.celleditors.JSFAttributeCellEditorFactory"/>
+ <tagConverterFactory class="org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml.JSFHTMLConverterFactory"/>
+ <elementEditFactory class="org.eclipse.jst.pagedesigner.jsf.ui.elementedit.jsfhtml.JSFHTMLElementEditFactory"/>
+ <elementEditFactory class="org.eclipse.jst.pagedesigner.jsf.ui.elementedit.jsfcore.JSFCoreElementEditFactory"/>
+ <linkCreator
+ class="org.eclipse.jst.pagedesigner.jsf.ui.actions.JSFCommandLinkCreator"
+ linkIdentifier="JSF CommandLink"/>
+ <linkCreator
+ class="org.eclipse.jst.pagedesigner.jsf.ui.actions.JSFOutputLinkCreator"
+ linkIdentifier="JSF OutputLink"/>
+ </extension>
+
+ <extension point="org.eclipse.jst.pagedesigner.popupMenuContributor">
+ <menuItemContributor class="org.eclipse.jst.pagedesigner.jsf.ui.actions.PageFlowContributor"
+ URI="http://java.sun.com/jsf/core"/>
+ </extension>
+
+ <!-- page variables -->
+ <extension
+ point="org.eclipse.jst.pagedesigner.jsp.core.pageVar">
+ <taglib uri="http://java.sun.com/jsf/html">
+
+ <tag
+ varTypeStringIsAttr="true"
+ varNameIsAttr="true"
+ varTypeMode="EXPRESSION_COLLECTION_ITEM"
+ varTypeString="value"
+ varName="var"
+ tagName="dataTable"/>
+ </taglib>
+ <taglib uri="http://java.sun.com/jsf/core">
+ <tag
+ varTypeStringIsAttr="true"
+ varNameIsAttr="true"
+ varTypeMode="BUNDLE"
+ varTypeString="basename"
+ varName="var"
+ tagName="loadBundle"/>
+ </taglib>
+ </extension>
+
+ <!-- element and attribute meta data -->
+ <extension
+ point="org.eclipse.jst.pagedesigner.cmRegistry">
+ <registry
+ configFile="configs/cm/jsfcore.xml"
+ uri="http://java.sun.com/jsf/core"/>
+ <registry
+ configFile="configs/cm/jsfhtml.xml"
+ uri="http://java.sun.com/jsf/html"/>
+ </extension>
+ <extension
+ point="org.eclipse.jst.pagedesigner.propertySections">
+ <propertySections>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFCoreActionListenerSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.actionListener">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/core"
+ tagName="actionListener"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFCoreAttributeSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.attribute">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/core"
+ tagName="attribute"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFCoreConverterSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.converter">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/core"
+ tagName="converter"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFCoreFacetSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.facet">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/core"
+ tagName="facet"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFCoreLoadBundleSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.loadBundle">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/core"
+ tagName="loadBundle"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFCoreParamSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.param">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/core"
+ tagName="param"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFCoreSelectItemSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.selectItem">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/core"
+ tagName="selectItem"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFCoreSelectItemsSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.selectItems">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/core"
+ tagName="selectItems"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFCoreSubviewSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.subview">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/core"
+ tagName="subview"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFCoreValidateDoubleRangeSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.validateDoubleRange">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/core"
+ tagName="validateDoubleRange"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFCoreValidateLengthSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.validateLength">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/core"
+ tagName="validateLength"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFCoreValidateLongRangeSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.validateLongRange">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/core"
+ tagName="validateLongRange"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFCoreValidatorSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.validator">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/core"
+ tagName="validator"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFCoreValueChangeListenerSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.valueChangeListener">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/core"
+ tagName="valueChangeListener"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFCoreVerbatimSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.verbatim">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/core"
+ tagName="verbatim"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFCoreViewSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.view">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/core"
+ tagName="view"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlColumnSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.column">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="column"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlCommandButtonSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.commandButton">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="commandButton"/>
+ </propertySection>
+ <propertySection
+ afterSection="section.general.commandButton"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlActionListenerSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.commandButton.listener">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="commandButton"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlCommandLinkSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.commandLink">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="commandLink"/>
+ </propertySection>
+ <propertySection
+ afterSection="section.general.commandLink"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlActionListenerSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.commandLink.listener">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="commandLink"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlDataTableSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.dataTable">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="dataTable"/>
+ </propertySection>
+ <propertySection
+ afterSection="section.general.dataTable"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlDataTableColumnsSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.dataTable.columns">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="dataTable"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlFormSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.form">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="form"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlGraphicImageSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.graphicImage">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="graphicImage"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlInputHiddenSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.inputHidden">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="inputHidden"/>
+ </propertySection>
+ <propertySection
+ afterSection="section.general.inputHidden"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlInputHiddenTypeSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.inputHidden.type">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="inputHidden"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlInputSecretSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.inputSecret">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="inputSecret"/>
+ </propertySection>
+ <propertySection
+ afterSection="section.general.inputSecret"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlInputSecretTypeSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.inputSecret.type">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="inputSecret"/>
+ </propertySection>
+ <propertySection
+ afterSection="section.general.inputSecret.type"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlInputOthersSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.inputText.others">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="inputSecret"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlInputTextSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.inputText">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="inputText"/>
+ </propertySection>
+ <propertySection
+ afterSection="section.general.inputText"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlInputTextTypeSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.inputText.type">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="inputText"/>
+ </propertySection>
+ <propertySection
+ afterSection="section.general.inputText.type"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlInputOthersSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.inputText.others">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="inputText"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlInputTextareaSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.inputTextarea">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="inputTextarea"/>
+ </propertySection>
+ <propertySection
+ afterSection="section.general.inputTextarea"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlInputTextareaTypeSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.inputTextarea.type">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="inputTextarea"/>
+ </propertySection>
+ <propertySection
+ afterSection="section.general.inputTextarea.type"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlInputOthersSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.inputTextarea.others">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="inputTextarea"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlMessageSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.message">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="message"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlMessagesSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.messages">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="messages"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlOutputFormatSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.outputFormat">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="outputFormat"/>
+ </propertySection>
+ <propertySection
+ afterSection="section.general.outputFormat"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlOutputFormatParamsSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.outputFormat.params">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="outputFormat"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlOutputLabelSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.outputLabel">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="outputLabel"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlOutputLinkSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.outputLink">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="outputLink"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlOutputTextSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.outputText">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="outputText"/>
+ </propertySection>
+ <propertySection
+ afterSection="section.general.outputText"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlOutputTextConverterSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.outputText.converter">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="outputText"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlPanelGridSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.panelGrid">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="panelGrid"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlPanelGroupSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.panelGroup">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="panelGroup"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlSelectBooleanCheckboxSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.selectBooleanCheckbox">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="selectBooleanCheckbox"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlSelectManyCheckboxSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.selectManyCheckbox">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="selectManyCheckbox"/>
+ </propertySection>
+ <propertySection
+ afterSection="section.general.selectManyCheckbox"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlSelectChoicesSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.selectManyCheckbox.choices">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="selectManyCheckbox"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlSelectManyListboxSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.selectManyListbox">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="selectManyListbox"/>
+ </propertySection>
+ <propertySection
+ afterSection="section.general.selectManyListbox"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlSelectChoicesSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.selectManyListbox.choices">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="selectManyListbox"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlSelectManyMenuSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.selectManyMenu">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="selectManyMenu"/>
+ </propertySection>
+ <propertySection
+ afterSection="section.general.selectManyMenu"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlSelectChoicesSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.selectManyMenu.choices">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="selectManyMenu"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlSelectOneListboxSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.selectOneListbox">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="selectOneListbox"/>
+ </propertySection>
+ <propertySection
+ afterSection="section.general.selectOneListbox"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlSelectChoicesSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.selectOneListbox.choices">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="selectOneListbox"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlSelectOneMenuSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.selectOneMenu">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="selectOneMenu"/>
+ </propertySection>
+ <propertySection
+ afterSection="section.general.selectOneMenu"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlSelectChoicesSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.selectOneMenu.choices">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="selectOneMenu"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlSelectOneRadioSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.selectOneRadio">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="selectOneRadio"/>
+ </propertySection>
+ <propertySection
+ afterSection="section.general.selectOneRadio"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFHtmlSelectChoicesSection"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.selectOneRadio.choices">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/html"
+ tagName="selectOneRadio"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFCoreConvertDateTimeGroup"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.convertDateTime">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/core"
+ tagName="convertDateTime"/>
+ </propertySection>
+ <propertySection
+ afterSection="top"
+ class="org.eclipse.jst.pagedesigner.jsf.ui.sections.JSFCoreConvertNumberGroup"
+ tab="org.eclipse.jst.pagedesigner.tabQuickEdit"
+ id="section.general.convertNumber">
+ <tagFilter
+ caseSensitive="true"
+ uri="http://java.sun.com/jsf/core"
+ tagName="convertNumber"/>
+ </propertySection>
+ </propertySections>
+ </extension>
+
+ <extension point="org.eclipse.jst.pagedesigner.PaletteItemConfigContributions">
+ <config index="30" path="configs/jsfcore_pi.xml" />
+ <config index="40" path="configs/jsfhtml_pi.xml" />
+ </extension>
+</plugin>
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/core/dom/JSFDOMUtil.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/core/dom/JSFDOMUtil.java
new file mode 100644
index 000000000..ab5f7afb7
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/core/dom/JSFDOMUtil.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.core.dom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.utils.CMUtil;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class JSFDOMUtil
+{
+
+ /**
+ * @param panelGridEle
+ * @param string
+ * @return
+ */
+ public static Element findFacet(Element parentEle, String name)
+ {
+ NodeList childnodes = parentEle.getChildNodes();
+ for (int i=0, size=childnodes.getLength(); i<size; i++)
+ {
+ Node node = childnodes.item(i);
+ if (node.getNodeType() == Node.ELEMENT_NODE && JSFDOMUtil.isFacet((Element)node))
+ {
+ Element ele = (Element) node;
+ if (name.equals(ele.getAttribute("name")))
+ {
+ return ele;
+ }
+ }
+ }
+ return null;
+ }
+
+ public static boolean isHColumn(Node node)
+ {
+ if (node instanceof Element)
+ {
+ Element ele = (Element) node;
+ if ("column".equalsIgnoreCase(ele.getLocalName()) && IJMTConstants.URI_JSF_HTML.equals(CMUtil.getElementNamespaceURI(ele)))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * @param panelGridEle
+ * @return
+ */
+ public static List getUIComponentChildren(Element panelGridEle)
+ {
+ // XXX: temp implementation. Later may move this out to be shared.
+ // currently just returning all children Element. Need to filter out things like non JSF UI component
+ List list = new ArrayList();
+ NodeList childnodes = panelGridEle.getChildNodes();
+ for (int i=0, size=childnodes.getLength(); i<size; i++)
+ {
+ Node node = childnodes.item(i);
+ if (node.getNodeType() == Node.ELEMENT_NODE)
+ {
+ if (JSFDOMUtil.isFacet((Element) node))
+ {
+ continue;
+ }
+ list.add(node);
+ }
+ }
+ return list;
+ }
+
+ public static boolean isFacet(Element ele)
+ {
+ // XXX: here we are not checking namespace! for error tolerant.
+ return "facet".equals(ele.getLocalName());
+ }
+
+ /**
+ * @param child
+ * @return
+ */
+ public static boolean isUIParameter(Element ele)
+ {
+ return "param".equals(ele.getLocalName());
+ }
+
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/JSFUIPlugin.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/JSFUIPlugin.java
new file mode 100644
index 000000000..32382b2c9
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/JSFUIPlugin.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.jst.pagedesigner.common.CommonPlugin;
+import org.eclipse.jst.pagedesigner.common.IFileFolderConstants;
+import org.eclipse.jst.pagedesigner.common.guiutils.Alerts;
+import org.eclipse.jst.pagedesigner.common.logging.Logger;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class JSFUIPlugin extends AbstractUIPlugin
+{
+ //The shared instance.
+ private static JSFUIPlugin _plugin;
+ //Resource bundle.
+ private ResourceBundle _resourceBundle;
+ private URL _pluginBase;
+
+ private static Logger _logger;
+ private static Alerts _alerts;
+
+ /**
+ * The constructor.
+ */
+ public JSFUIPlugin()
+ {
+ super();
+ _plugin = this;
+ try
+ {
+ _resourceBundle = ResourceBundle.getBundle("org.eclipse.jst.pagedesigner.jsf.ui.JSFUIPluginResources");
+ }
+ catch (MissingResourceException x)
+ {
+ _resourceBundle = null;
+ }
+ }
+
+ /**
+ * This method is called upon plug-in activation
+ */
+ public void start(BundleContext context) throws Exception
+ {
+ super.start(context);
+ _alerts = new Alerts(this, _resourceBundle);
+ _logger = CommonPlugin.getLogger(JSFUIPlugin.class);
+// _logger.setResourceBundle(_resourceBundle);
+ _pluginBase = getBundle().getEntry("/");
+ }
+
+ /**
+ * get the alerts objects associated with this plugin for alerting the user.
+ * @return
+ */
+ public static Alerts getAlerts()
+ {
+ return _alerts;
+ }
+
+ /**
+ * This method is called when the plug-in is stopped
+ */
+ public void stop(BundleContext context) throws Exception
+ {
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance.
+ */
+ public static JSFUIPlugin getDefault()
+ {
+ return _plugin;
+ }
+
+ /**
+ * Returns the string from the plugin's resource bundle,
+ * or 'key' if not found.
+ */
+ public static String getResourceString(String key)
+ {
+ ResourceBundle bundle = JSFUIPlugin.getDefault().getResourceBundle();
+ try
+ {
+ return (bundle != null) ? bundle.getString(key) : key;
+ }
+ catch (MissingResourceException e)
+ {
+ return key;
+ }
+ }
+
+ /**
+ * Returns the plugin's resource bundle,
+ */
+ public ResourceBundle getResourceBundle()
+ {
+ return _resourceBundle;
+ }
+
+ /**
+ * Return an image from the path
+ * @param name
+ * @return Image
+ */
+ public Image getImage(String name)
+ {
+ if (name == null)
+ {
+ return null;
+ }
+
+ ImageRegistry images = getImageRegistry();
+ Image image = (Image) images.get(name);
+ if (image == null)
+ {
+ try
+ {
+ ImageDescriptor id = ImageDescriptor.createFromURL(new URL(_pluginBase,
+ IFileFolderConstants.FOLDER_ICONS + "/" + name));
+ images.put(name, id);
+
+ image = images.get(name);
+ }
+ catch (MalformedURLException ee)
+ {
+ _logger.error("Error.JSFUIPlugin", name, ee); //$NON-NLS-2$
+ }
+ }
+ return image;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/JSFUIPluginResources.properties b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/JSFUIPluginResources.properties
new file mode 100644
index 000000000..5af178f6f
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/JSFUIPluginResources.properties
@@ -0,0 +1,40 @@
+#DataTable
+ElementEdit.Submenu.DataTable=DataTable
+ElementEdit.Submenu.DataTable.SelectTable=Select Table
+ElementEdit.Submenu.DataTable.InsertColumnBefore=Insert Column Before
+ElementEdit.Submenu.DataTable.InsertColumnAfter=Insert Column After
+ElementEdit.Submenu.DataTable.DeleteColumn=Delete Column
+ElementEdit.Submenu.InsertTableHeader=Insert Table Header
+ElementEdit.Submenu.InsertTableFooter=Insert Table Footer
+ElementEdit.Submenu.DeleteTableHeader=Delete Table Header
+ElementEdit.Submenu.DeleteTableFooter=Delete Table Footer
+ElementEdit.Submenu.InsertColumnHeader=Insert Column Header
+ElementEdit.Submenu.InsertColumnFooter=Insert Column Footer
+ElementEdit.Submenu.DeleteColumnHeader=Delete Column Header
+ElementEdit.Submenu.DeleteColumnFooter=Delete Column Footer
+
+#PanelGrid
+ElementEdit.Submenu.PanelGrid=PanelGrid
+ElementEdit.Submenu.PanelGrid.SelectTable=Select Table
+ElementEdit.Submenu.PanelGrid.InsertRowBefore=Insert Row Before
+ElementEdit.Submenu.PanelGrid.InsertRowAfter=Insert Row After
+ElementEdit.Submenu.PanelGrid.InsertColumnBefore=Insert Column Before
+ElementEdit.Submenu.PanelGrid.InsertColumnAfter=Insert Column After
+ElementEdit.Submenu.PanelGrid.DeleteRow=Delete Row
+ElementEdit.Submenu.PanelGrid.DeleteColumn=Delete Column
+ElementEdit.Submenu.PanelGrid.InsertHeader=Insert Header
+ElementEdit.Submenu.PanelGrid.InsertFooter=Insert Footer
+ElementEdit.Submenu.PanelGird.DeleteHeader=Delete Header
+ElementEdit.Submenu.PanelGrid.DeleteFooter=Delete Footer
+
+ElementEdit.Submenu.JavaNavigation=Java Navigate
+ElementEdit.Submenu.JavaNavigation.Binding=Binding
+ElementEdit.Submenu.JavaNavigation.Value=Value
+ElementEdit.Submenu.JavaNavigation.Action=Action
+ElementEdit.Submenu.LoadBundle=Open Properties File
+
+#Warning messages
+Message.Warning.Title=Warning
+Message.Warning.InvalidateExpression=The value is either an invalid Expression or the definition is missing.
+
+Error.JSFUIPlugin=Error in jsf.ui plugin \ No newline at end of file
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/JSFUIResources.properties b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/JSFUIResources.properties
new file mode 100644
index 000000000..08f4cff2b
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/JSFUIResources.properties
@@ -0,0 +1,2 @@
+MessageTagConverter.defaultValue=Message
+MessageTagConverter.defaultTooltip=Summary \ No newline at end of file
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/ActionsResources.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/ActionsResources.java
new file mode 100644
index 000000000..4ebdc7e05
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/ActionsResources.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class ActionsResources
+{
+ private static final String BUNDLE_NAME = "org.eclipse.jst.pagedesigner.jsf.ui.actions.ActionsResources"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ private ActionsResources()
+ {
+ }
+
+ public static String getString(String key)
+ {
+ // TODO Auto-generated method stub
+ try
+ {
+ return RESOURCE_BUNDLE.getString(key);
+ }
+ catch (MissingResourceException e)
+ {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/ActionsResources.properties b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/ActionsResources.properties
new file mode 100644
index 000000000..c2f6fa949
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/ActionsResources.properties
@@ -0,0 +1,18 @@
+AddValueChangeListenerAction.ActionLabel.ValueChangeListener=ValueChangeListener
+AddValidateDoubleRangeAction.ActionLabel.DoubleRange=Double Range
+AddValidateLengthAction.ActionLabel.Length=Length
+AddValidateLongRangeAction.ActionLabel.LongRange=Long Range
+AddConvertDateTimeAction.ActionLabel.DateTime=Date Time
+AddConvertNumberAction.ActionLabel.Number=Number
+AddAttributeAction.Wizard.NewAttribute=New Attribute
+AddAttributeAction.ActionLabel.Attribute=Attribute
+AddSelectItemAction.ActionLabel.SelectItem=Select Item
+AddSelectItemsAction.ActionLabel.SelectItems=Select Items
+AddAttributeAction.Wizard.Description=Enter a name and value for the attribute.
+AddParamAction.ActionLabel.Param=Param
+
+Submenu.JSFAdd=JSF Add
+Submenu.JSFAdd.Converter=Converter
+Submenu.JSFAdd.Validators=Validators
+
+PageFlowContributor.Menu.PageFlow=PageFlow \ No newline at end of file
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddActionListenerAction.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddActionListenerAction.java
new file mode 100644
index 000000000..0655cf930
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddActionListenerAction.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.DialogUtil;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class AddActionListenerAction extends JSFAddChildAction
+{
+ /**
+ *
+ */
+ public AddActionListenerAction(IDOMElement parentEle)
+ {
+ super("ActionListener", parentEle); //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ public void run()
+ {
+ DialogUtil.createSubElement(getShell(), getParentElement(), IJMTConstants.URI_JSF_CORE, IJSFConstants.TAG_ACTIONLISTENER, null);
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddAttributeAction.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddAttributeAction.java
new file mode 100644
index 000000000..52466c74c
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddAttributeAction.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.DialogUtil;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class AddAttributeAction extends JSFAddChildAction
+{
+
+ /**
+ * @param text
+ * @param parentNode
+ */
+ public AddAttributeAction(IDOMElement parentNode)
+ {
+ super(ActionsResources.getString("AddAttributeAction.ActionLabel.Attribute"), parentNode); //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ public void run()
+ {
+ DialogUtil.createSubElement(getShell(), getParentElement(), IJMTConstants.URI_JSF_CORE, "attribute", null);
+// CommonDialogFieldGroup group = new CommonDialogFieldGroup();
+//
+// AttributeData[] data = createAttributeData();
+// group.setAttributeData(data);
+//
+// DialogFieldGroupPage page = new DialogFieldGroupPage("Attribute", group); //$NON-NLS-1$
+// page.setTitle(ActionsResources.getString("AddAttributeAction.Wizard.NewAttribute")); //$NON-NLS-1$
+// page.setDescription(ActionsResources.getString("AddAttributeAction.Wizard.Description")); //$NON-NLS-1$
+// CommonDialogFieldWizard wizard = new CommonDialogFieldWizard(page);
+// wizard.setWindowTitle(ActionsResources.getString("AddAttributeAction.Wizard.NewAttribute")); //$NON-NLS-1$
+// WizardDialog dialog = new WizardDialog(getShell(), wizard);
+// dialog.create();
+// if (dialog.open() == WizardDialog.OK)
+// {
+// group.prepareData();
+// Map attributesMap = new HashMap();
+// for (int i = 0; i < data.length; i++)
+// {
+// attributesMap.put(data[i].attributeName, data[i].value);
+// }
+// AddJSFCoreChildCommand command = new AddJSFCoreChildCommand(this.getParentElement(),
+// IJSFConstants.TAG_ATTRIBUTE, attributesMap);
+// command.execute();
+// }
+ }
+
+// private AttributeData[] createAttributeData()
+// {
+// return new AttributeData[]
+// {
+// new AttributeData(IJMTConstants.URI_JSF_CORE, IJSFConstants.TAG_ATTRIBUTE, IJSFConstants.ATTR_NAME),
+// new AttributeData(IJMTConstants.URI_JSF_CORE, IJSFConstants.TAG_ATTRIBUTE, IJSFConstants.ATTR_VALUE)
+// }
+// ;
+// }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddConvertDateTimeAction.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddConvertDateTimeAction.java
new file mode 100644
index 000000000..b8a4127da
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddConvertDateTimeAction.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml.AddJSFCoreChildCommand;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class AddConvertDateTimeAction extends JSFAddChildAction
+{
+
+ /**
+ * @param text
+ * @param parentNode
+ */
+ public AddConvertDateTimeAction(IDOMElement parentNode)
+ {
+ super(ActionsResources.getString("AddConvertDateTimeAction.ActionLabel.DateTime"), parentNode); //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ public void run()
+ {
+ AddJSFCoreChildCommand command = new AddJSFCoreChildCommand(this.getParentElement(),
+ IJSFConstants.TAG_CONVERTDATETIME, null);
+ command.execute();
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddConvertNumberAction.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddConvertNumberAction.java
new file mode 100644
index 000000000..c5a93ef0e
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddConvertNumberAction.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml.AddJSFCoreChildCommand;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class AddConvertNumberAction extends JSFAddChildAction
+{
+
+ /**
+ * @param text
+ * @param parentNode
+ */
+ public AddConvertNumberAction(IDOMElement parentNode)
+ {
+ super(ActionsResources.getString("AddConvertNumberAction.ActionLabel.Number"), parentNode); //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ public void run()
+ {
+ AddJSFCoreChildCommand command = new AddJSFCoreChildCommand(this.getParentElement(),
+ IJSFConstants.TAG_CONVERTNUMBER, null);
+ command.execute();
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddConverterAction.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddConverterAction.java
new file mode 100644
index 000000000..4da9648fb
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddConverterAction.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml.AddJSFCoreChildCommand;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class AddConverterAction extends JSFAddChildAction
+{
+ String _converterId;
+
+ /**
+ * @param text
+ * @param parentNode
+ */
+ public AddConverterAction(String converterId, IDOMElement parentNode)
+ {
+ super(converterId, parentNode);
+ this._converterId = converterId;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ public void run()
+ {
+ Map attributes = new HashMap();
+ attributes.put("converterId", _converterId);
+ AddJSFCoreChildCommand command = new AddJSFCoreChildCommand(this.getParentElement(),
+ IJSFConstants.TAG_CONVERTER, attributes);
+ command.execute();
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddParamAction.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddParamAction.java
new file mode 100644
index 000000000..a9096494e
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddParamAction.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.DialogUtil;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class AddParamAction extends JSFAddChildAction
+{
+
+ /**
+ * @param text
+ * @param parentNode
+ */
+ public AddParamAction(IDOMElement parentNode)
+ {
+ super(ActionsResources.getString("AddParamAction.ActionLabel.Param"), parentNode); //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ public void run()
+ {
+ DialogUtil.createSubElement(getShell(), getParentElement(), IJMTConstants.URI_JSF_CORE,
+ IJSFConstants.TAG_PARAM, new String[] { IJSFConstants.ATTR_NAME, IJSFConstants.ATTR_VALUE});
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddSelectItemAction.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddSelectItemAction.java
new file mode 100644
index 000000000..3881d9e7f
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddSelectItemAction.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.DialogUtil;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class AddSelectItemAction extends JSFAddChildAction
+{
+
+ /**
+ * @param text
+ * @param parentNode
+ */
+ public AddSelectItemAction(IDOMElement parentNode)
+ {
+ super(ActionsResources.getString("AddSelectItemAction.ActionLabel.SelectItem"), parentNode); //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ public void run()
+ {
+ DialogUtil.createSubElement(getShell(), getParentElement(), IJMTConstants.URI_JSF_CORE,
+ IJSFConstants.TAG_SELECTITEM, new String[] { IJSFConstants.ATTR_ITEMLABEL, IJSFConstants.ATTR_ITEMVALUE});
+ }
+}
+
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddSelectItemsAction.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddSelectItemsAction.java
new file mode 100644
index 000000000..8d248c017
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddSelectItemsAction.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml.AddJSFCoreChildCommand;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class AddSelectItemsAction extends JSFAddChildAction
+{
+
+ public AddSelectItemsAction(IDOMElement parentNode)
+ {
+ super(ActionsResources.getString("AddSelectItemsAction.ActionLabel.SelectItems"), parentNode); //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ public void run()
+ {
+ AddJSFCoreChildCommand command = new AddJSFCoreChildCommand(this.getParentElement(),
+ IJSFConstants.TAG_SELECTITEMS, null);
+ command.execute();
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddValidateDoubleRangeAction.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddValidateDoubleRangeAction.java
new file mode 100644
index 000000000..c458b93aa
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddValidateDoubleRangeAction.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.DialogUtil;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class AddValidateDoubleRangeAction extends JSFAddChildAction
+{
+
+ /**
+ * @param text
+ * @param parentNode
+ */
+ public AddValidateDoubleRangeAction(IDOMElement parentNode)
+ {
+ super(ActionsResources.getString("AddValidateDoubleRangeAction.ActionLabel.DoubleRange"), parentNode); //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ public void run()
+ {
+ DialogUtil.createSubElement(getShell(), getParentElement(), IJMTConstants.URI_JSF_CORE,
+ IJSFConstants.TAG_VALIDATEDOUBLERANGE, new String[] { IJSFConstants.ATTR_MINIMUM,
+ IJSFConstants.ATTR_MAXIMUM});
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddValidateLengthAction.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddValidateLengthAction.java
new file mode 100644
index 000000000..2d789d21d
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddValidateLengthAction.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.DialogUtil;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class AddValidateLengthAction extends JSFAddChildAction
+{
+
+ /**
+ * @param text
+ * @param parentNode
+ */
+ public AddValidateLengthAction(IDOMElement parentNode)
+ {
+ super(ActionsResources.getString("AddValidateLengthAction.ActionLabel.Length"), parentNode); //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ public void run()
+ {
+ DialogUtil.createSubElement(getShell(), getParentElement(), IJMTConstants.URI_JSF_CORE,
+ IJSFConstants.TAG_VALIDATELENGTH, new String[] { IJSFConstants.ATTR_MINIMUM,
+ IJSFConstants.ATTR_MAXIMUM});
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddValidateLongRangeAction.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddValidateLongRangeAction.java
new file mode 100644
index 000000000..bf24e6d28
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddValidateLongRangeAction.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.DialogUtil;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class AddValidateLongRangeAction extends JSFAddChildAction
+{
+
+ /**
+ * @param text
+ * @param parentNode
+ */
+ public AddValidateLongRangeAction(IDOMElement parentNode)
+ {
+ super(ActionsResources.getString("AddValidateLongRangeAction.ActionLabel.LongRange"), parentNode); //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ public void run()
+ {
+ DialogUtil.createSubElement(getShell(), getParentElement(), IJMTConstants.URI_JSF_CORE,
+ IJSFConstants.TAG_VALIDATELONGRANGE, new String[] { IJSFConstants.ATTR_MINIMUM,
+ IJSFConstants.ATTR_MAXIMUM});
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddValidatorAction.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddValidatorAction.java
new file mode 100644
index 000000000..f648e20b4
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddValidatorAction.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml.AddJSFCoreChildCommand;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class AddValidatorAction extends JSFAddChildAction
+{
+ String _validatorId;
+
+ /**
+ * @param validatorId
+ * @param parentNode
+ */
+ public AddValidatorAction(String validatorId, IDOMElement parentNode)
+ {
+ super(validatorId, parentNode);
+ this._validatorId = validatorId;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ public void run()
+ {
+ Map attributes = new HashMap();
+ attributes.put("validatorId", _validatorId);
+ AddJSFCoreChildCommand command = new AddJSFCoreChildCommand(this.getParentElement(),
+ IJSFConstants.TAG_VALIDATOR, attributes);
+ command.execute();
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddValueChangeListenerAction.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddValueChangeListenerAction.java
new file mode 100644
index 000000000..6b4324601
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/AddValueChangeListenerAction.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.DialogUtil;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class AddValueChangeListenerAction extends JSFAddChildAction
+{
+
+ /**
+ * @param text
+ * @param parentNode
+ */
+ public AddValueChangeListenerAction(IDOMElement parentNode)
+ {
+ super(ActionsResources.getString("AddValueChangeListenerAction.ActionLabel.ValueChangeListener"), parentNode); //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ public void run()
+ {
+ DialogUtil.createSubElement(getShell(), getParentElement(), IJMTConstants.URI_JSF_CORE,
+ IJSFConstants.TAG_VALUECHANGELISTENER, new String[] { IJSFConstants.ATTR_TYPE});
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/DeleteHColumnHeaderFooterAction.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/DeleteHColumnHeaderFooterAction.java
new file mode 100644
index 000000000..58955c176
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/DeleteHColumnHeaderFooterAction.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jst.pagedesigner.jsf.ui.elementedit.request.DeleteHColumnHeaderFooterRequest;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class DeleteHColumnHeaderFooterAction extends Action
+{
+ private Command _command;
+
+ /**
+ * @param text
+ */
+ public DeleteHColumnHeaderFooterAction(String text, EditPart editPart, boolean isHeader)
+ {
+ super(text);
+ DeleteHColumnHeaderFooterRequest req = new DeleteHColumnHeaderFooterRequest(text, isHeader);
+ this._command = editPart.getCommand(req);
+ this.setEnabled(this._command != null && this._command.canExecute());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ public void run()
+ {
+ _command.execute();
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/DeleteHeaderFooterAction.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/DeleteHeaderFooterAction.java
new file mode 100644
index 000000000..d3f03f42e
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/DeleteHeaderFooterAction.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jst.pagedesigner.jsf.ui.elementedit.request.DeleteHeaderFooterRequest;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class DeleteHeaderFooterAction extends Action
+{
+ private Command _command;
+
+ /**
+ * @param text
+ */
+ public DeleteHeaderFooterAction(String text, EditPart editPart, boolean isHeader)
+ {
+ super(text);
+ DeleteHeaderFooterRequest req = new DeleteHeaderFooterRequest(text, isHeader);
+ this._command = editPart.getCommand(req);
+ this.setEnabled(this._command != null && this._command.canExecute());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ public void run()
+ {
+ _command.execute();
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/ExpressionAction.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/ExpressionAction.java
new file mode 100644
index 000000000..fe66f8867
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/ExpressionAction.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jst.pagedesigner.jsf.ui.JSFUIPlugin;
+import org.eclipse.jst.pagedesigner.jsp.core.pagevar.IPageVariablesProvider;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class ExpressionAction extends Action
+{
+ public static final int METHOD = 0;
+ public static final int VARIABLE = 1;
+
+ private String _action;
+ private IProject _project;
+ private IFile _file;
+ private int _type;
+
+ public ExpressionAction(int type)
+ {
+ _type = type;
+ }
+
+ /**
+ * @param attribute
+ */
+ public void setActionValue(String attribute)
+ {
+ _action = attribute;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IAction#isEnabled()
+ */
+ public boolean isEnabled()
+ {
+ return _project != null && isExpression();
+ }
+
+ private boolean isExpression()
+ {
+ boolean flag = false;
+ if (_action != null)
+ {
+ flag = _action.startsWith("#{") && _action.endsWith("}");//$NON-NLS-1$ $NON-NLS-2$
+ }
+ return flag;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IAction#run()
+ */
+ public void run()
+ {
+ IPageVariablesProvider pageVarProvider = (IPageVariablesProvider) getPage().getActiveEditor().getAdapter(
+ IPageVariablesProvider.class);
+ pageVarProvider.refresh();
+
+ Object result = null;
+ if (_type == METHOD)
+ {
+// result = VariableResolverUtils.resolveMethodBinding(_action, _project, IWebFrameworkResolver.ACTION_METHOD, true);
+ result = null;
+ }
+ else
+ {
+// result = VariableResolverUtils.resolveValueBinding(_action, _project, true);
+ result = null;
+ }
+ if (result == null)
+ {
+ JSFUIPlugin.getAlerts().warning("Message.Warning.Title", "Message.Warning.InvalidateExpression");//$NON-NLS-1$ $NON-NLS-2$
+ }
+ }
+
+ /**
+ * @param projectFor
+ */
+ public void setProject(IProject projectFor)
+ {
+ this._project = projectFor;
+ }
+
+ private IWorkbenchPage getPage()
+ {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+ return window.getActivePage();
+ }
+
+ public void setFile(IFile fileFor)
+ {
+ _file = fileFor;
+ }
+
+ public IFile getFile()
+ {
+ return _file;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/IJSFCoreSupport.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/IJSFCoreSupport.java
new file mode 100644
index 000000000..78752f2ae
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/IJSFCoreSupport.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+/**
+ * This interface is to provide information of how to enable/disable add
+ * jsf core sub element.
+ *
+ * As other JSF taglibs that we don't know today may also use jsf core tags inside
+ * them, so we may also enable the actions for adding jsf core tags to them. But
+ * we need check whether individual JSF core tags are supported.
+ *
+ * @author mengbo
+ * @version 1.5
+ */
+public interface IJSFCoreSupport
+{
+ /**
+ * actionListener can only be added to those ActionSource component.
+ * @return
+ */
+ public boolean isActionSource();
+
+ /**
+ *
+ * @return
+ */
+ public boolean isUIComponent();
+
+ /**
+ * converter (convertXXX) can only be added to those ValueHolder
+ * @return
+ */
+ public boolean isValueHolder();
+
+ /**
+ * validator can only be added to EditableValueHolder
+ * @return
+ */
+ public boolean isEditableValueHolder();
+
+ /**
+ * whether support selectItem and selectItems
+ * @return
+ */
+ public boolean supportSelectItems();
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/InsertHColumnHeaderFooterAction.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/InsertHColumnHeaderFooterAction.java
new file mode 100644
index 000000000..d6e3f512b
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/InsertHColumnHeaderFooterAction.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jst.pagedesigner.jsf.ui.elementedit.request.InsertHColumnHeaderFooterRequest;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class InsertHColumnHeaderFooterAction extends Action
+{
+ private Command _command;
+
+ /**
+ * @param text
+ */
+ public InsertHColumnHeaderFooterAction(String text, EditPart editPart, boolean isHeader)
+ {
+ super(text);
+
+ InsertHColumnHeaderFooterRequest req = new InsertHColumnHeaderFooterRequest(text, isHeader);
+ this._command = editPart.getCommand(req);
+ this.setEnabled(this._command != null && this._command.canExecute());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ public void run()
+ {
+ _command.execute();
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/InsertHeaderFooterAction.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/InsertHeaderFooterAction.java
new file mode 100644
index 000000000..3f41adb45
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/InsertHeaderFooterAction.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jst.pagedesigner.jsf.ui.elementedit.request.InsertHeaderFooterRequest;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class InsertHeaderFooterAction extends Action
+{
+ private Command _command;
+
+ /**
+ * @param text
+ */
+ public InsertHeaderFooterAction(String text, EditPart editPart, boolean isHeader)
+ {
+ super(text);
+
+ InsertHeaderFooterRequest req = new InsertHeaderFooterRequest(text, isHeader);
+ this._command = editPart.getCommand(req);
+ this.setEnabled(this._command != null && this._command.canExecute());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ public void run()
+ {
+ _command.execute();
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/JSFAddActionGroup.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/JSFAddActionGroup.java
new file mode 100644
index 000000000..21a0232f2
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/JSFAddActionGroup.java
@@ -0,0 +1,203 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jst.jsf.facesconfig.emf.ConverterIdType;
+import org.eclipse.jst.jsf.facesconfig.emf.ConverterType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.ValidatorIdType;
+import org.eclipse.jst.jsf.facesconfig.emf.ValidatorType;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+import org.eclipse.jst.pagedesigner.editors.PageDesignerActionConstants;
+import org.eclipse.jst.pagedesigner.utils.StructuredModelUtil;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class JSFAddActionGroup {
+
+ public static Action action = new Action() {
+ };
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.actions.ActionGroup#fillContextMenu(org.eclipse.jface.action.IMenuManager)
+ */
+ public void fillContextMenu(IMenuManager menu, final IDOMElement element,
+ final IJSFCoreSupport support) {
+ final IMenuManager submenu = new MenuManager(ActionsResources
+ .getString("Submenu.JSFAdd"));//$NON-NLS-1$
+ submenu.add(action);
+ submenu.addMenuListener(new IMenuListener() {
+ public void menuAboutToShow(IMenuManager manager) {
+ submenu.removeAll();
+ addJSFAddItems(submenu, element, support);
+ }
+ });
+ menu.appendToGroup(PageDesignerActionConstants.GROUP_SPECIAL, submenu);
+ }
+
+ /**
+ * @param submenu
+ * @param element
+ */
+ private void addJSFAddItems(IMenuManager submenu, IDOMElement element,
+ IJSFCoreSupport support) {
+ AddActionListenerAction actionListenerAction = new AddActionListenerAction(
+ element);
+ actionListenerAction.setEnabled(support.isActionSource());
+ submenu.add(actionListenerAction);
+
+ AddAttributeAction attrAction = new AddAttributeAction(element);
+ attrAction.setEnabled(support.isUIComponent());
+ submenu.add(attrAction);
+
+ IProject prj = null;
+ IFile file = StructuredModelUtil.getFileFor(element.getModel());
+ if (file != null) {
+ prj = file.getProject();
+ }
+
+ IMenuManager converterMenu = new MenuManager(ActionsResources
+ .getString("Submenu.JSFAdd.Converter"));//$NON-NLS-1$
+ boolean supportConverter = support.isValueHolder();
+ String[] converterIds = getRegisteredConverterIds(prj);
+ if (converterIds != null && converterIds.length > 0) {
+ for (int i = 0; i < converterIds.length; i++) {
+ AddConverterAction action = new AddConverterAction(
+ converterIds[i], element);
+ action.setEnabled(supportConverter);
+ converterMenu.add(action);
+ }
+ converterMenu.add(new Separator());
+ }
+ AddConvertDateTimeAction dateTimeAction = new AddConvertDateTimeAction(
+ element);
+ dateTimeAction.setEnabled(supportConverter);
+ converterMenu.add(dateTimeAction);
+ AddConvertNumberAction numberAction = new AddConvertNumberAction(
+ element);
+ numberAction.setEnabled(supportConverter);
+ converterMenu.add(numberAction);
+ submenu.add(converterMenu);
+
+ AddParamAction addParamAction = new AddParamAction(element);
+ addParamAction.setEnabled(support.isUIComponent());
+ submenu.add(addParamAction);
+
+ AddSelectItemAction selectItemAction = new AddSelectItemAction(element);
+ selectItemAction.setEnabled(support.supportSelectItems());
+ submenu.add(selectItemAction);
+
+ AddSelectItemsAction selectItemsAction = new AddSelectItemsAction(
+ element);
+ selectItemsAction.setEnabled(support.supportSelectItems());
+ submenu.add(selectItemsAction);
+
+ IMenuManager validatorMenu = new MenuManager(ActionsResources
+ .getString("Submenu.JSFAdd.Validators"));//$NON-NLS-1$
+ boolean supportValidator = support.isEditableValueHolder();
+ String[] validatorIds = getRegisteredValidatorIds(prj);
+ if (validatorIds != null && validatorIds.length > 0) {
+ for (int i = 0; i < validatorIds.length; i++) {
+ AddValidatorAction action = new AddValidatorAction(
+ validatorIds[i], element);
+ action.setEnabled(supportValidator);
+ validatorMenu.add(action);
+ }
+ validatorMenu.add(new Separator());
+ }
+ AddValidateDoubleRangeAction doubleRangeAction = new AddValidateDoubleRangeAction(
+ element);
+ doubleRangeAction.setEnabled(supportValidator);
+ validatorMenu.add(doubleRangeAction);
+ AddValidateLengthAction lengthAction = new AddValidateLengthAction(
+ element);
+ lengthAction.setEnabled(supportValidator);
+ validatorMenu.add(lengthAction);
+ AddValidateLongRangeAction longRangeAction = new AddValidateLongRangeAction(
+ element);
+ longRangeAction.setEnabled(supportValidator);
+ validatorMenu.add(longRangeAction);
+ submenu.add(validatorMenu);
+
+ AddValueChangeListenerAction valueChangeAction = new AddValueChangeListenerAction(
+ element);
+ valueChangeAction.setEnabled(support.isEditableValueHolder());
+ submenu.add(valueChangeAction);
+ }
+
+ /**
+ * @return
+ */
+ private String[] getRegisteredValidatorIds(IProject project) {
+ FacesConfigArtifactEdit facesConfigArtifactEdit = FacesConfigArtifactEdit
+ .getFacesConfigArtifactEditForRead(project);
+
+ if (facesConfigArtifactEdit == null)
+ return null;
+
+ FacesConfigType facesConfigType = facesConfigArtifactEdit
+ .getFacesConfig();
+ EList list = facesConfigType.getValidator();
+ int size = list.size();
+ if (size == 0)
+ return null;
+
+ String[] result = new String[size];
+ for (int i = 0, n = list.size(); i < n; i++) {
+ ValidatorType validator = (ValidatorType) list.get(i);
+ ValidatorIdType validatorId = validator.getValidatorId();
+ if (validatorId != null)
+ result[i] = validatorId.getTextContent().trim();
+ }
+ return result;
+ }
+
+ /**
+ * @return
+ */
+ private String[] getRegisteredConverterIds(IProject project) {
+ FacesConfigArtifactEdit facesConfigArtifactEdit = FacesConfigArtifactEdit
+ .getFacesConfigArtifactEditForRead(project);
+
+ if (facesConfigArtifactEdit == null)
+ return null;
+
+ FacesConfigType facesConfigType = facesConfigArtifactEdit
+ .getFacesConfig();
+ EList list = facesConfigType.getConverter();
+ int size = list.size();
+ if (size == 0)
+ return null;
+
+ String[] result = new String[size];
+ for (int i = 0, n = list.size(); i < n; i++) {
+ ConverterType converter = (ConverterType) list.get(i);
+ ConverterIdType converterId = converter.getConverterId();
+ if (converterId != null)
+ result[i] = converterId.getTextContent().trim();
+ }
+ return result;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/JSFAddChildAction.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/JSFAddChildAction.java
new file mode 100644
index 000000000..32167adb1
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/JSFAddChildAction.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+
+/**
+ * Classes in this package are related to JSF operation.
+ *
+ * @author mengbo
+ * @version 1.5
+ */
+public class JSFAddChildAction extends Action
+{
+ private IDOMElement _parentEle;
+
+ /**
+ *
+ */
+ public JSFAddChildAction(String text, IDOMElement parentNode)
+ {
+ super(text);
+ this._parentEle = parentNode;
+ }
+
+ public IDOMElement getParentElement()
+ {
+ return _parentEle;
+ }
+
+ public Shell getShell()
+ {
+ IWorkbench bench = PlatformUI.getWorkbench();
+ if (bench != null)
+ {
+ IWorkbenchWindow window = bench.getActiveWorkbenchWindow();
+ if (window == null)
+ {
+ IWorkbenchWindow[] windows = bench.getWorkbenchWindows();
+ if (windows != null && windows.length > 0)
+ {
+ window = windows[0];
+ }
+ }
+ if (window != null)
+ {
+ return window.getShell();
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/JSFCommandLinkCreator.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/JSFCommandLinkCreator.java
new file mode 100644
index 000000000..edec6871e
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/JSFCommandLinkCreator.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.gef.EditPart;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.Text;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.actions.link.AbstractLinkCreator;
+import org.eclipse.jst.pagedesigner.actions.link.LinkUtil;
+import org.eclipse.jst.pagedesigner.parts.TextEditPart;
+import org.eclipse.jst.pagedesigner.utils.JSPUtil;
+import org.eclipse.jst.pagedesigner.utils.StructuredModelUtil;
+import org.eclipse.jst.pagedesigner.viewer.DesignPosition;
+import org.eclipse.jst.pagedesigner.viewer.DesignRange;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class JSFCommandLinkCreator extends AbstractLinkCreator
+{
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.actions.link.ILinkCreator#makeLinkElement(org.eclipse.gef.EditPart, org.eclipse.jst.pagedesigner.viewer.DesignRange)
+ */
+ public Element makeLinkElement(EditPart part, DesignRange range)
+ {
+ if (part instanceof TextEditPart)
+ {
+ Text middleNode = LinkUtil.splitDomText(part, range);
+ EditPart parent = part.getParent();
+ Node parentNode = (Node) parent.getModel();
+ Document doc = (parentNode instanceof Document) ? (Document) parentNode : (parentNode.getOwnerDocument());
+
+ IDOMModel model = ((IDOMNode) parentNode).getModel();
+ String prefix = JSPUtil.getOrCreatePrefix(model, IJMTConstants.URI_JSF_HTML, "h");
+ JSPUtil.getOrCreatePrefix(model, IJMTConstants.URI_JSF_CORE, "f");
+
+ Element commandLink = doc.createElement(IJSFConstants.TAG_COMMANDLINK);
+ commandLink.setPrefix(prefix);
+ Element outputText = doc.createElement(IJSFConstants.TAG_OUTPUTTEXT);
+ outputText.setPrefix(prefix);
+ outputText.setAttribute(IJSFConstants.ATTR_VALUE, middleNode.getNodeValue());
+ commandLink.appendChild(outputText);
+
+ parentNode.replaceChild(commandLink, middleNode);
+ return commandLink;
+ }
+
+ return null;
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.actions.link.ILinkCreator#canExcute(org.eclipse.jst.pagedesigner.viewer.DesignRange)
+ */
+ public boolean canExcute(DesignRange range)
+ {
+ DesignPosition startPosition = range.getStartPosition();
+ EditPart part = startPosition.getContainerPart();
+ IDOMNode node = (IDOMNode) part.getModel();
+ IDOMModel model = node.getModel();
+ IFile openedFile = StructuredModelUtil.getFileFor(model);
+ boolean canSupportJSF = JSPUtil.supportTaglib(IJMTConstants.URI_JSF_HTML, openedFile);
+ if (!canSupportJSF)
+ {
+ return false;
+ }
+
+ return super.canExecute(range);
+ }
+
+ public String getSourcePreview(EditPart part, DesignRange range)
+ {
+ if (part instanceof TextEditPart)
+ {
+ TextEditPart textPart = (TextEditPart) part;
+ int[] offsets = textPart.getSelectedRange();
+
+ String displayData = textPart.getTextData();
+ String linkExp = displayData.substring(offsets[0], offsets[1]);
+
+ StringBuffer sb = new StringBuffer();
+ sb.append("<h:commandLink>\n<h:outputText value=\"");
+ sb.append(linkExp);
+ sb.append("\">");
+ sb.append("</h:outputText>\n</h:commandLink>");
+ return sb.toString();
+ }
+ return null;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/JSFNavigationGroup.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/JSFNavigationGroup.java
new file mode 100644
index 000000000..3f10fd072
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/JSFNavigationGroup.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jst.pagedesigner.css2.property.ICSSPropertyID;
+import org.eclipse.jst.pagedesigner.editors.PageDesignerActionConstants;
+import org.eclipse.jst.pagedesigner.jsf.ui.JSFUIPlugin;
+import org.eclipse.jst.pagedesigner.utils.StructuredModelUtil;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class JSFNavigationGroup
+{
+ public static Action action = new Action()
+ {
+ }
+ ;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.actions.ActionGroup#fillContextMenu(org.eclipse.jface.action.IMenuManager)
+ */
+ public void fillContextMenu(IMenuManager menu, final IDOMElement element, final IJSFCoreSupport support)
+ {
+ final IMenuManager submenu = new MenuManager(JSFUIPlugin.getResourceString("ElementEdit.Submenu.JavaNavigation"));//$NON-NLS-1$
+ submenu.add(action);
+ submenu.addMenuListener(new IMenuListener()
+ {
+ public void menuAboutToShow(IMenuManager manager)
+ {
+ submenu.removeAll();
+ addNavigationItems(submenu, element, support);
+ }
+ }
+ );
+ menu.appendToGroup(PageDesignerActionConstants.GROUP_SPECIAL, submenu);
+ }
+
+ private void addNavigationItems(IMenuManager submenu, IDOMElement ele, IJSFCoreSupport support)
+ {
+ if (support.isActionSource())
+ {
+ ExpressionAction action = new ExpressionAction(ExpressionAction.METHOD);
+ action.setText(JSFUIPlugin.getResourceString("ElementEdit.Submenu.JavaNavigation.Action"));//$NON-NLS-1$
+ action.setActionValue(ele.getAttribute(ICSSPropertyID.ATTR_ACTION));
+ if (ele instanceof IDOMElement)
+ {
+ IDOMModel model = ((IDOMElement) ele).getModel();
+ action.setProject(StructuredModelUtil.getProjectFor(model));
+ action.setFile(StructuredModelUtil.getFileFor(model));
+ }
+ submenu.add(action);
+ }
+ if (support.isValueHolder())
+ {
+ ExpressionAction action = new ExpressionAction(ExpressionAction.VARIABLE);
+ action.setText(JSFUIPlugin.getResourceString("ElementEdit.Submenu.JavaNavigation.Value"));//$NON-NLS-1$
+ action.setActionValue(ele.getAttribute(ICSSPropertyID.ATTR_VALUE));
+ if (ele instanceof IDOMElement)
+ {
+ IDOMModel model = ((IDOMElement) ele).getModel();
+ action.setProject(StructuredModelUtil.getProjectFor(model));
+ action.setFile(StructuredModelUtil.getFileFor(model));
+ }
+ submenu.add(action);
+ }
+
+ {
+ ExpressionAction action = new ExpressionAction(ExpressionAction.VARIABLE);
+ action.setText(JSFUIPlugin.getResourceString("ElementEdit.Submenu.JavaNavigation.Binding"));//$NON-NLS-1$
+ action.setActionValue(ele.getAttribute(ICSSPropertyID.ATTR_BINDING));
+ if (ele instanceof IDOMElement)
+ {
+ IDOMModel model = ((IDOMElement) ele).getModel();
+ action.setProject(StructuredModelUtil.getProjectFor(model));
+ action.setFile(StructuredModelUtil.getFileFor(model));
+ }
+ submenu.add(action);
+ }
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/JSFOutputLinkCreator.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/JSFOutputLinkCreator.java
new file mode 100644
index 000000000..9f02c1be4
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/JSFOutputLinkCreator.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.gef.EditPart;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.Text;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.actions.link.AbstractLinkCreator;
+import org.eclipse.jst.pagedesigner.actions.link.LinkUtil;
+import org.eclipse.jst.pagedesigner.parts.TextEditPart;
+import org.eclipse.jst.pagedesigner.utils.JSPUtil;
+import org.eclipse.jst.pagedesigner.utils.StructuredModelUtil;
+import org.eclipse.jst.pagedesigner.viewer.DesignPosition;
+import org.eclipse.jst.pagedesigner.viewer.DesignRange;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class JSFOutputLinkCreator extends AbstractLinkCreator
+{
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.actions.link.ILinkCreator#makeLinkElement(org.eclipse.gef.EditPart, org.eclipse.jst.pagedesigner.viewer.DesignRange)
+ */
+ public Element makeLinkElement(EditPart part, DesignRange range)
+ {
+ if (part instanceof TextEditPart)
+ {
+ Text middleNode = LinkUtil.splitDomText(part, range);
+ EditPart parent = part.getParent();
+ Node parentNode = (Node) parent.getModel();
+ Document doc = (parentNode instanceof Document) ? (Document) parentNode : (parentNode.getOwnerDocument());
+
+ IDOMModel model = ((IDOMNode) parentNode).getModel();
+ String prefix = JSPUtil.getOrCreatePrefix(model, IJMTConstants.URI_JSF_HTML, "h");
+ String fPrefix = JSPUtil.getOrCreatePrefix(model, IJMTConstants.URI_JSF_CORE, "f");
+
+ Element outputLink = doc.createElement(IJSFConstants.TAG_OUTPUTLINK);
+ outputLink.setPrefix(prefix);
+ Element verbatim = doc.createElement(IJSFConstants.TAG_VERBATIM);
+ verbatim.setPrefix(fPrefix);
+ Text value = doc.createTextNode(middleNode.getNodeValue());
+ verbatim.appendChild(value);
+ outputLink.appendChild(verbatim);
+
+ parentNode.replaceChild(outputLink, middleNode);
+ return outputLink;
+ }
+
+ return null;
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.actions.link.ILinkCreator#canExcute(org.eclipse.jst.pagedesigner.viewer.DesignRange)
+ */
+ public boolean canExcute(DesignRange range)
+ {
+ DesignPosition startPosition = range.getStartPosition();
+ EditPart part = startPosition.getContainerPart();
+ IDOMNode node = (IDOMNode) part.getModel();
+ IDOMModel model = node.getModel();
+ IFile openedFile = StructuredModelUtil.getFileFor(model);
+ if (openedFile == null)
+ {
+ return false;
+ }
+ boolean canSupportJSF = JSPUtil.supportTaglib(IJMTConstants.URI_JSF_HTML, openedFile);
+ if (!canSupportJSF)
+ {
+ return false;
+ }
+
+ return super.canExecute(range);
+ }
+
+ public String getSourcePreview(EditPart part, DesignRange range)
+ {
+ if (part instanceof TextEditPart)
+ {
+ TextEditPart textPart = (TextEditPart) part;
+ int[] offsets = textPart.getSelectedRange();
+ String displayData = textPart.getTextData();
+ String linkExp = displayData.substring(offsets[0], offsets[1]);
+
+ StringBuffer sb = new StringBuffer();
+ sb.append("<h:outputLink>\n<f:verbatim>");
+ sb.append(linkExp);
+ sb.append("</f:verbatim>\n</h:outputLink>");
+ return sb.toString();
+ }
+ return null;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/PageFlowContributor.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/PageFlowContributor.java
new file mode 100644
index 000000000..fea96380b
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/actions/PageFlowContributor.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.actions;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jst.pagedesigner.editors.PageDesignerActionConstants;
+import org.eclipse.jst.pagedesigner.extensionpoint.IContextMenuItemContributor;
+import org.eclipse.jst.pagedesigner.jsf.ui.JSFUIPlugin;
+import org.eclipse.jst.pagedesigner.utils.StructuredModelUtil;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class PageFlowContributor implements IContextMenuItemContributor
+{
+ private String _uri;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.extensionpoint.IContextMenuItemContributor#setURI(java.lang.String)
+ */
+ public void setURI(String uri)
+ {
+ this._uri = uri;
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.extensionpoint.IContextMenuItemContributor#getURI()
+ */
+ public String getURI()
+ {
+ return _uri;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.extensionpoint.IContextMenuItemContributor#setModel(org.eclipse.wst.sse.core.internal.provisional.IStructuredModel)
+ */
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.extensionpoint.IContextMenuItemContributor#fillContextMenu(org.eclipse.jface.action.IMenuManager)
+ */
+ public void fillContextMenu(IMenuManager manager, ISelection selection, IStructuredModel model, Control parentUI)
+ {
+ PageFlowAction action = new PageFlowAction();
+ action.setId(PageFlowAction.ID);
+ action.setModel(model);
+ IMenuManager viewMgr = manager.findMenuUsingPath(PageDesignerActionConstants.MENUMGR_VIEW_ID);
+ if (viewMgr != null)
+ {
+ viewMgr.add(action);
+ }
+ else
+ {
+ manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, action);
+ }
+ }
+
+ class PageFlowAction extends Action
+ {
+ public final static String ID = "org.eclipse.jst.pagedesigner.jsf.ui.actions.PageFlowAction"; //$NON-NLS-1$
+ private IStructuredModel model;
+
+ public PageFlowAction()
+ {
+ setText(ActionsResources.getString("PageFlowContributor.Menu.PageFlow"));//$NON-NLS-1$
+ }
+
+ public void setModel(IStructuredModel model)
+ {
+ this.model = model;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IAction#run()
+ */
+ public void run()
+ {
+ IFile file = StructuredModelUtil.getFileFor(model);
+ if (file != null)
+ {
+ try
+ {
+ // FacesConfigUtil.locateJSPFile(file);
+ }
+ catch (IllegalArgumentException e)
+ {
+ JSFUIPlugin.getAlerts().warning("Message.Warning.Title", e.getLocalizedMessage());//$NON-NLS-1$
+ }
+ }
+ }
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/attributegroup/AttributeData.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/attributegroup/AttributeData.java
new file mode 100644
index 000000000..3807b7d93
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/attributegroup/AttributeData.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.attributegroup;
+
+import java.util.HashMap;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class AttributeData
+{
+ public static final String SuperType = "superTyle";
+ public static final String Project = "project";
+
+ public String uri;
+ public String elementName;
+ public String attributeName;
+ public Object value;
+ public HashMap paramMap = new HashMap();
+
+ public AttributeData()
+ {
+
+ }
+
+ public AttributeData(String uri,String elementName,String name)
+ {
+ this.uri = uri;
+ this.attributeName = name;
+ this.elementName = elementName;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/attributegroup/CommonDialogFieldGroup.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/attributegroup/CommonDialogFieldGroup.java
new file mode 100644
index 000000000..334c30861
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/attributegroup/CommonDialogFieldGroup.java
@@ -0,0 +1,152 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.attributegroup;
+
+import java.util.HashMap;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+import org.eclipse.jst.pagedesigner.common.dialogfield.DialogField;
+import org.eclipse.jst.pagedesigner.common.dialogfield.DialogFieldGroup;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class CommonDialogFieldGroup extends DialogFieldGroup
+{
+ private HashMap map = new HashMap();
+ private AttributeData[] attributeData = null;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.common.dialogfield.DialogFieldGroup#initialize()
+ */
+ public void initialize()
+ {
+ if (attributeData != null)
+ {
+ for (int i = 0; i < attributeData.length; i++)
+ {
+ DialogField filed = DialogFieldFactory.getDialogField(attributeData[i]);
+ filed.setDialogFieldChangeListener(getDefaultChangeListener());
+ map.put(attributeData[i], filed);
+ }
+ }
+ }
+
+ public void prepareData()
+ {
+ if (attributeData != null)
+ {
+ for (int i = 0; i < attributeData.length; i++)
+ {
+ DialogField field = (DialogField) map.get(attributeData[i]);
+ DialogFieldFactory.prepareDialogFiledValue(field, attributeData[i]);
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.common.dialogfield.DialogFieldGroup#refreshData()
+ */
+ public void refreshData()
+ {
+ if (attributeData != null)
+ {
+ for (int i = 0; i < attributeData.length; i++)
+ {
+ DialogField field = (DialogField) map.get(attributeData[i]);
+ DialogFieldFactory.setDialogFiledValue(field, attributeData[i].value);
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.common.dialogfield.DialogFieldGroup#layoutDialogFields(org.eclipse.ui.forms.widgets.FormToolkit, org.eclipse.swt.widgets.Composite)
+ */
+ public void layoutDialogFields(FormToolkit toolkit, Composite parent)
+ {
+ GridData data = new GridData(GridData.FILL_BOTH);
+ parent.setLayoutData(data);
+
+ GridLayout gl = new GridLayout();
+ gl.numColumns = getMaxColumnNum();
+ parent.setLayout(gl);
+
+ if (attributeData != null)
+ {
+ for (int i = 0; i < attributeData.length; i++)
+ {
+ DialogField field = (DialogField) map.get(attributeData[i]);
+ Control[] controls = field.doFillIntoGrid(toolkit, parent, gl.numColumns);
+ if (controls.length > 1)
+ {
+ GridData gridData = (GridData) controls[1].getLayoutData();
+ if(field.getNumberOfControls() == gl.numColumns)
+ {
+ gridData.grabExcessHorizontalSpace = true;
+ }
+ gridData.horizontalAlignment = GridData.FILL;
+ }
+ field.setLabelText(DialogFieldFactory.getDialogFieldLabel(attributeData[i]));
+ }
+ }
+ }
+
+ private int getMaxColumnNum()
+ {
+ int cols = 0;
+ if (attributeData != null)
+ {
+ for (int i = 0; i < attributeData.length; i++)
+ {
+ DialogField field = (DialogField) map.get(attributeData[i]);
+ int fieldCols = field.getNumberOfControls();
+ if (fieldCols > cols)
+ {
+ cols = fieldCols;
+ }
+ }
+ }
+ return cols;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.common.dialogfield.DialogFieldGroup#validateDialogFields()
+ */
+ public IStatus[] validateDialogFields()
+ {
+ // TODO Now we let it be.
+ return null;
+ }
+
+ /**
+ * @return Returns the attributePairs.
+ */
+ public AttributeData[] getAttributeData()
+ {
+ return attributeData;
+ }
+
+ /**
+ * @param attributePairs The attributePairs to set.
+ */
+ public void setAttributeData(AttributeData[] attributePairs)
+ {
+ this.attributeData = attributePairs;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/attributegroup/CommonDialogFieldWizard.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/attributegroup/CommonDialogFieldWizard.java
new file mode 100644
index 000000000..892075e5c
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/attributegroup/CommonDialogFieldWizard.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.attributegroup;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jst.pagedesigner.common.dialogfield.DialogFieldGroupPage;
+import org.eclipse.ui.internal.dialogs.NewWizard;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class CommonDialogFieldWizard extends NewWizard
+{
+ DialogFieldGroupPage mainPage;
+ public CommonDialogFieldWizard(DialogFieldGroupPage page)
+ {
+ this.mainPage = page;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.wizard.IWizard#performFinish()
+ */
+ public boolean performFinish()
+ {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.wizard.IWizard#addPages()
+ */
+ public void addPages()
+ {
+ addPage(mainPage);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.wizards.NewWizard#doFinish(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected void doFinish(IProgressMonitor monitor) throws CoreException
+ {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.wizards.NewWizard#setupFinish()
+ */
+ protected void setupFinish()
+ {
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/attributegroup/DialogFieldFactory.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/attributegroup/DialogFieldFactory.java
new file mode 100644
index 000000000..87417a78c
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/attributegroup/DialogFieldFactory.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.attributegroup;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jst.pagedesigner.common.dialogfield.ClassButtonDialogField;
+import org.eclipse.jst.pagedesigner.common.dialogfield.ComboDialogField;
+import org.eclipse.jst.pagedesigner.common.dialogfield.DialogField;
+import org.eclipse.jst.pagedesigner.common.dialogfield.RadiosDialogField;
+import org.eclipse.jst.pagedesigner.common.dialogfield.StringDialogField;
+import org.eclipse.jst.pagedesigner.meta.IAttributeDescriptor;
+import org.eclipse.jst.pagedesigner.meta.ICMRegistry;
+import org.eclipse.jst.pagedesigner.meta.IElementDescriptor;
+import org.eclipse.jst.pagedesigner.meta.IValueType;
+import org.eclipse.jst.pagedesigner.meta.internal.CMRegistry;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class DialogFieldFactory
+{
+ public static DialogField getDialogField(AttributeData data)
+ {
+ IAttributeDescriptor descriptor = getAttributeDescriptor(data.uri, data.elementName, data.attributeName);
+ if(descriptor != null)
+ {
+ String type = descriptor.getValueType();
+ if (IValueType.CLASSNAME.equalsIgnoreCase(type))
+ {
+ ClassButtonDialogField field = new ClassButtonDialogField(null);
+ Object project = data.paramMap.get(AttributeData.Project);
+ if (project instanceof IProject)
+ {
+ field.setProject((IProject) project);
+ }
+ Object superType = data.paramMap.get(AttributeData.SuperType);
+ field.setSuperClassName((String) superType);
+ return field;
+ }
+ }
+ return new StringDialogField();
+ }
+
+ private static IAttributeDescriptor getAttributeDescriptor(String uri, String elementName, String attributeName)
+ {
+ ICMRegistry registry = CMRegistry.getInstance();
+ IElementDescriptor elementDescriptor = registry.getElementDescriptor(uri, elementName);
+ return elementDescriptor.getAttributeDescriptor(attributeName);
+ }
+
+ public static void setDialogFiledValue(DialogField field, Object value)
+ {
+ if (field instanceof StringDialogField)
+ {
+ ((StringDialogField) field).setTextWithoutUpdate(value == null ? "" : value.toString());//$NON-NLS-1$
+ }
+ else if (field instanceof ComboDialogField)
+ {
+ ((ComboDialogField) field).setTextWithoutUpdate(value == null ? "" : value.toString());//$NON-NLS-1$
+ }
+ else if (field instanceof RadiosDialogField)
+ {
+ if (value instanceof Integer)
+ {
+ ((RadiosDialogField) field).setSelectedIndex(((Integer) value).intValue());
+ }
+ }
+ }
+
+ /**
+ * @param field
+ * @param pair
+ */
+ public static void prepareDialogFiledValue(DialogField field, AttributeData pair)
+ {
+ if (field instanceof StringDialogField)
+ {
+ pair.value = ((StringDialogField) field).getText();
+ }
+ }
+
+ /**
+ * @param element
+ * @param string
+ * @return
+ */
+ public static String getDialogFieldLabel(AttributeData data)
+ {
+ String name = data.attributeName;
+ int gap = 'a' - 'A';//$NON-NLS-1$ //$NON-NLS-2$
+ if(name != null)
+ {
+ char[] chars = name.toCharArray();
+ char[] newChars = new char[chars.length*2];
+ if(chars.length > 0)
+ {
+ newChars[0] = chars[0] >= 'a' ? (char)(chars[0] - gap) : chars[0];//$NON-NLS-1$
+ }
+ int newPos = 1;
+ for(int i=1; i<chars.length; i++,newPos++)
+ {
+ if(chars[i] >= 'A' && chars[i] <= 'Z')//$NON-NLS-1$ //$NON-NLS-2$
+ {
+ newChars[newPos++] = ' ';//$NON-NLS-1$
+ }
+ newChars[newPos] = chars[i];
+ }
+ char[] labelChars = new char[newPos + 1];
+ System.arraycopy(newChars,0,labelChars,0,newPos);
+ labelChars[newPos] = ':';//$NON-NLS-1$
+ return new String(labelChars);
+ }
+ return "";//$NON-NLS-1$
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/celleditors/ConverterValidatorIdDialogField.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/celleditors/ConverterValidatorIdDialogField.java
new file mode 100644
index 000000000..6bf29edff
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/celleditors/ConverterValidatorIdDialogField.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.celleditors;
+
+import java.util.Arrays;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jst.jsf.facesconfig.ui.IFacesConfigConstants;
+import org.eclipse.jst.pagedesigner.common.dialogfield.ComboDialogField;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.IElementContextable;
+import org.eclipse.jst.pagedesigner.utils.StructuredModelUtil;
+import org.eclipse.swt.SWT;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class ConverterValidatorIdDialogField extends ComboDialogField implements IElementContextable
+{
+ private String _elementId = "";
+
+ /**
+ * @param flags
+ */
+ public ConverterValidatorIdDialogField()
+ {
+ super(SWT.NONE);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.properties.attrgroup.IElementContextable#setElementContext(org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode, org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement)
+ */
+ public void setElementContext(IDOMNode ancester, IDOMElement element)
+ {
+ IProject project = StructuredModelUtil.getProjectFor(element.getModel());
+ String[] results = null;
+ if ("validator-id".equalsIgnoreCase(_elementId))
+ {
+ //results = FacesUtil.getRegisteredConverterIds(project);
+
+ }
+ else
+ {
+ // results = FacesUtil.getRegisteredValidatorIds(project);
+ }
+ if (results != null)
+ {
+ Arrays.sort(results);
+ setItems(results);
+ }
+ else
+ {
+ setItems(new String[0]);
+ }
+ }
+
+ public String getElementId()
+ {
+ return _elementId;
+ }
+
+ public void setElementId(String elementId)
+ {
+ this._elementId = elementId;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/celleditors/JSFAttributeCellEditorFactory.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/celleditors/JSFAttributeCellEditorFactory.java
new file mode 100644
index 000000000..0b12eb596
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/celleditors/JSFAttributeCellEditorFactory.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.celleditors;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jst.pagedesigner.common.dialogfield.DialogField;
+import org.eclipse.jst.pagedesigner.meta.IAttributeCellEditorFactory;
+import org.eclipse.jst.pagedesigner.meta.IAttributeDescriptor;
+import org.eclipse.jst.pagedesigner.properties.celleditors.LabeledComboBoxCellEditor;
+import org.eclipse.jst.pagedesigner.utils.StructuredModelUtil;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+import org.w3c.dom.Element;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class JSFAttributeCellEditorFactory implements IAttributeCellEditorFactory
+{
+ private static final String CONVERTERID = "converterId"; //$NON-NLS-1$
+ private static final String VALIDATORID = "validatorId"; //$NON-NLS-1$
+
+ /**
+ * The constructor
+ */
+ public JSFAttributeCellEditorFactory()
+ {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.meta.IAttributeCellEditorFactory#createCellEditor(org.eclipse.swt.widgets.Composite, org.eclipse.jst.pagedesigner.meta.IAttributeDescriptor, org.w3c.dom.Element)
+ */
+ public CellEditor createCellEditor(Composite parent, IAttributeDescriptor attr, Element element)
+ {
+ String type = attr.getValueType();
+ IProject project = StructuredModelUtil.getProjectFor(((IDOMElement) element).getModel());
+ String[] results = null;
+ if (type.equalsIgnoreCase(CONVERTERID))
+ {
+ // XXX
+ // results = FacesUtil.getRegisteredConverterIds(project);
+ Map map = new HashMap();
+ if (results != null)
+ {
+ for (int i = 0; i < results.length; i++)
+ {
+ map.put(results[i], results[i]);
+ }
+ }
+ return LabeledComboBoxCellEditor.newInstance(parent, map, SWT.NONE);
+ }
+ else if (type.equalsIgnoreCase(VALIDATORID))
+ {
+ // XXX
+ // results = FacesUtil.getRegisteredValidatorIds(project);
+ Map map = new HashMap();
+ if (results != null)
+ {
+ for (int i = 0; i < results.length; i++)
+ {
+ map.put(results[i], results[i]);
+ }
+ }
+ return LabeledComboBoxCellEditor.newInstance(parent, map, SWT.NONE);
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.meta.IAttributeCellEditorFactory#createDialogField(org.eclipse.jst.pagedesigner.meta.IAttributeDescriptor, org.w3c.dom.Element, org.w3c.dom.Element)
+ */
+ public DialogField createDialogField(IAttributeDescriptor attr)
+ {
+ String type = attr.getValueType();
+
+ if (type.equalsIgnoreCase(CONVERTERID))
+ {
+ ConverterValidatorIdDialogField dialogField = new ConverterValidatorIdDialogField();
+ dialogField.setElementId("converter-id");
+ dialogField.setRequired(attr.isRequired());
+ dialogField.setToolTip(attr.getDescription());
+ return dialogField;
+ }
+ else if (type.equalsIgnoreCase(VALIDATORID))
+ {
+ ConverterValidatorIdDialogField dialogField = new ConverterValidatorIdDialogField();
+ dialogField.setElementId("validator-id");
+ dialogField.setRequired(attr.isRequired());
+ dialogField.setToolTip(attr.getDescription());
+ return dialogField;
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.meta.IAttributeCellEditorFactory#getSupportedValueTypes()
+ */
+ public String[] getSupportedValueTypes()
+ {
+ return new String[] { CONVERTERID, VALIDATORID};
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/AddJSFCoreChildCommand.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/AddJSFCoreChildCommand.java
new file mode 100644
index 000000000..208051612
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/AddJSFCoreChildCommand.java
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml;
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+import org.w3c.dom.Element;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.commands.DesignerCommand;
+import org.eclipse.jst.pagedesigner.utils.JSPUtil;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class AddJSFCoreChildCommand extends DesignerCommand
+{
+ // either use single name/value pair
+ private String _attrName;
+ private String _attrValue;
+ // or use a map.
+ private Map _attrMap;
+
+ private String _coreChildLocalName;
+ private IDOMElement _parent;
+
+ /**
+ *
+ */
+ public AddJSFCoreChildCommand(IDOMElement parent, String coreChildLocalName, Map attributes)
+ {
+ super("", parent); //$NON-NLS-1$
+ StringBuffer buffer = new StringBuffer(CommandResources.getString("AddJSFCoreChildCommand.Label.Add")); //$NON-NLS-1$
+ if(coreChildLocalName != null && coreChildLocalName.length() > 0)
+ {
+ buffer.append(coreChildLocalName.substring(0,1).toUpperCase());
+ buffer.append(coreChildLocalName.substring(1));
+ }
+ setLabel(buffer.toString());
+ this._parent = parent;
+ this._coreChildLocalName = coreChildLocalName;
+ this._attrMap = attributes;
+ }
+
+ /**
+ * @param parentElement
+ * @param string
+ * @param string2
+ * @param newClassName
+ */
+ public AddJSFCoreChildCommand(IDOMElement parent, String coreChildLocalName, String aname, String avalue)
+ {
+ super("", parent); //$NON-NLS-1$
+ StringBuffer buffer = new StringBuffer(CommandResources.getString("AddJSFCoreChildCommand.Label.Add")); //$NON-NLS-1$
+ if(coreChildLocalName != null && coreChildLocalName.length() > 0)
+ {
+ buffer.append(coreChildLocalName.substring(0,1).toUpperCase());
+ buffer.append(coreChildLocalName.substring(1));
+ }
+ setLabel(buffer.toString());
+ this._parent = parent;
+ this._coreChildLocalName = coreChildLocalName;
+ this._attrName = aname;
+ this._attrValue = avalue;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#doExecute()
+ */
+ protected void doExecute()
+ {
+ String prefix = JSPUtil.getOrCreatePrefix(this.getModel(), IJMTConstants.URI_JSF_CORE, "f"); //$NON-NLS-1$
+ String tag = _coreChildLocalName;
+ Element child = _parent.getOwnerDocument().createElement(tag);
+ child.setPrefix(prefix);
+ if (_attrMap != null)
+ {
+ for (Iterator iter = _attrMap.keySet().iterator(); iter.hasNext();)
+ {
+ String key = (String) iter.next();
+ String value = (String) _attrMap.get(key);
+
+ child.setAttribute(key, value);
+ }
+ }
+ if (_attrName != null)
+ {
+ child.setAttribute(_attrName, _attrValue);
+ }
+
+ _parent.appendChild(child);
+ formatNode(child);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#getAfterCommandDesignerSelection()
+ */
+ protected ISelection getAfterCommandDesignerSelection()
+ {
+ return toDesignSelection(_parent);
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/CommandResources.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/CommandResources.java
new file mode 100644
index 000000000..9a2263d21
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/CommandResources.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class CommandResources
+{
+ private static final String BUNDLE_NAME = "org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml.CommandResources"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ private CommandResources()
+ {
+ }
+
+ public static String getString(String key)
+ {
+ try
+ {
+ return RESOURCE_BUNDLE.getString(key);
+ }
+ catch (MissingResourceException e)
+ {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/CommandResources.properties b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/CommandResources.properties
new file mode 100644
index 000000000..bcdbf0074
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/CommandResources.properties
@@ -0,0 +1,17 @@
+AddJSFCoreChildCommand.Label.Add=Add
+DataTableDeleteColumnCommand.Label.DeleteColumn=Delete Column
+DataTableDeleteHeaderCommand.Label.DeleteHeader=Delete Header
+DataTableDeleteHeaderCommand.Label.DeleteFooter=Delete Footer
+DataTableInsertColumnCommand.Label.InsertColumn=Insert Column
+DataTableInsertHeaderCommand.Label.InsertHeader=Insert Header
+DataTableInsertHeaderCommand.Label.InsertFooter=Insert Footer
+DataTableInsertColumnHeaderCommand.Label.InsertHeader=Insert Header
+DataTableInsertColumnHeaderCommand.Label.InsertFooter=Insert Footer
+DataTableDeleteColumnHeaderCommand.Label.DeleteColumnHeader=Delete Column Header
+DataTableDeleteColumnHeaderCommand.Label.DeleteColumnFooter=Delete Column Footer
+PanelGridDeleteColumnCommand.Label.DeleteColumn=Delete Column
+PanelGridInsertColumnCommand.Label.InsertColumn=Insert Column
+PanelGridInsertFooterCommand.Label.InsertFooter=Insert Footer
+PanelGridInsertHeaderCommand.Label.InsertHeader=Insert Header
+PanelGridDeleteRowCommand.Label.DeleteRow=Delete Row
+PanelGridInsertRowCommand.Label.InsertRow=Insert Row
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableDeleteColumnCommand.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableDeleteColumnCommand.java
new file mode 100644
index 000000000..799c99e6d
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableDeleteColumnCommand.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jst.pagedesigner.commands.DesignerCommand;
+import org.eclipse.jst.pagedesigner.jsf.core.dom.JSFDOMUtil;
+import org.eclipse.jst.pagedesigner.viewer.IHTMLGraphicalViewer;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+/**
+ * Delete a column from dataTable.
+ *
+ * @author mengbo
+ * @version 1.5
+ */
+public class DataTableDeleteColumnCommand extends DesignerCommand
+{
+
+ private Element _dataTable;
+ private int _index;
+
+ /**
+ * @param label
+ * @param viewer
+ */
+ public DataTableDeleteColumnCommand(IHTMLGraphicalViewer viewer, Element dataTable, int columnIndex)
+ {
+ super(CommandResources.getString("DataTableDeleteColumnCommand.Label.DeleteColumn"), viewer); //$NON-NLS-1$
+ this._dataTable = dataTable;
+ this._index = columnIndex;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.gef.commands.Command#canExecute()
+ */
+ public boolean canExecute()
+ {
+ if (this._index < 0)
+ {
+ return false;
+ }
+ return super.canExecute();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#doExecute()
+ */
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#doExecute()
+ */
+ protected void doExecute()
+ {
+ NodeList children = _dataTable.getChildNodes();
+ int index = 0;
+ for (int i = 0, size = children.getLength(); i < size; i++)
+ {
+ Node node = children.item(i);
+ if (JSFDOMUtil.isHColumn(node))
+ {
+ if (index++ == this._index)
+ {
+ _dataTable.removeChild(node);
+ return;
+ }
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#getAfterCommandDesignerSelection()
+ */
+ protected ISelection getAfterCommandDesignerSelection()
+ {
+ return toDesignSelection(_dataTable);
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableDeleteColumnHeaderCommand.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableDeleteColumnHeaderCommand.java
new file mode 100644
index 000000000..9e97d742a
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableDeleteColumnHeaderCommand.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jst.pagedesigner.commands.DesignerCommand;
+import org.eclipse.jst.pagedesigner.jsf.core.dom.JSFDOMUtil;
+import org.eclipse.jst.pagedesigner.viewer.IHTMLGraphicalViewer;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class DataTableDeleteColumnHeaderCommand extends DesignerCommand
+{
+ boolean _header; // true means header, false means footer.
+ private Element _dataTable;
+
+ /**
+ * @param label
+ * @param viewer
+ */
+ public DataTableDeleteColumnHeaderCommand(IHTMLGraphicalViewer viewer, Element dataTable, boolean header)
+ {
+ super(header ? CommandResources.getString("DataTableDeleteColumnHeaderCommand.Label.DeleteColumnHeader") : //$NON-NLS-1$
+ CommandResources.getString("DataTableDeleteColumnHeaderCommand.Label.DeleteColumnFooter"), viewer); //$NON-NLS-1$
+ this._header = header;
+ this._dataTable = dataTable;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.gef.commands.Command#canExecute()
+ */
+ public boolean canExecute()
+ {
+ int num = 0;
+ NodeList children = _dataTable.getChildNodes();
+ for (int i = 0, size = children.getLength(); i < size; i++)
+ {
+ Node node = children.item(i);
+ if (JSFDOMUtil.isHColumn(node))
+ {
+ Element column = (Element) node;
+ if (hasHeader(column))
+ {
+ num++;
+ break;
+ }
+ }
+ }
+ if (num == 0)
+ {
+ return false;
+ }
+ return super.canExecute();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#doExecute()
+ */
+ protected void doExecute()
+ {
+ NodeList children = _dataTable.getChildNodes();
+ for (int i = 0, size = children.getLength(); i < size; i++)
+ {
+ Node node = children.item(i);
+ if (JSFDOMUtil.isHColumn(node))
+ {
+ Element column = (Element) node;
+ if (hasHeader(column))
+ {
+ Element hf = JSFDOMUtil.findFacet(column, _header ? "header" : "footer"); //$NON-NLS-1$ //$NON-NLS-2$
+ column.removeChild(hf);
+ }
+ }
+ }
+ formatNode(this._dataTable);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#getAfterCommandDesignerSelection()
+ */
+ protected ISelection getAfterCommandDesignerSelection()
+ {
+ return toDesignSelection(_dataTable);
+ }
+
+ /**
+ * @param column
+ * @param _header2
+ * @return
+ */
+ private boolean hasHeader(Element column)
+ {
+ return JSFDOMUtil.findFacet(column, _header ? "header" : "footer") != null; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableDeleteHeaderCommand.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableDeleteHeaderCommand.java
new file mode 100644
index 000000000..727359f00
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableDeleteHeaderCommand.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jst.pagedesigner.commands.DesignerCommand;
+import org.eclipse.jst.pagedesigner.jsf.core.dom.JSFDOMUtil;
+import org.eclipse.jst.pagedesigner.viewer.IHTMLGraphicalViewer;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class DataTableDeleteHeaderCommand extends DesignerCommand
+{
+ /**
+ * true means header,false means footer
+ */
+ boolean _isHeader;
+ private Element _dataTable;
+
+ public DataTableDeleteHeaderCommand(IHTMLGraphicalViewer viewer, Element dataTable, boolean isHeader)
+ {
+ super(isHeader ? CommandResources.getString("DataTableDeleteHeaderCommand.Label.DeleteHeader") : //$NON-NLS-1$
+ CommandResources.getString("DataTableDeleteHeaderCommand.Label.DeleteFooter"), viewer); //$NON-NLS-1$
+ this._isHeader = isHeader;
+ this._dataTable = dataTable;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.gef.commands.Command#canExecute()
+ */
+ public boolean canExecute()
+ {
+ if (this._isHeader)
+ {
+ boolean hasHeader = (JSFDOMUtil.findFacet(this._dataTable, "header") != null); //$NON-NLS-1$
+ if (!hasHeader)
+ {
+ return false;
+ }
+ }
+ else
+ {
+ boolean hasFooter = (JSFDOMUtil.findFacet(this._dataTable, "footer") != null); //$NON-NLS-1$
+ if (!hasFooter)
+ {
+ return false;
+ }
+ }
+ return super.canExecute();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#doExecute()
+ */
+ protected void doExecute()
+ {
+ String type = (this._isHeader) ? "header" : "footer"; //$NON-NLS-1$ //$NON-NLS-2$
+ Element ele = JSFDOMUtil.findFacet(this._dataTable, type);
+ if (ele != null)
+ {
+ this._dataTable.removeChild(ele);
+ }
+ formatNode(this._dataTable);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#getAfterCommandDesignerSelection()
+ */
+ protected ISelection getAfterCommandDesignerSelection()
+ {
+ return toDesignSelection(_dataTable);
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableInsertColumnCommand.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableInsertColumnCommand.java
new file mode 100644
index 000000000..d33a75040
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableInsertColumnCommand.java
@@ -0,0 +1,164 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.commands.DesignerCommand;
+import org.eclipse.jst.pagedesigner.jsf.core.dom.JSFDOMUtil;
+import org.eclipse.jst.pagedesigner.utils.JSPUtil;
+import org.eclipse.jst.pagedesigner.viewer.IHTMLGraphicalViewer;
+
+/**
+ * Insert a column into dataTable.
+ *
+ * @author mengbo
+ * @version 1.5
+ */
+public class DataTableInsertColumnCommand extends DesignerCommand
+{
+ Element _dataTable;
+ Element _child;
+ int _index;
+
+ /**
+ *
+ * @param viewer
+ * @param dataTable
+ * @param index 0 means before the first column.
+ */
+ public DataTableInsertColumnCommand(IHTMLGraphicalViewer viewer, Element dataTable, int index)
+ {
+ super(CommandResources.getString("DataTableInsertColumnCommand.Label.InsertColumn"), viewer); //$NON-NLS-1$
+ this._dataTable = dataTable;
+ this._index = index;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.gef.commands.Command#canExecute()
+ */
+ public boolean canExecute()
+ {
+ if (this._index < 0)
+ {
+ return false;
+ }
+ return super.canExecute();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#doExecute()
+ */
+ protected void doExecute()
+ {
+ String prefix = JSPUtil.getOrCreatePrefix(getModel(), IJMTConstants.URI_JSF_HTML, "h"); //$NON-NLS-1$
+ _child = (IDOMElement) _dataTable.getOwnerDocument().createElement(prefix + ":column"); //$NON-NLS-1$
+
+ createHeaderFooter(_child);
+ NodeList children = _dataTable.getChildNodes();
+ int count = 0;
+ for (int i = 0, size = children.getLength(); i < size; i++)
+ {
+ Node node = children.item(i);
+ if (JSFDOMUtil.isHColumn(node))
+ {
+ if (_index == count)
+ {
+ _dataTable.insertBefore(_child, node);
+ return;
+ }
+ count++;
+ }
+ }
+ _dataTable.insertBefore(_child, null);
+ formatNode(this._child);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#getAfterCommandDesignerSelection()
+ */
+ protected ISelection getAfterCommandDesignerSelection()
+ {
+ return toDesignSelection(_dataTable);
+ }
+
+ /**
+ * check whether the datatable already have header and footer, if yes,
+ * then also create for this column
+ *
+ * @param column
+ */
+ private void createHeaderFooter(Element column)
+ {
+ boolean hasHeader = false;
+ boolean hasFooter = false;
+ NodeList children = _dataTable.getChildNodes();
+ for (int i = 0, size = children.getLength(); i < size; i++)
+ {
+ Node node = children.item(i);
+ if (JSFDOMUtil.isHColumn(node))
+ {
+ if (!hasHeader && JSFDOMUtil.findFacet((Element) node, "header") != null) //$NON-NLS-1$
+ {
+ hasHeader = true;
+ }
+ if (!hasFooter && JSFDOMUtil.findFacet((Element) node, "footer") != null) //$NON-NLS-1$
+ {
+ hasFooter = true;
+ }
+ }
+ }
+ if (hasHeader)
+ {
+ Element facet = createFacet();
+ facet.setAttribute("name", "header"); //$NON-NLS-1$ //$NON-NLS-2$
+ Element ele = createDefaultElement();
+ facet.appendChild(ele);
+ column.appendChild(facet);
+ }
+ if (hasFooter)
+ {
+ Element facet = createFacet();
+ facet.setAttribute("name", "footer"); //$NON-NLS-1$ //$NON-NLS-2$
+ Element ele = createDefaultElement();
+ facet.appendChild(ele);
+ column.appendChild(facet);
+ }
+ }
+
+ /**
+ * @return
+ */
+ private Element createFacet()
+ {
+ String prefix = JSPUtil.getOrCreatePrefix(getModel(), IJMTConstants.URI_JSF_CORE, "f"); //$NON-NLS-1$
+ Element ele = _dataTable.getOwnerDocument().createElement(IJSFConstants.TAG_FACET);
+ ele.setPrefix(prefix);
+ return ele;
+ }
+
+ private Element createDefaultElement()
+ {
+ String prefix = JSPUtil.getOrCreatePrefix(getModel(), IJMTConstants.URI_JSF_HTML, "h"); //$NON-NLS-1$
+ Element ele = _dataTable.getOwnerDocument().createElement(IJSFConstants.TAG_OUTPUTTEXT);
+ ele.setPrefix(prefix);
+ ele.setAttribute(IJSFConstants.ATTR_VALUE, "Column"); //$NON-NLS-1$
+ return ele;
+ }
+
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableInsertColumnHeaderCommand.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableInsertColumnHeaderCommand.java
new file mode 100644
index 000000000..faf7b0960
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableInsertColumnHeaderCommand.java
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.commands.DesignerCommand;
+import org.eclipse.jst.pagedesigner.jsf.core.dom.JSFDOMUtil;
+import org.eclipse.jst.pagedesigner.utils.JSPUtil;
+import org.eclipse.jst.pagedesigner.viewer.IHTMLGraphicalViewer;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class DataTableInsertColumnHeaderCommand extends DesignerCommand
+{
+ boolean _header; // true means header, false means footer.
+ private Element _dataTable;
+
+ /**
+ * @param label
+ * @param viewer
+ */
+ public DataTableInsertColumnHeaderCommand(IHTMLGraphicalViewer viewer, Element dataTable, boolean header)
+ {
+ super(header ? CommandResources.getString("DataTableInsertColumnHeaderCommand.Label.InsertHeader") : CommandResources.getString("DataTableInsertColumnHeaderCommand.Label.InsertFooter"), viewer); //$NON-NLS-1$ //$NON-NLS-2$
+ this._header = header;
+ this._dataTable = dataTable;
+ }
+
+ public boolean canExecute()
+ {
+ int num = 0;
+ NodeList children = _dataTable.getChildNodes();
+ for (int i = 0, size = children.getLength(); i < size; i++)
+ {
+ Node node = children.item(i);
+ if (JSFDOMUtil.isHColumn(node))
+ {
+ Element column = (Element) node;
+ if (!hasHeader(column))
+ {
+ num++;
+ break;
+ }
+ }
+ }
+ if (num == 0)
+ {
+ return false;
+ }
+ return super.canExecute();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#doExecute()
+ */
+ protected void doExecute()
+ {
+ String type = (this._header) ? "header" : "footer"; //$NON-NLS-1$ //$NON-NLS-2$
+
+ NodeList children = _dataTable.getChildNodes();
+ for (int i = 0, size = children.getLength(); i < size; i++)
+ {
+ Node node = children.item(i);
+ if (JSFDOMUtil.isHColumn(node))
+ {
+ Element column = (Element) node;
+ if (!hasHeader(column))
+ {
+ Element headerOrFooter = createHeaderOrFooter(type);
+ column.appendChild(headerOrFooter);
+ }
+ }
+ }
+ formatNode(this._dataTable);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#getAfterCommandDesignerSelection()
+ */
+ protected ISelection getAfterCommandDesignerSelection()
+ {
+ return toDesignSelection(_dataTable);
+ }
+
+ /**
+ * @param column
+ * @param _header2
+ * @return
+ */
+ private boolean hasHeader(Element column)
+ {
+ return JSFDOMUtil.findFacet(column, _header ? "header" : "footer") != null; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ private Element createHeaderOrFooter(String type)
+ {
+ Element facet = createFacet();
+ Element def = createDefaultElement();
+ facet.appendChild(def);
+ facet.setAttribute(IJSFConstants.ATTR_NAME, type);
+ return facet;
+ }
+
+ private Element createFacet()
+ {
+ String prefix = JSPUtil.getOrCreatePrefix(getModel(), IJMTConstants.URI_JSF_CORE, "f"); //$NON-NLS-1$
+ Element ele = _dataTable.getOwnerDocument().createElement(IJSFConstants.TAG_FACET);
+ ele.setPrefix(prefix);
+ return ele;
+ }
+
+ private Element createDefaultElement()
+ {
+ String prefix = JSPUtil.getOrCreatePrefix(getModel(), IJMTConstants.URI_JSF_HTML, "h"); //$NON-NLS-1$
+ Element ele = _dataTable.getOwnerDocument().createElement(IJSFConstants.TAG_OUTPUTTEXT);
+ ele.setPrefix(prefix);
+ if (this._header)
+ {
+ ele.setAttribute(IJSFConstants.ATTR_VALUE, "Column Header"); //$NON-NLS-1$
+ }
+ else
+ {
+ ele.setAttribute(IJSFConstants.ATTR_VALUE, "Column Footer"); //$NON-NLS-1$
+ }
+
+ return ele;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableInsertHeaderCommand.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableInsertHeaderCommand.java
new file mode 100644
index 000000000..af9000757
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/DataTableInsertHeaderCommand.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.w3c.dom.Element;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.commands.DesignerCommand;
+import org.eclipse.jst.pagedesigner.jsf.core.dom.JSFDOMUtil;
+import org.eclipse.jst.pagedesigner.utils.JSPUtil;
+import org.eclipse.jst.pagedesigner.viewer.IHTMLGraphicalViewer;
+
+/**
+ * This command is used to insert a header row or footer row.
+ *
+ * @author mengbo
+ * @version 1.5
+ */
+public class DataTableInsertHeaderCommand extends DesignerCommand
+{
+ boolean _header; // true means header, false means footer.
+ private Element _dataTable;
+
+ /**
+ * @param label
+ * @param viewer
+ */
+ public DataTableInsertHeaderCommand(IHTMLGraphicalViewer viewer, Element dataTable, boolean header)
+ {
+ super(header ? CommandResources.getString("DataTableInsertHeaderCommand.Label.InsertHeader") : CommandResources.getString("DataTableInsertHeaderCommand.Label.InsertFooter"), viewer); //$NON-NLS-1$ //$NON-NLS-2$
+ this._header = header;
+ this._dataTable = dataTable;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.gef.commands.Command#canExecute()
+ */
+ public boolean canExecute()
+ {
+ if (this._header)
+ {
+ boolean hasHeader = (JSFDOMUtil.findFacet(this._dataTable, "header") != null); //$NON-NLS-1$
+ if (hasHeader)
+ {
+ return false;
+ }
+ }
+ else
+ {
+ boolean hasFooter = (JSFDOMUtil.findFacet(this._dataTable, "footer") != null); //$NON-NLS-1$
+ if (hasFooter)
+ {
+ return false;
+ }
+ }
+ return super.canExecute();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#doExecute()
+ */
+ protected void doExecute()
+ {
+ String type = (this._header) ? "header" : "footer"; //$NON-NLS-1$ //$NON-NLS-2$
+ Element headerOrFooter = createHeaderOrFooter(type);
+ if (this._header)
+ {
+ this._dataTable.insertBefore(headerOrFooter, this._dataTable.getFirstChild());
+ }
+ else
+ {
+ this._dataTable.appendChild(headerOrFooter);
+ }
+ formatNode(this._dataTable);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#getAfterCommandDesignerSelection()
+ */
+ protected ISelection getAfterCommandDesignerSelection()
+ {
+ return toDesignSelection(_dataTable);
+ }
+
+ private Element createHeaderOrFooter(String type)
+ {
+ Element facet = createFacet();
+ Element def = createDefaultElement();
+ facet.appendChild(def);
+ facet.setAttribute(IJSFConstants.ATTR_NAME, type);
+ return facet;
+ }
+
+ private Element createFacet()
+ {
+ String prefix = JSPUtil.getOrCreatePrefix(getModel(), IJMTConstants.URI_JSF_CORE, "f"); //$NON-NLS-1$
+ Element ele = _dataTable.getOwnerDocument().createElement(IJSFConstants.TAG_FACET);
+ ele.setPrefix(prefix);
+ return ele;
+ }
+
+ private Element createDefaultElement()
+ {
+ String prefix = JSPUtil.getOrCreatePrefix(getModel(), IJMTConstants.URI_JSF_HTML, "h"); //$NON-NLS-1$
+ Element ele = _dataTable.getOwnerDocument().createElement(IJSFConstants.TAG_OUTPUTTEXT);
+ ele.setPrefix(prefix);
+ if (this._header)
+ {
+ ele.setAttribute(IJSFConstants.ATTR_VALUE, "Table Header"); //$NON-NLS-1$
+ }
+ else
+ {
+ ele.setAttribute(IJSFConstants.ATTR_VALUE, "Table Footer"); //$NON-NLS-1$
+ }
+ return ele;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridDeleteColumnCommand.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridDeleteColumnCommand.java
new file mode 100644
index 000000000..46116d396
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridDeleteColumnCommand.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import org.eclipse.jst.pagedesigner.commands.DesignerCommand;
+import org.eclipse.jst.pagedesigner.jsf.core.dom.JSFDOMUtil;
+import org.eclipse.jst.pagedesigner.utils.DOMUtil;
+import org.eclipse.jst.pagedesigner.viewer.IHTMLGraphicalViewer;
+
+/**
+ * This is for delete a column in panelGrid
+ *
+ * @author mengbo
+ * @version 1.5
+ */
+public class PanelGridDeleteColumnCommand extends DesignerCommand
+{
+
+ private int _columnIndex;
+ private Element _panelGridEle;
+
+ /**
+ * @param label
+ * @param viewer
+ */
+ public PanelGridDeleteColumnCommand(IHTMLGraphicalViewer viewer, Element panelGrid, int columnIndex)
+ {
+ super(CommandResources.getString("PanelGridDeleteColumnCommand.Label.DeleteColumn"), viewer); //$NON-NLS-1$
+ this._panelGridEle = panelGrid;
+ this._columnIndex = columnIndex;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.gef.commands.Command#canExecute()
+ */
+ public boolean canExecute()
+ {
+ //if user chose header or footer,then disable the delete column action
+ if (this._columnIndex < 0)
+ {
+ return false;
+ }
+ int columns = DOMUtil.getIntAttributeIgnoreCase(_panelGridEle, "columns", 1); //$NON-NLS-1$
+ if (columns < 1)
+ {
+ columns = 1;
+ }
+ return columns > 1;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#doExecute()
+ */
+ protected void doExecute()
+ {
+ int columns = DOMUtil.getIntAttributeIgnoreCase(_panelGridEle, "columns", 1); //$NON-NLS-1$
+ if (columns < 1)
+ {
+ columns = 1;
+ }
+
+ if (_columnIndex >= columns)
+ {
+ // should not happen
+ // TODO: log.
+ return;
+ }
+ List children = JSFDOMUtil.getUIComponentChildren(_panelGridEle);
+ List toRemove = new ArrayList();
+ for (int i = _columnIndex; i < children.size(); i += columns)
+ {
+ toRemove.add(children.get(i));
+ }
+ for (int i = 0, size = toRemove.size(); i < size; i++)
+ {
+ _panelGridEle.removeChild((Node) toRemove.get(i));
+ }
+
+ _panelGridEle.setAttribute("columns", String.valueOf(columns - 1)); //$NON-NLS-1$
+ formatNode(_panelGridEle);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#getAfterCommandDesignerSelection()
+ */
+ protected ISelection getAfterCommandDesignerSelection()
+ {
+ return toDesignSelection(this._panelGridEle);
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridDeleteRowCommand.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridDeleteRowCommand.java
new file mode 100644
index 000000000..761a30794
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridDeleteRowCommand.java
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import org.eclipse.jst.pagedesigner.commands.DesignerCommand;
+import org.eclipse.jst.pagedesigner.jsf.core.dom.JSFDOMUtil;
+import org.eclipse.jst.pagedesigner.utils.DOMUtil;
+import org.eclipse.jst.pagedesigner.viewer.IHTMLGraphicalViewer;
+
+/**
+ * Remove a row from panel grid
+ *
+ * @author mengbo
+ * @version 1.5
+ */
+public class PanelGridDeleteRowCommand extends DesignerCommand
+{
+ Element _panelGridEle;
+ int _rowIndex;
+
+ /**
+ * @param label
+ * @param viewer
+ */
+ public PanelGridDeleteRowCommand(IHTMLGraphicalViewer viewer, Element panelGrid, int index)
+ {
+ super(CommandResources.getString("PanelGridDeleteRowCommand.Label.DeleteRow"), viewer); //$NON-NLS-1$
+ this._panelGridEle = panelGrid;
+ this._rowIndex = index;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#doExecute()
+ */
+ protected void doExecute()
+ {
+ // Remove the row from panelGrid is a little complex. Since this row could
+ // be header or footer.
+ boolean hasHeaderRow = (JSFDOMUtil.findFacet(_panelGridEle, "header") != null); //$NON-NLS-1$
+
+ int columns = DOMUtil.getIntAttributeIgnoreCase(_panelGridEle, "columns", 1); //$NON-NLS-1$
+ if (columns < 1)
+ {
+ columns = 1;
+ }
+
+ List children = JSFDOMUtil.getUIComponentChildren(_panelGridEle);
+ int numRows = (children.size() + columns - 1) / columns;
+
+ int removeRow = _rowIndex;
+
+ if (hasHeaderRow)
+ {
+ if (removeRow == 0)
+ {
+ // remove the header row.
+ removeHeader();
+ formatNode(_panelGridEle);
+ return;
+ }
+ else
+ {
+ removeRow--;
+ }
+ }
+ if (removeRow < numRows)
+ {
+ List toRemove = new ArrayList();
+ int max = columns * (removeRow + 1);
+ max = Math.min(max, children.size());
+ for (int i = (columns * removeRow); i < max; i++)
+ {
+ toRemove.add(children.get(i));
+ }
+ for (int i = 0, size = toRemove.size(); i < size; i++)
+ {
+ _panelGridEle.removeChild((Node) toRemove.get(i));
+ }
+ formatNode(_panelGridEle);
+ return;
+ }
+ else
+ {
+ // must be footer.
+ removeFooter();
+ formatNode(_panelGridEle);
+ return;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.gef.commands.Command#canExecute()
+ */
+ public boolean canExecute()
+ {
+ if (this._rowIndex < 0)
+ {
+ return false;
+ }
+ return super.canExecute();
+ }
+
+ /**
+ *
+ */
+ private void removeFooter()
+ {
+ Element ele = JSFDOMUtil.findFacet(_panelGridEle, "footer"); //$NON-NLS-1$
+ if (ele != null)
+ {
+ _panelGridEle.removeChild(ele);
+ }
+ }
+
+ /**
+ *
+ */
+ private void removeHeader()
+ {
+ Element ele = JSFDOMUtil.findFacet(_panelGridEle, "header"); //$NON-NLS-1$
+ if (ele != null)
+ {
+ _panelGridEle.removeChild(ele);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#getAfterCommandDesignerSelection()
+ */
+ protected ISelection getAfterCommandDesignerSelection()
+ {
+ return this.toDesignSelection(this._panelGridEle);
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridInsertColumnCommand.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridInsertColumnCommand.java
new file mode 100644
index 000000000..ad88a81d9
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridInsertColumnCommand.java
@@ -0,0 +1,151 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.commands.DesignerCommand;
+import org.eclipse.jst.pagedesigner.jsf.core.dom.JSFDOMUtil;
+import org.eclipse.jst.pagedesigner.jsf.ui.elementedit.util.PanelGridUtil;
+import org.eclipse.jst.pagedesigner.utils.DOMUtil;
+import org.eclipse.jst.pagedesigner.utils.JSPUtil;
+import org.eclipse.jst.pagedesigner.viewer.IHTMLGraphicalViewer;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class PanelGridInsertColumnCommand extends DesignerCommand
+{
+ private int _columnIndex;
+ private Element _panelGridEle;
+
+ /**
+ * construction
+ * @param viewer
+ * @param panelGrid
+ * @param columnIndex
+ */
+ public PanelGridInsertColumnCommand(IHTMLGraphicalViewer viewer, Element panelGrid, int columnIndex)
+ {
+ super(CommandResources.getString("PanelGridInsertColumnCommand.Label.InsertColumn"), viewer); //$NON-NLS-1$
+ this._panelGridEle = panelGrid;
+ this._columnIndex = columnIndex;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.gef.commands.Command#canExecute()
+ */
+ public boolean canExecute()
+ {
+ if (this._columnIndex < 0)
+ {
+ return false;
+ }
+ return super.canExecute();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#doExecute()
+ */
+ protected void doExecute()
+ {
+ int columns = DOMUtil.getIntAttributeIgnoreCase(_panelGridEle, IJSFConstants.ATTR_COLUMNS, 1);
+ if (columns < 1)
+ {
+ columns = 1;
+ }
+
+ int startPoint = 0;
+ if (_columnIndex > columns)
+ {
+ return;
+ }
+ else if (_columnIndex == columns)
+ {
+ startPoint = _columnIndex - 1;
+ }
+ else
+ {
+ startPoint = _columnIndex;
+ }
+
+ List children = JSFDOMUtil.getUIComponentChildren(_panelGridEle);
+
+ List toMove = new ArrayList();
+ for (int i = startPoint; i < children.size(); i += columns)
+ {
+ if (_columnIndex < columns)
+ {
+ toMove.add(children.get(i));
+ }
+ else
+ {
+ int tmp = i + 1;
+ if (tmp == children.size())
+ {
+ toMove.add(null);
+ }
+ else
+ {
+ toMove.add(children.get(i + 1));
+ }
+ }
+ }
+ // for (int i = 0, size = toMove.size(); i < size; i++)
+ int lastRowCells = (children.size() % columns == 0) ? columns : (children.size() % columns);
+ PanelGridUtil util = new PanelGridUtil(this._panelGridEle);
+ int uiRows = util.getUIRowCount();
+ int adds = uiRows;
+ if (this._columnIndex > lastRowCells)
+ {
+ adds += this._columnIndex - lastRowCells;
+ }
+ for (int i = 0, size = adds; i < size; i++)
+ {
+ Node child = createDefaultNode();
+ int toMoveSize = toMove.size();
+ Node node = null;
+ if (i < toMoveSize)
+ {
+ node = (Node) toMove.get(i);
+ }
+ _panelGridEle.insertBefore(child, node);
+ }
+
+ _panelGridEle.setAttribute(IJSFConstants.ATTR_COLUMNS, String.valueOf(columns + 1));
+ formatNode(_panelGridEle);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#getAfterCommandDesignerSelection()
+ */
+ protected ISelection getAfterCommandDesignerSelection()
+ {
+ return toDesignSelection(this._panelGridEle);
+ }
+
+ private Node createDefaultNode()
+ {
+ String prefix = JSPUtil.getOrCreatePrefix(getModel(), IJMTConstants.URI_JSF_HTML, "h"); //$NON-NLS-1$
+ Element child = _panelGridEle.getOwnerDocument().createElement(IJSFConstants.TAG_OUTPUTTEXT);
+ child.setPrefix(prefix);
+ return child;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridInsertFooterCommand.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridInsertFooterCommand.java
new file mode 100644
index 000000000..3933970f8
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridInsertFooterCommand.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml;
+
+import java.util.List;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.commands.DesignerCommand;
+import org.eclipse.jst.pagedesigner.jsf.core.dom.JSFDOMUtil;
+import org.eclipse.jst.pagedesigner.viewer.IHTMLGraphicalViewer;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class PanelGridInsertFooterCommand extends DesignerCommand
+{
+ private Element _panelGrid;
+
+ public PanelGridInsertFooterCommand(IHTMLGraphicalViewer viewer, Element panelGrid)
+ {
+ super(CommandResources.getString("PanelGridInsertFooterCommand.Label.InsertFooter"), viewer); //$NON-NLS-1$
+ this._panelGrid = panelGrid;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.gef.commands.Command#canExecute()
+ */
+ public boolean canExecute()
+ {
+ boolean hasHeader = (JSFDOMUtil.findFacet(this._panelGrid, "footer") != null); //$NON-NLS-1$
+ if (hasHeader)
+ {
+ return false;
+ }
+ return super.canExecute();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#doExecute()
+ */
+ protected void doExecute()
+ {
+ Document doc = this._panelGrid.getOwnerDocument();
+ Element facet = doc.createElement(IJSFConstants.TAG_FACET);
+ facet.setPrefix("f"); //$NON-NLS-1$
+ facet.setAttribute(IJSFConstants.ATTR_NAME, "footer"); //$NON-NLS-1$
+ Element outputText = doc.createElement(IJSFConstants.TAG_OUTPUTTEXT);
+ outputText.setPrefix("h"); //$NON-NLS-1$
+ outputText.setAttribute(IJSFConstants.ATTR_VALUE, "Footer"); //$NON-NLS-1$
+ facet.appendChild(outputText);
+ List list = JSFDOMUtil.getUIComponentChildren(this._panelGrid);
+ if (list != null && list.size() > 0)
+ {
+ this._panelGrid.insertBefore(facet, (Element) list.get(0));
+ }
+ else
+ {
+ this._panelGrid.insertBefore(facet, null);
+ }
+ formatNode(this._panelGrid);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#getAfterCommandDesignerSelection()
+ */
+ protected ISelection getAfterCommandDesignerSelection()
+ {
+ return toDesignSelection(this._panelGrid);
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridInsertHeaderCommand.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridInsertHeaderCommand.java
new file mode 100644
index 000000000..a8b5f427a
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridInsertHeaderCommand.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.commands.DesignerCommand;
+import org.eclipse.jst.pagedesigner.jsf.core.dom.JSFDOMUtil;
+import org.eclipse.jst.pagedesigner.viewer.IHTMLGraphicalViewer;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class PanelGridInsertHeaderCommand extends DesignerCommand
+{
+ private Element _panelGrid;
+
+ public PanelGridInsertHeaderCommand(IHTMLGraphicalViewer viewer, Element panelGrid)
+ {
+ super(CommandResources.getString("PanelGridInsertHeaderCommand.Label.InsertHeader"), viewer); //$NON-NLS-1$
+ this._panelGrid = panelGrid;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.gef.commands.Command#canExecute()
+ */
+ public boolean canExecute()
+ {
+ boolean hasHeader = (JSFDOMUtil.findFacet(this._panelGrid, "header") != null); //$NON-NLS-1$
+ if (hasHeader)
+ {
+ return false;
+ }
+ return super.canExecute();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#doExecute()
+ */
+ protected void doExecute()
+ {
+ Document doc = this._panelGrid.getOwnerDocument();
+ Element facet = doc.createElement(IJSFConstants.TAG_FACET);
+ facet.setPrefix("f"); //$NON-NLS-1$
+ facet.setAttribute(IJSFConstants.ATTR_NAME, "header"); //$NON-NLS-1$
+ Element outputText = doc.createElement(IJSFConstants.TAG_OUTPUTTEXT);
+ outputText.setPrefix("h"); //$NON-NLS-1$
+ outputText.setAttribute(IJSFConstants.ATTR_VALUE, "Header"); //$NON-NLS-1$
+ facet.appendChild(outputText);
+ this._panelGrid.insertBefore(facet, this._panelGrid.getFirstChild());
+ formatNode(this._panelGrid);
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#getAfterCommandDesignerSelection()
+ */
+ protected ISelection getAfterCommandDesignerSelection()
+ {
+ return toDesignSelection(this._panelGrid);
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridInsertRowCommand.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridInsertRowCommand.java
new file mode 100644
index 000000000..3abb15071
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/commands/jsfhtml/PanelGridInsertRowCommand.java
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml;
+
+import java.util.List;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.commands.DesignerCommand;
+import org.eclipse.jst.pagedesigner.jsf.core.dom.JSFDOMUtil;
+import org.eclipse.jst.pagedesigner.utils.DOMUtil;
+import org.eclipse.jst.pagedesigner.utils.JSPUtil;
+import org.eclipse.jst.pagedesigner.viewer.IHTMLGraphicalViewer;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class PanelGridInsertRowCommand extends DesignerCommand
+{
+ private int _rowIndex;
+ private Element _panelGridEle;
+
+ /**
+ * consturctor
+ * @param viewer
+ * @param panelGrid
+ * @param rowIndex
+ */
+ public PanelGridInsertRowCommand(IHTMLGraphicalViewer viewer, Element panelGrid, int rowIndex)
+ {
+ super(CommandResources.getString("PanelGridInsertRowCommand.Label.InsertRow"), viewer); //$NON-NLS-1$
+ this._panelGridEle = panelGrid;
+ this._rowIndex = rowIndex;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.gef.commands.Command#canExecute()
+ */
+ public boolean canExecute()
+ {
+ if (this._rowIndex < 0)
+ {
+ return false;
+ }
+ boolean hasHeaderRow = (JSFDOMUtil.findFacet(_panelGridEle, "header") != null); //$NON-NLS-1$
+ //forbid insert row before header
+ if (hasHeaderRow && _rowIndex == 0)
+ {
+ return false;
+ }
+
+ int offIndex = this._rowIndex;
+ if (hasHeaderRow)
+ {
+ offIndex--;
+ }
+
+ int columns = DOMUtil.getIntAttributeIgnoreCase(_panelGridEle, IJSFConstants.ATTR_COLUMNS, 1);
+ if (columns < 1)
+ {
+ columns = 1;
+ }
+ List children = JSFDOMUtil.getUIComponentChildren(_panelGridEle);
+ int numRows = (children.size() + columns - 1) / columns;
+ // //if the last element row is not full,then forbid insert row after the row
+ // if ((children.size() % columns != 0) && (offIndex == numRows))
+ // {
+ // return false;
+ // }
+ //forbid insert row after the footer row
+ if (offIndex > numRows)
+ {
+ return false;
+ }
+
+ return super.canExecute();
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#doExecute()
+ */
+ protected void doExecute()
+ {
+ boolean hasHeaderRow = (JSFDOMUtil.findFacet(_panelGridEle, "header") != null); //$NON-NLS-1$
+
+ int columns = DOMUtil.getIntAttributeIgnoreCase(_panelGridEle, IJSFConstants.ATTR_COLUMNS, 1);
+ if (columns < 1)
+ {
+ columns = 1;
+ }
+
+ List children = JSFDOMUtil.getUIComponentChildren(_panelGridEle);
+ int numRows = (children.size() + columns - 1) / columns;
+
+ int insertRow = _rowIndex;
+
+ if (hasHeaderRow)
+ {
+ if (insertRow == 0)
+ {
+ return;
+ }
+ else
+ {
+ insertRow--;
+ }
+ }
+ //if (insertRow < numRows || ((insertRow == numRows) && (children.size() % columns == 0)))
+
+ {
+ int insertPoint = insertRow * columns;
+ Node node = null;
+ if (insertPoint < children.size())
+ {
+ node = (Node) children.get(insertPoint);
+ }
+
+ int adds = 0;
+ //if insert after the last ui row
+ if (insertRow >= numRows)
+ {
+ adds = columns * (numRows + 1) - children.size();
+ }
+ else
+ {
+ adds = columns;
+ }
+
+ for (int i = 0; i < adds; i++)
+ {
+ Node child = createDefaultNode();
+ _panelGridEle.insertBefore(child, node);
+ }
+ formatNode(_panelGridEle);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.commands.DesignerCommand#getAfterCommandDesignerSelection()
+ */
+ protected ISelection getAfterCommandDesignerSelection()
+ {
+ return toDesignSelection(this._panelGridEle);
+ }
+
+ private Node createDefaultNode()
+ {
+ String prefix = JSPUtil.getOrCreatePrefix(getModel(), IJMTConstants.URI_JSF_HTML, "h"); //$NON-NLS-1$
+ Element child = _panelGridEle.getOwnerDocument().createElement(IJSFConstants.TAG_OUTPUTTEXT);
+ child.setPrefix(prefix);
+ return child;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfcore/JSFCoreConverterFactory.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfcore/JSFCoreConverterFactory.java
new file mode 100644
index 000000000..e67c25f5e
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfcore/JSFCoreConverterFactory.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfcore;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.converter.AbstractTagConverter;
+import org.eclipse.jst.pagedesigner.converter.HiddenTagConverter;
+import org.eclipse.jst.pagedesigner.converter.IConverterFactory;
+import org.eclipse.jst.pagedesigner.converter.ITagConverter;
+import org.eclipse.jst.pagedesigner.converter.TagConverterToSpan;
+import org.eclipse.jst.pagedesigner.jsf.ui.JSFUIPlugin;
+import org.eclipse.swt.graphics.Image;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class JSFCoreConverterFactory implements IConverterFactory
+{
+
+ /**
+ *
+ */
+ public JSFCoreConverterFactory()
+ {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.IConverterFactory#createConverter(org.w3c.dom.Element)
+ */
+ public ITagConverter createConverter(Element element, int mode)
+ {
+ String tagName = element.getLocalName();
+ ITagConverter converter;
+ if (IJSFConstants.TAG_VIEW.equalsIgnoreCase(tagName) || IJSFConstants.TAG_SUBVIEW.equalsIgnoreCase(tagName))
+ {
+ converter = new ViewTagConverter(element);
+ ((ViewTagConverter) converter).setNeedBorderDecorator(true);
+ }
+ else if (IJSFConstants.TAG_FACET.equalsIgnoreCase(tagName)
+ || IJSFConstants.TAG_VERBATIM.equalsIgnoreCase(tagName))
+ {
+ AbstractTagConverter toSpan = new TagConverterToSpan(element);
+ toSpan.setMinWidth(10);
+ toSpan.setMinHeight(10);
+ toSpan.setNeedBorderDecorator(true);
+ converter = toSpan;
+ }
+ else if (IJSFConstants.TAG_LOADBUNDLE.equalsIgnoreCase(tagName))
+ {
+ converter = new LoadBundleTagConverter(element, getJSFCoreSharedImage(tagName));
+ }
+ else
+ {
+ converter = new HiddenTagConverter(element, getJSFCoreSharedImage(tagName));
+ }
+ converter.setMode(mode);
+ return converter;
+ }
+
+ /**
+ * @param tagName
+ * @return
+ */
+ private Image getJSFCoreSharedImage(String tagName)
+ {
+ Image image = JSFUIPlugin.getDefault().getImage("palette/JSFCORE/small/JSF_" + tagName.toUpperCase() + ".gif");
+ return image;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.IConverterFactory#getSupportedURI()
+ */
+ public String getSupportedURI()
+ {
+ return IJMTConstants.URI_JSF_CORE;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfcore/LoadBundleTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfcore/LoadBundleTagConverter.java
new file mode 100644
index 000000000..91d979eea
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfcore/LoadBundleTagConverter.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfcore;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.util.HashMap;
+import java.util.PropertyResourceBundle;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.PDPlugin;
+import org.eclipse.jst.pagedesigner.common.IFileFolderConstants;
+import org.eclipse.jst.pagedesigner.common.logging.Logger;
+import org.eclipse.jst.pagedesigner.common.utils.ResourceUtils;
+import org.eclipse.jst.pagedesigner.converter.HiddenTagConverter;
+import org.eclipse.jst.pagedesigner.utils.PreviewUtil;
+import org.eclipse.jst.pagedesigner.utils.StructuredModelUtil;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+import org.w3c.dom.Element;
+
+/**
+ * @author mengbo
+ */
+public class LoadBundleTagConverter extends HiddenTagConverter
+{
+ private static Logger _log = PDPlugin.getLogger(LoadBundleTagConverter.class);
+
+ /**
+ * @param host
+ * @param image
+ */
+ public LoadBundleTagConverter(Element host, Image image)
+ {
+ super(host, image);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#convertRefresh(java.lang.Object)
+ */
+ public void convertRefresh(Object context)
+ {
+ Element hostEle = getHostElement();
+ String varString = hostEle.getAttribute(IJSFConstants.ATTR_VAR);
+ String baseName = hostEle.getAttribute(IJSFConstants.ATTR_BASENAME);
+ if (baseName == null || varString == null)
+ {
+ return;
+ }
+ baseName = baseName.replace('.', '/') + IFileFolderConstants.DOT + IFileFolderConstants.EXT_PROPERTIES;
+ IProject project = null;
+
+ if (hostEle instanceof IDOMNode)
+ {
+ IDOMModel model = ((IDOMNode) hostEle).getModel();
+ if (model != null)
+ {
+ project = StructuredModelUtil.getProjectFor(model);
+ }
+ }
+ if (project == null)
+ {
+ return;
+ }
+ String prop = (new StringBuffer("webroot")
+ .append(IFileFolderConstants.PATH_SEPARATOR).append(IFileFolderConstants.FOLDER_WEBINF).append(
+ IFileFolderConstants.PATH_SEPARATOR).append(IFileFolderConstants.FOLDER_CLASS).append(
+ IFileFolderConstants.PATH_SEPARATOR).append(baseName)).toString();
+ IResource res = project.findMember(prop);
+ if (res == null)
+ {
+ prop = IFileFolderConstants.FOLDER_SOURCE + IFileFolderConstants.PATH_SEPARATOR + baseName;
+ res = project.findMember(prop);
+ if (res == null)
+ {
+ return;
+ }
+ }
+ InputStream ins = null;
+ try
+ {
+ File f = new File(res.getLocation().toString());
+ ins = new FileInputStream(f);
+ if (ins != null)
+ {
+ ins = new BufferedInputStream(ins);
+ PropertyResourceBundle bundle = new PropertyResourceBundle(ins);
+ if (bundle != null)
+ {
+ if (PreviewUtil.BUNDLE_MAP == null)
+ {
+ PreviewUtil.BUNDLE_MAP = new HashMap();
+ }
+ else
+ {
+ PreviewUtil.BUNDLE_MAP.clear();
+ }
+ PreviewUtil.BUNDLE_MAP.put(varString, bundle);
+ PreviewUtil.BUNDLE = bundle;
+ PreviewUtil.VAR = varString;
+ }
+ }
+ }
+ catch (MalformedURLException e)
+ {
+ _log.error("LoadBundleTagConverter.convertRefresh.MalformedURLException", e);
+ return;
+ }
+ catch (IOException e)
+ {
+ _log.error("LoadBundleTagConverter.convertRefresh.IOException", e);
+ return;
+ }
+ finally
+ {
+ ResourceUtils.ensureClosed(ins);
+ }
+
+ return;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfcore/ViewTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfcore/ViewTagConverter.java
new file mode 100644
index 000000000..b6b6c273e
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfcore/ViewTagConverter.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfcore;
+
+import org.eclipse.jst.pagedesigner.IHTMLConstants;
+import org.eclipse.jst.pagedesigner.converter.AbstractTagConverter;
+import org.eclipse.jst.pagedesigner.converter.ConverterUtil;
+import org.w3c.dom.Element;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class ViewTagConverter extends AbstractTagConverter
+{
+ /**
+ * @param host
+ */
+ public ViewTagConverter(Element host)
+ {
+ super(host);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#doConvertRefresh()
+ */
+ protected Element doConvertRefresh()
+ {
+ Element result = createElement(IHTMLConstants.TAG_DIV);
+ copyChildren(getHostElement(), result);
+// if(!isPreviewMode())
+// {
+// result.setAttribute(IHTMLConstants.ATTR_STYLE,"margin:10px;");
+// }
+ if(!isPreviewMode() && ConverterUtil.isEmptyContainer(getHostElement()))
+ {
+ result.appendChild(ConverterUtil.createDescriptionElement(getDestDocument(),null));
+ }
+ return result;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isMultiLevel()
+ */
+ public boolean isMultiLevel()
+ {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.css2.style.ITagEditInfo#isWidget()
+ */
+ public boolean isWidget()
+ {
+ return false;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/ColumnTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/ColumnTagConverter.java
new file mode 100644
index 000000000..31f98171c
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/ColumnTagConverter.java
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.eclipse.jst.pagedesigner.IHTMLConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.converter.AbstractTagConverter;
+import org.eclipse.jst.pagedesigner.converter.ConvertPosition;
+import org.eclipse.jst.pagedesigner.css2.property.ICSSPropertyID;
+import org.eclipse.jst.pagedesigner.dom.EditModelQuery;
+import org.eclipse.jst.pagedesigner.jsf.core.dom.JSFDOMUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class ColumnTagConverter extends AbstractTagConverter
+{
+
+ /**
+ * @param host
+ */
+ public ColumnTagConverter(Element host)
+ {
+ super(host);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#doConvertRefresh()
+ */
+ protected Element doConvertRefresh()
+ {
+ Element hostEle = getHostElement();
+ // we render all non-facet (header, footer) sub elements of this element
+ Element resultEle = createElement(IHTMLConstants.TAG_TD);
+ // --- create column's td in column tag converter, this should not be final solution, we might need to use
+ // referece column figure in td later.
+
+ Node parent = hostEle.getParentNode();
+ int offset;
+ if (parent != null && parent.getLocalName().equals(IJSFConstants.TAG_DATATABLE))
+ {
+ String columnClassesAttr = ((Element) parent).getAttribute(IJSFConstants.ATTR_COLUMNCLASSES);
+ List columnClasses = new ArrayList();
+ if (columnClassesAttr != null)
+ {
+ StringTokenizer tokenizer = new StringTokenizer(columnClassesAttr, ", ");
+ while (tokenizer.hasMoreTokens())
+ {
+ columnClasses.add(tokenizer.nextToken());
+ }
+ }
+ offset = EditModelQuery.getInstance().getSameTypeNodeIndex(hostEle);
+ if (offset < columnClasses.size())
+ {
+ resultEle.setAttribute(ICSSPropertyID.ATTR_CLASS, (String) columnClasses.get(offset));
+ }
+ }
+ if (EditModelQuery.getInstance().hasNonTransparentChild(hostEle, new String[]
+ {
+ IJSFConstants.TAG_FACET
+ }
+ ))
+ {
+ Node child = hostEle.getFirstChild();
+ int index = 0;
+ while (child != null)
+ {
+ if (child instanceof Element && JSFDOMUtil.isFacet((Element) child))
+ {
+ }
+ else
+ {
+ addChild(child, new ConvertPosition(resultEle, index++));
+ }
+ child = child.getNextSibling();
+ }
+ }
+ else
+ {
+ Node child = createText(" ");
+ resultEle.appendChild(child);
+ }
+ return resultEle;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isMultiLevel()
+ */
+ public boolean isMultiLevel()
+ {
+ return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isWidget()
+ */
+ public boolean isWidget()
+ {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.css2.style.ITagEditInfo#needBorderDecorator()
+ */
+ public boolean needBorderDecorator()
+ {
+ Element hostEle = getHostElement();
+ Node parent = hostEle.getParentNode();
+ if (parent != null && parent.getLocalName().equals(IJSFConstants.TAG_DATATABLE))
+ {
+ return false;
+ }
+ return true;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/CommandButtonTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/CommandButtonTagConverter.java
new file mode 100644
index 000000000..1889ba3af
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/CommandButtonTagConverter.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import org.eclipse.jst.pagedesigner.IHTMLConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.converter.AbstractTagConverter;
+import org.eclipse.jst.pagedesigner.converter.JSFConverterUtil;
+import org.w3c.dom.Element;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class CommandButtonTagConverter extends AbstractTagConverter
+{
+
+ /**
+ * @param host
+ */
+ public CommandButtonTagConverter(Element host)
+ {
+ super(host);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#doConvertRefresh()
+ */
+ protected Element doConvertRefresh()
+ {
+ Element hostEle = getHostElement();
+
+ // Renders an HTML "input" element.
+ Element inputEle = createElement(IHTMLConstants.TAG_INPUT);
+
+ // pass throught attributes
+ JSFConverterUtil.copyAllAttributes(hostEle, inputEle, null);
+
+// If the "styleClass" attribute is specified, render its
+ // value as the value of the "class" attribute.
+ JSFConverterUtil.copyAttribute(hostEle, IJSFConstants.ATTR_STYLECLASS, inputEle, IHTMLConstants.ATTR_CLASS);
+
+ inputEle.removeAttribute(IJSFConstants.ATTR_STYLECLASS);
+
+ // next handles input type
+ // "image" attribute: Absolute or relative URL of the image to be
+ // displayed for this button. If specified, this "input" element will be
+ // of type "image". Otherwise, it will be of the type specified by the
+ // "type" property with a label specified by the "value" property.
+
+ String imageAttr = hostEle.getAttribute(IJSFConstants.ATTR_IMAGE);
+ String type;
+ if (imageAttr == null || imageAttr.length() == 0)
+ {
+ type = hostEle.getAttribute(IJSFConstants.ATTR_TYPE);
+ if (type == null || type.length() == 0)
+ {
+ type = "submit"; // default type
+ }
+ }
+ else
+ {
+ type = "image";
+ // copy the image attribute as the src attribute
+ String src = mapURL(imageAttr);
+ inputEle.setAttribute(IHTMLConstants.ATTR_SRC, src);
+ }
+ // overwrite the "type" attribute
+ inputEle.setAttribute(IHTMLConstants.ATTR_TYPE, type);
+
+ String value = hostEle.getAttribute(IJSFConstants.ATTR_VALUE);
+ if (value != null && value.length() > 0)
+ {
+ value = mapValue(value);
+ inputEle.setAttribute(IHTMLConstants.ATTR_VALUE, value);
+ }
+
+ // Render the clientId of the component as the value of the "name" attribute.
+ // Render the current value of the component as the value of the "value" attribute.
+
+ return inputEle;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isMultiLevel()
+ */
+ public boolean isMultiLevel()
+ {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isWidget()
+ */
+ public boolean isWidget()
+ {
+ return true;
+ }
+
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/CommandLinkTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/CommandLinkTagConverter.java
new file mode 100644
index 000000000..d6828ba63
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/CommandLinkTagConverter.java
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import org.eclipse.jst.pagedesigner.IHTMLConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.converter.AbstractTagConverter;
+import org.eclipse.jst.pagedesigner.converter.ConvertPosition;
+import org.eclipse.jst.pagedesigner.converter.ConverterUtil;
+import org.eclipse.jst.pagedesigner.converter.JSFConverterUtil;
+import org.eclipse.jst.pagedesigner.jsf.core.dom.JSFDOMUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class CommandLinkTagConverter extends AbstractTagConverter
+{
+
+ /**
+ * @param host
+ */
+ public CommandLinkTagConverter(Element host)
+ {
+ super(host);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#doConvertRefresh()
+ */
+ protected Element doConvertRefresh()
+ {
+ Element hostEle = getHostElement();
+ // Render an HTML "a" anchor element that acts like a form submit button when clicked.
+ Element aEle = createElement(IHTMLConstants.TAG_A);
+
+ JSFConverterUtil.copyAllAttributes(hostEle, aEle, null);
+
+ // If the "styleClass" attribute is specified, render its value as the value of the "class" attribute.
+ JSFConverterUtil.copyAttribute(hostEle, IJSFConstants.ATTR_STYLECLASS, aEle, IHTMLConstants.ATTR_CLASS);
+
+ aEle.removeAttribute(IJSFConstants.ATTR_STYLECLASS);
+
+ // Render "#" as the value of the "href" attribute.
+ aEle.setAttribute(IHTMLConstants.ATTR_HREF, "#");
+ // Extend the container border a little to make it selectable
+ if (!isPreviewMode())
+ {
+ String style = aEle.getAttribute(IHTMLConstants.ATTR_STYLE);
+ style = "padding:0.3em;" + style;
+ aEle.setAttribute(IHTMLConstants.ATTR_STYLE, style);
+ }
+
+ int childNodeIndex = 0;
+ // Render the current value of the component as the link text if it
+ // is specified.
+ String value = hostEle.getAttribute(IJSFConstants.ATTR_VALUE);
+ if (value != null && value.length() > 0)
+ {
+ value = mapValue(value);
+ aEle.appendChild(createText(value));
+ childNodeIndex = 1;
+ }
+ // generate children
+ // Render any non-UIParameter children as normal inside of the "a" element.
+ // These will appear as the link text.
+
+ if (hostEle.hasChildNodes())
+ {
+ Node child = hostEle.getFirstChild();
+ for (; child != null; child = child.getNextSibling())
+ {
+ if (!shouldIgnore(child))
+ {
+ if (child instanceof Element
+ && (JSFDOMUtil.isUIParameter((Element) child) || isActionListener((Element) child)))
+ {
+ // skip
+ }
+ else
+ {
+ addChild(child, new ConvertPosition(aEle, childNodeIndex++));
+ }
+ }
+ }
+ }
+ if (ConverterUtil.isEmptyContainer(hostEle) && !hostEle.hasAttribute(IJSFConstants.ATTR_VALUE))
+ {
+ aEle.appendChild(getDestDocument().createTextNode(IJSFConstants.TAG_COMMANDLINK));
+ }
+
+ return aEle;
+ }
+
+ private boolean isActionListener(Element element)
+ {
+ if(element != null && IJSFConstants.TAG_ACTIONLISTENER.equalsIgnoreCase(element.getLocalName()))
+ {
+ return true;
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isMultiLevel()
+ */
+ public boolean isMultiLevel()
+ {
+ return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isWidget()
+ */
+ public boolean isWidget()
+ {
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.pagedesigner.css2.style.ITagEditInfo#needBorderDecorator()
+ */
+ public boolean needBorderDecorator()
+ {
+ return true;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/DataTableTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/DataTableTagConverter.java
new file mode 100644
index 000000000..563a18926
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/DataTableTagConverter.java
@@ -0,0 +1,297 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.eclipse.jst.pagedesigner.IHTMLConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.converter.AbstractTagConverter;
+import org.eclipse.jst.pagedesigner.converter.ConvertPosition;
+import org.eclipse.jst.pagedesigner.converter.ConverterUtil;
+import org.eclipse.jst.pagedesigner.converter.JSFConverterUtil;
+import org.eclipse.jst.pagedesigner.jsf.core.dom.JSFDOMUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class DataTableTagConverter extends AbstractTagConverter
+{
+ private static final String FACET_NAME_HEADER = "header";
+
+ /**
+ * @param host
+ */
+ public DataTableTagConverter(Element host)
+ {
+ super(host);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#doConvertRefresh()
+ */
+ protected Element doConvertRefresh()
+ {
+ Element hostEle = getHostElement();
+
+ // Renders an HTML "table" element compliant with the HTML 401 specification.
+ Element tableEle = createElement(IHTMLConstants.TAG_TABLE);
+
+ // Any pass-through attributes are also rendered on the "table" element.
+ JSFConverterUtil.copyAllAttributes(hostEle, tableEle, null);
+
+ // Please consult the javadoc for UIData to supplement this specification.
+ // If the "styleClass" attribute is specified, render its value as the value
+ // of the "class" attribute on the "table" element.
+ ConverterUtil.copyAttribute(hostEle, IJSFConstants.ATTR_STYLECLASS, tableEle, IHTMLConstants.ATTR_CLASS);
+ tableEle.removeAttribute(IJSFConstants.ATTR_STYLECLASS);
+
+ List columns = findUIColumns(hostEle);
+
+ // rendering the thead
+ convertTHeader(hostEle, tableEle, columns, true);
+
+ convertTBody(hostEle, tableEle, columns);
+ // rendering the tfoot
+ // Follow the same process as for the header, except replace "header" with
+ // "footer", "th" with "td", "thead" with "tfoot", and "headerClass" with
+ // "footerClass". Do not render any "scope" attribute for the footer.
+ convertTHeader(hostEle, tableEle, columns, false);
+
+ return tableEle;
+ }
+
+ /**
+ * @param hostEle
+ * @return
+ */
+ private List findUIColumns(Element hostEle)
+ {
+ List result = new ArrayList();
+ Node child = hostEle.getFirstChild();
+ if (child != null)
+ {
+
+ while (child != null)
+ {
+ if (child instanceof Element)
+ {
+ Element ele = (Element) child;
+ // XXX: we are not handling namespace here
+ if (IJSFConstants.TAG_COLUMN.equals(ele.getLocalName()))
+ {
+ result.add(ele);
+ }
+ }
+ child = child.getNextSibling();
+ }
+ }
+ return result;
+ }
+
+ protected void convertTBody(Element hostEle, Element tableEle, List columns)
+ {
+ // Rendering the table body
+ Element tbodyEle = createElement(IHTMLConstants.TAG_TBODY);
+ tableEle.appendChild(tbodyEle);
+ // Render a "tbody" element. Keep track of the result of the "rows" property
+ // on the UIData component. Keep track of the number of rows we have rendered
+ // so far.
+ // Iterate through the rows. Set the "rowIndex" property of the UIDatacomponent
+ // to be correct as we iterate through the rows.
+ // Stop rendering children and close out the "tbody" element if the "rowAvailable"
+ // property of the UIData returned false.
+
+ // XXX: we are only rendering one row.
+ // Output a "tr" element.
+ Element trEle = createElement(IHTMLConstants.TAG_TR);
+ tbodyEle.appendChild(trEle);
+
+ // Output the value of the "rowClasses" per the attribute description below.
+ String rowClasses = tableEle.getAttribute(IJSFConstants.ATTR_ROWCLASSES);
+ if (rowClasses != null)
+ {
+ // as we are only rendering one row, so we only get the first rowclass
+ StringTokenizer tokenizer = new StringTokenizer(rowClasses, ", ");
+ if (tokenizer.hasMoreTokens())
+ {
+ trEle.setAttribute(IHTMLConstants.ATTR_CLASS, tokenizer.nextToken());
+ }
+ }
+
+ // --------------------------------- move this part into ColumnsTagConverter. ------------------------------
+ String columnClassesAttr = hostEle.getAttribute(IJSFConstants.ATTR_COLUMNCLASSES);
+ List columnClasses = new ArrayList();
+ if (columnClassesAttr != null)
+ {
+ StringTokenizer tokenizer = new StringTokenizer(columnClassesAttr, ", ");
+ while (tokenizer.hasMoreTokens())
+ {
+ columnClasses.add(tokenizer.nextToken());
+ }
+ }
+ // --- create column's td in column tag converter, here
+ // For each UIColumn child, output a "td" element, attaching the value of the
+ // "columnClasses" attribute of the UIData component per the attribute description below.
+ // Recursively encode each child of each UIColumn child. Close out the "td" element.
+ // When done with the row, close out the "tr" element. When done with all the rows,
+ // close out the "tbody" element.
+ for (int i = 0, size = columns.size(); i < size; i++)
+ {
+ Element column = (Element) columns.get(i);
+ addChild(column, new ConvertPosition(trEle, i));
+ // Element tdEle = createElement("td");
+ // if (i < columnClasses.size())
+ // {
+ // tdEle.setAttribute("class", (String) columnClasses.get(i));
+ // }
+ //
+ // trEle.appendChild(tdEle);
+ // // put the "h:column" under td.
+ // addChild(column, new ConvertPosition(tdEle, 0));
+ }
+ }
+
+ /**
+ * @param hostEle
+ * @param tableEle
+ * @param header true means header, false means footer
+ */
+ protected void convertTHeader(Element hostEle, Element tableEle, List columns, boolean header)
+ {
+ // If the UIData component has a "header" facet, or any of the child UIColumn
+ // components has a "header" facet, render a "thead" element.
+ Element facetEle = JSFDOMUtil.findFacet(hostEle, header ? FACET_NAME_HEADER : "footer");
+ boolean hasColHeader = false;
+ for (int i = 0, size = columns.size(); i < size; i++)
+ {
+ Element uicolumnEle = (Element) columns.get(i);
+ Element columnFacet = JSFDOMUtil.findFacet(uicolumnEle, header ? FACET_NAME_HEADER : "footer");
+ if (columnFacet != null)
+ {
+ hasColHeader = true;
+ break;
+ }
+ }
+
+ if (facetEle == null && !hasColHeader)
+ {
+ return;
+ }
+ Element theadEle = createElement(header ? IHTMLConstants.TAG_THEAD : IHTMLConstants.TAG_TFOOT);
+ tableEle.appendChild(theadEle);
+
+ // If the UIData component has a "header" facet, encode its contents inside of
+ // "tr" and "th" elements, respectively.
+ if (facetEle != null)
+ {
+ Element trEle = createElement(IHTMLConstants.TAG_TR);
+ theadEle.appendChild(trEle);
+ Element thEle = createElement(header ? IHTMLConstants.TAG_TH : IHTMLConstants.TAG_TD);
+ trEle.appendChild(thEle);
+ // Output the value of the "headerClass" attribute of the UIData component,
+ // if present, as the value of the "class" attribute on the "th".
+ ConverterUtil.copyAttribute(hostEle, header ? IJSFConstants.ATTR_HEADERCLASS
+ : IJSFConstants.ATTR_FOOTERCLASS, thEle, IHTMLConstants.ATTR_CLASS);
+ // Output the number of child UIColumn components of theUIData component as
+ // the value of the "colspan" attribute on the "th".
+ if (columns.size() > 0)
+ {
+ thEle.setAttribute(IHTMLConstants.ATTR_COLSPAN, String.valueOf(columns.size()));
+ }
+
+ addChild(facetEle, new ConvertPosition(thEle, 0));
+ }
+ // Output "colgroup" as the value of the "scope" attribute on the "th" element.
+
+ // If any of the child UIColumn components has a "header" facet render a "tr"
+ // element.
+ if (hasColHeader)
+ {
+ Element trEle = createElement(IHTMLConstants.TAG_TR);
+ theadEle.appendChild(trEle);
+
+ for (int i = 0, size = columns.size(); i < size; i++)
+ {
+ Element uicolumnEle = (Element) columns.get(i);
+ Element columnFacet = JSFDOMUtil.findFacet(uicolumnEle, header ? FACET_NAME_HEADER : "footer");
+ Element thEle = createElement(header ? IHTMLConstants.TAG_TH : IHTMLConstants.TAG_TD);
+ trEle.appendChild(thEle);
+ if (columnFacet != null)
+ {
+ // For eachUIColumn that actually has a "header" facet, render it inside of
+ // a "th" element.
+ addChild(columnFacet, new ConvertPosition(thEle, 0));
+ }
+ else
+ {
+ // Columns that don't have a "header" facet cause an empty "th" element to be
+ // rendered.
+ }
+
+ // Output the value of the "headerClass" attribute of the UIData component,
+ // if present, as the value of the "class" attribute on the "th".
+ ConverterUtil.copyAttribute(hostEle, header ? IJSFConstants.ATTR_HEADERCLASS
+ : IJSFConstants.ATTR_FOOTERCLASS, thEle, IHTMLConstants.ATTR_CLASS);
+
+ // Output "col" as the value of the "colgroup" attribute on the "th" element.
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isMultiLevel()
+ */
+ public boolean isMultiLevel()
+ {
+ return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isWidget()
+ */
+ public boolean isWidget()
+ {
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#needBorderDecorator()
+ */
+ public boolean needBorderDecorator()
+ {
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#needTableDecorator()
+ */
+ public boolean needTableDecorator()
+ {
+ return true;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/GraphicImageTagConveter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/GraphicImageTagConveter.java
new file mode 100644
index 000000000..88ceabd00
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/GraphicImageTagConveter.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import org.eclipse.jst.pagedesigner.IHTMLConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.converter.AbstractTagConverter;
+import org.eclipse.jst.pagedesigner.converter.ConverterUtil;
+import org.eclipse.jst.pagedesigner.converter.JSFConverterUtil;
+import org.w3c.dom.Element;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class GraphicImageTagConveter extends AbstractTagConverter
+{
+
+ /**
+ * @param host
+ */
+ public GraphicImageTagConveter(Element host)
+ {
+ super(host);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#doConvertRefresh()
+ */
+ protected Element doConvertRefresh()
+ {
+ Element hostEle = getHostElement();
+ // Renders an HTML "img" element.
+ Element imgEle = createElement(IHTMLConstants.TAG_IMG);
+
+ JSFConverterUtil.copyAllAttributes(hostEle, imgEle, null);
+
+ // If the "styleClass" attribute is specified, render its value as
+ // the value of the "class" attribute.
+ ConverterUtil.copyAttribute(hostEle, IJSFConstants.ATTR_STYLECLASS, imgEle, IHTMLConstants.ATTR_CLASS);
+ imgEle.removeAttribute(IJSFConstants.ATTR_STYLECLASS);
+
+ // Render the clientId as the value of the "id" attribute.
+ // Render the value of the component as the value of the "src"
+ // attribute, after passing it to the getResourceUR() method
+ // of the ViewHandler for this application, and passing the
+ // result through the encodeResourceURL() method of the
+ // ExternalContext.
+ String src = getSrc(hostEle);
+ if (src != null)
+ {
+ imgEle.setAttribute(IHTMLConstants.ATTR_SRC, src);
+ }
+ return imgEle;
+ }
+
+ /**
+ * @param hostEle
+ * @return
+ */
+ private String getSrc(Element hostEle)
+ {
+ // TODO: need revisit the spec for special URL converting
+ // for this element
+ String value = hostEle.getAttribute(IJSFConstants.ATTR_VALUE);
+ if (value == null)
+ {
+ // Context-relative URL to retrieve the resource associated
+ // with this component. This is an alias for the "value"
+ // property.
+ value = hostEle.getAttribute(IJSFConstants.ATTR_URL);
+ }
+ if (value != null)
+ {
+ value = mapValue(value);
+ value = mapURL(value);
+ }
+ return value;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isMultiLevel()
+ */
+ public boolean isMultiLevel()
+ {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isWidget()
+ */
+ public boolean isWidget()
+ {
+ return true;
+ }
+
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/InputTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/InputTagConverter.java
new file mode 100644
index 000000000..4fed1ca95
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/InputTagConverter.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import org.eclipse.jst.pagedesigner.IHTMLConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.converter.AbstractTagConverter;
+import org.eclipse.jst.pagedesigner.converter.JSFConverterUtil;
+import org.w3c.dom.Element;
+
+/**
+ * This is for inputHidden, inputSecret, inputText.
+ *
+ * @author mengbo
+ * @version 1.5
+ */
+public class InputTagConverter extends AbstractTagConverter
+{
+
+ private String _inputType;
+
+ /**
+ * @param host
+ */
+ public InputTagConverter(Element host, String inputType)
+ {
+ super(host);
+ _inputType = inputType;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#doConvertRefresh()
+ */
+ protected Element doConvertRefresh()
+ {
+ Element hostEle = getHostElement();
+ // Renders an HTML "input" element of "type" "text".
+ Element inputEle = createElement(IHTMLConstants.TAG_INPUT);
+ JSFConverterUtil.copyAllAttributes(hostEle, inputEle, null);
+ JSFConverterUtil.copyAttribute(hostEle, IJSFConstants.ATTR_STYLECLASS, inputEle, IHTMLConstants.ATTR_CLASS);
+ inputEle.removeAttribute(IJSFConstants.ATTR_STYLECLASS);
+
+ inputEle.setAttribute(IHTMLConstants.ATTR_TYPE, getInputType());
+
+ inputEle.removeAttribute(IJSFConstants.ATTR_VALUE);
+ inputEle.setAttribute(IJSFConstants.ATTR_VALUE, getValue(hostEle));
+
+ return inputEle;
+ }
+
+ /**
+ * @param hostEle
+ * @return
+ */
+ private String getValue(Element hostEle)
+ {
+ String valueAttr = hostEle.getAttribute(IJSFConstants.ATTR_VALUE);
+ if (valueAttr == null)
+ {
+ String name = hostEle.getLocalName();
+ return name.substring(0, 1).toUpperCase() + name.substring(1);
+ }
+ else
+ {
+ return mapValue(valueAttr);
+ }
+ }
+
+ /**
+ * @return
+ */
+ private String getInputType()
+ {
+ return _inputType;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isMultiLevel()
+ */
+ public boolean isMultiLevel()
+ {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isWidget()
+ */
+ public boolean isWidget()
+ {
+ return true;
+ }
+
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/InputTextAreaTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/InputTextAreaTagConverter.java
new file mode 100644
index 000000000..adac259e0
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/InputTextAreaTagConverter.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import org.eclipse.jst.pagedesigner.IHTMLConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.converter.AbstractTagConverter;
+import org.eclipse.jst.pagedesigner.converter.JSFConverterUtil;
+import org.w3c.dom.Element;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class InputTextAreaTagConverter extends AbstractTagConverter
+{
+
+ /**
+ * @param host
+ */
+ public InputTextAreaTagConverter(Element host)
+ {
+ super(host);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#doConvertRefresh()
+ */
+ protected Element doConvertRefresh()
+ {
+ Element hostEle = getHostElement();
+ // Renders an HTML "textarea" element.
+ Element textareaEle = createElement(IHTMLConstants.TAG_TEXTAREA);
+
+ JSFConverterUtil.copyAllAttributes(hostEle, textareaEle, null);
+ JSFConverterUtil.copyAttribute(hostEle, IJSFConstants.ATTR_STYLECLASS, textareaEle, IHTMLConstants.ATTR_CLASS);
+ textareaEle.removeAttribute(IJSFConstants.ATTR_STYLECLASS);
+
+ String value = hostEle.getAttribute(IJSFConstants.ATTR_VALUE);
+ if (value != null && value.length() > 0)
+ {
+ value = mapValue(value);
+ textareaEle.appendChild(createText(value));
+ }
+
+ return textareaEle;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isMultiLevel()
+ */
+ public boolean isMultiLevel()
+ {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isWidget()
+ */
+ public boolean isWidget()
+ {
+ return true;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/JSFFormTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/JSFFormTagConverter.java
new file mode 100644
index 000000000..ad0c44d43
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/JSFFormTagConverter.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import org.eclipse.jst.pagedesigner.IHTMLConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.converter.AbstractTagConverter;
+import org.eclipse.jst.pagedesigner.converter.JSFConverterUtil;
+import org.w3c.dom.Element;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class JSFFormTagConverter extends AbstractTagConverter
+{
+
+ /**
+ * @param host
+ */
+ public JSFFormTagConverter(Element host)
+ {
+ super(host);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#doConvertRefresh()
+ */
+ protected Element doConvertRefresh()
+ {
+ // The value of the "method" attribute must be "post". The value of the
+ // "action" attribute must be the result of passing the view identifier
+ // of the current view to the getActionURL() method of the ViewHandler for
+ // this application, then passing that String to the encodeActionURL()
+ // method on the ExternalContext.
+ // XXX: as our tag converter only serve designer and preview, so we only
+ // deal with attributes relating to visual effect. Ignoring "method", "action",
+ // etc.
+ Element hostEle = getHostElement();
+
+ Element formEle = createElement(IHTMLConstants.TAG_FORM);
+
+ // If the "styleClass" attribute is specified, render its value as the
+ // value of the "class" attribute.
+ JSFConverterUtil.copyAttribute(hostEle, IJSFConstants.ATTR_STYLECLASS, formEle, IHTMLConstants.ATTR_CLASS);
+ formEle.removeAttribute(IJSFConstants.ATTR_STYLECLASS);
+
+ // pass through other attributes
+ // XXX: handle ignored attributes here.
+ JSFConverterUtil.copyAllAttributes(hostEle, formEle, null);
+
+ // Render all the necessary hidden fields for all commandLink instances
+ // in the page just before the close of the "form" element.
+ // XXX: ignored for these hidden fields.
+
+ // children of old <h:form> should still be children.
+ this.copyChildren(hostEle, formEle);
+
+ return formEle;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isMultiLevel()
+ */
+ public boolean isMultiLevel()
+ {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isWidget()
+ */
+ public boolean isWidget()
+ {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#needBorderDecorator()
+ */
+ public boolean needBorderDecorator()
+ {
+ return true;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/JSFHTMLConverterFactory.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/JSFHTMLConverterFactory.java
new file mode 100644
index 000000000..4e14cc2ec
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/JSFHTMLConverterFactory.java
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.converter.HiddenTagConverter;
+import org.eclipse.jst.pagedesigner.converter.IConverterFactory;
+import org.eclipse.jst.pagedesigner.converter.ITagConverter;
+import org.eclipse.jst.pagedesigner.jsf.ui.JSFUIPlugin;
+import org.eclipse.swt.graphics.Image;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class JSFHTMLConverterFactory implements IConverterFactory
+{
+
+ /**
+ *
+ */
+ public JSFHTMLConverterFactory()
+ {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.IConverterFactory#createConverter(org.w3c.dom.Element)
+ */
+ public ITagConverter createConverter(Element element, int mode)
+ {
+ String tagName = element.getLocalName();
+ ITagConverter converter;
+ if (IJSFConstants.TAG_COLUMN.equalsIgnoreCase(tagName))
+ {
+ converter = new ColumnTagConverter(element);
+ }
+ else if (IJSFConstants.TAG_COMMANDBUTTON.equalsIgnoreCase(tagName))
+ {
+ converter = new CommandButtonTagConverter(element);
+ }
+ else if (IJSFConstants.TAG_COMMANDLINK.equalsIgnoreCase(tagName))
+ {
+ converter = new CommandLinkTagConverter(element);
+ }
+ else if (IJSFConstants.TAG_DATATABLE.equalsIgnoreCase(tagName))
+ {
+ converter = new DataTableTagConverter(element);
+ }
+ else if (IJSFConstants.TAG_FORM.equalsIgnoreCase(tagName))
+ {
+ converter = new JSFFormTagConverter(element);
+ }
+ else if (IJSFConstants.TAG_GRAPHICIMAGE.equalsIgnoreCase(tagName))
+ {
+ converter = new GraphicImageTagConveter(element);
+ }
+ else if (IJSFConstants.TAG_INPUTHIDDEN.equalsIgnoreCase(tagName))
+ {
+ return new HiddenTagConverter(element, getJSFHTMLImage(tagName));
+ }
+ else if (IJSFConstants.TAG_INPUTSECRET.equalsIgnoreCase(tagName))
+ {
+ converter = new InputTagConverter(element, "password");
+ }
+ else if (IJSFConstants.TAG_INPUTTEXT.equalsIgnoreCase(tagName))
+ {
+ converter = new InputTagConverter(element, "text");
+ }
+ else if (IJSFConstants.TAG_INPUTTEXTAREA.equalsIgnoreCase(tagName))
+ {
+ converter = new InputTextAreaTagConverter(element);
+ }
+ else if (IJSFConstants.TAG_MESSAGE.equalsIgnoreCase(tagName)
+ || IJSFConstants.TAG_MESSAGES.equalsIgnoreCase(tagName))
+ {
+ converter = new HiddenTagConverter(element, getJSFHTMLImage(tagName));
+ }
+ else if (IJSFConstants.TAG_OUTPUTTEXT.equalsIgnoreCase(tagName)
+ || IJSFConstants.TAG_OUTPUTFORMAT.equalsIgnoreCase(tagName))
+ {
+ converter = new OutputTextTagConverter(element);
+ }
+ else if (IJSFConstants.TAG_OUTPUTLABEL.equalsIgnoreCase(tagName))
+ {
+ converter = new OutputLabelTagConverter(element);
+ }
+ else if (IJSFConstants.TAG_OUTPUTLINK.equalsIgnoreCase(tagName))
+ {
+ converter = new OutputLinkTagConverter(element);
+ }
+ else if (IJSFConstants.TAG_PANELGRID.equalsIgnoreCase(tagName))
+ {
+ converter = new PanelGridTagConverter(element);
+ }
+ else if (IJSFConstants.TAG_PANELGROUP.equalsIgnoreCase(tagName))
+ {
+ converter = new PanelGroupTagConverter(element);
+ }
+ else if (IJSFConstants.TAG_SELECTBOOLEANCHECKBOX.equalsIgnoreCase(tagName))
+ {
+ converter = new SelectBooleanCheckboxTagConverter(element);
+ }
+ else if (IJSFConstants.TAG_SELECTMANYCHECKBOX.equalsIgnoreCase(tagName))
+ {
+ converter = new TableBasedSelectTagConverter(element, "checkbox");
+ }
+ else if (IJSFConstants.TAG_SELECTMANYLISTBOX.equalsIgnoreCase(tagName))
+ {
+ converter = new SelectManyListboxTagConverter(element);
+ }
+ else if (IJSFConstants.TAG_SELECTMANYMENU.equalsIgnoreCase(tagName))
+ {
+ converter = new SelectManyMenuTagConverter(element);
+ }
+ else if (IJSFConstants.TAG_SELECTONELISTBOX.equalsIgnoreCase(tagName))
+ {
+ converter = new SelectOneListboxTagConverter(element);
+ }
+ else if (IJSFConstants.TAG_SELECTONEMENU.equalsIgnoreCase(tagName))
+ {
+ converter = new SelectOneMenuTagConverter(element);
+ }
+ else if (IJSFConstants.TAG_SELECTONERADIO.equalsIgnoreCase(tagName))
+ {
+ converter = new TableBasedSelectTagConverter(element, "radio");
+ }
+ else
+ {
+ return null;
+ }
+ converter.setMode(mode);
+ return converter;
+ }
+
+ /**
+ * @param tagName
+ * @return
+ */
+ private Image getJSFHTMLImage(String tagName)
+ {
+ Image image = JSFUIPlugin.getDefault().getImage("palette/JSFHTML/small/JSF_" + tagName.toUpperCase() + ".gif");
+ return image;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.IConverterFactory#getSupportedURI()
+ */
+ public String getSupportedURI()
+ {
+ return IJMTConstants.URI_JSF_HTML;
+ }
+
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/MessageTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/MessageTagConverter.java
new file mode 100644
index 000000000..b9ce7b8d9
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/MessageTagConverter.java
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import org.eclipse.jst.pagedesigner.IHTMLConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.converter.AbstractTagConverter;
+import org.eclipse.jst.pagedesigner.converter.JSFConverterUtil;
+import org.eclipse.jst.pagedesigner.jsf.ui.util.JSFUIPluginResourcesUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.Text;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class MessageTagConverter extends AbstractTagConverter
+{
+ private static final String MESSAGE_CONTENT = JSFUIPluginResourcesUtil.getInstance().getString(
+ "MessageTagConverter.defaultValue");
+ private static final String MESSAGE_TOOLTIP = JSFUIPluginResourcesUtil.getInstance().getString(
+ "MessageTagConverter.defaultTooltip");
+
+ /**
+ * @param host
+ */
+ public MessageTagConverter(Element host)
+ {
+ super(host);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#doConvertRefresh()
+ */
+ protected Element doConvertRefresh()
+ {
+ Element hostEle = getHostElement();
+
+ // If the "styleClass" or "style" attributes are present,
+ // render a "span" element.
+ // XXX: to make things simpler, we always create a span
+ Element spanEle = createElement(IHTMLConstants.TAG_SPAN);
+
+ // If the "style" attribute is present, pass it thru.
+ // XXX: we are passing all the attributes through, since other attribute
+ // don't conflict with html attributes.
+ JSFConverterUtil.copyAllAttributes(hostEle, spanEle, null);
+
+ // If the "styleClass" attribute is present,
+ // output the value of the "styleClass" attribute as the value of the "class" attribute on the "span" element
+ JSFConverterUtil.copyAttribute(hostEle, IJSFConstants.ATTR_STYLECLASS, spanEle, IHTMLConstants.ATTR_CLASS);
+ spanEle.removeAttribute(IJSFConstants.ATTR_STYLECLASS);
+
+ String fatalStyle = hostEle.getAttribute(IJSFConstants.ATTR_FATALSTYLE);
+ String errorStyle = hostEle.getAttribute(IJSFConstants.ATTR_ERRORSTYLE);
+ String warnStyle = hostEle.getAttribute(IJSFConstants.ATTR_WARNSTYLE);
+ String infoStyle = hostEle.getAttribute(IJSFConstants.ATTR_INFOSTYLE);
+ String fatalClass = hostEle.getAttribute(IJSFConstants.ATTR_FATALCLASS);
+ String errorClass = hostEle.getAttribute(IJSFConstants.ATTR_ERRORCLASS);
+ String warnClass = hostEle.getAttribute(IJSFConstants.ATTR_WARNCLASS);
+ String infoClass = hostEle.getAttribute(IJSFConstants.ATTR_INFOCLASS);
+
+ if ((!"".equals(fatalStyle)) && (fatalStyle != null))
+ {
+ spanEle.setAttribute(IHTMLConstants.ATTR_STYLE, fatalStyle);
+ }
+ else if ((!"".equals(errorStyle)) && (errorStyle != null))
+ {
+ spanEle.setAttribute(IHTMLConstants.ATTR_STYLE, errorStyle);
+ }
+ else if ((!"".equals(warnStyle)) && (warnStyle != null))
+ {
+ spanEle.setAttribute(IHTMLConstants.ATTR_STYLE, warnStyle);
+ }
+ else if ((!"".equals(infoStyle)) && (infoStyle != null))
+ {
+ spanEle.setAttribute(IHTMLConstants.ATTR_STYLE, infoStyle);
+ }
+
+ if ((!"".equals(fatalClass)) && (fatalClass != null))
+ {
+ spanEle.setAttribute(IJSFConstants.ATTR_STYLECLASS, fatalClass);
+ }
+ else if ((!"".equals(errorClass)) && (errorClass != null))
+ {
+ spanEle.setAttribute(IJSFConstants.ATTR_STYLECLASS, errorClass);
+ }
+ else if ((!"".equals(warnClass)) && (warnClass != null))
+ {
+ spanEle.setAttribute(IJSFConstants.ATTR_STYLECLASS, warnClass);
+ }
+ else if ((!"".equals(infoClass)) && (infoClass != null))
+ {
+ spanEle.setAttribute(IJSFConstants.ATTR_STYLECLASS, infoClass);
+ }
+ spanEle.removeAttribute(IJSFConstants.ATTR_STYLECLASS);
+
+ //If the "tooltip" attribute is present with the value of "true", and so does
+ //the "showSummary",then output the "summary" as the value of the "title" attribute on the "span".
+ String hasToolTip = hostEle.getAttribute(IJSFConstants.ATTR_TOOLTIP);
+ String showSummary = hostEle.getAttribute(IJSFConstants.ATTR_SHOWSUMMARY);
+ if ("true".equalsIgnoreCase(hasToolTip))
+ {
+ if ("true".equalsIgnoreCase(showSummary))
+ {
+ spanEle.setAttribute("title", MESSAGE_TOOLTIP);
+ }
+ }
+ Text text = createText(MESSAGE_CONTENT);
+ spanEle.appendChild(text);
+
+ return spanEle;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isMultiLevel()
+ */
+ public boolean isMultiLevel()
+ {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.css2.style.ITagEditInfo#isWidget()
+ */
+ public boolean isWidget()
+ {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.css2.style.ITagEditInfo#needBorderDecorator()
+ */
+ public boolean needBorderDecorator()
+ {
+ return true;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/MessagesTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/MessagesTagConverter.java
new file mode 100644
index 000000000..7450b45f0
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/MessagesTagConverter.java
@@ -0,0 +1,181 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import org.eclipse.jst.pagedesigner.IHTMLConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.converter.AbstractTagConverter;
+import org.eclipse.jst.pagedesigner.converter.JSFConverterUtil;
+import org.eclipse.jst.pagedesigner.jsf.ui.util.JSFUIPluginResourcesUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.Text;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class MessagesTagConverter extends AbstractTagConverter
+{
+ private static final String MESSAGE_CONTENT = JSFUIPluginResourcesUtil.getInstance().getString(
+ "MessageTagConverter.defaultValue");
+ private static final String MESSAGE_TOOLTIP = JSFUIPluginResourcesUtil.getInstance().getString(
+ "MessageTagConverter.defaultTooltip");
+
+ /**
+ * @param host
+ */
+ public MessagesTagConverter(Element host)
+ {
+ super(host);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#doConvertRefresh()
+ */
+ protected Element doConvertRefresh()
+ {
+ Element hostEle = getHostElement();
+ String layout = hostEle.getAttribute(IJSFConstants.ATTR_LAYOUT);
+ if (IHTMLConstants.TAG_TABLE.equalsIgnoreCase(layout))
+ {
+ Element table = createElement(IHTMLConstants.TAG_TABLE);
+ table.setAttribute(IHTMLConstants.ATTR_BORDER, "1");
+ for (int i = 0; i < 2; i++)
+ {
+ Element tr = createElement(IHTMLConstants.TAG_TR);
+ Element td = createElement(IHTMLConstants.TAG_TD);
+ Element span = createSpan();
+ td.appendChild(span);
+ tr.appendChild(td);
+ table.appendChild(tr);
+ }
+ return table;
+ }
+ else
+ {
+ Element ul = createElement(IHTMLConstants.TAG_UL);
+ for (int i = 0; i < 2; i++)
+ {
+ Element li = createElement(IHTMLConstants.TAG_LI);
+ Element span = createSpan();
+ li.appendChild(span);
+ ul.appendChild(li);
+ }
+ return ul;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isMultiLevel()
+ */
+ public boolean isMultiLevel()
+ {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.css2.style.ITagEditInfo#isWidget()
+ */
+ public boolean isWidget()
+ {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.css2.style.ITagEditInfo#needBorderDecorator()
+ */
+ public boolean needBorderDecorator()
+ {
+ return true;
+ }
+
+ private Element createSpan()
+ {
+ Element hostEle = getHostElement();
+
+ // If the "styleClass" or "style" attributes are present,
+ // render a "span" element.
+ // XXX: to make things simpler, we always create a span
+ Element spanEle = createElement(IHTMLConstants.TAG_SPAN);
+
+ // If the "style" attribute is present, pass it thru.
+ // XXX: we are passing all the attributes through, since other attribute
+ // don't conflict with html attributes.
+ JSFConverterUtil.copyAllAttributes(hostEle, spanEle, null);
+
+ // If the "styleClass" attribute is present,
+ // output the value of the "styleClass" attribute as the value of the "class" attribute on the "span" element
+ JSFConverterUtil.copyAttribute(hostEle, IJSFConstants.ATTR_STYLECLASS, spanEle, IHTMLConstants.ATTR_CLASS);
+ spanEle.removeAttribute(IJSFConstants.ATTR_STYLECLASS);
+
+ String fatalStyle = hostEle.getAttribute(IJSFConstants.ATTR_FATALSTYLE);
+ String errorStyle = hostEle.getAttribute(IJSFConstants.ATTR_ERRORSTYLE);
+ String warnStyle = hostEle.getAttribute(IJSFConstants.ATTR_WARNSTYLE);
+ String infoStyle = hostEle.getAttribute(IJSFConstants.ATTR_INFOSTYLE);
+ String fatalClass = hostEle.getAttribute(IJSFConstants.ATTR_FATALCLASS);
+ String errorClass = hostEle.getAttribute(IJSFConstants.ATTR_ERRORCLASS);
+ String warnClass = hostEle.getAttribute(IJSFConstants.ATTR_WARNCLASS);
+ String infoClass = hostEle.getAttribute(IJSFConstants.ATTR_INFOCLASS);
+
+ if ((!"".equals(fatalStyle)) && (fatalStyle != null))
+ {
+ spanEle.setAttribute(IHTMLConstants.ATTR_STYLE, fatalStyle);
+ }
+ else if ((!"".equals(errorStyle)) && (errorStyle != null))
+ {
+ spanEle.setAttribute(IHTMLConstants.ATTR_STYLE, errorStyle);
+ }
+ else if ((!"".equals(warnStyle)) && (warnStyle != null))
+ {
+ spanEle.setAttribute(IHTMLConstants.ATTR_STYLE, warnStyle);
+ }
+ else if ((!"".equals(infoStyle)) && (infoStyle != null))
+ {
+ spanEle.setAttribute(IHTMLConstants.ATTR_STYLE, infoStyle);
+ }
+
+ if ((!"".equals(fatalClass)) && (fatalClass != null))
+ {
+ spanEle.setAttribute(IJSFConstants.ATTR_STYLECLASS, fatalClass);
+ }
+ else if ((!"".equals(errorClass)) && (errorClass != null))
+ {
+ spanEle.setAttribute(IJSFConstants.ATTR_STYLECLASS, errorClass);
+ }
+ else if ((!"".equals(warnClass)) && (warnClass != null))
+ {
+ spanEle.setAttribute(IJSFConstants.ATTR_STYLECLASS, warnClass);
+ }
+ else if ((!"".equals(infoClass)) && (infoClass != null))
+ {
+ spanEle.setAttribute(IJSFConstants.ATTR_STYLECLASS, infoClass);
+ }
+
+ //If the "tooltip" attribute is present with the value of "true", and so does
+ //the "showSummary",then output the "summary" as the value of the "title" attribute on the "span".
+ String hasToolTip = hostEle.getAttribute(IJSFConstants.ATTR_TOOLTIP);
+ String showSummary = hostEle.getAttribute(IJSFConstants.ATTR_SHOWSUMMARY);
+ if ("true".equalsIgnoreCase(hasToolTip))
+ {
+ if ("true".equalsIgnoreCase(showSummary))
+ {
+ spanEle.setAttribute(IHTMLConstants.ATTR_TITLE, MESSAGE_TOOLTIP);
+ }
+ }
+ Text text = createText(MESSAGE_CONTENT);
+ spanEle.appendChild(text);
+
+ return spanEle;
+ }
+
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/OutputLabelTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/OutputLabelTagConverter.java
new file mode 100644
index 000000000..786cbc9cb
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/OutputLabelTagConverter.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import org.eclipse.jst.pagedesigner.IHTMLConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.converter.AbstractTagConverter;
+import org.eclipse.jst.pagedesigner.converter.ConvertPosition;
+import org.eclipse.jst.pagedesigner.converter.JSFConverterUtil;
+import org.eclipse.jst.pagedesigner.jsf.core.dom.JSFDOMUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class OutputLabelTagConverter extends AbstractTagConverter
+{
+ /**
+ * @param host
+ */
+ public OutputLabelTagConverter(Element host)
+ {
+ super(host);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#doConvertRefresh()
+ */
+ protected Element doConvertRefresh()
+ {
+ Element hostEle = getHostElement();
+
+ Element labelEle = createElement(IHTMLConstants.TAG_LABEL);
+
+ JSFConverterUtil.copyAllAttributes(hostEle, labelEle, null);
+
+ // If the "styleClass" attribute is present,
+ // render its value as the value of the "class" attribute.
+ JSFConverterUtil.copyAttribute(hostEle, IJSFConstants.ATTR_STYLECLASS, labelEle, IHTMLConstants.ATTR_CLASS);
+ labelEle.removeAttribute(IJSFConstants.ATTR_STYLECLASS);
+
+ // String value = getValue(hostEle);
+ // Text textNode = createText(value);
+ // labelEle.appendChild(textNode);
+
+ int index = 0;
+ Node child = hostEle.getFirstChild();
+ if (hostEle.hasChildNodes())
+ {
+ for (; child != null; child = child.getNextSibling())
+ {
+ if (!shouldIgnore(child))
+ {
+ if (child instanceof Element && JSFDOMUtil.isUIParameter((Element) child))
+ {
+ // skip
+ }
+ else
+ {
+ addChild(child, new ConvertPosition(labelEle, index++));
+ }
+ }
+ }
+ }
+ else
+ {
+ labelEle.appendChild(createText(getDefaultValue()));
+ }
+
+ return labelEle;
+ }
+
+ /**
+ * @param hostEle
+ * @return
+ */
+ private String getDefaultValue()
+ {
+ String name = IJSFConstants.TAG_OUTPUTLABEL;
+
+ return name.substring(0, 1).toUpperCase() + name.substring(1);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isMultiLevel()
+ */
+ public boolean isMultiLevel()
+ {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isWidget()
+ */
+ public boolean isWidget()
+ {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.css2.style.ITagEditInfo#needBorderDecorator()
+ */
+ public boolean needBorderDecorator()
+ {
+ return true;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/OutputLinkTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/OutputLinkTagConverter.java
new file mode 100644
index 000000000..90b23a629
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/OutputLinkTagConverter.java
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import org.eclipse.jst.pagedesigner.IHTMLConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.converter.AbstractTagConverter;
+import org.eclipse.jst.pagedesigner.converter.ConvertPosition;
+import org.eclipse.jst.pagedesigner.converter.ConverterUtil;
+import org.eclipse.jst.pagedesigner.converter.JSFConverterUtil;
+import org.eclipse.jst.pagedesigner.jsf.core.dom.JSFDOMUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class OutputLinkTagConverter extends AbstractTagConverter
+{
+
+ /**
+ * @param host
+ */
+ public OutputLinkTagConverter(Element host)
+ {
+ super(host);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#doConvertRefresh()
+ */
+ protected Element doConvertRefresh()
+ {
+ Element hostEle = getHostElement();
+
+ Element aEle = createElement(IHTMLConstants.TAG_A);
+
+ // If the "style" attribute is present, pass it thru.
+ // XXX: we are passing all the attributes through, since other attribute
+ // don't conflict with html attributes.
+ JSFConverterUtil.copyAllAttributes(hostEle, aEle, null);
+
+ // If the "styleClass" attribute is present,
+ // render its value as the value of the "class" attribute.
+ JSFConverterUtil.copyAttribute(hostEle, IJSFConstants.ATTR_STYLECLASS, aEle, IHTMLConstants.ATTR_CLASS);
+ aEle.removeAttribute(IJSFConstants.ATTR_STYLECLASS);
+
+ // value should be mapped to href, but it won't affect visual
+ // so use "#"
+ aEle.setAttribute(IHTMLConstants.ATTR_HREF, "#");
+
+ JSFConverterUtil.copyAttribute(hostEle, IJSFConstants.ATTR_VALUE, aEle, IHTMLConstants.ATTR_HREF);
+ aEle.removeAttribute(IJSFConstants.ATTR_VALUE);
+
+ // Extend the container border a little to make it selectable
+ if (!isPreviewMode())
+ {
+ String style = aEle.getAttribute(IHTMLConstants.ATTR_STYLE);
+ style = "padding:0.3em;" + style;
+ aEle.setAttribute(IHTMLConstants.ATTR_STYLE, style);
+ }
+
+ int index = 0;
+ Node child = hostEle.getFirstChild();
+ if (hostEle.hasChildNodes())
+ {
+ for (; child != null; child = child.getNextSibling())
+ {
+ if (!shouldIgnore(child))
+ {
+ if (child instanceof Element && JSFDOMUtil.isUIParameter((Element) child))
+ {
+ // skip
+ }
+ else
+ {
+ addChild(child, new ConvertPosition(aEle, index++));
+ }
+ }
+ }
+ }
+ if (ConverterUtil.isEmptyContainer(hostEle) && !hostEle.hasAttribute(IJSFConstants.ATTR_VALUE))
+ {
+ aEle.appendChild(createText(getDefaultValue()));
+ }
+ return aEle;
+ }
+
+ private String getDefaultValue()
+ {
+ String name = IJSFConstants.TAG_OUTPUTLINK;
+
+ return name.substring(0, 1).toUpperCase() + name.substring(1);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isMultiLevel()
+ */
+ public boolean isMultiLevel()
+ {
+ return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isWidget()
+ */
+ public boolean isWidget()
+ {
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.pagedesigner.css2.style.ITagEditInfo#needBorderDecorator()
+ */
+ public boolean needBorderDecorator()
+ {
+ return true;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/OutputTextTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/OutputTextTagConverter.java
new file mode 100644
index 000000000..d795999b1
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/OutputTextTagConverter.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import org.eclipse.jst.pagedesigner.IHTMLConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.converter.AbstractTagConverter;
+import org.eclipse.jst.pagedesigner.converter.JSFConverterUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.Text;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class OutputTextTagConverter extends AbstractTagConverter
+{
+
+ /**
+ * @param host
+ */
+ public OutputTextTagConverter(Element host)
+ {
+ super(host);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#doConvertRefresh()
+ */
+ protected Element doConvertRefresh()
+ {
+ Element hostEle = getHostElement();
+
+ // If the "styleClass" or "style" attributes are present,
+ // render a "span" element.
+ // XXX: to make things simpler, we always create a span
+ Element spanEle = createElement(IHTMLConstants.TAG_SPAN);
+
+ // If the "style" attribute is present, pass it thru.
+ // XXX: we are passing all the attributes through, since other attribute
+ // don't conflict with html attributes.
+ JSFConverterUtil.copyAllAttributes(hostEle, spanEle, null);
+
+ // If the "styleClass" attribute is present,
+ // render its value as the value of the "class" attribute.
+ JSFConverterUtil.copyAttribute(hostEle, IJSFConstants.ATTR_STYLECLASS, spanEle, IHTMLConstants.ATTR_CLASS);
+ spanEle.removeAttribute(IJSFConstants.ATTR_STYLECLASS);
+
+ spanEle.removeAttribute(IJSFConstants.ATTR_VALUE);
+
+ // If the "escape" attribute is not present, or it is present and
+ // its value is "true" all angle brackets should be converted to the
+ // ampersand xx semicolon syntax when rendering the value of the "value"
+ // attribute as the value of the component. If the "escape" attribute is
+ // present and is "false" the value of the component should be rendered
+ // as text without escaping.
+ String value = getValue(hostEle);
+ Text textNode = createText(value);
+ spanEle.appendChild(textNode);
+
+ return spanEle;
+ }
+
+ /**
+ * @param hostEle
+ * @return
+ */
+ private String getValue(Element hostEle)
+ {
+ String valueAttr = hostEle.getAttribute(IJSFConstants.ATTR_VALUE);
+ if (valueAttr == null)
+ {
+ String name = hostEle.getLocalName();
+ return name.substring(0, 1).toUpperCase() + name.substring(1);
+ }
+ else
+ {
+ return mapValue(valueAttr);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isMultiLevel()
+ */
+ public boolean isMultiLevel()
+ {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isWidget()
+ */
+ public boolean isWidget()
+ {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#needBorderDecorator()
+ */
+ public boolean needBorderDecorator()
+ {
+ return true;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/PanelGridTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/PanelGridTagConverter.java
new file mode 100644
index 000000000..46c9bee13
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/PanelGridTagConverter.java
@@ -0,0 +1,210 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.eclipse.jst.pagedesigner.jsf.core.dom.JSFDOMUtil;
+import org.w3c.dom.Element;
+
+import org.eclipse.jst.pagedesigner.IHTMLConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.converter.AbstractTagConverter;
+import org.eclipse.jst.pagedesigner.converter.ConvertPosition;
+import org.eclipse.jst.pagedesigner.converter.JSFConverterUtil;
+import org.eclipse.jst.pagedesigner.utils.DOMUtil;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class PanelGridTagConverter extends AbstractTagConverter
+{
+ /**
+ * @param host
+ */
+ public PanelGridTagConverter(Element host)
+ {
+ super(host);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.visualtag.AbstractTagConverter#doConvertRefresh()
+ */
+ protected Element doConvertRefresh()
+ {
+ Element panelGridEle = this.getHostElement();
+
+ // Renders an HTML "table" element, conforming to the rules in the HTML 401 specification.
+ Element tableEle = createElement(IHTMLConstants.TAG_TABLE);
+
+ // Render the pass-through attributes in the table below.
+ // TODO: need handle ignored attributes here. But as they don't conflict
+ // with standard table attributes, so its ok that we leave it later.
+ JSFConverterUtil.copyAllAttributes(panelGridEle, tableEle, null);
+
+ // If the "styleClass" attribute is specified, render its value as the value of the "class" attribute
+ JSFConverterUtil.copyAttribute(panelGridEle, IJSFConstants.ATTR_STYLECLASS, tableEle, IHTMLConstants.ATTR_CLASS);
+ tableEle.removeAttribute(IJSFConstants.ATTR_STYLECLASS);
+
+ int columns = DOMUtil.getIntAttributeIgnoreCase(panelGridEle, IJSFConstants.ATTR_COLUMNS, 1);
+ if (columns < 1)
+ {
+ columns = 1;
+ }
+
+ // Render the "header" facet, if present, inside of "thead", "tr", and "th" elements, nested in that order.
+ Element facet = JSFDOMUtil.findFacet(panelGridEle, "header");
+ if (facet != null)
+ {
+ // we need render a thead here
+ Element theadEle = createElement(IHTMLConstants.TAG_THEAD);
+ tableEle.appendChild(theadEle);
+ Element trEle = createElement(IHTMLConstants.TAG_TR);
+ theadEle.appendChild(trEle);
+ Element thEle = createElement(IHTMLConstants.TAG_TH);
+ trEle.appendChild(thEle);
+ // If the "headerClass" attribute is specifed, render its value as the value of the "class" attribute on
+ // the "th" element.
+ String headerClass = panelGridEle.getAttribute(IJSFConstants.ATTR_HEADERCLASS);
+ if (headerClass != null && headerClass.length() > 0)
+ {
+ thEle.setAttribute(IHTMLConstants.ATTR_CLASS, headerClass);
+ }
+ // Render the value of the "columns" attribute as the value of the "colspan" attribute on the "th" element.
+ thEle.setAttribute(IHTMLConstants.ATTR_COLSPAN, String.valueOf(columns));
+ addChild(facet, new ConvertPosition(thEle, 0));
+ }
+
+ // Render the "footer" facet if present, using similar logic to the rendering of
+ // the "header", but replacing "thead" with "tfoot", "th" with "td", and "headerClass"
+ // with "footerClass".
+ facet = JSFDOMUtil.findFacet(panelGridEle, "footer");
+ if (facet != null)
+ {
+ // we need render a thead here
+ Element theadEle = createElement(IHTMLConstants.TAG_TFOOT);
+ tableEle.appendChild(theadEle);
+ Element trEle = createElement(IHTMLConstants.TAG_TR);
+ theadEle.appendChild(trEle);
+ Element tdEle = createElement(IHTMLConstants.TAG_TD);
+ trEle.appendChild(tdEle);
+ // If the "headerClass" attribute is specifed, render its value as the value of the "class" attribute on
+ // the "th" element.
+ String footerClass = panelGridEle.getAttribute(IJSFConstants.ATTR_FOOTERCLASS);
+ if (footerClass != null && footerClass.length() > 0)
+ {
+ tdEle.setAttribute(IHTMLConstants.ATTR_CLASS, footerClass);
+ }
+ // Render the value of the "columns" attribute as the value of the "colspan" attribute on the "th" element.
+ tdEle.setAttribute(IHTMLConstants.ATTR_COLSPAN, String.valueOf(columns));
+ addChild(facet, new ConvertPosition(tdEle, 0));
+ }
+
+ List rowclasses = new ArrayList();
+ String rowclassesattr = panelGridEle.getAttribute(IJSFConstants.ATTR_ROWCLASSES);
+ if (rowclassesattr != null)
+ {
+ StringTokenizer tokenizer = new StringTokenizer(rowclassesattr, ", ");
+ while (tokenizer.hasMoreTokens())
+ {
+ rowclasses.add(tokenizer.nextToken());
+ }
+ }
+
+ List columnclasses = new ArrayList();
+ String columnclassattr = panelGridEle.getAttribute(IJSFConstants.ATTR_COLUMNCLASSES);
+ if (columnclassattr != null)
+ {
+ StringTokenizer tokenizer = new StringTokenizer(columnclassattr, ", ");
+ while (tokenizer.hasMoreTokens())
+ {
+ columnclasses.add(tokenizer.nextToken());
+ }
+ }
+
+ // Render the children of the UIPanel component inside of a "tbody" element.
+ // Render the children based on the value of the "columns" attribute, creating a new
+ // row each time a "columns" worth of children have been rendered. Each child is rendered
+ // inside of a "td" element. If a child has "rendered==false" it is not rendered,
+ // and the column counter must not be incremented.
+ Element tbody = createElement(IHTMLConstants.TAG_TBODY);
+ tableEle.appendChild(tbody);
+
+ List uipanelChildren = JSFDOMUtil.getUIComponentChildren(panelGridEle);
+ Element currentTr = null;
+ int nextRow = 0; // for rowclasses
+ for (int i = 0; i < uipanelChildren.size(); i++)
+ {
+ int columnIndex = i % columns;
+ if (columnIndex == 0)
+ {
+ currentTr = createElement(IHTMLConstants.TAG_TR);
+ if (!rowclasses.isEmpty())
+ {
+ currentTr.setAttribute(IHTMLConstants.ATTR_CLASS, (String) rowclasses.get(nextRow));
+ nextRow = (nextRow + 1) % rowclasses.size();
+ }
+ tbody.appendChild(currentTr);
+ }
+ Element uichild = (Element) uipanelChildren.get(i);
+ Element td = createElement(IHTMLConstants.TAG_TD);
+ if (columnIndex < columnclasses.size())
+ {
+ td.setAttribute(IHTMLConstants.ATTR_CLASS, (String) columnclasses.get(columnIndex));
+ }
+ currentTr.appendChild(td);
+ this.addChild(uichild, new ConvertPosition(td, 0));
+ }
+
+ return (tableEle);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.visualtag.ITagConverter#isMultiLevel()
+ */
+ public boolean isMultiLevel()
+ {
+ return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.visualtag.ITagConverter#isWidget()
+ */
+ public boolean isWidget()
+ {
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.css2.style.ITagEditInfo#needBorderDecorator()
+ */
+ public boolean needBorderDecorator()
+ {
+ return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#needTableDecorator()
+ */
+ public boolean needTableDecorator()
+ {
+ return true;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/PanelGroupTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/PanelGroupTagConverter.java
new file mode 100644
index 000000000..923374cd3
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/PanelGroupTagConverter.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import org.eclipse.jst.pagedesigner.IHTMLConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.converter.AbstractTagConverter;
+import org.eclipse.jst.pagedesigner.converter.JSFConverterUtil;
+import org.w3c.dom.Element;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class PanelGroupTagConverter extends AbstractTagConverter
+{
+
+ /**
+ * @param host
+ */
+ public PanelGroupTagConverter(Element host)
+ {
+ super(host);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#doConvertRefresh()
+ */
+ protected Element doConvertRefresh()
+ {
+ Element hostEle = getHostElement();
+
+ // If the "styleClass" or "style" attributes are present,
+ // render a "span" element.
+ // XXX: for page designer to have the panelGroup to always take up space,
+ // we use "div".
+ Element spanEle = createElement(IHTMLConstants.TAG_DIV);
+
+ // If the "style" attribute is present, pass it thru.
+ // XXX: we are passing all the attributes through, since other attribute
+ // don't conflict with html attributes.
+ JSFConverterUtil.copyAllAttributes(hostEle, spanEle, null);
+
+ // If the "styleClass" attribute is present,
+ // render its value as the value of the "class" attribute.
+ JSFConverterUtil.copyAttribute(hostEle, IJSFConstants.ATTR_STYLECLASS, spanEle, IHTMLConstants.ATTR_CLASS);
+ spanEle.removeAttribute(IJSFConstants.ATTR_STYLECLASS);
+
+ copyChildren(hostEle, spanEle);
+ return spanEle;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isMultiLevel()
+ */
+ public boolean isMultiLevel()
+ {
+ return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isWidget()
+ */
+ public boolean isWidget()
+ {
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.pagedesigner.css2.style.ITagEditInfo#needBorderDecorator()
+ */
+ public boolean needBorderDecorator()
+ {
+ return true;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectBasedTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectBasedTagConverter.java
new file mode 100644
index 000000000..666b475eb
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectBasedTagConverter.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import java.util.List;
+
+import org.eclipse.jst.pagedesigner.IHTMLConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.converter.ConverterUtil;
+import org.eclipse.jst.pagedesigner.converter.JSFConverterUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.Text;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public abstract class SelectBasedTagConverter extends SelectTagConverter
+{
+
+ /**
+ * @param host
+ */
+ public SelectBasedTagConverter(Element host)
+ {
+ super(host);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#doConvertRefresh()
+ */
+ protected Element doConvertRefresh()
+ {
+ Element hostEle = getHostElement();
+
+ // Render an HTML "select" element.
+ Element selectEle = createElement(IHTMLConstants.TAG_SELECT);
+
+ // Render the clientId of the component as the value of the "name" attribute.
+ ConverterUtil.copyAttribute(hostEle, IJSFConstants.ATTR_ID, selectEle, IHTMLConstants.ATTR_NAME);
+
+ // XXX: handle ignore
+ JSFConverterUtil.copyAllAttributes(hostEle, selectEle, null);
+
+// If the "styleClass" attribute is specified, render its value as the value of
+ // the "class" attribute on the "select" element.
+ JSFConverterUtil.copyAttribute(hostEle, IJSFConstants.ATTR_STYLECLASS, selectEle, IHTMLConstants.ATTR_CLASS);
+ selectEle.removeAttribute(IJSFConstants.ATTR_STYLECLASS);
+
+ // child class may generated different multiple and size attribute
+ handleMultipleAndSize(hostEle, selectEle);
+
+ // next generated the options under the <select>, so they can also be displayed.
+ List selectItems = this.getSelectItems(hostEle);
+ for (int i=0, size=selectItems.size(); i<size; i++)
+ {
+ SelectItemModel item = (SelectItemModel) selectItems.get(i);
+ Element option = createElement(IHTMLConstants.TAG_OPTION);
+ option.setAttribute(IHTMLConstants.ATTR_VALUE, item.getItemValue());
+ Text textNode = createText(item.getDisplayString());
+ option.appendChild(textNode);
+ selectEle.appendChild(option);
+ }
+
+ return (selectEle);
+ }
+
+ /**
+ * @param hostEle
+ * @param selectEle
+ */
+ protected abstract void handleMultipleAndSize(Element hostEle, Element selectEle);
+
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectBooleanCheckboxTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectBooleanCheckboxTagConverter.java
new file mode 100644
index 000000000..f10d920d1
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectBooleanCheckboxTagConverter.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import org.eclipse.jst.pagedesigner.IHTMLConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.converter.AbstractTagConverter;
+import org.eclipse.jst.pagedesigner.converter.JSFConverterUtil;
+import org.w3c.dom.Element;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class SelectBooleanCheckboxTagConverter extends AbstractTagConverter
+{
+
+ /**
+ * @param host
+ */
+ public SelectBooleanCheckboxTagConverter(Element host)
+ {
+ super(host);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#doConvertRefresh()
+ */
+ protected Element doConvertRefresh()
+ {
+ Element hostEle = getHostElement();
+ // Renders an HTML "input" element of type "checkbox".
+ Element inputEle = createElement(IHTMLConstants.TAG_INPUT);
+ JSFConverterUtil.copyAllAttributes(hostEle, inputEle, null);
+ JSFConverterUtil.copyAttribute(hostEle, IJSFConstants.ATTR_STYLECLASS, inputEle, IHTMLConstants.ATTR_CLASS);
+ inputEle.removeAttribute(IJSFConstants.ATTR_STYLECLASS);
+
+ inputEle.setAttribute(IHTMLConstants.ATTR_TYPE, "checkbox");
+
+ if ("true".equalsIgnoreCase(inputEle.getAttribute(IHTMLConstants.ATTR_VALUE)))
+ {
+ inputEle.setAttribute(IHTMLConstants.ATTR_CHECKED,"checked");
+ }
+ return inputEle;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isMultiLevel()
+ */
+ public boolean isMultiLevel()
+ {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isWidget()
+ */
+ public boolean isWidget()
+ {
+ return true;
+ }
+
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectItemModel.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectItemModel.java
new file mode 100644
index 000000000..b10a977b4
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectItemModel.java
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+/**
+ * This class emulate a javax.faces.model.SelectItem
+ *
+ * @author mengbo
+ * @version 1.5
+ */
+public class SelectItemModel
+{
+ private String _description;
+ private String _label;
+ private String _itemValue;
+ private String _value;
+ private String _id;
+ private boolean _disabled;
+
+ /**
+ * @return Returns the disabled.
+ */
+ public boolean isDisabled()
+ {
+ return _disabled;
+ }
+
+ /**
+ * @param disabled The disabled to set.
+ */
+ public void setDisabled(boolean disabled)
+ {
+ this._disabled = disabled;
+ }
+
+ /**
+ * Return a description of this item, for use in development tools.
+ */
+ public String getDescription()
+ {
+ return _description;
+ }
+
+ /**
+ * Return the label of this item, to be rendered visibly for the user.
+ * @return
+ */
+ public String getLabel()
+ {
+ return _label;
+ }
+
+ /**
+ * Set the description of this item, for use in development tools.
+ * @param description
+ */
+ public void setDescription(java.lang.String description)
+ {
+ _description = description;
+ }
+
+ /**
+ * Set the label of this item, to be rendered visibly for the user.
+ * @param label
+ */
+ public void setLabel(java.lang.String label)
+ {
+ this._label = label;
+ }
+ public String getItemValue()
+ {
+ return _itemValue;
+ }
+
+ public void setItemValue(String itemValue)
+ {
+ this._itemValue = itemValue;
+ }
+
+ public String getValue()
+ {
+ return _value;
+ }
+
+ public void setValue(String value)
+ {
+ this._value = value;
+ }
+
+ public String getId()
+ {
+ return _id;
+ }
+
+ public void setId(String id)
+ {
+ _id = id;
+ }
+
+ public String getDisplayString()
+ {
+ if (_label != null && _label.length() > 0)
+ {
+ return _label;
+ }
+ else if (_value != null && _value.length() > 0)
+ {
+ return _value;
+ }
+ else if (_description != null && _description.length() > 0)
+ {
+ return _description;
+ }
+ else if (_itemValue != null && _itemValue.length() > 0)
+ {
+ return _itemValue;
+ }
+ else
+ {
+ return "SelectItem";
+ }
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectManyListboxTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectManyListboxTagConverter.java
new file mode 100644
index 000000000..abc3ab65a
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectManyListboxTagConverter.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class SelectManyListboxTagConverter extends SelectBasedTagConverter
+{
+
+ /**
+ * @param host
+ */
+ public SelectManyListboxTagConverter(Element host)
+ {
+ super(host);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.jsfhtml.SelectBasedTagConverter#handleMultipleAndSize(org.w3c.dom.Element, org.w3c.dom.Element)
+ */
+ protected void handleMultipleAndSize(Element hostEle, Element selectEle)
+ {
+ // If the component is a UISelectMany instance, render "multiple" as the value of the
+ // "multiple" attribute.
+ selectEle.setAttribute("multiple", "multiple");
+
+ // If the "size" attribute is specified, render its value as the value of the "size"
+ // attribute. Otherwise use the number of items as the value of the "size" attribute.
+ String sizeattr = hostEle.getAttribute("size");
+
+ List selectItems = this.getSelectItems(hostEle);
+ if (sizeattr == null)
+ {
+ if (!selectItems.isEmpty())
+ {
+ selectEle.setAttribute("size", String.valueOf(selectItems.size()));
+ }
+ }
+ }
+
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectManyMenuTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectManyMenuTagConverter.java
new file mode 100644
index 000000000..e6ead1f4a
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectManyMenuTagConverter.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import org.w3c.dom.Element;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class SelectManyMenuTagConverter extends SelectBasedTagConverter
+{
+
+ /**
+ * @param host
+ */
+ public SelectManyMenuTagConverter(Element host)
+ {
+ super(host);
+ // TODO Auto-generated constructor stub
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.jsfhtml.SelectBasedTagConverter#handleMultipleAndSize(org.w3c.dom.Element, org.w3c.dom.Element)
+ */
+ protected void handleMultipleAndSize(Element hostEle, Element selectEle)
+ {
+ // If the component is a UISelectMany instance, render "multiple" as the value of the
+ // "multiple" attribute.
+ selectEle.setAttribute("multiple", "multiple");
+
+ // If the "size" attribute is specified, render its value as the value of the "size"
+ // attribute. Otherwise use the number of items as the value of the "size" attribute.
+ selectEle.setAttribute("size", "1");
+ }
+
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectOneListboxTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectOneListboxTagConverter.java
new file mode 100644
index 000000000..e1a0493fb
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectOneListboxTagConverter.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class SelectOneListboxTagConverter extends SelectBasedTagConverter
+{
+
+ /**
+ * @param host
+ */
+ public SelectOneListboxTagConverter(Element host)
+ {
+ super(host);
+ // TODO Auto-generated constructor stub
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.jsfhtml.SelectBasedTagConverter#handleMultipleAndSize(org.w3c.dom.Element, org.w3c.dom.Element)
+ */
+ protected void handleMultipleAndSize(Element hostEle, Element selectEle)
+ {
+ // always not multiple
+ selectEle.removeAttribute("multiple");
+
+ // If the "size" attribute is specified, render its value as the value of the "size"
+ // attribute. Otherwise use the number of items as the value of the "size" attribute.
+ String sizeattr = hostEle.getAttribute("size");
+
+ List selectItems = this.getSelectItems(hostEle);
+ if (sizeattr == null)
+ {
+ if (!selectItems.isEmpty())
+ {
+ selectEle.setAttribute("size", String.valueOf(selectItems.size()));
+ }
+ }
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectOneMenuTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectOneMenuTagConverter.java
new file mode 100644
index 000000000..1bb5db414
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectOneMenuTagConverter.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import org.w3c.dom.Element;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class SelectOneMenuTagConverter extends SelectBasedTagConverter
+{
+
+ /**
+ * @param host
+ */
+ public SelectOneMenuTagConverter(Element host)
+ {
+ super(host);
+ // TODO Auto-generated constructor stub
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.jsfhtml.SelectBasedTagConverter#handleMultipleAndSize(org.w3c.dom.Element, org.w3c.dom.Element)
+ */
+ protected void handleMultipleAndSize(Element hostEle, Element selectEle)
+ {
+ // always not multiple
+ selectEle.removeAttribute("multiple");
+
+ selectEle.setAttribute("size", "1");
+ }
+
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectTagConverter.java
new file mode 100644
index 000000000..8251ff4a6
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/SelectTagConverter.java
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.converter.AbstractTagConverter;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * This class is supposed to be common parent class for the different selectMany tags.
+ *
+ * @author mengbo
+ * @version 1.5
+ */
+public abstract class SelectTagConverter extends AbstractTagConverter
+{
+ /**
+ * @param host
+ */
+ public SelectTagConverter(Element host)
+ {
+ super(host);
+ }
+
+ /**
+ * Return a list of SelectItem
+ *
+ * @param parent
+ * @return
+ */
+ protected List getSelectItems(Element parent)
+ {
+ List result = new ArrayList();
+ NodeList nl = parent.getChildNodes();
+ for (int i = 0, size = nl.getLength(); i < size; i++)
+ {
+ Node child = nl.item(i);
+ if (child instanceof Element)
+ {
+ Element ele = (Element) child;
+ String tagname = ele.getLocalName();
+ if (IJSFConstants.TAG_SELECTITEM.equalsIgnoreCase(tagname))
+ {
+ SelectItemModel item = new SelectItemModel();
+ item.setDescription(ele.getAttribute(IJSFConstants.ATTR_ITEMDESCRIPTION));
+ item.setLabel(ele.getAttribute(IJSFConstants.ATTR_ITEMLABEL));
+ item.setItemValue(ele.getAttribute(IJSFConstants.ATTR_ITEMVALUE));
+ item.setValue(ele.getAttribute(IJSFConstants.ATTR_VALUE));
+ item.setId(ele.getAttribute(IJSFConstants.ATTR_ID));
+ item.setDisabled("true".equalsIgnoreCase(ele.getAttribute(IJSFConstants.ATTR_ITEMDISABLED)));
+ result.add(item);
+ }
+ else if (IJSFConstants.TAG_SELECTITEMS.equalsIgnoreCase(tagname))
+ {
+ // as selectItems can only be resolved at run time, so we just emulate
+ // as if it map to two selectitem
+ String value = ele.getAttribute(IJSFConstants.ATTR_VALUE);
+ if (value == null || value.length() == 0)
+ {
+ value = IJSFConstants.ATTR_VALUE;
+ }
+ SelectItemModel item1 = new SelectItemModel();
+ item1.setValue(value + "_1");
+ item1.setId(ele.getAttribute(IJSFConstants.ATTR_ID));
+ result.add(item1);
+ SelectItemModel item2 = new SelectItemModel();
+ item2.setValue(value + "_2");
+ item2.setId(ele.getAttribute(IJSFConstants.ATTR_ID));
+ result.add(item2);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ public SelectItemModel getDefault(Element parent)
+ {
+ SelectItemModel item = new SelectItemModel();
+ if (parent.getLocalName().equals(IJSFConstants.TAG_SELECTONERADIO))
+ {
+ item.setLabel("radio");
+ }
+ else if (parent.getLocalName().equals(IJSFConstants.TAG_SELECTMANYCHECKBOX))
+ {
+ item.setLabel("checkBox");
+ }
+ else
+ {
+ item.setLabel(parent.getLocalName());
+ }
+ return item;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isMultiLevel()
+ */
+ public boolean isMultiLevel()
+ {
+ return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.pagedesigner.converter.ITagConverter#isWidget()
+ */
+ public boolean isWidget()
+ {
+ return true;
+ }
+
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/TableBasedSelectTagConverter.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/TableBasedSelectTagConverter.java
new file mode 100644
index 000000000..556e9b9f1
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/converter/jsfhtml/TableBasedSelectTagConverter.java
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.converter.jsfhtml;
+
+import java.util.List;
+
+import org.eclipse.jst.pagedesigner.IHTMLConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.converter.ConverterUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.Text;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class TableBasedSelectTagConverter extends SelectTagConverter
+{
+
+ private String _inputType;
+
+ /**
+ * @param host
+ */
+ public TableBasedSelectTagConverter(Element host, String inputType)
+ {
+ super(host);
+ this._inputType = inputType;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#doConvertRefresh()
+ */
+ protected Element doConvertRefresh()
+ {
+ Element hostEle = getHostElement();
+
+ // Render a "table" element.
+ Element tableEle = createElement(IHTMLConstants.TAG_TABLE);
+
+ // If the "styleClass" is specified, render the value of the "styleClass"
+ // attribute as the value of the "class" attribute on the "table" element.
+ ConverterUtil.copyAttribute(hostEle, IJSFConstants.ATTR_STYLECLASS, tableEle, IHTMLConstants.ATTR_CLASS);
+
+ // If the "style", "border" attributes are specified, pass them thru.
+ ConverterUtil.copyAttribute(hostEle, IJSFConstants.ATTR_STYLE, tableEle, IHTMLConstants.ATTR_STYLE);
+ ConverterUtil.copyAttribute(hostEle, IJSFConstants.ATTR_BORDER, tableEle, IHTMLConstants.ATTR_BORDER);
+
+ // If the "layout" attribute is specified, and its value is "pageDirection",
+ // render the children elements vertically, otherwise horizontally, in the table.
+ boolean horizontal = true;
+ if ("pageDirection".equalsIgnoreCase(hostEle.getAttribute(IJSFConstants.ATTR_LAYOUT)))
+ {
+ horizontal = false;
+ }
+
+ Element itemContainer;
+ if (horizontal)
+ {
+ itemContainer = createElement(IHTMLConstants.TAG_TR);
+ tableEle.appendChild(itemContainer);
+ }
+ else
+ {
+ itemContainer = tableEle;
+ }
+
+ // XXX: If any of the children are an instance of SelectItemGroup, render them as a
+ // nested table.
+ // but at design time, we don't know anything about SelectItemGroup. so will not
+ // rendering nested table.
+
+ List selectitems = this.getSelectItems(hostEle);
+
+ // for designer, if there is no item, we still want to render one
+ if (this.isDesignerMode() && selectitems.isEmpty())
+ {
+ SelectItemModel item = getDefault(hostEle);
+ selectitems.add(item);
+ }
+
+ boolean isDisabled = Boolean.TRUE.toString()
+ .equalsIgnoreCase(hostEle.getAttribute(IJSFConstants.ATTR_DISABLED));
+ boolean isReadonly = Boolean.TRUE.toString()
+ .equalsIgnoreCase(hostEle.getAttribute(IJSFConstants.ATTR_READONLY));
+
+ for (int i = 0, size = selectitems.size(); i < size; i++)
+ {
+ SelectItemModel item = (SelectItemModel) selectitems.get(i);
+ // Each of the children are ultimately rendererd as follows.
+ // Render a "label" element. Inside of the "label", render an "input" element
+ // of "type" "checkbox" for each child component.
+ Element labelEle = createElement(IHTMLConstants.TAG_LABEL);
+ Element inputEle = createElement(IHTMLConstants.TAG_INPUT);
+ inputEle.setAttribute(IHTMLConstants.ATTR_TYPE, getInputType());
+ if (isDisabled || item.isDisabled())
+ {
+ inputEle.setAttribute(IHTMLConstants.ATTR_DISABLED, "disabled");
+ }
+ if (isReadonly)
+ {
+ inputEle.setAttribute(IHTMLConstants.ATTR_READONLY, "readonly");
+ }
+
+ // As an exception to the general
+ // rules about how to handle the "id" attribute, render it as an attribute on
+ // the outer "table" element, the value of which is the clientId of the component
+ // per the rules at the beginning of this specification.The "id" attribute must
+ // not be output on each "input" element.
+ if (item.getId() != null)
+ {
+ labelEle.setAttribute(IHTMLConstants.ATTR_ID, item.getId());
+ }
+
+ // The value of the current SelectItem
+ // is rendered as the value of the "value" attribute. If the value of the enclosing
+ // UISelectMany matches the current value, render "checked" as the value of the
+ // "checked" attribute. If the current SelectItem.isDisabled() returns true,
+ // render "disabled" as the value of the "disabled" attribute.
+ if (item.getValue() != null)
+ {
+ inputEle.setAttribute(IHTMLConstants.ATTR_VALUE, item.getValue());
+ }
+ // XXX: checked and disabled is not handled.
+
+ // Close out the "input" element and render the return value from
+ // SelectItem.getLabel(). Close out the "label" element and any other nested elements.
+ Text label = createText(item.getDisplayString());
+
+ labelEle.appendChild(inputEle);
+ labelEle.appendChild(label);
+
+ if (horizontal)
+ {
+ Element td = createElement(IHTMLConstants.TAG_TD);
+ td.appendChild(labelEle);
+ itemContainer.appendChild(td);
+ }
+ else
+ {
+ Element tr = createElement(IHTMLConstants.TAG_TR);
+ Element td = createElement(IHTMLConstants.TAG_TD);
+ tr.appendChild(td);
+ td.appendChild(labelEle);
+ itemContainer.appendChild(tr);
+ }
+ }
+
+ return (tableEle);
+ }
+
+ protected String getInputType()
+ {
+ return _inputType;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.converter.AbstractTagConverter#needBorderDecorator()
+ */
+ public boolean needBorderDecorator()
+ {
+ return true;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfcore/FacetElementEdit.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfcore/FacetElementEdit.java
new file mode 100644
index 000000000..300fc7b19
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfcore/FacetElementEdit.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.elementedit.jsfcore;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.jst.pagedesigner.elementedit.AbstractElementEdit;
+import org.eclipse.jst.pagedesigner.parts.ElementEditPart;
+import org.w3c.dom.Element;
+
+public class FacetElementEdit extends AbstractElementEdit
+{
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.elementedit.AbstractElementEdit#handleModelChange(org.w3c.dom.Element, org.eclipse.jst.pagedesigner.parts.ElementEditPart)
+ */
+ public boolean handleModelChange(Element ele, ElementEditPart part,boolean recursive)
+ {
+ EditPart parent = part.getParent();
+ if (parent instanceof ElementEditPart)
+ {
+ ((ElementEditPart) parent).refreshModelChange(recursive);
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfcore/JSFCoreElementEditFactory.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfcore/JSFCoreElementEditFactory.java
new file mode 100644
index 000000000..09c410a90
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfcore/JSFCoreElementEditFactory.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.elementedit.jsfcore;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.elementedit.IElementEdit;
+import org.eclipse.jst.pagedesigner.elementedit.IElementEditFactory;
+import org.w3c.dom.Element;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class JSFCoreElementEditFactory implements IElementEditFactory
+{
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.elementedit.IElementEditFactory#createElementEdit(org.w3c.dom.Element)
+ */
+ public IElementEdit createElementEdit(Element element)
+ {
+ String tagname = element.getLocalName();
+ if (IJSFConstants.TAG_LOADBUNDLE.equalsIgnoreCase(tagname))
+ {
+ return new LoadBundleElementEdit();
+ }
+ else if(IJSFConstants.TAG_FACET.equalsIgnoreCase(tagname))
+ {
+ return new FacetElementEdit();
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.elementedit.IElementEditFactory#getSupportedURI()
+ */
+ public String getSupportedURI()
+ {
+ return IJMTConstants.URI_JSF_CORE;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfcore/JarEntryEditorInput.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfcore/JarEntryEditorInput.java
new file mode 100644
index 000000000..34595153b
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfcore/JarEntryEditorInput.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.elementedit.jsfcore;
+
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorRegistry;
+import org.eclipse.ui.IPersistableElement;
+import org.eclipse.ui.IStorageEditorInput;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class JarEntryEditorInput implements IStorageEditorInput
+{
+
+ private IStorage fJarEntryFile;
+
+ public JarEntryEditorInput(IStorage jarEntryFile)
+ {
+ fJarEntryFile = jarEntryFile;
+ }
+
+ /*
+ */
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (!(obj instanceof JarEntryEditorInput))
+ {
+ return false;
+ }
+ JarEntryEditorInput other = (JarEntryEditorInput) obj;
+ return fJarEntryFile.equals(other.fJarEntryFile);
+ }
+
+ /*
+ * @see IEditorInput#getPersistable()
+ */
+ public IPersistableElement getPersistable()
+ {
+ return null;
+ }
+
+ /*
+ * @see IEditorInput#getName()
+ */
+ public String getName()
+ {
+ return fJarEntryFile.getName();
+ }
+
+ /*
+ * @see IEditorInput#getFullPath()
+ */
+ public String getFullPath()
+ {
+ return fJarEntryFile.getFullPath().toString();
+ }
+
+ /*
+ * @see IEditorInput#getContentType()
+ */
+ public String getContentType()
+ {
+ return fJarEntryFile.getFullPath().getFileExtension();
+ }
+
+ /*
+ * @see IEditorInput#getToolTipText()
+ */
+ public String getToolTipText()
+ {
+ return fJarEntryFile.getFullPath().toString();
+ }
+
+ /*
+ * @see IEditorInput#getImageDescriptor()
+ */
+ public ImageDescriptor getImageDescriptor()
+ {
+ IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
+ return registry.getImageDescriptor(fJarEntryFile.getFullPath().getFileExtension());
+ }
+
+ /*
+ * @see IEditorInput#exists()
+ */
+ public boolean exists()
+ {
+ // JAR entries can't be deleted
+ return true;
+ }
+
+ /*
+ * @see IAdaptable#getAdapter(Class)
+ */
+ public Object getAdapter(Class adapter)
+ {
+ return null;
+ }
+
+ /*
+ * see IStorageEditorInput#getStorage()
+ */
+ public IStorage getStorage()
+ {
+ return fJarEntryFile;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfcore/LoadBundleAction.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfcore/LoadBundleAction.java
new file mode 100644
index 000000000..a600f4a4b
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfcore/LoadBundleAction.java
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.elementedit.jsfcore;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jst.pagedesigner.jsf.ui.JSFUIPlugin;
+import org.eclipse.jst.pagedesigner.jsp.core.el.LoadBundleUtil;
+import org.eclipse.ui.IEditorDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorRegistry;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+
+
+/**
+ * @author mengbo
+ */
+public class LoadBundleAction extends Action
+{
+ private String _baseName;
+ private IProject _project;
+
+ public LoadBundleAction()
+ {
+ setText(JSFUIPlugin.getResourceString("ElementEdit.Submenu.LoadBundle"));//$NON-NLS-1$
+ }
+
+ /**
+ * @param attribute
+ */
+ public void setBaseName(String attribute)
+ {
+ _baseName = attribute;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IAction#run()
+ */
+ public void run()
+ {
+ if (_project == null || _baseName == null)
+ {
+ return;
+ }
+
+ IStorage storage = null;
+ try
+ {
+ storage = LoadBundleUtil.getLoadBundleResource(_project, _baseName);
+ }
+ catch (CoreException e)
+ {
+ JSFUIPlugin.getAlerts().warning("Message.Warning.Title", e.getLocalizedMessage());//$NON-NLS-1$
+ return;
+ }
+
+ if (storage instanceof IFile)
+ {
+ try
+ {
+ IDE.openEditor(getPage(), (IFile) storage, true);
+ }
+ catch (PartInitException e1)
+ {
+ JSFUIPlugin.getAlerts().warning("Message.Warning.Title", e1.getLocalizedMessage());//$NON-NLS-1$
+ }
+ }
+ else
+ {
+ IEditorInput input = new JarEntryEditorInput((IStorage) storage);
+ try
+ {
+ getPage().openEditor(input, "org.eclipse.ui.DefaultTextEditor");//$NON-NLS-1$
+ }
+ catch (PartInitException e1)
+ {
+ JSFUIPlugin.getAlerts().warning("Message.Warning.Title", e1.getLocalizedMessage());//$NON-NLS-1$
+ }
+ }
+ }
+
+
+ private IWorkbenchPage getPage()
+ {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+ return window.getActivePage();
+ }
+
+ /**
+ * @param projectFor
+ */
+ public void setProject(IProject projectFor)
+ {
+ this._project = projectFor;
+ }
+
+ public String getEditorID(String inputName)
+ {
+ IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
+
+ // check for a default editor
+ IEditorDescriptor editorDescriptor = registry.getDefaultEditor(inputName);
+
+ // next check the OS for in-place editor (OLE on Win32)
+ if (editorDescriptor == null && registry.isSystemInPlaceEditorAvailable(inputName))
+ {
+ editorDescriptor = registry.findEditor(IEditorRegistry.SYSTEM_INPLACE_EDITOR_ID);
+ }
+
+ // next check with the OS for an external editor
+ if (editorDescriptor == null && registry.isSystemExternalEditorAvailable(inputName))
+ {
+ editorDescriptor = registry.findEditor(IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID);
+ }
+
+ // next lookup the default text editor
+ if (editorDescriptor == null)
+ {
+ editorDescriptor = registry.findEditor("org.eclipse.ui.DefaultTextEditor"); //$NON-NLS-1$
+ }
+
+ // if no valid editor found, bail out
+ if (editorDescriptor == null)
+ {
+ return null;
+ }
+
+ return editorDescriptor.getId();
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IAction#isEnabled()
+ */
+ public boolean isEnabled()
+ {
+ return _project != null && _baseName != null && !"".equals(_baseName);//$NON-NLS-1$
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfcore/LoadBundleElementEdit.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfcore/LoadBundleElementEdit.java
new file mode 100644
index 000000000..4f3dfe602
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfcore/LoadBundleElementEdit.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.elementedit.jsfcore;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jst.pagedesigner.css2.property.ICSSPropertyID;
+import org.eclipse.jst.pagedesigner.editors.PageDesignerActionConstants;
+import org.eclipse.jst.pagedesigner.elementedit.AbstractElementEdit;
+import org.eclipse.jst.pagedesigner.utils.StructuredModelUtil;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+import org.w3c.dom.Element;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class LoadBundleElementEdit extends AbstractElementEdit
+{
+ private LoadBundleAction loadBundleAction;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.elementedit.IElementEdit#fillContextMenu(org.eclipse.jface.action.IMenuManager, org.w3c.dom.Element)
+ */
+ public void fillContextMenu(IMenuManager contextMenu, Element ele)
+ {
+ super.fillContextMenu(contextMenu,ele);
+
+ LoadBundleAction action = getAction();
+ action.setBaseName(ele.getAttribute(ICSSPropertyID.ATTR_BASENAME));
+ if (ele instanceof IDOMElement)
+ {
+ action.setProject(StructuredModelUtil.getProjectFor(((IDOMElement) ele).getModel()));
+ }
+ contextMenu.appendToGroup(PageDesignerActionConstants.GROUP_SPECIAL, action);
+ }
+
+ private LoadBundleAction getAction()
+ {
+ if (loadBundleAction == null)
+ {
+ loadBundleAction = new LoadBundleAction();
+ }
+ return loadBundleAction;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfhtml/ColumnElementEdit.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfhtml/ColumnElementEdit.java
new file mode 100644
index 000000000..24a59efbd
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfhtml/ColumnElementEdit.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.elementedit.jsfhtml;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.jst.pagedesigner.editpolicies.ColumnResizableEditPolicy;
+import org.eclipse.jst.pagedesigner.parts.ElementEditPart;
+import org.w3c.dom.Element;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class ColumnElementEdit extends DefaultJSFHTMLElementEdit
+{
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.elementedit.AbstractElementEdit#handleModelChange(org.w3c.dom.Element, org.eclipse.jst.pagedesigner.parts.ElementEditPart)
+ */
+ public boolean handleModelChange(Element ele, ElementEditPart part, boolean recursive)
+ {
+ EditPart parent = part.getParent();
+ if (parent instanceof ElementEditPart)
+ {
+ ((ElementEditPart) parent).refreshModelChange(recursive);
+ return true;
+ }
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.elementedit.IElementEdit#createEditPolicies(org.eclipse.jst.pagedesigner.parts.ElementEditPart)
+ */
+ public void createEditPolicies(ElementEditPart part)
+ {
+ part.installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new ColumnResizableEditPolicy());
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfhtml/DataTableElementEdit.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfhtml/DataTableElementEdit.java
new file mode 100644
index 000000000..05e497093
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfhtml/DataTableElementEdit.java
@@ -0,0 +1,280 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.elementedit.jsfhtml;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import org.eclipse.jst.pagedesigner.actions.single.SelectEditPartAction;
+import org.eclipse.jst.pagedesigner.editors.PageDesignerActionConstants;
+import org.eclipse.jst.pagedesigner.editpolicies.ElementResizableEditPolicy;
+import org.eclipse.jst.pagedesigner.jsf.ui.JSFUIPlugin;
+import org.eclipse.jst.pagedesigner.jsf.ui.actions.DeleteHColumnHeaderFooterAction;
+import org.eclipse.jst.pagedesigner.jsf.ui.actions.DeleteHeaderFooterAction;
+import org.eclipse.jst.pagedesigner.jsf.ui.actions.InsertHColumnHeaderFooterAction;
+import org.eclipse.jst.pagedesigner.jsf.ui.actions.InsertHeaderFooterAction;
+import org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml.DataTableDeleteColumnCommand;
+import org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml.DataTableDeleteColumnHeaderCommand;
+import org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml.DataTableDeleteHeaderCommand;
+import org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml.DataTableInsertColumnCommand;
+import org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml.DataTableInsertColumnHeaderCommand;
+import org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml.DataTableInsertHeaderCommand;
+import org.eclipse.jst.pagedesigner.jsf.ui.elementedit.request.DeleteHColumnHeaderFooterRequest;
+import org.eclipse.jst.pagedesigner.jsf.ui.elementedit.request.DeleteHeaderFooterRequest;
+import org.eclipse.jst.pagedesigner.jsf.ui.elementedit.request.InsertHColumnHeaderFooterRequest;
+import org.eclipse.jst.pagedesigner.jsf.ui.elementedit.request.InsertHeaderFooterRequest;
+import org.eclipse.jst.pagedesigner.jsf.ui.elementedit.util.DataTableUtil;
+import org.eclipse.jst.pagedesigner.parts.ElementEditPart;
+import org.eclipse.jst.pagedesigner.parts.NodeEditPart;
+import org.eclipse.jst.pagedesigner.tableedit.DeleteRowColumnAction;
+import org.eclipse.jst.pagedesigner.tableedit.InsertRowColumnAction;
+import org.eclipse.jst.pagedesigner.tableedit.TableInsertRequest;
+import org.eclipse.jst.pagedesigner.tableedit.TableResizeRequest;
+import org.eclipse.jst.pagedesigner.tableedit.TableRowColumnDeleteRequest;
+import org.eclipse.jst.pagedesigner.viewer.IHTMLGraphicalViewer;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class DataTableElementEdit extends DefaultJSFHTMLElementEdit
+{
+ public static Action action = new Action()
+ {
+ };
+ private final static int FAKE_INDEX = -10;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.elementedit.IElementEdit#fillContextMenu(org.eclipse.jface.action.IMenuManager, org.w3c.dom.Element)
+ */
+ public void fillContextMenu(IMenuManager contextMenu, Element ele)
+ {
+ super.fillContextMenu(contextMenu, ele);
+
+ final IMenuManager tableMenu = new MenuManager(JSFUIPlugin.getResourceString("ElementEdit.Submenu.DataTable"));//$NON-NLS-1$
+ final ElementEditPart editPart = (ElementEditPart) ((IDOMElement) ele).getAdapterFor(EditPart.class);
+ // ok, we passed the checking, now let's create the actions.
+ tableMenu.add(action);
+ tableMenu.addMenuListener(new IMenuListener()
+ {
+ public void menuAboutToShow(IMenuManager manager)
+ {
+ tableMenu.removeAll();
+ fillTableMenu(editPart, FAKE_INDEX, tableMenu);
+ }
+ });
+
+ contextMenu.appendToGroup(PageDesignerActionConstants.GROUP_CONTAINER, tableMenu);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.elementedit.IElementEdit#fillContainerContextMenu(org.eclipse.jface.action.IMenuManager, org.eclipse.jst.pagedesigner.parts.ElementEditPart, org.eclipse.jst.pagedesigner.parts.NodeEditPart, org.eclipse.jface.viewers.ISelection)
+ */
+ public boolean fillContainerContextMenu(IMenuManager contextMenu, final ElementEditPart elePart,
+ NodeEditPart nodePart, ISelection innerSelection)
+ {
+ Element table = (Element) elePart.getModel();
+ Node node = (Node) nodePart.getModel();
+
+ DataTableUtil util = new DataTableUtil(table);
+ Element columnParent = util.findHColumnParent(node);
+
+ final int cellColumn = util.getColumnIndex(columnParent);
+
+ final IMenuManager tableMenu = new MenuManager(JSFUIPlugin.getResourceString("ElementEdit.Submenu.DataTable"));//$NON-NLS-1$
+
+ // ok, we passed the checking, now let's create the actions.
+ tableMenu.add(action);
+ tableMenu.addMenuListener(new IMenuListener()
+ {
+ public void menuAboutToShow(IMenuManager manager)
+ {
+ tableMenu.removeAll();
+ fillTableMenu(elePart, cellColumn, tableMenu);
+ }
+ });
+
+ contextMenu.appendToGroup(PageDesignerActionConstants.GROUP_CONTAINER, tableMenu);
+ return true;
+
+ }
+
+ /**
+ * @param elePart
+ * @param cellColumn
+ * @param tableMenu
+ */
+ private void fillTableMenu(ElementEditPart elePart, int cellColumn, IMenuManager tableMenu)
+ {
+ SelectEditPartAction action = new SelectEditPartAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.DataTable.SelectTable"), elePart);//$NON-NLS-1$
+ tableMenu.add(action);
+
+ tableMenu.add(new Separator());
+
+ {
+ InsertRowColumnAction insertColumnBeforeAction = new InsertRowColumnAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.DataTable.InsertColumnBefore"), //$NON-NLS-1$
+ elePart, cellColumn, false, true);
+ tableMenu.add(insertColumnBeforeAction);
+
+ InsertRowColumnAction insertColumnAfterAction = new InsertRowColumnAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.DataTable.InsertColumnAfter"),//$NON-NLS-1$
+ elePart, cellColumn, false, false);
+ tableMenu.add(insertColumnAfterAction);
+
+ tableMenu.add(new Separator());
+ }
+
+ {
+ DeleteRowColumnAction deleteColumnAction = new DeleteRowColumnAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.DataTable.DeleteColumn"), //$NON-NLS-1$
+ elePart, cellColumn, false);
+ tableMenu.add(deleteColumnAction);
+ tableMenu.add(new Separator());
+ }
+
+ {
+ InsertHeaderFooterAction headerAction = new InsertHeaderFooterAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.InsertTableHeader"), elePart, true);//$NON-NLS-1$
+ tableMenu.add(headerAction);
+
+ InsertHeaderFooterAction footerAction = new InsertHeaderFooterAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.InsertTableFooter"), elePart, false);//$NON-NLS-1$
+ tableMenu.add(footerAction);
+
+ DeleteHeaderFooterAction delHeaderAction = new DeleteHeaderFooterAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.DeleteTableHeader"), elePart, true);//$NON-NLS-1$
+ tableMenu.add(delHeaderAction);
+
+ DeleteHeaderFooterAction delFooterAction = new DeleteHeaderFooterAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.DeleteTableFooter"), elePart, false);//$NON-NLS-1$
+ tableMenu.add(delFooterAction);
+ tableMenu.add(new Separator());
+ }
+
+ {
+ InsertHColumnHeaderFooterAction hColHeaderAction = new InsertHColumnHeaderFooterAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.InsertColumnHeader"),//$NON-NLS-1$
+ elePart, true);
+ tableMenu.add(hColHeaderAction);
+
+ InsertHColumnHeaderFooterAction hColFooterAction = new InsertHColumnHeaderFooterAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.InsertColumnFooter"),//$NON-NLS-1$
+ elePart, false);
+ tableMenu.add(hColFooterAction);
+
+ DeleteHColumnHeaderFooterAction delColHeader = new DeleteHColumnHeaderFooterAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.DeleteColumnHeader"),//$NON-NLS-1$
+ elePart, true);
+ tableMenu.add(delColHeader);
+
+ DeleteHColumnHeaderFooterAction delColFooter = new DeleteHColumnHeaderFooterAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.DeleteColumnFooter"),//$NON-NLS-1$
+ elePart, false);
+ tableMenu.add(delColFooter);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.elementedit.IElementEdit#createEditPolicies(org.eclipse.jst.pagedesigner.parts.ElementEditPart)
+ */
+ public void createEditPolicies(ElementEditPart part)
+ {
+ part.installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new DataTableResizePolicy(part));
+ }
+
+ static class DataTableResizePolicy extends ElementResizableEditPolicy
+ {
+ ElementEditPart _part;
+
+ public DataTableResizePolicy(ElementEditPart part)
+ {
+ _part = part;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.gef.editpolicies.ResizableEditPolicy#getCommand(org.eclipse.gef.Request)
+ */
+ public Command getCommand(Request request)
+ {
+ IHTMLGraphicalViewer viewer = (IHTMLGraphicalViewer) _part.getViewer();
+ Element dataTable = (Element) _part.getIDOMNode();
+ if (request instanceof TableResizeRequest)
+ {
+ // TODO: FIXME:
+ }
+ else if (request instanceof TableInsertRequest)
+ {
+ TableInsertRequest tableInsertRequest = (TableInsertRequest) request;
+ if (tableInsertRequest.isRow())
+ {
+ // don't support insert row.
+ return null;
+ }
+ else
+ {
+ int index = tableInsertRequest.getIndex() + (tableInsertRequest.isBefore() ? 0 : 1);
+ return new DataTableInsertColumnCommand(viewer, dataTable, index);
+ }
+ }
+ else if (request instanceof InsertHeaderFooterRequest)
+ {
+ InsertHeaderFooterRequest req = (InsertHeaderFooterRequest) request;
+ boolean isHeader = req.isHeader();
+ return new DataTableInsertHeaderCommand(viewer, dataTable, isHeader);
+ }
+ else if (request instanceof DeleteHeaderFooterRequest)
+ {
+ DeleteHeaderFooterRequest req = (DeleteHeaderFooterRequest) request;
+ boolean isHeader = req.isHeader();
+ return new DataTableDeleteHeaderCommand(viewer, dataTable, isHeader);
+ }
+ else if (request instanceof InsertHColumnHeaderFooterRequest)
+ {
+ InsertHColumnHeaderFooterRequest req = (InsertHColumnHeaderFooterRequest) request;
+ boolean isHeader = req.isHeader();
+ return new DataTableInsertColumnHeaderCommand(viewer, dataTable, isHeader);
+ }
+ else if (request instanceof DeleteHColumnHeaderFooterRequest)
+ {
+ DeleteHColumnHeaderFooterRequest req = (DeleteHColumnHeaderFooterRequest) request;
+ boolean isHeader = req.isHeader();
+ return new DataTableDeleteColumnHeaderCommand(viewer, dataTable, isHeader);
+ }
+ else if (request instanceof TableRowColumnDeleteRequest)
+ {
+ TableRowColumnDeleteRequest deleteReq = (TableRowColumnDeleteRequest) request;
+ if (deleteReq.isRow())
+ {
+ return null;
+ }
+ else
+ {
+ return new DataTableDeleteColumnCommand(viewer, dataTable, deleteReq.getIndex());
+ }
+ }
+ return super.getCommand(request);
+ }
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfhtml/DefaultJSFHTMLElementEdit.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfhtml/DefaultJSFHTMLElementEdit.java
new file mode 100644
index 000000000..cb76b24e8
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfhtml/DefaultJSFHTMLElementEdit.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.elementedit.jsfhtml;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jst.pagedesigner.elementedit.AbstractElementEdit;
+import org.eclipse.jst.pagedesigner.jsf.ui.actions.IJSFCoreSupport;
+import org.eclipse.jst.pagedesigner.jsf.ui.actions.JSFAddActionGroup;
+import org.eclipse.jst.pagedesigner.jsf.ui.actions.JSFNavigationGroup;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class DefaultJSFHTMLElementEdit extends AbstractElementEdit
+{
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.elementedit.AbstractElementEdit#fillContextMenu(org.eclipse.jface.action.IMenuManager, org.w3c.dom.Element)
+ */
+ public void fillContextMenu(IMenuManager contextMenu, Element ele)
+ {
+ super.fillContextMenu(contextMenu, ele);
+
+ // next are JSF HTML special support.
+ new JSFAddActionGroup().fillContextMenu(contextMenu, (IDOMElement) ele, new JSFCoreSupport(ele.getLocalName()));
+ new JSFNavigationGroup().fillContextMenu(contextMenu, (IDOMElement) ele, new JSFCoreSupport(ele.getLocalName()));
+ }
+
+ static class JSFCoreSupport implements IJSFCoreSupport
+ {
+ String _localName;
+
+ public JSFCoreSupport(String localtag)
+ {
+ _localName = localtag;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.jsf.actions.IJSFCoreSupport#isActionSource()
+ */
+ public boolean isActionSource()
+ {
+ // UICommand.
+ return _localName.startsWith("command");
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.jsf.actions.IJSFCoreSupport#isUIComponent()
+ */
+ public boolean isUIComponent()
+ {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.jsf.actions.IJSFCoreSupport#isValueHolder()
+ */
+ public boolean isValueHolder()
+ {
+ // UIOutput
+ return _localName.startsWith("output") || _localName.startsWith("input")
+ || _localName.startsWith("select");
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.jsf.actions.IJSFCoreSupport#isEditableValueHolder()
+ */
+ public boolean isEditableValueHolder()
+ {
+ // UIInput
+ return _localName.startsWith("input") || _localName.startsWith("select");
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.jsf.actions.IJSFCoreSupport#supportSelectItems()
+ */
+ public boolean supportSelectItems()
+ {
+ return _localName.startsWith("select");
+ }
+
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfhtml/JSFHTMLElementEditFactory.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfhtml/JSFHTMLElementEditFactory.java
new file mode 100644
index 000000000..c4e388c8c
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfhtml/JSFHTMLElementEditFactory.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.elementedit.jsfhtml;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.elementedit.IElementEdit;
+import org.eclipse.jst.pagedesigner.elementedit.IElementEditFactory;
+import org.w3c.dom.Element;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class JSFHTMLElementEditFactory implements IElementEditFactory
+{
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.elementedit.IElementEditFactory#createElementEdit(org.w3c.dom.Element)
+ */
+ public IElementEdit createElementEdit(Element element)
+ {
+ String tagname = element.getLocalName();
+
+ if ("dataTable".equalsIgnoreCase(tagname))
+ {
+ return new DataTableElementEdit();
+ }
+ else if ("panelGrid".equalsIgnoreCase(tagname))
+ {
+ return new PanelGridElementEdit();
+ }
+ else if ("column".equalsIgnoreCase(tagname))
+ {
+ return new ColumnElementEdit();
+ }
+ return new DefaultJSFHTMLElementEdit();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.elementedit.IElementEditFactory#getSupportedURI()
+ */
+ public String getSupportedURI()
+ {
+ return IJMTConstants.URI_JSF_HTML;
+ }
+
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfhtml/PanelGridElementEdit.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfhtml/PanelGridElementEdit.java
new file mode 100644
index 000000000..137576d40
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/jsfhtml/PanelGridElementEdit.java
@@ -0,0 +1,300 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.elementedit.jsfhtml;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.actions.single.SelectEditPartAction;
+import org.eclipse.jst.pagedesigner.editors.PageDesignerActionConstants;
+import org.eclipse.jst.pagedesigner.editpolicies.ElementResizableEditPolicy;
+import org.eclipse.jst.pagedesigner.jsf.ui.JSFUIPlugin;
+import org.eclipse.jst.pagedesigner.jsf.ui.actions.DeleteHeaderFooterAction;
+import org.eclipse.jst.pagedesigner.jsf.ui.actions.InsertHeaderFooterAction;
+import org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml.DataTableDeleteHeaderCommand;
+import org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml.PanelGridDeleteColumnCommand;
+import org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml.PanelGridDeleteRowCommand;
+import org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml.PanelGridInsertColumnCommand;
+import org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml.PanelGridInsertFooterCommand;
+import org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml.PanelGridInsertHeaderCommand;
+import org.eclipse.jst.pagedesigner.jsf.ui.commands.jsfhtml.PanelGridInsertRowCommand;
+import org.eclipse.jst.pagedesigner.jsf.ui.elementedit.request.DeleteHeaderFooterRequest;
+import org.eclipse.jst.pagedesigner.jsf.ui.elementedit.request.InsertHeaderFooterRequest;
+import org.eclipse.jst.pagedesigner.jsf.ui.elementedit.util.PanelGridUtil;
+import org.eclipse.jst.pagedesigner.parts.ElementEditPart;
+import org.eclipse.jst.pagedesigner.parts.NodeEditPart;
+import org.eclipse.jst.pagedesigner.tableedit.DeleteRowColumnAction;
+import org.eclipse.jst.pagedesigner.tableedit.InsertRowColumnAction;
+import org.eclipse.jst.pagedesigner.tableedit.TableInsertRequest;
+import org.eclipse.jst.pagedesigner.tableedit.TableResizeRequest;
+import org.eclipse.jst.pagedesigner.tableedit.TableRowColumnDeleteRequest;
+import org.eclipse.jst.pagedesigner.viewer.IHTMLGraphicalViewer;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class PanelGridElementEdit extends DefaultJSFHTMLElementEdit
+{
+ public static Action action = new Action()
+ {
+ };
+ private final static int FAKE_INDEX = -10;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.elementedit.IElementEdit#fillContextMenu(org.eclipse.jface.action.IMenuManager, org.w3c.dom.Element)
+ */
+ public void fillContextMenu(IMenuManager contextMenu, Element ele)
+ {
+ super.fillContextMenu(contextMenu, ele);
+
+ final IMenuManager tableMenu = new MenuManager(JSFUIPlugin.getResourceString("ElementEdit.Submenu.PanelGrid"));//$NON-NLS-1$
+ tableMenu.add(action);
+ final ElementEditPart gridEditPart = (ElementEditPart) ((IDOMElement) ele).getAdapterFor(EditPart.class);
+
+ // ok, we passed the checking, now let's create the actions.
+ tableMenu.addMenuListener(new IMenuListener()
+ {
+ public void menuAboutToShow(IMenuManager manager)
+ {
+ tableMenu.removeAll();
+ fillPanelGridMenu(gridEditPart, FAKE_INDEX, FAKE_INDEX, tableMenu);
+ }
+ });
+
+ contextMenu.appendToGroup(PageDesignerActionConstants.GROUP_CONTAINER, tableMenu);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.elementedit.IElementEdit#fillContainerContextMenu(org.eclipse.jface.action.IMenuManager, org.eclipse.jst.pagedesigner.parts.ElementEditPart, org.eclipse.jst.pagedesigner.parts.NodeEditPart, org.eclipse.jface.viewers.ISelection)
+ */
+ public boolean fillContainerContextMenu(IMenuManager contextMenu, final ElementEditPart elePart,
+ NodeEditPart nodePart, ISelection innerSelection)
+ {
+ Element table = (Element) elePart.getModel();
+ Node node = (Node) nodePart.getModel();
+
+ Element childEle = null;
+ if (node instanceof Element)
+ {
+ childEle = (Element) node;
+ }
+ else
+ {
+ boolean hasElementParent = false;
+ Node nodeBackup = node;
+ while (!IJSFConstants.TAG_PANELGRID.equalsIgnoreCase(nodeBackup.getParentNode().getLocalName()))
+ {
+ nodeBackup = nodeBackup.getParentNode();
+ if (nodeBackup instanceof Element)
+ {
+ hasElementParent = true;
+ break;
+ }
+ }
+ if (!hasElementParent)
+ {
+ return false;
+ }
+ else
+ {
+ childEle = (Element) nodeBackup;
+ }
+ }
+
+ PanelGridUtil util = new PanelGridUtil(table);
+ final int cellRow = util.convertRowIndexFromDomToView(util.getDomRowIndex(childEle));
+ final int cellColumn = util.getDomColumnIndex(childEle);
+
+ final IMenuManager tableMenu = new MenuManager(JSFUIPlugin.getResourceString("ElementEdit.Submenu.PanelGrid"));//$NON-NLS-1$
+ tableMenu.add(action);
+
+ // ok, we passed the checking, now let's create the actions.
+ tableMenu.addMenuListener(new IMenuListener()
+ {
+ public void menuAboutToShow(IMenuManager manager)
+ {
+ tableMenu.removeAll();
+ fillPanelGridMenu(elePart, cellRow, cellColumn, tableMenu);
+ }
+ });
+
+ contextMenu.appendToGroup(PageDesignerActionConstants.GROUP_CONTAINER, tableMenu);
+ return true;
+
+ }
+
+ /**
+ * @param elePart
+ * @param cellRow
+ * @param cellColumn
+ * @param tableMenu
+ */
+ private void fillPanelGridMenu(ElementEditPart elePart, int cellRow, int cellColumn, IMenuManager tableMenu)
+ {
+ SelectEditPartAction action = new SelectEditPartAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.PanelGrid.SelectTable"), elePart);//$NON-NLS-1$
+ tableMenu.add(action);
+
+ tableMenu.add(new Separator());
+
+ {
+ InsertRowColumnAction insertRowBeforeAction = new InsertRowColumnAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.PanelGrid.InsertRowBefore"), //$NON-NLS-1$
+ elePart, cellRow, true, true);
+ tableMenu.add(insertRowBeforeAction);
+
+ InsertRowColumnAction insertRowAfterAction = new InsertRowColumnAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.PanelGrid.InsertRowAfter"), //$NON-NLS-1$
+ elePart, cellRow, true, false);
+ tableMenu.add(insertRowAfterAction);
+
+ tableMenu.add(new Separator());
+ }
+
+ {
+ InsertRowColumnAction insertColumnBeforeAction = new InsertRowColumnAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.PanelGrid.InsertColumnBefore"), //$NON-NLS-1$
+ elePart, cellColumn, false, true);
+ tableMenu.add(insertColumnBeforeAction);
+
+ InsertRowColumnAction insertColumnAfterAction = new InsertRowColumnAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.PanelGrid.InsertColumnAfter"), //$NON-NLS-1$
+ elePart, cellColumn, false, false);
+ tableMenu.add(insertColumnAfterAction);
+
+ tableMenu.add(new Separator());
+ }
+
+ {
+ DeleteRowColumnAction deleteRowAction = new DeleteRowColumnAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.PanelGrid.DeleteRow"), //$NON-NLS-1$
+ elePart, cellRow, true);
+ tableMenu.add(deleteRowAction);
+
+ DeleteRowColumnAction deleteColumnAction = new DeleteRowColumnAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.PanelGrid.DeleteColumn"), //$NON-NLS-1$
+ elePart, cellColumn, false);
+ tableMenu.add(deleteColumnAction);
+ tableMenu.add(new Separator());
+ }
+
+ {
+ InsertHeaderFooterAction headerAction = new InsertHeaderFooterAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.PanelGrid.InsertHeader"), //$NON-NLS-1$
+ elePart, true);
+ tableMenu.add(headerAction);
+
+ InsertHeaderFooterAction footerAction = new InsertHeaderFooterAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.PanelGrid.InsertFooter"), //$NON-NLS-1$
+ elePart, false);
+ tableMenu.add(footerAction);
+
+ DeleteHeaderFooterAction delHeaderAction = new DeleteHeaderFooterAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.PanelGird.DeleteHeader"), elePart, true);//$NON-NLS-1$
+ tableMenu.add(delHeaderAction);
+
+ DeleteHeaderFooterAction delFooterAction = new DeleteHeaderFooterAction(JSFUIPlugin
+ .getResourceString("ElementEdit.Submenu.PanelGrid.DeleteFooter"), elePart, false);//$NON-NLS-1$
+ tableMenu.add(delFooterAction);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.elementedit.IElementEdit#createEditPolicies(org.eclipse.jst.pagedesigner.parts.ElementEditPart)
+ */
+ public void createEditPolicies(ElementEditPart part)
+ {
+ part.installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new PanelGridResizePolicy(part));
+ }
+
+ static class PanelGridResizePolicy extends ElementResizableEditPolicy
+ {
+ ElementEditPart _part;
+
+ public PanelGridResizePolicy(ElementEditPart part)
+ {
+ _part = part;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.gef.editpolicies.ResizableEditPolicy#getCommand(org.eclipse.gef.Request)
+ */
+ public Command getCommand(Request request)
+ {
+ IHTMLGraphicalViewer viewer = (IHTMLGraphicalViewer) _part.getViewer();
+ Element panelGrid = (Element) _part.getIDOMNode();
+ if (request instanceof TableResizeRequest)
+ {
+ // TODO: FIXME:
+ }
+ else if (request instanceof TableInsertRequest)
+ {
+ TableInsertRequest tableInsertRequest = (TableInsertRequest) request;
+ if (tableInsertRequest.isRow())
+ {
+ int index = tableInsertRequest.getIndex() + (tableInsertRequest.isBefore() ? 0 : 1);
+ return new PanelGridInsertRowCommand(viewer, panelGrid, index);
+ }
+ else
+ {
+ int index = tableInsertRequest.getIndex() + (tableInsertRequest.isBefore() ? 0 : 1);
+ return new PanelGridInsertColumnCommand(viewer, panelGrid, index);
+ }
+ }
+ else if (request instanceof InsertHeaderFooterRequest)
+ {
+ InsertHeaderFooterRequest req = (InsertHeaderFooterRequest) request;
+ boolean isHeader = req.isHeader();
+ if (isHeader)
+ {
+ return new PanelGridInsertHeaderCommand(viewer, panelGrid);
+ }
+ else
+ {
+ return new PanelGridInsertFooterCommand(viewer, panelGrid);
+ }
+ }
+ else if (request instanceof DeleteHeaderFooterRequest)
+ {
+ DeleteHeaderFooterRequest req = (DeleteHeaderFooterRequest) request;
+ boolean isHeader = req.isHeader();
+ return new DataTableDeleteHeaderCommand(viewer, panelGrid, isHeader);
+ }
+ else if (request instanceof TableRowColumnDeleteRequest)
+ {
+ TableRowColumnDeleteRequest deleteReq = (TableRowColumnDeleteRequest) request;
+ if (deleteReq.isRow())
+ {
+ return new PanelGridDeleteRowCommand(viewer, panelGrid, deleteReq.getIndex());
+ }
+ else
+ {
+ return new PanelGridDeleteColumnCommand(viewer, panelGrid, deleteReq.getIndex());
+ }
+ }
+ return super.getCommand(request);
+ }
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/request/DeleteHColumnHeaderFooterRequest.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/request/DeleteHColumnHeaderFooterRequest.java
new file mode 100644
index 000000000..6725b3246
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/request/DeleteHColumnHeaderFooterRequest.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.elementedit.request;
+
+import org.eclipse.gef.Request;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class DeleteHColumnHeaderFooterRequest extends Request
+{
+ private boolean _isHeader;
+
+ public DeleteHColumnHeaderFooterRequest(String type, boolean isHeader)
+ {
+ super(type);
+ this._isHeader = isHeader;
+ }
+
+ /**
+ * @return Returns the _isHeader.
+ */
+ public boolean isHeader()
+ {
+ return _isHeader;
+ }
+
+ /**
+ * @param header The _isHeader to set.
+ */
+ public void setHeader(boolean header)
+ {
+ _isHeader = header;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/request/DeleteHeaderFooterRequest.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/request/DeleteHeaderFooterRequest.java
new file mode 100644
index 000000000..cd67259ce
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/request/DeleteHeaderFooterRequest.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.elementedit.request;
+
+import org.eclipse.gef.Request;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class DeleteHeaderFooterRequest extends Request
+{
+ private boolean _isHeader;
+
+ public DeleteHeaderFooterRequest(String type, boolean isHeader)
+ {
+ super(type);
+ this._isHeader = isHeader;
+ }
+
+ /**
+ * @return Returns the _isHeader.
+ */
+ public boolean isHeader()
+ {
+ return _isHeader;
+ }
+
+ /**
+ * @param header The _isHeader to set.
+ */
+ public void setHeader(boolean header)
+ {
+ _isHeader = header;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/request/InsertHColumnHeaderFooterRequest.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/request/InsertHColumnHeaderFooterRequest.java
new file mode 100644
index 000000000..9ed09a9f0
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/request/InsertHColumnHeaderFooterRequest.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.elementedit.request;
+
+import org.eclipse.gef.Request;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class InsertHColumnHeaderFooterRequest extends Request
+{
+ private boolean _isHeader;
+
+ public InsertHColumnHeaderFooterRequest(String type, boolean isHeader)
+ {
+ super(type);
+ this._isHeader = isHeader;
+ }
+
+ /**
+ * @return Returns the _isHeader.
+ */
+ public boolean isHeader()
+ {
+ return _isHeader;
+ }
+
+ /**
+ * @param header The _isHeader to set.
+ */
+ public void setHeader(boolean header)
+ {
+ _isHeader = header;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/request/InsertHeaderFooterRequest.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/request/InsertHeaderFooterRequest.java
new file mode 100644
index 000000000..404ac275e
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/request/InsertHeaderFooterRequest.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.elementedit.request;
+
+import org.eclipse.gef.Request;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class InsertHeaderFooterRequest extends Request
+{
+ private boolean _isHeader;
+
+ public InsertHeaderFooterRequest(String type, boolean isHeader)
+ {
+ super(type);
+ this._isHeader = isHeader;
+ }
+
+ /**
+ * @return Returns the _isHeader.
+ */
+ public boolean isHeader()
+ {
+ return _isHeader;
+ }
+
+ /**
+ * @param header The _isHeader to set.
+ */
+ public void setHeader(boolean header)
+ {
+ _isHeader = header;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/util/DataTableUtil.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/util/DataTableUtil.java
new file mode 100644
index 000000000..6405515fb
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/util/DataTableUtil.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.elementedit.util;
+
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.jsf.core.dom.JSFDOMUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class DataTableUtil
+{
+ private static final int INVALID_POSITION = -10;
+ private Element _dataTable = null;
+
+ public DataTableUtil(Element dataTable)
+ {
+ this._dataTable = dataTable;
+ }
+
+ public int getColumnIndex(Element column)
+ {
+ NodeList nodeList = this._dataTable.getElementsByTagName("h:column");
+ if (nodeList != null)
+ {
+ for (int i = 0, size = nodeList.getLength(); i < size; i++)
+ {
+ if (column == (Element) nodeList.item(i))
+ {
+ return i;
+ }
+ }
+ }
+ return INVALID_POSITION;
+ }
+
+ public Element findHColumnParent(Node child)
+ {
+ if (child == null)
+ {
+ return null;
+ }
+
+ Node childBackup = child;
+ boolean hasHColumnParent = false;
+
+ if (JSFDOMUtil.isHColumn(child))
+ {
+ return (Element) child;
+ }
+ while (!IJSFConstants.TAG_DATATABLE.equalsIgnoreCase(childBackup.getParentNode().getLocalName()))
+ {
+ childBackup = (Element) childBackup.getParentNode();
+ String tagName = childBackup.getLocalName();
+ if (IJSFConstants.TAG_COLUMN.equalsIgnoreCase(tagName))
+ {
+ hasHColumnParent = true;
+ break;
+ }
+ }
+
+ if (hasHColumnParent)
+ {
+ return (Element) childBackup;
+ }
+ return null;
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/util/PanelGridUtil.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/util/PanelGridUtil.java
new file mode 100644
index 000000000..146f293d6
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/elementedit/util/PanelGridUtil.java
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.elementedit.util;
+
+import java.util.List;
+
+import org.eclipse.jst.pagedesigner.jsf.core.dom.JSFDOMUtil;
+import org.w3c.dom.Element;
+
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.utils.DOMUtil;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class PanelGridUtil
+{
+ private static final int INVALID_POSITION = -10;
+ private Element _panelGrid = null;
+
+ public PanelGridUtil(Element panelGrid)
+ {
+ this._panelGrid = panelGrid;
+ }
+
+ public int convertRowIndexFromDomToView(int domIndex)
+ {
+ boolean hasHeaderRow = (JSFDOMUtil.findFacet(this._panelGrid, "header") != null);
+ boolean hasFooterRow = (JSFDOMUtil.findFacet(this._panelGrid, "footer") != null);
+ if (!hasFooterRow)
+ {
+ return domIndex;
+ }
+ if (domIndex == 0)
+ {
+ return domIndex;
+ }
+ if (hasHeaderRow)
+ {
+ if (domIndex > 1)
+ {
+ return domIndex - 1;
+ }
+ }
+ else
+ {
+ if (domIndex > 0)
+ {
+ return domIndex - 1;
+ }
+ }
+ //must be footer
+ int uiRows = getUIRowCount();
+ return domIndex + uiRows;
+ }
+
+ public int getDomRowIndex(Element cell)
+ {
+ boolean hasHeaderRow = (JSFDOMUtil.findFacet(this._panelGrid, "header") != null);
+ boolean hasFooterRow = (JSFDOMUtil.findFacet(this._panelGrid, "footer") != null);
+ //if cell is header or footer
+ boolean isFacet = JSFDOMUtil.isFacet(cell);
+ Element parent = (Element) cell.getParentNode();
+ boolean isParentFacet = JSFDOMUtil.isFacet(parent);
+ if (isParentFacet)
+ {
+ cell = parent;
+ }
+ if (isFacet || isParentFacet)
+ {
+ String attrName = cell.getAttribute("name");
+ if ("header".equalsIgnoreCase(attrName))
+ {
+ return 0;
+ }
+ else if ("footer".equalsIgnoreCase(attrName))
+ {
+ if (hasHeaderRow)
+ {
+ return 1;
+ }
+ return 0;
+ }
+ }
+
+ int columns = DOMUtil.getIntAttributeIgnoreCase(this._panelGrid, IJSFConstants.ATTR_COLUMNS, 1);
+ if (columns < 1)
+ {
+ columns = 1;
+ }
+ int pos = getPosition(cell);
+ int rowIndex = pos / columns;
+
+ if (hasHeaderRow)
+ {
+ rowIndex++;
+ }
+ if (hasFooterRow)
+ {
+ rowIndex++;
+ }
+
+ return rowIndex;
+ }
+
+ public int getDomColumnIndex(Element cell)
+ {
+ int columns = DOMUtil.getIntAttributeIgnoreCase(this._panelGrid, IJSFConstants.ATTR_COLUMNS, 1);
+ if (columns < 1)
+ {
+ columns = 1;
+ }
+ int pos = getPosition(cell);
+ //if position is at header or footer,then insert column action should be disabled
+ if (pos == INVALID_POSITION)
+ {
+ return pos;
+ }
+
+ int columnIndex = pos % columns;
+ return columnIndex;
+ }
+
+ public int getUIRowCount()
+ {
+ int columns = DOMUtil.getIntAttributeIgnoreCase(this._panelGrid, IJSFConstants.ATTR_COLUMNS, 1);
+ if (columns < 1)
+ {
+ columns = 1;
+ }
+ List children = JSFDOMUtil.getUIComponentChildren(this._panelGrid);
+ int numRows = (children.size() + columns - 1) / columns;
+
+ return numRows;
+ }
+
+ private int getPosition(Element cell)
+ {
+ List children = JSFDOMUtil.getUIComponentChildren(this._panelGrid);
+ int size = children.size();
+ int i = 0;
+ for (i = 0; i < size; i++)
+ {
+ if (cell == children.get(i))
+ {
+ break;
+ }
+ }
+ if (i == size)
+ {
+ return INVALID_POSITION;
+ }
+ return i;
+ }
+
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreActionListenerSection.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreActionListenerSection.java
new file mode 100644
index 000000000..86b3eebba
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreActionListenerSection.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.sections;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.AttributeGroupSection;
+
+/**
+ * @author mengbo
+ */
+public class JSFCoreActionListenerSection extends AttributeGroupSection
+{
+ public JSFCoreActionListenerSection()
+ {
+ super(IJMTConstants.URI_JSF_CORE, IJSFConstants.TAG_ACTIONLISTENER,
+ new String[] {
+ IJSFConstants.ATTR_TYPE
+ });
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreAttributeSection.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreAttributeSection.java
new file mode 100644
index 000000000..288e80eac
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreAttributeSection.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.sections;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.AttributeGroupSection;
+
+/**
+ * @author mengbo
+ */
+public class JSFCoreAttributeSection extends AttributeGroupSection
+{
+ public JSFCoreAttributeSection()
+ {
+ super(IJMTConstants.URI_JSF_CORE, IJSFConstants.TAG_ATTRIBUTE,
+ new String[] {
+ IJSFConstants.ATTR_NAME,
+ IJSFConstants.ATTR_VALUE
+ });
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreConvertDateTimeGroup.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreConvertDateTimeGroup.java
new file mode 100644
index 000000000..5a6d1a705
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreConvertDateTimeGroup.java
@@ -0,0 +1,283 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.sections;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.commands.single.ChangeAttributeCommand;
+import org.eclipse.jst.pagedesigner.common.dialogfield.DialogField;
+import org.eclipse.jst.pagedesigner.common.dialogfield.IDialogFieldApplyListener;
+import org.eclipse.jst.pagedesigner.common.dialogfield.StyleComboDialogField;
+import org.eclipse.jst.pagedesigner.meta.EditorCreator;
+import org.eclipse.jst.pagedesigner.meta.IAttributeDescriptor;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.AttributeGroup;
+import org.eclipse.jst.pagedesigner.ui.dialogfields.DialogFieldWrapper;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+
+/**
+ * This group could be used in both section and dialog.
+ *
+ * @author mengbo
+ * @version 1.5
+ */
+public class JSFCoreConvertDateTimeGroup extends AttributeGroup
+{
+ private StyleComboDialogField _typeField;
+ private StyleComboDialogField _dateStyleField;
+ private StyleComboDialogField _timeStyleField;
+ private StyleComboDialogField _patternField;
+
+ final private static String[] TYPES = { "date", "time", "both" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ };
+ final private static String[] DATESTYLES = { "default", "short", "medium", "long", "full", "custom" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ };
+ final private static String[] TIMESTYLES = { "default", "short", "medium", "long", "full", "custom" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ };
+ final private static String[] DATEPATTERNS = { "", "M/d/yy", "EEE, M/d/yy", "MM/dd/yyyy", "EEE, MM/dd/yyyy", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ "MMM d, yyyy", "EEE, MMM d, yyyy", "MMMM d, yyyy", "EEEE, MMMM d, yyyy", "MMMM yyyy" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ };
+ final private static String[] TIMEPATTERNS = { "", "hh:mm", "hh:mm z", "HH:mm z", "HH:mm:ss z" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ };
+ final private static String[] DATETIMEPATTERNS = {
+ "", "M/d/yy hh:mm", "EEE, M/d/yy hh:mm", "MM/dd/yyyy HH:mm:ss z", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "EEE, MM/dd/yyyy HH:mm:ss z", "MMM d, yyyy HH:mm z", "EEE, MMM d, yyyy HH:mm z", "MMMM d, yyyy HH:mm z", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "EEEE, MMMM d, yyyy HH:mm z" //$NON-NLS-1$
+ };
+
+ /**
+ * @param uri
+ * @param tagName
+ * @param attrNames
+ */
+ public JSFCoreConvertDateTimeGroup()
+ {
+ super(IJMTConstants.URI_JSF_CORE, IJSFConstants.TAG_CONVERTDATETIME, new String[] { IJSFConstants.ATTR_TYPE,
+ IJSFConstants.ATTR_DATESTYLE, IJSFConstants.ATTR_TIMESTYLE, IJSFConstants.ATTR_PATTERN});
+ }
+
+ protected DialogField createDialogField(String uri, String tag, IAttributeDescriptor attr)
+ {
+ EditorCreator creator = EditorCreator.getInstance();
+ if (attr.getAttributeName().equals(IJSFConstants.ATTR_TYPE))
+ {
+ DialogFieldWrapper wrapper = (DialogFieldWrapper) creator
+ .createDialogFieldWithWrapper(uri, tag, attr, null);
+ _typeField = (StyleComboDialogField) wrapper.getWrappedDialogField();
+ return wrapper;
+ }
+ else if (attr.getAttributeName().equals(IJSFConstants.ATTR_DATESTYLE))
+ {
+ DialogFieldWrapper wrapper = (DialogFieldWrapper) creator
+ .createDialogFieldWithWrapper(uri, tag, attr, null);
+ _dateStyleField = (StyleComboDialogField) wrapper.getWrappedDialogField();
+ _dateStyleField.setItems(DATESTYLES);
+ return wrapper;
+ }
+ else if (attr.getAttributeName().equals(IJSFConstants.ATTR_TIMESTYLE))
+ {
+ DialogFieldWrapper wrapper = (DialogFieldWrapper) creator
+ .createDialogFieldWithWrapper(uri, tag, attr, null);
+ _timeStyleField = (StyleComboDialogField) wrapper.getWrappedDialogField();
+ _timeStyleField.setItems(TIMESTYLES);
+ return wrapper;
+ }
+ else if (attr.getAttributeName().equals(IJSFConstants.ATTR_PATTERN))
+ {
+ DialogFieldWrapper wrapper = (DialogFieldWrapper) creator
+ .createDialogFieldWithWrapper(uri, tag, attr, null);
+ _patternField = (StyleComboDialogField) wrapper.getWrappedDialogField();
+ return wrapper;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ public IDialogFieldApplyListener getDialogFieldApplyListener(String uri, String tag, IAttributeDescriptor attr)
+ {
+ String attribute = attr.getAttributeName();
+ if (attribute.equals(IJSFConstants.ATTR_TYPE) || attribute.equals(IJSFConstants.ATTR_DATESTYLE)
+ || attribute.equals(IJSFConstants.ATTR_TIMESTYLE))
+ {
+ IDialogFieldApplyListener listener = new IDialogFieldApplyListener()
+ {
+ public void dialogFieldApplied(DialogField field)
+ {
+ updatePatternItems();
+ updateFieldStatus();
+ updateFieldData();
+ }
+ };
+ return listener;
+ }
+ else if (attribute.equals(IJSFConstants.ATTR_PATTERN))
+ {
+ IDialogFieldApplyListener listener = new IDialogFieldApplyListener()
+ {
+ public void dialogFieldApplied(DialogField field)
+ {
+ updateFieldStatus();
+ updateFieldData();
+ }
+ };
+ return listener;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.properties.attrgroup.AttributeGroup#refreshData()
+ */
+
+ public void refreshData()
+ {
+ IDOMElement element = getElement();
+
+ String type = element.getAttribute(IJSFConstants.ATTR_TYPE);
+ _typeField.setTextWithoutUpdate(type);
+
+ String dateStyle = element.getAttribute(IJSFConstants.ATTR_DATESTYLE);
+ if (!_dateStyleField.getText().equalsIgnoreCase(DATESTYLES[5]))
+ {
+ _dateStyleField.setTextWithoutUpdate(dateStyle);
+ }
+
+ String timeStyle = element.getAttribute(IJSFConstants.ATTR_TIMESTYLE);
+ if (!_timeStyleField.getText().equalsIgnoreCase(TIMESTYLES[5]))
+ {
+ _timeStyleField.setTextWithoutUpdate(timeStyle);
+ }
+
+ String pattern = element.getAttribute(IJSFConstants.ATTR_PATTERN);
+ _patternField.setTextWithoutUpdate(pattern);
+
+ updateFieldStatus();
+ }
+
+ /**
+ *
+ */
+ private void updateFieldStatus()
+ {
+ String type = _typeField.getText();
+ String dateStyle = _dateStyleField.getText();
+ String timeStyle = _timeStyleField.getText();
+
+ if (type.equalsIgnoreCase(TYPES[0]))
+ {
+ _dateStyleField.setEnabled(true);
+ _timeStyleField.setEnabled(false);
+ if (dateStyle.equalsIgnoreCase(DATESTYLES[5]))
+ {
+ _patternField.setEnabled(true);
+ }
+ else
+ {
+ _patternField.setEnabled(false);
+ }
+ }
+ else if (type.equalsIgnoreCase(TYPES[1]))
+ {
+ _dateStyleField.setEnabled(false);
+ _timeStyleField.setEnabled(true);
+ if (timeStyle.equalsIgnoreCase(TIMESTYLES[5]))
+ {
+ _patternField.setEnabled(true);
+ }
+ else
+ {
+ _patternField.setEnabled(false);
+ }
+ }
+ else if (type.equalsIgnoreCase(TYPES[2]))
+ {
+ _dateStyleField.setEnabled(true);
+ _timeStyleField.setEnabled(true);
+ if (dateStyle.equalsIgnoreCase(DATESTYLES[5]) || timeStyle.equalsIgnoreCase(TIMESTYLES[5]))
+ {
+ _patternField.setEnabled(true);
+ }
+ else
+ {
+ _patternField.setEnabled(false);
+ }
+ }
+ }
+
+ private void updatePatternItems()
+ {
+ String type = _typeField.getText();
+ String dateStyle = _dateStyleField.getText();
+ String timeStyle = _timeStyleField.getText();
+
+ if (type.equalsIgnoreCase(TYPES[0]) && dateStyle.equalsIgnoreCase(DATESTYLES[5]))
+ {
+ _patternField.getComboControl(null, null).removeAll();
+ _patternField.getComboControl(null, null).setItems(DATEPATTERNS);
+ }
+
+ if (type.equalsIgnoreCase(TYPES[1]) && timeStyle.equalsIgnoreCase(TIMESTYLES[5]))
+ {
+ _patternField.getComboControl(null, null).removeAll();
+ _patternField.getComboControl(null, null).setItems(TIMEPATTERNS);
+ }
+
+ if (type.equalsIgnoreCase(TYPES[2])
+ && (dateStyle.equalsIgnoreCase(DATESTYLES[5]) || timeStyle.equalsIgnoreCase(TIMESTYLES[5])))
+ {
+ _patternField.getComboControl(null, null).removeAll();
+ _patternField.getComboControl(null, null).setItems(DATETIMEPATTERNS);
+ }
+ }
+
+ private void updateFieldData()
+ {
+ String type = _typeField.getText();
+ String dateStyle = _dateStyleField.getText();
+ String timeStyle = _timeStyleField.getText();
+ String pattern = _patternField.getText();
+
+ // update the model
+ if (!_dateStyleField.isEnabled() || dateStyle.equalsIgnoreCase(DATESTYLES[5]))
+ {
+ dateStyle = "";
+ }
+
+ if (!_timeStyleField.isEnabled() || timeStyle.equalsIgnoreCase(TIMESTYLES[5]))
+ {
+ timeStyle = "";
+ }
+
+ if (!_patternField.isEnabled())
+ {
+ pattern = "";
+
+ }
+
+ Map map = new HashMap();
+ map.put(IJSFConstants.ATTR_TYPE, type);
+ map.put(IJSFConstants.ATTR_DATESTYLE, dateStyle);
+ map.put(IJSFConstants.ATTR_TIMESTYLE, timeStyle);
+ map.put(IJSFConstants.ATTR_PATTERN, pattern);
+
+ ChangeAttributeCommand c = new ChangeAttributeCommand(SectionResources
+ .getString("JSFCoreConvertDateTimeSection.ChangeAttribute"), getElement(), map);
+ c.execute();
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreConvertNumberGroup.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreConvertNumberGroup.java
new file mode 100644
index 000000000..640af64e3
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreConvertNumberGroup.java
@@ -0,0 +1,220 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.sections;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+
+import org.eclipse.jst.pagedesigner.common.dialogfield.ComboDialogField;
+import org.eclipse.jst.pagedesigner.common.dialogfield.DialogField;
+import org.eclipse.jst.pagedesigner.common.dialogfield.IDialogFieldApplyListener;
+import org.eclipse.jst.pagedesigner.common.dialogfield.StringDialogField;
+import org.eclipse.jst.pagedesigner.common.dialogfield.StyleComboDialogField;
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.commands.single.ChangeAttributeCommand;
+import org.eclipse.jst.pagedesigner.meta.EditorCreator;
+import org.eclipse.jst.pagedesigner.meta.IAttributeDescriptor;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.AttributeGroup;
+import org.eclipse.jst.pagedesigner.ui.dialogfields.DialogFieldWrapper;
+
+/**
+ * @author mengbo
+ */
+public class JSFCoreConvertNumberGroup extends AttributeGroup
+{
+ private StyleComboDialogField _typeField;
+ private StyleComboDialogField _patternField;
+ private ComboDialogField _currencyCodeField;
+ private StringDialogField _currencySymbolField;
+
+ final private static String[] TYPES = { "number", "currency", "percentage", "custom" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ };
+
+ /**
+ * @param uri
+ * @param tagName
+ * @param attrNames
+ */
+ public JSFCoreConvertNumberGroup()
+ {
+ super(IJMTConstants.URI_JSF_CORE, IJSFConstants.TAG_CONVERTNUMBER, new String[] { IJSFConstants.ATTR_TYPE,
+ IJSFConstants.ATTR_CURRENCYCODE, IJSFConstants.ATTR_CURRENCYSYMBOL, IJSFConstants.ATTR_PATTERN});
+ }
+
+ protected DialogField createDialogField(String uri, String tag, IAttributeDescriptor attr)
+ {
+ EditorCreator creator = EditorCreator.getInstance();
+ if (attr.getAttributeName().equals(IJSFConstants.ATTR_TYPE))
+ {
+ DialogFieldWrapper wrapper = (DialogFieldWrapper) creator
+ .createDialogFieldWithWrapper(uri, tag, attr, null);
+ _typeField = (StyleComboDialogField) wrapper.getWrappedDialogField();
+ _typeField.setItems(TYPES);
+ return wrapper;
+ }
+ else if (attr.getAttributeName().equals(IJSFConstants.ATTR_CURRENCYCODE))
+ {
+ DialogFieldWrapper wrapper = (DialogFieldWrapper) creator
+ .createDialogFieldWithWrapper(uri, tag, attr, null);
+ _currencyCodeField = (ComboDialogField) wrapper.getWrappedDialogField();
+ return wrapper;
+ }
+ else if (attr.getAttributeName().equals(IJSFConstants.ATTR_CURRENCYSYMBOL))
+ {
+ DialogFieldWrapper wrapper = (DialogFieldWrapper) creator
+ .createDialogFieldWithWrapper(uri, tag, attr, null);
+ _currencySymbolField = (StringDialogField) wrapper.getWrappedDialogField();
+ return wrapper;
+ }
+ else if (attr.getAttributeName().equals(IJSFConstants.ATTR_PATTERN))
+ {
+ DialogFieldWrapper wrapper = (DialogFieldWrapper) creator
+ .createDialogFieldWithWrapper(uri, tag, attr, null);
+ _patternField = (StyleComboDialogField) wrapper.getWrappedDialogField();
+ return wrapper;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ public IDialogFieldApplyListener getDialogFieldApplyListener(String uri, String tag, IAttributeDescriptor attr)
+ {
+ String attribute = attr.getAttributeName();
+ if (attribute.equals(IJSFConstants.ATTR_CURRENCYCODE) || attribute.equals(IJSFConstants.ATTR_CURRENCYSYMBOL)
+ || attribute.equals(IJSFConstants.ATTR_PATTERN))
+ {
+ IDialogFieldApplyListener listener = new IDialogFieldApplyListener()
+ {
+ public void dialogFieldApplied(DialogField field)
+ {
+ updateFieldData();
+ }
+ };
+ return listener;
+ }
+ else if (attribute.equals(IJSFConstants.ATTR_TYPE))
+ {
+ IDialogFieldApplyListener listener = new IDialogFieldApplyListener()
+ {
+ public void dialogFieldApplied(DialogField field)
+ {
+ updateFieldStatus();
+ updateFieldData();
+ }
+ };
+ return listener;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.pagedesigner.pagedesigner.properties.attrgroup.AttributeGroup#refreshData()
+ */
+ public void refreshData()
+ {
+ IDOMElement element = getElement();
+
+ String type = element.getAttribute(IJSFConstants.ATTR_TYPE);
+ if (!_typeField.getText().equalsIgnoreCase(TYPES[3]))
+ {
+ _typeField.setTextWithoutUpdate(type);
+ }
+
+ String currencyCode = element.getAttribute(IJSFConstants.ATTR_CURRENCYCODE);
+ _currencyCodeField.setTextWithoutUpdate(currencyCode);
+
+ String currencySymbol = element.getAttribute(IJSFConstants.ATTR_CURRENCYSYMBOL);
+ _currencySymbolField.setTextWithoutUpdate(currencySymbol);
+
+ String pattern = element.getAttribute(IJSFConstants.ATTR_PATTERN);
+ _patternField.setTextWithoutUpdate(pattern);
+
+ updateFieldStatus();
+ }
+
+ private void updateFieldStatus()
+ {
+ String type = _typeField.getText();
+
+ if (type.equalsIgnoreCase(TYPES[0]))
+ {
+ _currencyCodeField.setEnabled(false);
+ _currencySymbolField.setEnabled(false);
+ _patternField.setEnabled(false);
+ }
+ else if (type.equalsIgnoreCase(TYPES[1]))
+ {
+ _currencyCodeField.setEnabled(true);
+ _currencySymbolField.setEnabled(true);
+ _patternField.setEnabled(false);
+ }
+ else if (type.equalsIgnoreCase(TYPES[2]))
+ {
+ _currencyCodeField.setEnabled(false);
+ _currencySymbolField.setEnabled(false);
+ _patternField.setEnabled(false);
+ }
+ else if (type.equalsIgnoreCase(TYPES[3]))
+ {
+ _currencyCodeField.setEnabled(false);
+ _currencySymbolField.setEnabled(false);
+ _patternField.setEnabled(true);
+ }
+ }
+
+ private void updateFieldData()
+ {
+ String type = _typeField.getText();
+ String currencyCode = _currencyCodeField.getText();
+ String currencySymbol = _currencySymbolField.getText();
+ String pattern = _patternField.getText();
+
+ // update the model
+ if (type.equalsIgnoreCase(TYPES[3]))
+ {
+ type = "";
+ }
+
+ if (!_currencyCodeField.isEnabled())
+ {
+ currencyCode = "";
+ }
+
+ if (!_currencySymbolField.isEnabled())
+ {
+ currencySymbol = "";
+ }
+
+ if (!_patternField.isEnabled())
+ {
+ pattern = "";
+ }
+
+ Map map = new HashMap();
+ map.put(IJSFConstants.ATTR_TYPE, type);
+ map.put(IJSFConstants.ATTR_CURRENCYCODE, currencyCode);
+ map.put(IJSFConstants.ATTR_CURRENCYSYMBOL, currencySymbol);
+ map.put(IJSFConstants.ATTR_PATTERN, pattern);
+
+ ChangeAttributeCommand c = new ChangeAttributeCommand(SectionResources
+ .getString("JSFCoreConvertNumberSection.CommandLabel.ChangeAttribute"), getElement(), map);
+ c.execute();
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreConverterSection.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreConverterSection.java
new file mode 100644
index 000000000..a3df0b409
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreConverterSection.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.sections;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.AttributeGroupSection;
+
+/**
+ * @author mengbo
+ */
+public class JSFCoreConverterSection extends AttributeGroupSection
+{
+ public JSFCoreConverterSection()
+ {
+ super(IJMTConstants.URI_JSF_CORE, IJSFConstants.TAG_CONVERTER,
+ new String[] {
+ IJSFConstants.ATTR_CONVERTERID
+ });
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreFacetSection.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreFacetSection.java
new file mode 100644
index 000000000..487b4902a
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreFacetSection.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.sections;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.AttributeGroupSection;
+
+/**
+ * @author mengbo
+ */
+public class JSFCoreFacetSection extends AttributeGroupSection
+{
+ public JSFCoreFacetSection()
+ {
+ super(IJMTConstants.URI_JSF_CORE, IJSFConstants.TAG_FACET,
+ new String[] {
+ IJSFConstants.ATTR_NAME
+ });
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreLoadBundleSection.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreLoadBundleSection.java
new file mode 100644
index 000000000..9f30bb78e
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreLoadBundleSection.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.sections;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.AttributeGroupSection;
+
+/**
+ * @author mengbo
+ */
+public class JSFCoreLoadBundleSection extends AttributeGroupSection
+{
+ public JSFCoreLoadBundleSection()
+ {
+ super(IJMTConstants.URI_JSF_CORE, IJSFConstants.TAG_LOADBUNDLE,
+ new String[] {
+ IJSFConstants.ATTR_BASENAME,
+ IJSFConstants.ATTR_VAR
+ });
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreParamSection.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreParamSection.java
new file mode 100644
index 000000000..ef6286e6a
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreParamSection.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.sections;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.AttributeGroupSection;
+
+/**
+ * @author mengbo
+ */
+public class JSFCoreParamSection extends AttributeGroupSection
+{
+ public JSFCoreParamSection()
+ {
+ super(IJMTConstants.URI_JSF_CORE, IJSFConstants.TAG_PARAM,
+ new String[] {
+ IJSFConstants.ATTR_ID,
+ IJSFConstants.ATTR_NAME,
+ IJSFConstants.ATTR_VALUE,
+ IJSFConstants.ATTR_BINDING
+ });
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreSelectItemSection.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreSelectItemSection.java
new file mode 100644
index 000000000..874c1cf01
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreSelectItemSection.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.sections;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.AttributeGroupSection;
+
+/**
+ * @author mengbo
+ */
+public class JSFCoreSelectItemSection extends AttributeGroupSection
+{
+ public JSFCoreSelectItemSection()
+ {
+ super(IJMTConstants.URI_JSF_CORE, IJSFConstants.TAG_SELECTITEM,
+ new String[] {
+ IJSFConstants.ATTR_ID,
+ IJSFConstants.ATTR_ITEMLABEL,
+ IJSFConstants.ATTR_ITEMVALUE
+ });
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreSelectItemsSection.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreSelectItemsSection.java
new file mode 100644
index 000000000..35726567d
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreSelectItemsSection.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.sections;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.AttributeGroupSection;
+
+/**
+ * @author mengbo
+ */
+public class JSFCoreSelectItemsSection extends AttributeGroupSection
+{
+ public JSFCoreSelectItemsSection()
+ {
+ super(IJMTConstants.URI_JSF_CORE, IJSFConstants.TAG_SELECTITEMS,
+ new String[] {
+ IJSFConstants.ATTR_ID,
+ IJSFConstants.ATTR_VALUE,
+ IJSFConstants.ATTR_BINDING
+ });
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreSubviewSection.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreSubviewSection.java
new file mode 100644
index 000000000..a1cae4909
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreSubviewSection.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.sections;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.AttributeGroupSection;
+
+/**
+ * @author mengbo
+ */
+public class JSFCoreSubviewSection extends AttributeGroupSection
+{
+ public JSFCoreSubviewSection()
+ {
+ super(IJMTConstants.URI_JSF_CORE, IJSFConstants.TAG_SUBVIEW,
+ new String[] {
+ IJSFConstants.ATTR_ID
+ });
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreValidateDoubleRangeSection.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreValidateDoubleRangeSection.java
new file mode 100644
index 000000000..9219beb20
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreValidateDoubleRangeSection.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.sections;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.AttributeGroupSection;
+
+/**
+ * @author mengbo
+ */
+public class JSFCoreValidateDoubleRangeSection extends AttributeGroupSection
+{
+ public JSFCoreValidateDoubleRangeSection()
+ {
+ super(IJMTConstants.URI_JSF_CORE, IJSFConstants.TAG_VALIDATEDOUBLERANGE,
+ new String[] {
+ IJSFConstants.ATTR_MINIMUM,
+ IJSFConstants.ATTR_MAXIMUM
+ });
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreValidateLengthSection.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreValidateLengthSection.java
new file mode 100644
index 000000000..131619559
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreValidateLengthSection.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.sections;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.AttributeGroupSection;
+
+/**
+ * @author mengbo
+ */
+public class JSFCoreValidateLengthSection extends AttributeGroupSection
+{
+ public JSFCoreValidateLengthSection()
+ {
+ super(IJMTConstants.URI_JSF_CORE, IJSFConstants.TAG_VALIDATELENGTH,
+ new String[] {
+ IJSFConstants.ATTR_MINIMUM,
+ IJSFConstants.ATTR_MAXIMUM
+ });
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreValidateLongRangeSection.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreValidateLongRangeSection.java
new file mode 100644
index 000000000..e253e9afe
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreValidateLongRangeSection.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.sections;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.AttributeGroupSection;
+
+/**
+ * @author mengbo
+ */
+public class JSFCoreValidateLongRangeSection extends AttributeGroupSection
+{
+ public JSFCoreValidateLongRangeSection()
+ {
+ super(IJMTConstants.URI_JSF_CORE, IJSFConstants.TAG_VALIDATELONGRANGE,
+ new String[] {
+ IJSFConstants.ATTR_MINIMUM,
+ IJSFConstants.ATTR_MAXIMUM
+ });
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreValidatorSection.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreValidatorSection.java
new file mode 100644
index 000000000..51c75005f
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreValidatorSection.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.sections;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.AttributeGroupSection;
+
+/**
+ * @author mengbo
+ */
+public class JSFCoreValidatorSection extends AttributeGroupSection
+{
+ public JSFCoreValidatorSection()
+ {
+ super(IJMTConstants.URI_JSF_CORE, IJSFConstants.TAG_VALIDATOR,
+ new String[] {
+ IJSFConstants.ATTR_VALIDATORID
+ });
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreValueChangeListenerSection.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreValueChangeListenerSection.java
new file mode 100644
index 000000000..168ebc125
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreValueChangeListenerSection.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.sections;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.AttributeGroupSection;
+
+/**
+ * @author mengbo
+ */
+public class JSFCoreValueChangeListenerSection extends AttributeGroupSection
+{
+ public JSFCoreValueChangeListenerSection()
+ {
+ super(IJMTConstants.URI_JSF_CORE, IJSFConstants.TAG_VALUECHANGELISTENER,
+ new String[] {
+ IJSFConstants.ATTR_TYPE
+ });
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreVerbatimSection.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreVerbatimSection.java
new file mode 100644
index 000000000..4a6dab6a3
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreVerbatimSection.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.sections;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.AttributeGroupSection;
+
+/**
+ * @author mengbo
+ */
+public class JSFCoreVerbatimSection extends AttributeGroupSection
+{
+ public JSFCoreVerbatimSection()
+ {
+ super(IJMTConstants.URI_JSF_CORE, IJSFConstants.TAG_VERBATIM,
+ new String[] {
+ IJSFConstants.ATTR_ESCAPE
+ });
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreViewSection.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreViewSection.java
new file mode 100644
index 000000000..80b2918b1
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFCoreViewSection.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.sections;
+
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.IJSFConstants;
+import org.eclipse.jst.pagedesigner.properties.attrgroup.AttributeGroupSection;
+
+/**
+ * @author mengbo
+ */
+public class JSFCoreViewSection extends AttributeGroupSection
+{
+ public JSFCoreViewSection()
+ {
+ super(IJMTConstants.URI_JSF_CORE, IJSFConstants.TAG_VIEW,
+ new String[] {
+ IJSFConstants.ATTR_LOCALE
+ });
+ }
+}
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlActionListenerSection.java b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlActionListenerSection.java
new file mode 100644
index 000000000..6cf27a596
--- /dev/null
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner.jsf.ui/src/org/eclipse/jst/pagedesigner/jsf/ui/sections/JSFHtmlActionListenerSection.java
@@ -0,0 +1,308 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Sybase, Inc. 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:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.pagedesigner.jsf.ui.sections;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jst.pagedesigner.IJMTConstants;
+import org.eclipse.jst.pagedesigner.commands.single.AddSubNodeCommand;
+import org.eclipse.jst.pagedesigner.commands.single.RemoveSubNodeCommand;
+import org.eclipse.jst.pagedesigner.properties.BaseCustomSection;
+import org.eclipse.jst.pagedesigner.properties.DesignerPropertyTool;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetPage;
+import org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetWidgetFactory;
+import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * @author mengbo
+ * @version 1.5
+ */
+public class JSFHtmlActionListenerSection extends BaseCustomSection
+{
+ final private static String[] LISTENTYPES = { "Action"};
+
+ private IDOMElement _element;
+ private Table _listenersTable;
+ private TableViewer _listenersViewer;
+ private CCombo _listenTypeCombo;
+ private Button _listenAddButton, _listenRemoveButton;
+
+ private class ListenerCotentLabelProvider implements IStructuredContentProvider, ITableLabelProvider
+ {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ */
+ public Object[] getElements(Object inputElement)
+ {
+ IDOMElement root = _element;
+ List result = new ArrayList();
+
+ NodeList children = root.getChildNodes();
+ for (int i = 0, n = children.getLength(); i < n; i++)
+ {
+ Node child = children.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE)
+ {
+ IDOMElement element = (IDOMElement) child;
+ String nodeName = element.getNodeName();
+ if (nodeName.indexOf("Listener") != -1) //$NON-NLS-1$
+ {
+ result.add(child);
+ }
+ }
+ }
+
+ if (result.isEmpty())
+ {
+ return new Object[0];
+ }
+
+ return result.toArray(new IDOMElement[result.size()]);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
+ {
+ }
+
+ public String getColumnText(Object element, int columnIndex)
+ {
+ String result = null;
+ if (element instanceof IDOMElement)
+ {
+ IDOMElement node = (IDOMElement) element;
+ String nodeName = node.getNodeName();
+ switch (columnIndex)
+ {
+ case 0:
+ result = nodeName;
+ break;
+ default:
+ break;
+ }
+ }
+ return result != null ? result : ""; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+
+ public void dispose()
+ {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+ */
+ public Image getColumnImage(Object element, int columnIndex)
+ {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
+ */
+ public void addListener(ILabelProviderListener listener)
+ {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
+ */
+ public boolean isLabelProperty(Object element, String property)
+ {