Does PrimeFaces Extensions components use OmniFaces? - primefaces

I was looking for any omnifaces import in PrimeFaces Extensions API but did not found.
http://primefaces-extensions.github.io/reports/apidocs/index.html
Question in title. Any ideas? Or I'm on wrong way and PE don't use OmniFaces?

No.
See <dependencies> in the PFE project POM. That's all.

Related

Trouble implementing p:linkButton

I am trying to use the Primefaces link button component. I tried using Primefaces 6.2 and the project builds but I get the error message
"/index.xhtml #82,60 <p:linkButton> Tag Library supports namespace: http://primefaces.org/ui, but no tag was defined for name: linkButton"
When I try to update my primefaces version to 6.2.RC1 or 6.2.RC2, I get a DependencyResolutionException. How can I properly link Primefaces in my pom file so that I can use the linkButton? I noticed that the Primefaces showcase for the component says it is using 6.3 and have tried that as well, even though I didn't see that version on the repository list. Is this component not available yet?
Here are the primefaces dependencies in my pom.xml...
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.3</version>
</dependency>
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>all-themes</artifactId>
<version>1.0.9</version>
</dependency>
This component is supported in 7.0. At the time of the question, the showcase was running a SNAPSHOT version of 6.3 which was not released but became 7.0. sThe fact that the showcase was running something newer than OP used made it visible there. See https://github.com/primefaces/primefaces/issues/3613
Could not figure out how to get the p:linkButton working but I instead used p:button to get the same exact functionality as described in the Primefaces showcase.

Google maps classes not showing in Import-Package in MANIFEST.MF

I'm using the maven-bundle-plugin and trying to bundle Google maps dependency.
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-ClassPath>*;scope=compile|runtime</Bundle-ClassPath>
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
<Embed-Directory>OSGI-INF/lib</Embed-Directory>
<Import-Package>
*
</Import-Package>
<_exportcontents>
*
</_exportcontents>
</instructions>
</configuration>
</plugin>
When I inspect the JAR (Manifest.MF) I can see com.google.maps.model in Export-Package but not in Import-Package. How can I get it in the Import-Package as well?
This question is linked to a previously unresolved question How to import a class from third party jar file in an OSGi component
Well, there shouldn't be anything in the Import-Package here, as you're not importing the google maps classes, you are embedding them. You're packing the google jar inside your own bundle, and Import-Package applies only when you want to use those classes exported from another bundle.
As of the other question, I'm not entirely sure (I don't use the maven bundle plugin at all) but the 'exportcontents *' seems suspect, exporting too much can lead to subtle problems.
I'd say start by exporting nothing and add packages as needed.
If you are embedding the jar in your bundle and want to access its classes, use the Include-Resource instruction, it has an option to unroll a JAR resource (see # option)

Where is WinHttpClients in HttpClient?

I'm following a example of HttpClient4.4, which is
https://hc.apache.org/httpcomponents-client-4.4.x/httpclient-win/examples/org/apache/http/examples/client/win/ClientWinAuth.java
However, this class cannot be compiled, because of NOT FOUND WinHttpClients.
I'm sure that the lib I imported is 4.4. So, is there anyone knows what's going on? (I have already checked my classpath. Still not found this class also.)
Thanks
Windows specific is shipped as a separate module. Make sure to add httpclient-win as a dependency to your project
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-win</artifactId>
<version>4.4</version>
</dependency>

The attribute list is not defined in o:converter (Netbeans 7.3)

I'm trying to use the new org.omnifaces.converter.ListConverter in a primefaces picklist.
I added the new dependency in my project with maven and rebuilt the project in order to download the jar file:
<dependency>
<groupId>org.omnifaces</groupId>
<artifactId>omnifaces</artifactId>
<version>1.5</version>
</dependency>
I'm importing the namespace in my facelets as follows:
xmlns:o="http://omnifaces.org/ui"
Still, when I try to use <o:converter> in my picklist as follows:
<o:converter converterId="omnifaces.ListConverter" list="#{projectBean.clientSource}" />
I get a message from netbeans 7.3 saying :
The attribute list is not defined in the component converter
It doesn't seem to cause any build failure though...
Am I missing something? Do I not use omnifaces as it is meant to be?
This is, unfortunately, "by design".
Netbeans apparently validates the attributes rather strictly based on their registration in the *.taglib.xml file.
The <o:converter> is supposed to support all attribtues of any arbitrary converter, such as pattern and locale of <f:convertDateTime>, the minFractionDigits and integerOnly of <f:convertNumber>, etcetera. It's however impossible to register all of those attributes in the *.taglib.xml file in order to satisfy all possible use cases of <o:converter>. It namely also supports custom converters instead of standard ones.
It's however valid to specify a "custom" tag attribute and this is where the <o:converter> relies on. The list attribute is actually an attribute of the omnifaces.ListConverter converter. I don't have Netbeans at hands and I'm not sure whether it interpretes it as an error or as an warning and or if it's configurable somewhere in its validation settings, but I can assure you that this is absolutely harmless and should at most generate a warning (and thus not as an error).
In case you didn't understood the use of <o:converter>, it's a special tag handler which evaluates the attributes of the specified converter during view render time instead of view build time. This way it's possible to supply "dynamic" attributes tied to bean properties instead of hardcoded string attributes.
I worked around this issue in netbeans by unzipping omnifaces-2.1.jar.
Edit omnifaces-2.1\META-INF\omnifaces-ui-taglib.xml
Find converter
Add an attribute under converter:
<attribute>
<description>
<![CDATA[
Model source list http://showcase.omnifaces.org/converters/ListConverter
]]>
</description>
<name>list</name>
<required>false</required>
<type>java.lang.String</type>
</attribute>
Just before < /tag >.
Zip the extracted contents (META-INF and org folders) into onmifaces-2.1.jar.
Use that jar in netbeans.
The first time when you add the dependency, netbeans don't update its namespaces list.
Then,
Execute "Clean and Build"
In some cases, restart Netbeans
And its all
The same has happened to me with omnifaces 1.7 and Netbeans 7.3.1

downloading jackson.codehaus.org jar

I need to download a json parser so I go to the jackson.codehaus.org website. Instead of a convenient link to click and download the jar/jars, they have me going in circles. Does anyone know where the jars are -- exactly?
You can use this link instead :
DOWNLOAD v2.9.7
More General Link
Or goto http://mvnrepository.com/ and search for 'jackson-core' .
If you click "Download" at the right edge of the screen, scroll down to "Downloads, 2.x" and click "Core", you'll get the direct download.
Here you can find the jackson libraries (version 2.4.0). I got these project from a tutorial where you can see how to implement jackson and the code and libraries are available to download too:
http://www.ibm.com/developerworks/java/library/j-hangman-app/index.html
Next alternative link : http://www.java2s.com/Code/Jar/j/Downloadjacksonall199jar.htm
You can find here the "AllIn" jars with complete list of included files. But latest version here is 1.9.9. so...
Please try
/repositories/snapshots/com/fasterxml/jackson/core
Goto relevant directory
jackson-annotations/
jackson-core/
jackson-databind/
Then open maven-metadata.xml file. You can find the directory of latest version there. Please note that all jars renamed with release date.
I know this question is 4 years old, but the Jackson library is still very hard to find, and even though Sujith PS' answer here leads to the core jar, that was not enough for me.
For anyone who's looking for the jar files for Core, Databind and Annotations, I found them here:
http://mvnrepository.com/artifact/com.fasterxml.jackson.core
Specifically for version 2.7.4:
jackson-core-2.7.4.jar
jackson-databind-2.7.4.jar
jackson-annotations-2.7.4.jar