a4j:actionparam equivalent

Components, Ajax Framework, Utilities and More.
User avatar
Oleg
Expert Member
Posts: 3788
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 ;)

User avatar
optimus.prime
Prime
Posts: 17328
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

16 Sep 2011, 15:45

Sounds good.

tandraschko
PrimeFaces Core Developer
Posts: 3094
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>
Always Bet On Prime (+ Extensions)!

Thomas Andraschko
PrimeFaces Developer | PrimeFaces Extensions Founder
Apache OpenWebBeans PMC | Apache DeltaSpike PMC | Apache MyFaces PMC

Personal Blog: http://tandraschko.blogspot.de/

tandraschko
PrimeFaces Core Developer
Posts: 3094
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?
Always Bet On Prime (+ Extensions)!

Thomas Andraschko
PrimeFaces Developer | PrimeFaces Extensions Founder
Apache OpenWebBeans PMC | Apache DeltaSpike PMC | Apache MyFaces PMC

Personal Blog: http://tandraschko.blogspot.de/

User avatar
Oleg
Expert Member
Posts: 3788
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!

tandraschko
PrimeFaces Core Developer
Posts: 3094
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 :)
Always Bet On Prime (+ Extensions)!

Thomas Andraschko
PrimeFaces Developer | PrimeFaces Extensions Founder
Apache OpenWebBeans PMC | Apache DeltaSpike PMC | Apache MyFaces PMC

Personal Blog: http://tandraschko.blogspot.de/

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Google [Bot], Hickaru and 28 guests