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.
Related
I am very new with Sikuli framework. I am trying to use Sikuli for GUI testing. I have taken the screen image shot using snipping tool for gmail login page and the same image i am using while running the test cases.
But it seems somehow, Sikuli framework is not able to match the image on the screen with below error:
FindFailed: C:/Rohit_Work_Dir/bdd_fw_workspace/cucumberwithrobotfw/src/test/java/com/learn/sikulimpl/emailId.png: (397x82) in S(0)[0,0 1280x720] E:Y, T:3.0
Line 2759, in file Region.java
at org.sikuli.script.Region.wait(Region.java:2759)
at org.sikuli.script.Region.find(Region.java:2336)
at org.sikuli.script.Region.getLocationFromTarget(Region.java:3213)
at org.sikuli.script.Region.click(Region.java:3698)
at org.sikuli.script.Region.keyin(Region.java:4366)
at org.sikuli.script.Region.type(Region.java:4328)
at com.learn.sikulimpl.LoginGmailAccountSteps.loginToGEAccount(LoginGmailAccountSteps.java:58)
NOTE:
I am using eclipse as IDE for the testing.
I have created maven project with Sikula api version along with Selenium:
<dependency>
<groupId>com.sikulix</groupId>
<artifactId>sikulixapi</artifactId>
<version>1.1.1</version>
<exclusions>
<exclusion>
<groupId>com.github.vidstige</groupId>
<artifactId>jadb</artifactId>
</exclusion>
</exclusions>
</dependency>
You should use high quality images, but maybe your tool compress them. Just use Sikuli IDE and your problem will be solved.
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.
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>
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
I was wondering why www.json.org/anyone else doesn't provide an official JAR package of org.json for download? All queries I find of people asking where they can download the JAR results in replies to the page which just lists the source files.
It seems a bit cumbersome to expect everybody to download each source file and prepare the JAR file themselves.
Have you considered using Maven? for instance, if you wanted a JAR to pars JSON you could just include...
http://mvnrepository.com/artifact/org.codehaus.jackson/jackson-core-asl/1.9.6
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.9.6</version>
</dependency>
in a pom.xml, this will give you the jar for JSON.
Or better yet, use the org.json one...
http://mvnrepository.com/artifact/org.json/json
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
</dependency>
I downloaded a jar from here:
http://code.google.com/p/org-json-java/downloads/detail?name=org.json-20120521.jar&can=2&q=
The implementation from json.org by Douglas Crockford is nōn-free. Luckily, a Free almost drop-in replacement exists (apparently, Google’s code packaged by someone else for Maven Central):
<dependency>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
<version>0.0.20131108.vaadin1</version>
</dependency>
Add this to pom.xml instead of using the json.org one. We had to do only one minor change to our code for this: the vaadin one can throw JSONException in more places, so we had to either catch them or pass them through to the callers (extend the throws declaration).
Beware that the json.org software has a non-open source license. This causes downstream problems in many cases.
The issue is that the license is essentially the MIT license, but it adds a line that says that the software should only be used for good, not evil. This sounds fine, but if you have to get a corporate lawyer to sign off it gets nasty because there is no consensus legal definition of "evil". If you use json.org's library, you can't put your software into Debian, for instance. Your software likewise can't be a dependency for any Apache project.
To help with this, I have adapted and packaged the android clean-room rewrite of the json.org library. The source is on github and is Apache licensed. See https://github.com/tdunning/open-json. To use this, add something like this to your pom (or equivalent):
<!-- https://mvnrepository.com/artifact/com.tdunning/json -->
<dependency>
<groupId>com.tdunning</groupId>
<artifactId>json</artifactId>
<version>1.3</version>
</dependency>
Ping me with pull requests or issues on github or however you like.
Using the com.tdunnning package can lead to dependency conflicts, especially if you make your project available to others as a library. The implementation does not have 100% compatibility with org.json
That package(com.tdunning) has been forked to https://github.com/openjson/openjson with the package renamed to com.github.openjson instead of org.json to prevent conflicts.
The maven dependency:
<dependency>
<groupId>com.github.openjson</groupId>
<artifactId>openjson</artifactId>
<version>1.0.10</version>
</dependency>