Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.5.3
-
Fix Version/s: 1.6
-
Component/s: ICE-Components
-
Labels:None
-
Environment:jdk 1.5.0_11, JBoss 4.0.5, MyFaces
-
Workaround Exists:Yes
-
Workaround Description:Use <redirect/> to reach and leave the page. This, however, requires navigation rules starting from or pointing to *.iface pages, which is frowned upon by the development environment.
Description
Whenever a page containing a dataTable and a rowSelector is reached by a non-redirected navigation rule, the rendering of the rowSelector does not work. Moving the mouse pointer over a row does not activate the mouseOverClass, selecting a row does not activate the selectedClass. The style sheet, which is linked to the destination page, is not linked unless it is also linked to the page of origin.
The reason is, that some of the required JavaScript is only generated, when the whole of the destination page is rendered. Without the <redirect/>, only part of the destinaltion page is rendered, lacking the style sheet link and the JavaScript functions Element..addClassName and Element.removeClassNane
Example:
from index.jspx:
<f:view>
<h:form id="index">
<h:commandButton id="tableBtn" action="table" value="Table"/>
</h:form>
</f:view>
Drom table.jspx
<f:view>
<ice:form id="table" partialSubmit="true">
<h:panelGrid id="alles" columns="3">
<div style="height: 15em; align: right;">
<ice:dataTable id="links"
var="autor"
value="#{table.links}"
rows="#{table.rows}"
border="1"
styleClass="tabelle20"
rowClasses="ungerade gerade">
<ice:column id="nachnameCol">
<ice:rowSelector
value="#{autor.selected}"
selectionListener="#{table.linksSelected}"
selectedClass="ausgewaehlt"
mouseOverClass="maus"/>
<f:facet name="header">
<ice:outputText id="nachnameHead" value="Nachname"/>
</f:facet>
<ice:outputText id="nachnameTxt" value="#{autor.nachname}" />
</ice:column>
<ice:column id="vornameCol">
<f:facet name="header">
<ice:outputText id="vornameHead" value="Vorname"/>
</f:facet>
<ice:outputText id="vornameTxt" value="#{autor.vorname}" />
</ice:column>
</ice:dataTable>
</div>
</h:panelGrid>
</ice:form>
</f:view>
From faces-config.xml:
<navigation-rule>
<display-name>table</display-name>
<navigation-case>
<from-outcome>table</from-outcome>
<to-view-id>/table.iface</to-view-id> <!-- must be .iface, .jspx does not work -->
<redirect/>
</navigation-case> <!-- makes a visible difference, when left out -->
</navigation-rule>
<navigation-rule>
<display-name>zurückVonTable</display-name>
<from-view-id>/table.iface</from-view-id> <!-- must be .iface, .jspx does not work -->
<navigation-case>
<from-outcome>index</from-outcome>
<to-view-id>/index.iface</to-view-id> <!-- must be .iface, .jspx does not work -->
<redirect/> <!-- also required here -->
</navigation-case>
</navigation-rule>
The reason is, that some of the required JavaScript is only generated, when the whole of the destination page is rendered. Without the <redirect/>, only part of the destinaltion page is rendered, lacking the style sheet link and the JavaScript functions Element..addClassName and Element.removeClassNane
Example:
from index.jspx:
<f:view>
<h:form id="index">
<h:commandButton id="tableBtn" action="table" value="Table"/>
</h:form>
</f:view>
Drom table.jspx
<f:view>
<ice:form id="table" partialSubmit="true">
<h:panelGrid id="alles" columns="3">
<div style="height: 15em; align: right;">
<ice:dataTable id="links"
var="autor"
value="#{table.links}"
rows="#{table.rows}"
border="1"
styleClass="tabelle20"
rowClasses="ungerade gerade">
<ice:column id="nachnameCol">
<ice:rowSelector
value="#{autor.selected}"
selectionListener="#{table.linksSelected}"
selectedClass="ausgewaehlt"
mouseOverClass="maus"/>
<f:facet name="header">
<ice:outputText id="nachnameHead" value="Nachname"/>
</f:facet>
<ice:outputText id="nachnameTxt" value="#{autor.nachname}" />
</ice:column>
<ice:column id="vornameCol">
<f:facet name="header">
<ice:outputText id="vornameHead" value="Vorname"/>
</f:facet>
<ice:outputText id="vornameTxt" value="#{autor.vorname}" />
</ice:column>
</ice:dataTable>
</div>
</h:panelGrid>
</ice:form>
</f:view>
From faces-config.xml:
<navigation-rule>
<display-name>table</display-name>
<navigation-case>
<from-outcome>table</from-outcome>
<to-view-id>/table.iface</to-view-id> <!-- must be .iface, .jspx does not work -->
<redirect/>
</navigation-case> <!-- makes a visible difference, when left out -->
</navigation-rule>
<navigation-rule>
<display-name>zurückVonTable</display-name>
<from-view-id>/table.iface</from-view-id> <!-- must be .iface, .jspx does not work -->
<navigation-case>
<from-outcome>index</from-outcome>
<to-view-id>/index.iface</to-view-id> <!-- must be .iface, .jspx does not work -->
<redirect/> <!-- also required here -->
</navigation-case>
</navigation-rule>
The warnimg messages mean something like "unknown property 'filter'. Declaration ignored.