It should work but... I had some issues regarding the table updates.

What is the scope of 'wprolelist' ?

In some cases I had to use the following method to 'force' the update, since
the value attribute hasn't changed really changed (the list continues the
same).


    private void updateTableValue(RequestContext requestContext, UIComponent
viewRoot, String id, Object value)
    {
        UIComponent component =
ComponentUtils.findRelativeComponent(viewRoot, id);
        if(component instanceof UIXIterator)//just in case the view was
changed
        {
            ((UIXIterator) component).setValue(value);
        }
    }

But I think it is a hack... :-)

Cheers,

Walter Mourão
http://waltermourao.com.br
http://arcadian.com.br
http://oriens.com.br



On Tue, Apr 26, 2011 at 3:31 PM, Catherine Rocchio <crocc...@comcast.net>wrote:

> Hi there,
>
>
>
> I am trying to achieve a Partial Submit update of a Trinidad Table upon
> submit of a Command Button (called "Add Row").  The bean behind the table
> is
> definitely getting updated because when I do an overall page refresh, I see
> my new rows getting added - but I can't seem to get the table to refresh on
> its own with the partialTriggers on it.
>
>
>
> So.. I guess my question is - should something like this work?  Or.. do
> tables need to be programmatically poked for partial submits?  This seems
> pretty basic - but - it just isn't working for me.  I guess I will feel
> better if I know it SHOULD work - and I will keep trying.
>
>
>
> I am using Trinidad 2 and Myfaces 2.
>
>
>
> Sorry!!!!
>
>
>
> Thanks for help!
>
> Catherine
>
>
>
> <tr:commandButton text="Add" partialSubmit="true" id="test"
> actionListener="#{createworkplan.addAction}"  />
>
>
>
> My addAction is just boring - but adds a row to a vector which is behind
> the
> table.
>
>
>
>      public void addAction(ActionEvent event) {
>
>
>
>                  wprolelist.add(new RoleList("test person", "True",
> "True", "True"));
>
> }
>
>
>
> And my table has the specification of the partialTrigger.
>
> <tr:table id="workplanroleprivs" rowSelection="single"
> value="#{createworkplan.wprolelist}" var="row" width = "800"
>
> styleClass="order-table"
>
> partialTriggers="::test"
>
> headerClass="order-table-header"
>
> rowClasses="order-table-odd-row,order-table-even-row"
>
> >
>
>
>
>
>
>
>
>

Reply via email to