You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by wo...@pta.de on 2008/01/16 11:48:05 UTC

[Trinidad] tr:form/subform issue: form fields not passed




Hi,

BTW Happy New Year to everybody!

Here's an issue I think might be interesting for others as well: The issue
is that in a combination of
facelets 1.1.12(Snapshot), Trinidad 1.2.4 using showDetailItem with
enclosed subforms and an embracing big form
the form fields are not passed.

Here's the code simplified to see the essentials:

There is a layout.xhtml with containing
 <tr:panelAccordion discloseMany="true" discloseNone="false">
  <tr:showDetailItem id="definitionSelectionAreaId"
   text="#{definitionSelectionAreaTitle}"
   rendered="#{definitionSelectionAreaRendered}"
   disclosed="#{definitionSelectionAreaOpen}" >
   <ui:insert name="definitionSelectionArea">
    HERE's a subform
   </ui:insert>
  </tr:showDetailItem>
  <tr:showDetailItem id="dataAreaId" text="#{dataAreaTitle}"
  rendered="#{dataAreaRendered}" disclosed="#{dataAreaOpen}">
   <ui:insert name="dataArea">
                                HERE's another subform
   </ui:insert>
  </tr:showDetailItem>
  <tr:showDetailItem id="detailDataAreaId"  text="#{detailDataAreaTitle}"
  rendered="#{detailDataAreaRendered}" disclosed="#{detailDataAreaOpen}">
       <ui:insert name="detailDataArea">
    AND HERE's yet another one
   </ui:insert>
  </tr:showDetailItem>
 </tr:panelAccordion>

A subform applied in the main page that uses this layout looks like

       <tr:subform id="setFurtherOrderAttributes
              <ui:include src="subform.xhtml"/>
 </tr:subform>

The actual subform.xhtml looks like

<div
   xmlns:ui="http://java.sun.com/jsf/facelets"
   xmlns:h="http://java.sun.com/jsf/html"
   xmlns:f="http://java.sun.com/jsf/core"
   xmlns:tr="http://myfaces.apache.org/trinidad"
   xmlns:trh="http://myfaces.apache.org/trinidad/html"
   >

<trh:tableLayout  borderWidth="0"  width="750">

 <trh:rowLayout>

   <ui:decorate template="/WEB-INF/layout/inputText.xhtml">
     <ui:param name="cellRequired" value="false" />
     <ui:param name="cellLabel" value="Geschaeftsstelle:"/>
     <ui:param name="cellId" value="gst"/>
     <ui:param name="cellValue"
     value="#{auftrag.anldId.n082_AbwickelndeGeschaeftsstelle}" />
/>
     <tr:inputText readOnly="#{readOnlyTest}" simple="true" width="100%"
     showRequired="false" required="#{cellRequired}"
     requiredMessageDetail="" columns="#{cellColumns}"
     maximumLength="#{cellMaxLength}" id="#{cellId}" value="#{cellValue}"
     shortDesc="#{cellShortDesc}" onfocus="storeFocus(this);
     this.style.backgroundColor='#92df55';"
     onblur="this.style.backgroundColor=null;" />
   </ui:decorate>
<!--..and so on.. (do not be surprised as to its redundancy this has been
generated automatically..)-->
</trh:rowLayout>
</trh:tableLayout>

The main page using the layout and the subforms has a command button at its
end

    <tr:commandButton id="auftragFreigeben" rendered="true"
    textAndAccessKey="&amp;1: Freigeben"
    action="#{auftragsController.saveData}" />

The problem concretely is that in the actionListener the old values of the
fields are logged but no changes are
passed.

Could it be that there is an issue with facelets? Any other reason?

Thanks,
Wolfgang.

PTA Programmier-Technische Arbeiten GmbH
Seckenheimer Str. 65-67, 68165 Mannheim
Amtsgericht Mannheim, HRB 1139
USt-IdNr.: DE 143 839 368
Geschäftsführer:
Dipl.-Ing. Peter Fischer
Dr. Harald W. Busch
Dipl.-Kfm. Knut Fischer

**********************************************************************
http://www.pta.de
Mit 1539 Erfahrungsberichten aus 39 Jahren erfolgreicher Projektarbeit!
**********************************************************************

Re: [Trinidad] tr:form/subform issue: form fields not passed

Posted by Matthias Wessendorf <ma...@apache.org>.
is readOnly="#{readOnlyTest}" evaluated as true ?

-M

