summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-03-05 02:28:52 (EST)
committer Manik Kishore2012-06-19 07:19:05 (EDT)
commit95c3a67563cc5279db4827ddbdb708dfaac90fcf (patch)
tree664b53846670b6d2caa7fd6e1b143b47d930757e
parent1bb12c917a56bb59a18f483c9ccfa3aecf5cfca3 (diff)
downloadorg.eclipse.stardust.ui.web-95c3a67563cc5279db4827ddbdb708dfaac90fcf.zip
org.eclipse.stardust.ui.web-95c3a67563cc5279db4827ddbdb708dfaac90fcf.tar.gz
org.eclipse.stardust.ui.web-95c3a67563cc5279db4827ddbdb708dfaac90fcf.tar.bz2
Jira-ID: CRNT-24009
1)Added searchCriticality() method in CriticalityAutocompleteSelector.java and moved code from searchValueChanged(event). git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@54289 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/common/criticality/CriticalityAutocompleteSelector.java39
-rw-r--r--views-common/src/main/resources/META-INF/xhtml/criticality/criticalityAutocompleteSingleSelector.xhtml2
2 files changed, 29 insertions, 12 deletions
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/common/criticality/CriticalityAutocompleteSelector.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/common/criticality/CriticalityAutocompleteSelector.java
index 8930adf..9ff60bc 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/common/criticality/CriticalityAutocompleteSelector.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/common/criticality/CriticalityAutocompleteSelector.java
@@ -45,7 +45,8 @@ public class CriticalityAutocompleteSelector extends AutocompleteMultiSelector<C
protected boolean showAutocompletePanel;
protected boolean showSelectedList;
-
+ private SelectInputText autoComplete;
+
/**
* @param provider
* @param autoCompleteListner
@@ -117,17 +118,9 @@ public class CriticalityAutocompleteSelector extends AutocompleteMultiSelector<C
{
if (event.getComponent() instanceof SelectInputText)
{
- SelectInputText autoComplete = (SelectInputText) event.getComponent();
+ autoComplete = (SelectInputText) event.getComponent();
selectedItem = autoComplete.getSelectedItem();
- if (selectedItem != null)
- {
- autoComplete.setValue(selectedItem.getLabel());
- if (autocompleteSelectorListener != null)
- {
- autocompleteSelectorListener.actionPerformed(autoComplete, selectedItem);
- }
- }
- else
+ if (selectedItem == null)
{
String newWord = (String) event.getNewValue();
newWord = newWord.trim();
@@ -150,6 +143,25 @@ public class CriticalityAutocompleteSelector extends AutocompleteMultiSelector<C
}
/**
+ * Action method called on selection of Criticality
+ */
+ public void searchCriticality()
+ {
+ if (null != autoComplete)
+ {
+ selectedItem = autoComplete.getSelectedItem();
+ if (selectedItem != null)
+ {
+ autoComplete.setValue(selectedItem.getLabel());
+ if (autocompleteSelectorListener != null)
+ {
+ autocompleteSelectorListener.actionPerformed(autoComplete, selectedItem);
+ }
+ }
+ }
+ }
+
+ /**
* @param criticality
*/
public void removeCriticality(CriticalityAutocompleteItem criticality)
@@ -236,6 +248,11 @@ public class CriticalityAutocompleteSelector extends AutocompleteMultiSelector<C
this.showSelectedList = showSelectedList;
}
+ public SelectInputText getAutoComplete()
+ {
+ return autoComplete;
+ }
+
/**
*
*/
diff --git a/views-common/src/main/resources/META-INF/xhtml/criticality/criticalityAutocompleteSingleSelector.xhtml b/views-common/src/main/resources/META-INF/xhtml/criticality/criticalityAutocompleteSingleSelector.xhtml
index 7c7bc06..3484733 100644
--- a/views-common/src/main/resources/META-INF/xhtml/criticality/criticalityAutocompleteSingleSelector.xhtml
+++ b/views-common/src/main/resources/META-INF/xhtml/criticality/criticalityAutocompleteSingleSelector.xhtml
@@ -17,7 +17,7 @@
valueChangeListener="#{component.searchValueChanged}"
disabled="#{component.disabled}" partialSubmit="false" width="95%"
listVar="criticality" listValue="#{component.matchingData}"
- style="margin: 0px 0px 9px 2px;">
+ style="margin: 0px 0px 9px 2px;" action="#{component.searchCriticality}">
<f:facet name="selectInputText">
<ice:panelGrid columns="2">
<ice:outputText value="#{criticality.label}" escape="false"