Page 2 of 2

Re: a4j:actionparam equivalent

Posted: 16 Sep 2011, 15:19
by Oleg
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 ;)

Re: a4j:actionparam equivalent

Posted: 16 Sep 2011, 15:45
by cagatay.civici
Sounds good.

Re: a4j:actionparam equivalent

Posted: 17 Sep 2011, 13:12
by tandraschko
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>

Re: a4j:actionparam equivalent

Posted: 19 Sep 2011, 22:27
by tandraschko
Oleg, i also try to implement pe:convertJson.
Do you have any idea how i can create an own pe:convertJson tag?

Re: a4j:actionparam equivalent

Posted: 20 Sep 2011, 08:12
by Oleg
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!

Re: a4j:actionparam equivalent

Posted: 20 Sep 2011, 09:26
by tandraschko
All right :)
initial version is checked in, change what ever you want :)