2008/1/16  <wo...@pta.de>:
>
>
>
>
> Hi,
>
> BTW Happy New Year to everybody!
>
> Here's an issue I think might be interesting for others as well: The issue
> is that in a combination of
> facelets 1.1.12(Snapshot), Trinidad 1.2.4 using showDetailItem with
> enclosed subforms and an embracing big form
> the form fields are not passed.
>
> Here's the code simplified to see the essentials:
>
> There is a layout.xhtml with containing
>  <tr:panelAccordion discloseMany="true" discloseNone="false">
>   <tr:showDetailItem id="definitionSelectionAreaId"
>    text="#{definitionSelectionAreaTitle}"
>    rendered="#{definitionSelectionAreaRendered}"
>    disclosed="#{definitionSelectionAreaOpen}" >
>    <ui:insert name="definitionSelectionArea">
>     HERE's a subform
>    </ui:insert>
>   </tr:showDetailItem>
>   <tr:showDetailItem id="dataAreaId" text="#{dataAreaTitle}"
>   rendered="#{dataAreaRendered}" disclosed="#{dataAreaOpen}">
>    <ui:insert name="dataArea">
>                                 HERE's another subform
>    </ui:insert>
>   </tr:showDetailItem>
>   <tr:showDetailItem id="detailDataAreaId"  text="#{detailDataAreaTitle}"
>   rendered="#{detailDataAreaRendered}" disclosed="#{detailDataAreaOpen}">
>        <ui:insert name="detailDataArea">
>     AND HERE's yet another one
>    </ui:insert>
>   </tr:showDetailItem>
>  </tr:panelAccordion>
>
> A subform applied in the main page that uses this layout looks like
>
>        <tr:subform id="setFurtherOrderAttributes
>               <ui:include src="subform.xhtml"/>
>  </tr:subform>
>
> The actual subform.xhtml looks like
>
> <div
>    xmlns:ui="http://java.sun.com/jsf/facelets"
>    xmlns:h="http://java.sun.com/jsf/html"
>    xmlns:f="http://java.sun.com/jsf/core"
>    xmlns:tr="http://myfaces.apache.org/trinidad"
>    xmlns:trh="http://myfaces.apache.org/trinidad/html"
>    >
>
> <trh:tableLayout  borderWidth="0"  width="750">
>
>  <trh:rowLayout>
>
>    <ui:decorate template="/WEB-INF/layout/inputText.xhtml">
>      <ui:param name="cellRequired" value="false" />
>      <ui:param name="cellLabel" value="Geschaeftsstelle:"/>
>      <ui:param name="cellId" value="gst"/>
>      <ui:param name="cellValue"
>      value="#{auftrag.anldId.n082_AbwickelndeGeschaeftsstelle}" />
> />
>      <tr:inputText readOnly="#{readOnlyTest}" simple="true" width="100%"
>      showRequired="false" required="#{cellRequired}"
>      requiredMessageDetail="" columns="#{cellColumns}"
>      maximumLength="#{cellMaxLength}" id="#{cellId}" value="#{cellValue}"
>      shortDesc="#{cellShortDesc}" onfocus="storeFocus(this);
>      this.style.backgroundColor='#92df55';"
>      onblur="this.style.backgroundColor=null;" />
>    </ui:decorate>
> <!--..and so on.. (do not be surprised as to its redundancy this has been
> generated automatically..)-->
> </trh:rowLayout>
> </trh:tableLayout>
>
> The main page using the layout and the subforms has a command button at its
> end
>
>     <tr:commandButton id="auftragFreigeben" rendered="true"
>     textAndAccessKey="&amp;1: Freigeben"
>     action="#{auftragsController.saveData}" />
>
> The problem concretely is that in the actionListener the old values of the
> fields are logged but no changes are
> passed.
>
> Could it be that there is an issue with facelets? Any other reason?
>
> Thanks,
> Wolfgang.
>
> PTA Programmier-Technische Arbeiten GmbH
> Seckenheimer Str. 65-67, 68165 Mannheim
> Amtsgericht Mannheim, HRB 1139
> USt-IdNr.: DE 143 839 368
> Geschäftsführer:
> Dipl.-Ing. Peter Fischer
> Dr. Harald W. Busch
> Dipl.-Kfm. Knut Fischer
>
> **********************************************************************
> http://www.pta.de
> Mit 1539 Erfahrungsberichten aus 39 Jahren erfolgreicher Projektarbeit!
> **********************************************************************



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org