Hello

I do this
               <s:inputSuggestAjax
       id="orderNumbersFilter"
       suggestedItemsMethod="#{pagedDeliveryScheduleSort.findOrderNumbers}"
       value="#{ pagedDeliveryScheduleSort.suggestOrderNumber}" >
       <s:submitOnEvent for="submitLink" event="change" />
  </s:inputSuggestAjax>

  <h:commandButton id="submitLink" style="display:none" />

And is not ok yet

2007/3/28, Mike Kienenberger <[EMAIL PROTECTED]>:

I would try this instead:

    <s:inputSuggestAjax
         id="orderNumbersFilter"
         suggestedItemsMethod="#{
pagedDeliveryScheduleSort.findOrderNumbers}"
         value="#{ pagedDeliveryScheduleSort.suggestOrderNumber}" >
         <s:submitOnEvent for="submitLink" event="change" />
    </s:inputSuggestAjax>

    <h:commandButton id="submitLink" style="display:none" />

Get rid of the onchange from inputSuggestAjax, and replace the
callback with event="change" for submitOnEvent.   This will let the
component decide how to submit the form (and it will generally have
internal knowledge about how the framework javascript works that is
not obvious to the end user).



On 3/28/07, Edney Imme <[EMAIL PROTECTED]> wrote:
> I Do this
>
>                     <s:inputSuggestAjax onchange="submitForm();"
> id="orderNumbersFilter"
> suggestedItemsMethod="#{pagedDeliveryScheduleSort.findOrderNumbers }"
>                                                     value="#{
> pagedDeliveryScheduleSort.suggestOrderNumber}" >
>                         <s:submitOnEvent for="submitLink"
> callback="submitForm()"></s:submitOnEvent>
>
>                     </s:inputSuggestAjax>
>                         <h:commandButton id="submitLink"
> style="display:none" />
>
> 2007/3/28, Edney Imme < [EMAIL PROTECTED]>:
> > Do you have a example????
> >
> >
> >
> > 2007/3/28, Mike Kienenberger < [EMAIL PROTECTED]>:
> > > There's no reason why you can't add a command button.
> > > If you don't want it to be visible, set it to style="display:none".
> > > If you call submitForm() directly, you might miss other JSF-specific
> > > javascript that needs to be executed on submit.  For example, you
> > > cannot use subForms if you use submitForm().
> > >
> > > On 3/28/07, Edney Imme < [EMAIL PROTECTED]> wrote:
> > > > Ok
> > > >
> > > > but i dont have a commandbutton,
> > > >
> > > > I want do a refresh when some data is changed.
> > > >
> > > > I do this
> > > >
> > > >                <s:inputSuggestAjax
> id="pointOfConsumptionFilter"
> > > > suggestedItemsMethod="#{
> > > > pagedDeliveryScheduleSort.findPointOfConsumptions}"
> > > >
> > > > value="#{ inputSuggest.suggestPointOfConsumption}"
> > > > onchange="submitForm" >
> > > >                         <s:submitOnEvent
> > > >                             for="pointOfConsumptionFilter"
> > > >                             event="blur"
> > > >
> > > > callback="submitForm()"></s:submitOnEvent>
> > > >                      </s:inputSuggestAjax>
> > > >
> > > > but don“t work.
> > > >
> > > >
> > > >
> > > > 2007/3/28, Mike Kienenberger < [EMAIL PROTECTED]>:
> > > > > This is how I typically use it for pulldown menus.
> > > > >
> > > > >                         <sandbox:subForm
> > > > id="chooseValueForm">
> > > > >                                 <h:selectOneMenu
> > > > id="valueInput" value="#{page.selectedValue}">
> > > > >
> <f:selectItems
> > > > value="#{page.possibleValueList }" />
> > > > >
> > > > <sandbox:submitOnEvent for="executeChoseValue" />
> > > > >                                 </h:selectOneMenu>
> > > > >                                 <h:commandButton
> > > > id="executeChoseValue" value="Go!" />
> > > > >                         </sandbox:subForm>
> > > > >
> > > > >
> > > > >
> > > > > On 3/28/07, Edney Imme < [EMAIL PROTECTED]> wrote:
> > > > > > can you please send a example to how work with
<s:submitOnEvent>
> > > > > >
> > > > > >
> > > > > >
> > > > > > 2007/3/28, Mike Kienenberger <[EMAIL PROTECTED] >:
> > > > > > > There's probably a lot of possible reasons why this might
> happen.
> > > > > > > For instance, the component might be in an s:subForm.
> > > > > > >
> > > > > > > The easiest way to handle this is to use the
<s:submitOnEvent>
> > > > > > > component so that the javascript is generated for you
> automatically.
> > > > > > >
> > > > > > > Otherwise, try looking at the generated html page code.
> > > > > > >
> > > > > > > On 3/28/07, Edney Imme < [EMAIL PROTECTED] > wrote:
> > > > > > > > Hi
> > > > > > > >
> > > > > > > > I use s:inputSuggestAjax in my program. And in the
onchange
> > > > attribute I
> > > > > > call
> > > > > > > > a javascript function
> > > > > > > >
> > > > > > > >      <s:inputSuggestAjax onchange="submitForm();"
> > > > > > id="orderNumbersFilter"
> > > > > > > > suggestedItemsMethod="#{
> > > > > > > > pagedDeliveryScheduleSort.findOrderNumbers }"
> > > > > > > >
> > > > > > > >
> > > >
> value="#{pagedDeliveryScheduleSort.suggestOrderNumber}"
> > > > > > />
> > > > > > > >
> > > > > > > >     When I test it, the javascript function is not called
when
> i
> > > > change
> > > > > > the
> > > > > > > > value.
> > > > > > > >
> > > > > > > > can anyone help me?
> > > > > > > >
> > > > > > > > thanks
> > > > > > > >
> > > > > > > > Best Regards
> > > > > > > > Edney
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Att.
> > > > > > > > Edney Marcel Imme
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Att.
> > > > > > Edney Marcel Imme
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Att.
> > > > Edney Marcel Imme
> > >
> >
> >
> >
> > --
> > Att.
> > Edney Marcel Imme
>
>
>
> --
> Att.
> Edney Marcel Imme




--
Att.
Edney Marcel Imme

Reply via email to