Re: AjaxUpdateContainer and AjaxAutoComplete together?
Re: AjaxUpdateContainer and AjaxAutoComplete together?
- Subject: Re: AjaxUpdateContainer and AjaxAutoComplete together?
- From: Theodore Petrosky <email@hidden>
- Date: Tue, 28 Aug 2012 06:47:05 -0700 (PDT)
AjaxUpdateTrigger worked just fine alone. I would make that work.
given
<undateContainer1 id = "uc1ID">
<wo:AjaxUpdateTrigger updateContainerIDs = "$updateContainers" />
</undateContainer1>
<undateContainer2 id = "uc2ID">
</undateContainer2>
<undateContainer3 id = "uc3ID">
</undateContainer3>
<undateContainer4 id = "uc4ID">
</undateContainer4>
in the .java
public NSArray<String> updateContainers = new NSArray<String>(new String[] {"uc3ID", "uc4ID"});
if UC1 is updated, so will UC3 and UC4 but not UC2
although this is pseudo code, the concept works. I have an app I can send you if you want.
--- On Mon, 8/27/12, Pascal Robert <email@hidden> wrote:
> From: Pascal Robert <email@hidden>
> Subject: Re: AjaxUpdateContainer and AjaxAutoComplete together?
> To: "Theodore Petrosky" <email@hidden>
> Cc: "WebObjects Development" <email@hidden>
> Date: Monday, August 27, 2012, 11:18 AM
> Hi Ted,
>
> Yes I did try to use AjaxUpdateTrigger but nothing get
> triggered even if my array indeed contains the two
> containers id. Are you using it with AjaxAutoComplete?
>
> > If I read this correctly, you are trying to update two
> containers? did you see: AjaxUpdateTrigger
> >
> > <wo:AjaxObserveField
> updateContainerID="specDescription"
> observeFieldID="specName_field" />
> > <wo:AjaxObserveField
> updateContainerID="specSupplierPartNumber"
> observeFieldID="specName_field" />
> >
> > they are both watching the same observeField
> >
> > AjaxUpdateTrigger is useful if you have multiple
> containers on a page that are controlled by a central parent
> component. AjaxUpdateTrigger allows you to pass in an array
> of containers that need to be updated. An example of this is
> if you have multiple editable areas on a page and only one
> should be in edit mode at a time. If you put an
> AjaxUpdateTrigger inside the edit view, you can set the
> other components to not be in edit mode and trigger all of
> the other update containers to update, reflecting their new
> non-editable status.
> >
> > I have used this one with success.
> >
> > Ted
> >
> > --- On Thu, 8/16/12, Pascal Robert <email@hidden>
> wrote:
> >
> >> From: Pascal Robert <email@hidden>
> >> Subject: Re: AjaxUpdateContainer and
> AjaxAutoComplete together?
> >> To: "Theodore Petrosky" <email@hidden>
> >> Cc: "WebObjects Development" <email@hidden>
> >> Date: Thursday, August 16, 2012, 6:35 AM
> >>
> >> Le 2012-08-16 à 06:12, Theodore Petrosky a écrit
> :
> >>
> >>> Pascal,
> >>>
> >>> shouldn't the id agree:
> >>>
> >>>
> >>>
> >>>> <wo:AjaxAutoComplete id="specName"
> >>>
> >>> <wo:AjaxObserveField
> >> updateContainerID="specDescription"
> >>>> observeFieldID="specName_field" />
> >>>
> >>> I mean you are observing 'specName' not
> >> 'specName_field'
> >>
> >> It's AjaxAutoComplete who added _field itself.
> >>
> >>> or I am not seeing what you are observing
> >>>
> >>> Ted
> >>>
> >>>
> >>> --- On Tue, 8/14/12, Pascal Robert <email@hidden>
> >> wrote:
> >>>
> >>>> From: Pascal Robert <email@hidden>
> >>>> Subject: AjaxUpdateContainer and
> AjaxAutoComplete
> >> together?
> >>>> To: "WebObjects Development" <email@hidden>
> >>>> Date: Tuesday, August 14, 2012, 10:09 AM
> >>>> I'm trying to use AjaxAutoComplete
> >>>> and two AjaxUpdateContainer together, but I
> have
> >> problems
> >>>> doing so. What I want to achieve is that
> when an
> >> item from a
> >>>> list built by AjaxAutoComplete is selected,
> I want
> >> to
> >>>> display two attributes from the selected
> item.
> >> Problem is
> >>>> that I get this:
> >>>>
> >>>> août 14 09:55:27 WARN
> er.ajax.Ajax -
> >> You
> >>>> performed an Ajax update, but no response
> was
> >> generated. A
> >>>> common cause of this is that you spelled
> your
> >>>> updateContainerID wrong. You
> specified a
> >> container ID
> >>>> 'specSupplierPartNumber'.
> >>>>
> >>>> HTML code:
> >>>>
> >>>>
> >> <td>
> >>>>
> >> <span
> >>>> id="simpleComplete">
> >>>>
>
> >>>> <wo:AjaxAutoComplete id="specName"
> >> list="$currentSpecs"
> >>>> value="$specName" item="$specItem"
> >>>> displayString="$specItem.ID"
> >> selection="$specSelection"
> >>>> />
> >>>>
>
> >>>> <wo:AjaxObserveField
> >> updateContainerID="specDescription"
> >>>> observeFieldID="specName_field" />
> >>>>
>
> >>>> <wo:AjaxObserveField
> >>>> updateContainerID="specSupplierPartNumber"
> >>>> observeFieldID="specName_field" />
> >>>>
> >> </span>
> >>>>
> >> </td>
> >>>>
>
> >>>> <td><wo:AjaxUpdateContainer
> >>>> id="specSupplierPartNumber"><wo:str
> >>>>
> value="$specSelection.manufacturerPartNumber"
> >>>>
> /></wo:AjaxUpdateContainer></td>
> >>>>
> >> <td>
> >>>>
>
> >>>> <wo:AjaxUpdateContainer
> >>>> id="specDescription"><wo:str
> >>>> value="$specSelection.description"
> >>>> /></wo:AjaxUpdateContainer>
> >>>>
> >> </td>
> >>>>
> >>>> And I see that two POST requests like this
> are
> >> made:
> >>>>
> >>>> POST
> >>>>
> >>
> /cgi-bin/WebObjects/Alexandria.woa/ajax/tY93dxbCSPWBvr50t7zbbg/3.0.15.5.1?_u=specDescription&1344952527175
> >>>>
> >>>> The setter for specSelection is never
> called. And
> >> yes, it's
> >>>> wrapped in a form.
> >>>>
> _______________________________________________
> >>>> Do not post admin requests to the list.
> They will
> >> be
> >>>> ignored.
> >>>> Webobjects-dev mailing list
> (email@hidden)
> >>>> Help/Unsubscribe/Update your Subscription:
> >>>>
> >>>> This email sent to email@hidden
> >>
> >>
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden