users@jsf-extensions.java.net

Dynafaces in a table

From: Ramon Casha <ramon.casha_at_megabyte.net>
Date: Mon, 07 Jul 2008 15:54:59 +0200

I'm trying to use dynamic faces to update components in a table.

The table contains a dropdown list, and I'm trying to update another
component on the same row based on the selected value in the dropdown.
However it seems the events are not being invoked at all. No JS error
messages appear.

I'm using NB 6.1 with VWP / Dynafaces

Here's the JSP code. The Java class is pretty empty so far - the
valueChanged method doesn't get invoked.

Can anyone help?

Ramon Casha




<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
    xmlns:jsfExt="http://java.sun.com/jsf/extensions/dynafaces"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
    <jsp:directive.page contentType="text/html;charset=UTF-8"
pageEncoding="UTF-8"/>
    <f:view>
        <webuijsf:page id="page1">
            <webuijsf:html id="html1">
                <webuijsf:head id="head1">
                    <webuijsf:link id="link1"
url="/resources/stylesheet.css"/>
                </webuijsf:head>
                <webuijsf:body id="body1" style="-rave-layout: flow">
                    <webuijsf:form id="form1">
                        <jsfExt:ajaxZone eventType="onchange"
id="zone1">
                            <webuijsf:table augmentTitle="false"
id="table1" title="Temp">
                                <webuijsf:tableRowGroup
binding="#{Page1.tableRowGroup1}" id="tableRowGroup1" rows="10"
sourceData="#{SessionBean1.testds}" sourceVar="currentRow">
                                    <webuijsf:tableColumn
headerText="locale" id="tableColumn1">
                                        <webuijsf:dropDown
binding="#{Page1.fldLocale}" converter="#{Page1.fldLocaleConverter}"
id="fldLocale"

items="#{ApplicationBean1.locales}"
selected="#{currentRow.value['locale']}"
valueChangeListenerExpression="#{Page1.onLocaleChange}"/>
                                    </webuijsf:tableColumn>
                                    <webuijsf:tableColumn
headerText="name" id="tableColumn2" sort="name">
                                        <webuijsf:textField
id="textField1" text="#{currentRow.value['name']}"/>
                                    </webuijsf:tableColumn>
                                    <webuijsf:tableColumn
headerText="description" id="tableColumn3" sort="description">
                                        <webuijsf:textField
id="textField2" text="#{currentRow.value['description']}"/>
                                    </webuijsf:tableColumn>
                                    <webuijsf:tableColumn
headerText="country" id="tableColumn4" sort="country">
                                        <webuijsf:textField
binding="#{Page1.fldCountry}" id="fldCountry"
text="#{currentRow.value['country']}"/>
                                    </webuijsf:tableColumn>
                                    <webuijsf:tableColumn
headerText="ISO3" id="tableColumn5" sort="ISO3">
                                        <webuijsf:staticText id="fldISO"
text="#{currentRow.value['ISO3']}"/>
                                    </webuijsf:tableColumn>
                                </webuijsf:tableRowGroup>
                            </webuijsf:table>
                        </jsfExt:ajaxZone>
                        <webuijsf:button
actionExpression="#{Page1.button1_action}" id="button1" text="Button"/>
                    </webuijsf:form>
                </webuijsf:body>
            </webuijsf:html>
        </webuijsf:page>
    </f:view>
</jsp:root>

DISCLAIMER
----------------------

The information contained in this electronic mail may be confidential or legally privileged. It is for the intended recipient(s) only. Should you receive this message in error, please notify the sender by replying to this mail. Unauthorised use of the contents is strictly prohibited. Whilst all care has been taken, the Megabyte Group is not responsible for the integrity of the contents of this electronic mail and any attachments included within.