Author: tkuprevich
Date: 2008-05-21 12:01:46 -0400 (Wed, 21 May 2008)
New Revision: 8679
Modified:
trunk/test-applications/jsp/src/main/java/panelBar/PanelBar.java
trunk/test-applications/jsp/src/main/webapp/PanelBar/PanelBar.jsp
trunk/test-applications/jsp/src/main/webapp/PanelBar/PanelBarProperty.jsp
Log:
Modified: trunk/test-applications/jsp/src/main/java/panelBar/PanelBar.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/panelBar/PanelBar.java 2008-05-21 15:56:06
UTC (rev 8678)
+++ trunk/test-applications/jsp/src/main/java/panelBar/PanelBar.java 2008-05-21 16:01:46
UTC (rev 8679)
@@ -1,11 +1,15 @@
package panelBar;
+import javax.faces.context.FacesContext;
import javax.faces.event.ValueChangeEvent;
+import javax.faces.event.ActionEvent;
+import org.richfaces.component.html.HtmlPanelBar;
+import javax.faces.application.Application;
public class PanelBar {
private String width;
-
+ private HtmlPanelBar panelBar;
private String height;
private String contentStyle;
private String style=null;
@@ -26,6 +30,14 @@
//headerStyle=null;
}
+ public void actionListener(ActionEvent e) {
+ //Application application = FacesContext.getCurrentInstance().getApplication();
+ String pId = panelBar.getId();
+ if(pId != null){
+ System.out.println("Binding test passed. PanelBar ID = " + pId);
+ }
+ }
+
public void doStyles()
{
if (getContentStyle() == null) {
@@ -150,4 +162,12 @@
setHeight("400px");
setLabel(new String [] {"Test5", "Test 5", "Test_5",
"Test-5"});
}
+
+ public HtmlPanelBar getPanelBar() {
+ return panelBar;
+ }
+
+ public void setPanelBar(HtmlPanelBar panelBar) {
+ this.panelBar = panelBar;
+ }
}
Modified: trunk/test-applications/jsp/src/main/webapp/PanelBar/PanelBar.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/PanelBar/PanelBar.jsp 2008-05-21 15:56:06
UTC (rev 8678)
+++ trunk/test-applications/jsp/src/main/webapp/PanelBar/PanelBar.jsp 2008-05-21 16:01:46
UTC (rev 8679)
@@ -4,32 +4,43 @@
<%@ taglib
uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="panelBarSubviewID">
- <rich:panelBar id="pBId" height="#{panelBar.height}"
width="#{panelBar.width}" contentClass="#{panelBar.contentStyle}"
- styleClass="#{panelBar.style}" selectedPanel="pBiId4"
onclick="#{event.onclick}" onitemchange="#{event.onitemchange}"
onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}"
onmouseover="#{event.onmouseover}">
- <rich:panelBarItem rendered="#{panelBar.rendered}" id="pBiId1"
label="#{panelBar.label[0]}"
- headerClass="#{panelBar.headerStyle}">
- <h:outputText value="Some text..."></h:outputText>
- <h:outputLink
value="http://www.jboss.com/"><f:verbatim>Link</f:v...
- </rich:panelBarItem>
+ <rich:panelBar binding="#{panelBar.panelBar}" id="pBId"
height="#{panelBar.height}"
+ width="#{panelBar.width}" contentClass="#{panelBar.contentStyle}"
+ styleClass="#{panelBar.style}" selectedPanel="pBiId4"
+
+ onclick="#{event.onclick}" onitemchange="#{event.onitemchange}"
+ onmousemove="#{event.onmousemove}"
onmouseout="#{event.onmouseout}"
+ onmouseover="#{event.onmouseover}">
+ <rich:panelBarItem rendered="#{panelBar.rendered}" id="pBiId1"
+ label="#{panelBar.label[0]}"
headerClass="#{panelBar.headerStyle}">
+ <h:outputText value="Some text..."></h:outputText>
+ <h:outputLink
value="http://www.jboss.com/">
+ <f:verbatim>Link</f:verbatim>
+ </h:outputLink>
+ </rich:panelBarItem>
- <rich:panelBarItem id="pBiId2" label="#{panelBar.label[1]}"
headerClass="#{panelBar.headerStyle}">
- <h:graphicImage value="/pics/masshtaby_01.jpg" width="300"
height="200"></h:graphicImage>
- </rich:panelBarItem>
+ <rich:panelBarItem id="pBiId2" label="#{panelBar.label[1]}"
+ headerClass="#{panelBar.headerStyle}">
+ <h:graphicImage value="/pics/masshtaby_01.jpg" width="300"
+ height="200"></h:graphicImage>
+ </rich:panelBarItem>
- <rich:panelBarItem id="pBiId3" label="#{panelBar.label[2]}"
headerClass="#{panelBar.headerStyle}">
- <f:facet name="openMarker">
- <h:graphicImage
value="/pics/ajax_process.gif"></h:graphicImage>
- </f:facet>
- <f:facet name="closeMarker">
- <h:graphicImage
value="/pics/ajax_stoped.gif"></h:graphicImage>
- </f:facet>
- <h:graphicImage value="/pics/podb109_61.jpg" width="300"
height="200"></h:graphicImage>
- </rich:panelBarItem>
+ <rich:panelBarItem id="pBiId3" label="#{panelBar.label[2]}"
+ headerClass="#{panelBar.headerStyle}">
+ <f:facet name="openMarker">
+ <h:graphicImage
value="/pics/ajax_process.gif"></h:graphicImage>
+ </f:facet>
+ <f:facet name="closeMarker">
+ <h:graphicImage
value="/pics/ajax_stoped.gif"></h:graphicImage>
+ </f:facet>
+ <h:graphicImage value="/pics/podb109_61.jpg" width="300"
height="200"></h:graphicImage>
+ </rich:panelBarItem>
- <rich:panelBarItem id="pBiId4" label="#{panelBar.label[3]}"
headerClass="#{panelBar.headerStyle}">
- <h:outputText value="Select Panel"></h:outputText>
- </rich:panelBarItem>
- </rich:panelBar>
+ <rich:panelBarItem id="pBiId4" label="#{panelBar.label[3]}"
+ headerClass="#{panelBar.headerStyle}">
+ <h:outputText value="Select Panel"></h:outputText>
+ </rich:panelBarItem>
+ </rich:panelBar>
- <rich:spacer height="20px"></rich:spacer>
+ <rich:spacer height="20px"></rich:spacer>
</f:subview>
Modified: trunk/test-applications/jsp/src/main/webapp/PanelBar/PanelBarProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/PanelBar/PanelBarProperty.jsp 2008-05-21
15:56:06 UTC (rev 8678)
+++ trunk/test-applications/jsp/src/main/webapp/PanelBar/PanelBarProperty.jsp 2008-05-21
16:01:46 UTC (rev 8679)
@@ -27,5 +27,8 @@
<h:outputText value="Switch Styles:" />
<h:commandButton action="#{panelBar.doStyles}"
value="#{panelBar.btnLabel}" />
+
+ <h:outputText value="Binding test:" />
+ <a4j:commandButton value="Go"
actionListener="#{panelBar.actionListener}"></a4j:commandButton>
</h:panelGrid>
</f:subview>
\ No newline at end of file