Can't find namespace for passthrough

UI Components for JSF
Post Reply
anabpz
Posts: 12
Joined: 25 Nov 2015, 19:32

25 Nov 2015, 20:03

Hi everyone,

I'm having problem trying to use namespace the two possible namespace to use passthrough features, the old http://java.sun.com/jsf/passthrough (that its availaible for now), and the newest http://xmlns.jcp.org/jsf/passthrough.

I have changed the other namespaces from http://java.sun.com/jsf .... to http://xmlns.jcp.org/jsf/... and there hasn't been any problem except for passthrough. I have followed this sites: I would like to use 'Pass-Through Attributes' for adding to some Primefaces components.

I had been for long time on Internet but I don't have found any solution.

Is there another way to get this feature?
PrimeFaces 11.0 | JSF 2.3 | Barcelona Theme 5.0.0

anabpz
Posts: 12
Joined: 25 Nov 2015, 19:32

30 Nov 2015, 13:45

I've found a solution for this.

I've just used the tag <f:passThroughAttribute> from namespace xmlns:f="http://java.sun.com/jsf/core" and I add it to an UI input component in order to use some HTML5 markups directly.

Code: Select all

<html ... xmlns:f="http://java.sun.com/jsf/core"/>


<p:calendar id="frmEDate" showButtonPanel="false"
	showOn="false" readonly="true"
	value="#{myBean.date}" size="15"
	pattern="dd/MM/yyyy" mask="true" >

	    <f:passThroughAttributes name="oncontextmenu" value="return false;" />
            <f:passThroughAttributes name="oncopy" value="return false;" />
            <f:passThroughAttributes name="onpaste" value="return false;" />
            <f:passThroughAttributes name="oncut" value="return false;" />

</p:calendar>
Regards!
PrimeFaces 11.0 | JSF 2.3 | Barcelona Theme 5.0.0

User avatar
andyba
Expert Member
Posts: 2473
Joined: 31 Mar 2011, 16:27
Location: Steinfeld, near Bremen/Osnabrück, DE
Contact:

30 Nov 2015, 15:47

Use xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
Below is a snippet of code I use in a production system.

Code: Select all

<p:panelGrid columns="1" class="pDroppable" columnClasses="col-center draggableSize" pt:place="#{place.JSON()}">
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 30 guests