myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kienenberger" <mkien...@gmail.com>
Subject Re: Reset dataScroller
Date Thu, 31 May 2007 18:47:00 GMT
Are you asking how to resubmit the form when the menu changes?

If so, see here:

http://wiki.apache.org/myfaces/SubmitPageOnValueChange

As it states at the top, the simplest way to do this is with a
submitOnEvent component, typically inside of a subForm component.
Both of these components are currently in the sandbox, but are
production-quality.  (No one's gotten around yet to promoting them to
Tomahawk).

<sandbox:subForm id="chooseRouteOneForm">
	<h:selectOneMenu id="routeOneInput"
		value="#{routeSplitReorderPage.routeOne}">
		<t:selectItems
			value="#{cisDAO.routeList}"
			var="route"
			itemLabel="#{route.routeCode} - #{route.description}"
			itemValue="#{route}" />
		<sandbox:submitOnEvent for="executeChoseRouteOne" />
	</h:selectOneMenu>
	<h:commandButton id="executeChoseRouteOne"
		value="Go!">
	</h:commandButton>
</sandbox:subForm>



On 5/31/07, Michael Böckling <Michael.Boeckling@dmc.de> wrote:
> Wow, it seems you are doing the exact same thing as me, even my bean has the
> same name! :D
> I was afraid that this would have to be the solution... Oh boy.
>
>
> I have a second issue, however, thats a bit related to this. To avoid having
> to reset the UI, I do a full page reload, e.g. when I change the displayed
> rows per page of my dataTable. That way, my dataScrollers stay in sync as
> well.
>
> I have a h:selectOneMenu to change this number, and I would like to trigger
> an auto-submit when it changes its value. For now, it works only using a
> commandButton, but that just look right. I tried to register the
> oamSubmitForm() with  the 'onchange' event on the h:selectOneMenu, but that
> does not work, for whatever reason. I guess its because h:selectOneMenu
> isn't a actionSource.
>
> Is there a way to do this properly? This seems to be one of the easiest
> things, yet I can't do it.
>
>
> And thanks for your help so far, Mike! That was great!
>
>
>
> Michael
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: Mike Kienenberger [mailto:mkienenb@gmail.com]
> > Gesendet: Donnerstag, 31. Mai 2007 20:18
> > An: MyFaces Discussion
> > Betreff: Re: Reset dataScroller
> >
> >
> > See here for ideas:
> >
> > https://issues.apache.org/jira/browse/TOMAHAWK-548
> >
> > No one's been motivated enough yet to submit patches.
> >
> > On 5/31/07, Michael Böckling <Michael.Boeckling@dmc.de> wrote:
> > > Hi!
> > >
> > > I have a problem with t:dataScroller, it does not reset
> > itself when the
> > > underlying data model changes. When I click on the "first" button,
> > > everything is well again. Is there a way to do this
> > programmatically? In
> > > JavaScript or in a backing bean?
> > >
> > > Thanks for any help!
> > >
> > >
> > > Michael
> > >
> > >
> > > --
> > > Michael Böckling
> > > Java Engineer
> > > dmc digital media center GmbH
> > > Rommelstraße 11
> > > 70376 Stuttgart (Germany)
> > > Telefon: +49 711 601747-0
> > > Telefax: +49 711 601747-141
> > > E-Mail: Michael.Boeckling@dmc.de
> > > Internet: www.dmc.de
> > >
> > > Handelsregister: AG Stuttgart HRB 18974
> > > Geschäftsführer: Andreas Magg, Daniel Rebhorn, Andreas Schwend
> > >
> > > ---------------------------------------------
> > > Besseres E-Business.
> > > dmc ist die kreative Vernetzung von Agentur, Systemhaus und
> > Service. Seit
> > > über 10 Jahren entwickeln und realisieren wir zukunftweisende und
> > > erfolgreiche E-Business-Lösungen. Zu unseren langjährigen
> > Kunden zählen
> > > neckermann.de, Kodak und Telekom Training.
> > >
> > > dmc auf Platz 8 im aktuellen New Media Service Ranking.
> > > Als inhabergeführte und netzwerkunabhängige Agentur gehören
> > wir mit einem
> > > Umsatz von 13,50 Mio. Euro zu den Top 10 der
> > erfolgreichsten New Media
> > > Dienstleister in Deutschland.
> > >
> >
>

Mime
View raw message