3 Replies Latest reply on Apr 13, 2009 7:41 PM by nbelaevski

    InplaceInput usage

      Hi,
      I'm new to RichFaces and JSF in general but I managed to get a seam app going and am learning the usage of various Richfaces components. I can't, however, get the InplaceInput component to work.

      The code:

      <rich:column>
       <f:facet name="header">Buy price</f:facet>
       <rich:inplaceInput layout="block" value="#{rawMaterial.buyPrice}"
       converterMessage="Price value should be integer. Price at row #{row+1} can't be changed."
       id="inplace" required="true"
       requiredMessage="Price at row #{row+1} wasn't filled. Value can't be changed."
       changedHoverClass="hover" viewHoverClass="hover"
       viewClass="inplace" changedClass="inplace"
       selectOnEdit="true" editEvent="ondblclick">
      
       <a4j:support event="onviewactivated" reRender="rawMaterialList, messages" />
      
       </rich:inplaceInput>
      </rich:column>
      


      The page all displays and I am able to edit the values but the values don't get saved to the database. I know for sure that hibernate works because I can add and delete entities from the database. So what am I doing wrong?

      Thanks.

        • 1. Re: InplaceInput usage
          nbelaevski

          Hello,

          How do you save changes?

          • 2. Re: InplaceInput usage

            I was under the impression that a4j would automatically save any changed objects. If that isn't so, could you please give me a link to an actual working example? :)

            • 3. Re: InplaceInput usage
              nbelaevski

               

              "NubKnacker" wrote:
              I was under the impression that a4j would automatically save any changed objects.

              a4j:support behaves in the same way as common h:commandLink. Object properties are updated when request is submitted and that's all that JSF does. Consider saving updated objects explicitly using actions or take a look at JBoss Seam documentation.