Author: abelevich
Date: 2007-06-13 12:27:58 -0400 (Wed, 13 Jun 2007)
New Revision: 1164
Modified:
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml
Log:
Modified:
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml
===================================================================
---
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml 2007-06-13
16:27:48 UTC (rev 1163)
+++
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml 2007-06-13
16:27:58 UTC (rev 1164)
@@ -8,32 +8,23 @@
<head>
-
- <script>
- //<![CDATA[
-
- function processCellValue(cell, value) {
- var cell = $(cell);
- if(cell) {
- if(value && value.indexOf("2")>0) {
- cell.setStyle({backgroundColor: "red"});
- }
- else {
- cell.setStyle({backgroundColor: ""});
- }
- }
- }
-
- function onSort(column, order) {
- alert("Column " + column + " sorted in " + order + "
order.");
- }
- //]]>
-
- </script>
+ <style type="text/css">
+ .inputStyle{
+ font-family:arial;
+ font-size:6pt;
+ font-size-adjust:none;
+ font-stretch:normal;
+ font-style:normal;
+ font-variant:normal;
+ font-weight:normal;
+ line-height:normal;
+ }
+ </style>
</head>
+
<body>
- <f:view>
+ <f:view>
<h:form>
<sg:scrollable-grid value="#{dataModel2}"
@@ -51,92 +42,137 @@
</f:facet>
<sg:column width="100px" sortable="false">
+
<f:facet name="header">
- <h:outputText value="Index"></h:outputText>
+ <h:outputText value="Index"></h:outputText>
</f:facet>
+
<h:outputText value="#{issues.index}"></h:outputText>
+
<f:facet name="footer">
<h:outputText value="footer0"></h:outputText>
</f:facet>
+
</sg:column>
<sg:column width="200px">
+
<f:facet name="header">
<h:outputText value="Key"></h:outputText>
</f:facet>
- <h:outputText value="#{issues.key.value}"></h:outputText>
+
+ <h:outputText value="#{issues.key.value}"></h:outputText>
+
<f:facet name="footer">
<h:outputText value="footer1"></h:outputText>
</f:facet>
+
</sg:column>
<sg:column width="200px">
+
<f:facet name="header">
<h:outputText value="Summary"></h:outputText>
</f:facet>
- <h:outputText value="#{issues.summary}"></h:outputText>
- <f:facet name="footer">
+
+ <h:inputText value="#{issues.summary}" style="width: 200px"
styleClass="inputStyle"></h:inputText>
+
+ <f:facet name="footer">
<h:outputText value="footer2"></h:outputText>
</f:facet>
+
</sg:column>
<sg:column width="200px">
+
<f:facet name="header">
<h:outputText value="Assignee"></h:outputText>
</f:facet>
- <h:outputText
value="#{issues.assignee.name}"></h:outputText>
+
+ <h:inputText value="#{issues.assignee}"
converter="#{jiraUserConverter}"
styleClass="inputStyle"></h:inputText>
+
<f:facet name="footer">
<h:outputText value="footer3"></h:outputText>
</f:facet>
+
</sg:column>
<sg:column width="200px">
+
<f:facet name="header">
- <h:outputText value="Status"></h:outputText>
+ <h:outputText value="Status"></h:outputText>
</f:facet>
- <h:outputText
value="#{issues.status.name}"></h:outputText>
- <f:facet name="footer">
+
+ <h:selectOneMenu id="select_status"
value="#{issues.status}" converter="#{StatusConverter}"
styleClass="inputStyle">
+ <f:selectItem itemValue="#{status_open}"
itemLabel="Open"/>
+ <f:selectItem itemValue="#{status_closed}"
itemLabel="Closed"/>
+ <f:selectItem itemValue="#{status_resolved}"
itemLabel="Resolved"/>
+ <f:selectItem itemValue="#{status_inprogress}" itemLabel="In
Progress"/>
+ <f:selectItem itemValue="#{status_reopened}"
itemLabel="Reopened"/>
+ </h:selectOneMenu>
+
+ <f:facet name="footer">
<h:outputText value="footer4"></h:outputText>
</f:facet>
+
</sg:column>
<sg:column width="200px">
+
<f:facet name="header">
<h:outputText value="Reporter"></h:outputText>
</f:facet>
- <h:outputText
value="#{issues.reporter.username}"></h:outputText>
+
+ <h:outputText
value="#{issues.reporter.username}"></h:outputText>
+
<f:facet name="footer">
<h:outputText value="footer5"></h:outputText>
</f:facet>
+
</sg:column>
<sg:column width="200px">
+
<f:facet name="header">
<h:outputText value="Priority"></h:outputText>
</f:facet>
- <h:outputText
value="#{issues.priority.name}"></h:outputText>
+
+ <h:selectOneMenu id="select_priority"
value="#{issues.priority}" converter="#{PriorityConverter}"
styleClass="inputStyle">
+ <f:selectItem itemValue="#{priority_blocker}"
itemLabel="Blocker"/>
+ <f:selectItem itemValue="#{priority_critical}"
itemLabel="Critical"/>
+ <f:selectItem itemValue="#{priority_major}"
itemLabel="Major"/>
+ <f:selectItem itemValue="#{priority_minor}"
itemLabel="Minor"/>
+ <f:selectItem itemValue="#{priority_cosmetic}"
itemLabel="Cosmetic"/>
+ </h:selectOneMenu>
+
<f:facet name="footer">
<h:outputText value="footer6"></h:outputText>
</f:facet>
+
</sg:column>
<sg:column width="200px">
+
<f:facet name="header">
<h:outputText value="Resolution"></h:outputText>
</f:facet>
- <h:outputText value="#{issues.resolution}"></h:outputText>
+
+ <h:inputText value="#{issues.resolution}"
styleClass="inputStyle"></h:inputText>
+
<f:facet name="footer">
<h:outputText value="footer8"></h:outputText>
</f:facet>
+
</sg:column>
</sg:scrollable-grid>
+ <h:commandButton value="submit"></h:commandButton>
-
-
-
- </h:form>
+ </h:form>
+ <a4j:outputPanel ajaxRendered="true">
+ <h:messages showDetail="true"/>
+ </a4j:outputPanel>
</f:view>
</body>
</html>
\ No newline at end of file