Vielleicht kann mir ja hier jemand helfen.
Habe es schon im JBoss-Forum versucht zu klären, aber da komme ich nicht weiter.
Laut nbelaevski sieht der Code ok aus, und ich weiß echt nich, wo das Problem liegt.
Das Ganze läuft darauf hinaus, dass ich eine Seite mit tabPanel erstellt hab und in den Panels sollen dataTables incl Inhalt angezeigt werden, tun sie aber nicht, lediglich die hardeingecodeten Zahlen werden in einer Reihe fortlaufend angezeigt.
Hier die reiter.xhtml:
die MyReports.xhtml:
die Administration.xhtml:
die web.xml:
[HIGHLIGHT="xml"]<?xml version="1.0"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>****-UI</display-name>
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>#{SkinBean.skin}</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>richfaces</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<context-param>
<param-name>org.richfaces.CONTROL_SKINNING</param-name>
<param-value>enable</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>facelets.REFRESH_PERIOD</param-name>
<param-value>2</param-value>
</context-param>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.verifyObjects</param-name>
<param-value>true</param-value>
</context-param>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
</web-app> [/HIGHLIGHT]
und die faces-config.xml:
[HIGHLIGHT="xml"]<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
<managed-bean>
<managed-bean-name>UserBean</managed-bean-name>
<managed-bean-class>beans.UserBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>SkinBean</managed-bean-name>
<managed-bean-class>beans.SkinBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>skin</property-name>
<value>emeraldTown</value>
</managed-property>
</managed-bean>
<navigation-rule>
<from-view-id>/mainpage/goodbye.xhtml</from-view-id>
<navigation-case>
<from-action>#{UserBean.BackToLogIn}</from-action>
<from-outcome>back</from-outcome>
<to-view-id>/login.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/mainpage/reiter.xhtml</from-view-id>
<navigation-case>
<from-action>#{UserBean.LogOut}</from-action>
<from-outcome>bye</from-outcome>
<to-view-id>/mainpage/goodbye.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/login.xhtml</from-view-id>
<navigation-case>
<from-action>#{UserBean.CheckValidUser}</from-action>
<from-outcome>success</from-outcome>
<to-view-id>/mainpage/reiter.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-action>#{UserBean.CheckValidUser}</from-action>
<from-outcome>fail</from-outcome>
<to-view-id>/mainpage/loginfailed.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/mainpage/loginfailed.xhtml</from-view-id>
<navigation-case>
<from-action>#{UserBean.CheckValidUser}</from-action>
<from-outcome>success</from-outcome>
<to-view-id>/mainpage/reiter.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-action>#{UserBean.CheckValidUser}</from-action>
<from-outcome>fail</from-outcome>
<to-view-id>/mainpage/loginfailed.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
[/HIGHLIGHT]
Als Application Server nutze ich den Glassfish v2, der auch keine Fehlermeldung ausgibt, der Logout-Button funktioniert auch soweit und ich habe sämtliche bibliotheken aus der Livedemo von Exadel eingebunden (das war der letzte Tip aus dem JBoss-Forum).
Wenn jemand eine erleuchtende Idee hat, wäre ich sehr verbunden!
Habe es schon im JBoss-Forum versucht zu klären, aber da komme ich nicht weiter.
Laut nbelaevski sieht der Code ok aus, und ich weiß echt nich, wo das Problem liegt.
Das Ganze läuft darauf hinaus, dass ich eine Seite mit tabPanel erstellt hab und in den Panels sollen dataTables incl Inhalt angezeigt werden, tun sie aber nicht, lediglich die hardeingecodeten Zahlen werden in einer Reihe fortlaufend angezeigt.
Hier die reiter.xhtml:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:x="http://java.sun.com/jsp/jstl/xml"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
xmlns:sql="http://java.sun.com/jsp/jstl/sql">
<h:form><h:graphicImage value="/pic/pum_tech_green.jpg" style="height:30%;"/></h:form>
<h:form>
<a4j:commandButton value="Logout" style="text-align : center; width : 53px;">
<a4j:support disableDefault="true" event="onclick"
action="#{UserBean.LogOut}"/>
</a4j:commandButton>
</h:form>
<rich:panel style="text-align:center;">
<f:facet name="header">
<h:outputText value="****** Business Intelligence" >
</h:outputText>
</f:facet>
<rich:tabPanel switchType="client">
<rich:tab label="MyReports" id="reports" rendered="true">
<rich:panel>
<rich:insert src="/mainpage/MyReports.xhtml"/>
</rich:panel>
</rich:tab>
<rich:tab label="MySettings" disabled="true" id="settings">
<rich:insert src="/mainpage/MySettings.xhtml"/>
</rich:tab>
<rich:tab label="Administration" id="admin">
<rich:insert src="/mainpage/Administration.xhtml"/>
</rich:tab>
</rich:tabPanel>
</rich:panel>
<h:form style="text-align:center;">
copyright by ****** Technologies AG, All rights reserved.
</h:form>
</ui:composition>
die MyReports.xhtml:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:x="http://java.sun.com/jsp/jstl/xml"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
xmlns:sql="http://java.sun.com/jsp/jstl/sql">
1
<rich:dataTable>3
<rich:column style="weight:80px">4
<h:outputText value="reporting status:"/>5
<a4j:status id="commonstatus" startText="In progress..." stopText="Complete"/>
<rich:spacer height="5" />6
<a4j:form>
<a4j:commandButton value="Ok" style="text-align : center; width : 100px;"
eventsQueue="foo2">
<a4j:support disableDefault="true" event="onclick"
action="reRender"/>
</a4j:commandButton>
7</a4j:form>
</rich:column>8
<rich:column>9
<rich:comboBox selectFirstOnUpdate="false"
defaultLabel="select your report">
<f:selectItems value="#{ReportBean.report}" />10
</rich:comboBox>11
</rich:column>12
</rich:dataTable>13
<rich:dataTable style=" width : 100%;">14
<rich:column style="width:20%;">15
<rich:comboBox selectFirstOnUpdate="false"
defaultLabel="select your font size">16
<f:selectItems value=""/><!-- TODO implement font sizes -->
</rich:comboBox>17
</rich:column>18
<rich:column style="width:80%;">19
</rich:column>20
</rich:dataTable>21
<rich:dataTable>22
<rich:column style="width:20%;">23
<rich:comboBox id="select" value="#{skinBean.skin}" onchange="submit()">
<f:selectItem itemLabel="plain" itemValue="plain" />
<f:selectItem itemLabel="emeraldTown" itemValue="emeraldTown" />
<f:selectItem itemLabel="blueSky" itemValue="blueSky" />
<f:selectItem itemLabel="wine" itemValue="wine" />
<f:selectItem itemLabel="japanCherry" itemValue="japanCherry" />
<f:selectItem itemLabel="ruby" itemValue="ruby" />
<f:selectItem itemLabel="classic" itemValue="classic" />
<f:selectItem itemLabel="laguna" itemValue="laguna" />
<f:selectItem itemLabel="deepMarine" itemValue="deepMarine" />
</rich:comboBox>24
</rich:column>25
<rich:column style="width:80%;">26
<h:outputText></h:outputText>27
</rich:column>28
</rich:dataTable>29
</ui:composition>
die Administration.xhtml:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:x="http://java.sun.com/jsp/jstl/xml"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
xmlns:sql="http://java.sun.com/jsp/jstl/sql">
<f:facet name ="navigation">
<rich:dataTable>2
<rich:column>3
<rich:comboBox selectFirstOnUpdate="false"
defaultLabel="select your Datasource">4
<f:selectItems value="#{DataSourcesBean.dataSources}" />5
</rich:comboBox>6
<rich:comboBox selectFirstOnUpdate="false"
defaultLabel="select your reporter config">7
<f:selectItems value="#{ReporterConfigBean.reporterconfig}" />8
</rich:comboBox>9
</rich:column>10
<rich:column>11
<h:outputText value = "#{DataSourcesBean.dataSources} ||
#{ReporterConfigBean.reporterconfig}"></h:outputText>
12
</rich:column>13
</rich:dataTable>14
</f:facet>
</ui:composition>
die web.xml:
[HIGHLIGHT="xml"]<?xml version="1.0"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>****-UI</display-name>
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>#{SkinBean.skin}</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>richfaces</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<context-param>
<param-name>org.richfaces.CONTROL_SKINNING</param-name>
<param-value>enable</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>facelets.REFRESH_PERIOD</param-name>
<param-value>2</param-value>
</context-param>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.verifyObjects</param-name>
<param-value>true</param-value>
</context-param>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
</web-app> [/HIGHLIGHT]
und die faces-config.xml:
[HIGHLIGHT="xml"]<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
<managed-bean>
<managed-bean-name>UserBean</managed-bean-name>
<managed-bean-class>beans.UserBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>SkinBean</managed-bean-name>
<managed-bean-class>beans.SkinBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>skin</property-name>
<value>emeraldTown</value>
</managed-property>
</managed-bean>
<navigation-rule>
<from-view-id>/mainpage/goodbye.xhtml</from-view-id>
<navigation-case>
<from-action>#{UserBean.BackToLogIn}</from-action>
<from-outcome>back</from-outcome>
<to-view-id>/login.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/mainpage/reiter.xhtml</from-view-id>
<navigation-case>
<from-action>#{UserBean.LogOut}</from-action>
<from-outcome>bye</from-outcome>
<to-view-id>/mainpage/goodbye.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/login.xhtml</from-view-id>
<navigation-case>
<from-action>#{UserBean.CheckValidUser}</from-action>
<from-outcome>success</from-outcome>
<to-view-id>/mainpage/reiter.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-action>#{UserBean.CheckValidUser}</from-action>
<from-outcome>fail</from-outcome>
<to-view-id>/mainpage/loginfailed.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/mainpage/loginfailed.xhtml</from-view-id>
<navigation-case>
<from-action>#{UserBean.CheckValidUser}</from-action>
<from-outcome>success</from-outcome>
<to-view-id>/mainpage/reiter.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-action>#{UserBean.CheckValidUser}</from-action>
<from-outcome>fail</from-outcome>
<to-view-id>/mainpage/loginfailed.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
[/HIGHLIGHT]
Als Application Server nutze ich den Glassfish v2, der auch keine Fehlermeldung ausgibt, der Logout-Button funktioniert auch soweit und ich habe sämtliche bibliotheken aus der Livedemo von Exadel eingebunden (das war der letzte Tip aus dem JBoss-Forum).
Wenn jemand eine erleuchtende Idee hat, wäre ich sehr verbunden!
Zuletzt bearbeitet von einem Moderator: