Andrew Robinson wrote:
I think I know your problem. It is a phase issue

I'll take your word for it, but I guess the only thing I could do to try and trace it through was to set a breakpoint in the decode method and step through everything.

and why value change listeners (VCL) suck in JSF (really bad architecture)

Is there a better option? Even combos fire value changes.


The VCL architecture sucks as it is not transaction aware, and the events fired in the validation doesn't mean that the update will ever be done (so the new value may never become the actual value). Also, when the VCL is invoked, the model is not updated, so you can't trust values from the model layer (beans) since they may have pending changes.

I haven't tried it, but add a <tr:subform> around each input. This should only validate & update the value that has changed instead of the entire form.
Didn't work. I'm using

 <h:column>
       <tr:subform>
           <tr:inputText

and similar for the inputDate

One curious thing about this layout is that it can no longer find partial triggers fields when a normal name is specified for partialTriggers.

Feb 8, 2008 5:12:16 PM org.apache.myfaces.trinidadinternal.context.RequestContextImpl addPartialTriggerListeners WARNING: Could not find partial trigger finalMarkField from CoreInputDate[UIXEditableFacesBeanImpl, id=_idJsp14]

I tried the preceding colons as well (4 of them this time because of the additional nesting), but no luck there either.

Surely I'm not the first person to try to use PPR/ValueChange on an editable table am I?


On Feb 8, 2008 1:14 PM, Shane Petroff <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Andrew Robinson wrote:

    What trinidad build are you using?

    Trinidad 1.0.5,
    MyFaces Core 1.1.5



    colons should not be necessary for components in the same naming
    container.

    Tried with and without. Using the colons clearly does not work
    because it issues the warning:

    WARNING: Could not find partial trigger :::finalMarkField from
    CoreInputDate[UIXEditableFacesBeanImpl, id=_idJsp12]

    With no preceding colons there is no warning generated, but the
    field is never refreshed either. The value change method is below,
    as is a stripped down jsp. I can see the value change being fired,
    but where would I even set a breakpoint to tell if anything is
    happening on the partialTriggers side?




        public void finalMarkChanged( ValueChangeEvent event )
        {
            StudentSection ss = (StudentSection) m_Table.getRowData();
            ss.setWithdrawalDate(new Date()); // I'm assuming that
    this instance is still around to refresh the field from

            System.out.println( "finalMarkChanged for " +
    ss.getStudentName() + " " + ss.getWithdrawalDate() );
        }


    <f:view>

    <tr:document title="#{bundle.ClassListHeader}">


    <body class="page-background">

    <h:form>

      <h:panelGrid headerClass="page-header" styleClass="panel"
                   columns="1" cellpadding="5">

        <h:messages showDetail="true" showSummary="false"
    styleClass="errors"/>

        <h:dataTable styleClass="dataTable"
                     rowClasses="list-row-even,list-row-odd"
    cellpadding="4" border="0"
                     headerClass="list-header"
                     cellspacing="0"
                     value="#{classListBean.studentSections}"
                     var="studentSec"
                     binding="#{classListBean.table}">

          <h:column>
            <f:facet name="header">
              <h:commandLink styleClass="table-header" id="studentDesc"
                             actionListener="#{classListBean.sort}">
                <h:outputText value="#{bundle.StudentColHeader}"/>
              </h:commandLink>
            </f:facet>
            <h:outputText value="#{studentSec.studentName}"/>
          </h:column>

          <h:column>
            <f:facet name="header">
                <h:outputText
    value="#{bundle.ClassListFinalMarkHeader}" styleClass="label"/>
            </f:facet>
            <tr:inputText id="finalMarkField"
                          columns="5"
                          value="#{studentSec.finalMark}"
                          autoSubmit="true"
valueChangeListener="#{classListBean.finalMarkChanged}"/>
          </h:column>

          <h:column>
            <f:facet name="header">
                <h:outputText
    value="#{bundle.ClassListWithdrawalDateHeader}" styleClass="label"/>
            </f:facet>
            <tr:inputDate columns="11"

                          partialTriggers=":::finalMarkField"
                          value="#{studentSec.withdrawalDate}"
                          required="false" >
                <f:convertDateTime pattern="dd-MMM-yyyy"
    timeZone="#{configBundle.TimeZone}"/>
            </tr:inputDate>
          </h:column>

        </h:dataTable>

      </h:panelGrid>

    </h:form>

    </body>

    </tr:document>

    </f:view>




    On Feb 8, 2008 10:31 AM, Shane Petroff <[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>> wrote:

        Matthias Wessendorf wrote:
        > ah,
        > I just noticed, that "finalMarkField" is inside a table
        (naming container).
        > haven't read your code carefully, sorry.
        >
        > can you *try* partialTriggers=":::finalMarkField" ?
        >

        No joy... cleared the browser cache first, then dumped
        tomcat's cache,
        did a full build and restarted the server. I also tried ::
        and ::::
        variants (3 does appear to be the correct number though based
        on the
        generated html), but still no partial triggers refresh. Would
        it be more
        likely to work if I switched to a tr:table?

        --
        Shane


-- Shane




--
Shane

Reply via email to