a4j:actionparam equivalent

UI Components for JSF
User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

16 Sep 2011, 15:19

Yes, well, but f:param doesn't allow to attach converter (not an instance of ValueHolder). Attaching converter is important for custom converters too. I intend to write pe:jsonConverter and solve JS-Java conversion automatically ;)
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

16 Sep 2011, 15:45

Sounds good.

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

17 Sep 2011, 13:12

Done!

Example:

Code: Select all

		<h:form>
			<h:outputText id="test1" value="#{remoteCommandController.testString}" />
			<h:outputText id="test2" value="#{remoteCommandController.testDate}" />  

			<pe:remoteCommand name="myCommand" process="@this" update="test1 test2">
				<pe:remoteCommandParameter name="test" applyTo="#{remoteCommandController.testString}"/>
				<pe:remoteCommandParameter name="test2" applyTo="#{remoteCommandController.testDate}">
					<f:convertDateTime type="both" dateStyle="short"/>
				</pe:remoteCommandParameter>
			</pe:remoteCommand>
	
			<p:commandButton value="Do" type="button" onclick="myCommand('hello world', '5/14/07 12:55:42 PM')" />
		</h:form>
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

19 Sep 2011, 22:27

Oleg, i also try to implement pe:convertJson.
Do you have any idea how i can create an own pe:convertJson tag?
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

20 Sep 2011, 08:12

Good work Thomas!

pe:jsonConverter is a quite normally Converter Thomas. It implements JSF converter interface. I normally register converters in a spec. faces-config xml (e.g. pfext-converters.taglib.xml). Don't care about this please. I will add this converter to the ext. library. This week is my busy time over and next week I will start work on the ext. project!
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

20 Sep 2011, 09:26

All right :)
initial version is checked in, change what ever you want :)
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests