Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

b:selectOneMenu converter not working #797

Closed
chongma opened this issue May 28, 2017 · 16 comments
Closed

b:selectOneMenu converter not working #797

chongma opened this issue May 28, 2017 · 16 comments
Assignees

Comments

@chongma
Copy link
Collaborator

chongma commented May 28, 2017

in some cases i am using h:selectOneMenu with a converter which selects an object. if i switch to a b:selectOneMenu it doesn't seem to work the same

@chongma
Copy link
Collaborator Author

chongma commented May 28, 2017

i have created a test in https://github.com/chongma/test. it is in the menu under converter

@cljk
Copy link
Contributor

cljk commented Jun 20, 2017

Where did you deploy your test project? For me it was not possible to startup in Wildfly 10.

@chongma
Copy link
Collaborator Author

chongma commented Jun 20, 2017

TomEE. i used the same pom dependencies as the BootsFaces showcase. @stephanrauh had the same problem running it last time maybe he remembers how he did it

@chongma
Copy link
Collaborator Author

chongma commented Jan 29, 2018

i updated the project https://github.com/chongma/test with tomee maven plugin. after clone you only need to run at the command line mvn clean package and mvn tomee:start. then the project should be running at http://localhost:8080/test-0.0.1-SNAPSHOT/. then mvn tomee:stop will terminate the container

@modima65
Copy link

I'm lost: it has to do with b:panelGrid contentDisabled attribute, it has to do with components' disabled attribute, it has to do with b:fetchBeanInfos, it has todo with toggling components from disabled to enabled and validation phase. Mix some of these ingredients and your converter won't work or won't match the component's value, causing validation failure. I'll post and example as soon as I'm free from my duties. Thanks.

@chongma
Copy link
Collaborator Author

chongma commented Feb 2, 2018

I realised that b:selectOneMenu doesn't have a converter attribute. So I tried f:converter but still nothing happens

stephanrauh added a commit that referenced this issue Feb 2, 2018
…rted, but didn't show in the autocomplete list
@stephanrauh
Copy link
Collaborator

stephanrauh commented Feb 2, 2018

Actually, b:selectOneMenu does support converters. I just forgot to declare this attribute in the *.jsfdsl, so it's neither shown in the autocomplete list, nor is it documented in the attribute list of the showcase. Thanks for pointing this out!

@chongma
Copy link
Collaborator Author

chongma commented Feb 3, 2018

did anyone manage to run my test project using tomee maven plugin? it would be good if someone can confirm the issue. also any idea what would i be looking for in the code regarding converter support?

@cljk
Copy link
Contributor

cljk commented Feb 3, 2018

I didn´t look further.... think this will be resolvable but your dependencies of your test project seem to be broken

>mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building test 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-war-plugin/2.5/maven-war-plugin-2.5.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-war-plugin/2.5/maven-war-plugin-2.5.pom (8.8 kB at 19 kB/s)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-war-plugin/2.5/maven-war-plugin-2.5.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-war-plugin/2.5/maven-war-plugin-2.5.jar (86 kB at 540 kB/s)
Downloading: https://oss.sonatype.org/content/repositories/snapshots/org/omnifaces/omnifaces/2.6.8/omnifaces-2.6.8.pom
[WARNING] The POM for org.omnifaces:omnifaces:jar:2.6.8 is missing, no dependency information available
Downloading: https://oss.sonatype.org/content/repositories/snapshots/net/bootsfaces/bootsfaces/1.2.0/bootsfaces-1.2.0.pom
[WARNING] The POM for net.bootsfaces:bootsfaces:jar:1.2.0 is missing, no dependency information available
Downloading: https://oss.sonatype.org/content/repositories/snapshots/org/apache/tomee/tomee-embedded/7.0.4/tomee-embedded-7.0.4.pom
[WARNING] The POM for org.apache.tomee:tomee-embedded:pom:7.0.4 is missing, no dependency information available
Downloading: https://oss.sonatype.org/content/repositories/snapshots/org/omnifaces/omnifaces/2.6.8/omnifaces-2.6.8.jar
Downloading: https://oss.sonatype.org/content/repositories/snapshots/net/bootsfaces/bootsfaces/1.2.0/bootsfaces-1.2.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.923 s
[INFO] Finished at: 2018-02-03T11:12:30+01:00
[INFO] Final Memory: 9M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project test: Could not resolve dependencies for project net.bootsfaces:test:war:0.0.1-SNAPSHOT: The following artifacts could not be resolved: org.omnifaces:omnifaces:jar:2.6.8, net.bootsfaces:bootsfaces:jar:1.2.0, org.apache.tomee:tomee-embedded:pom:7.0.4: Could not find artifact org.omnifaces:omnifaces:jar:2.6.8 in central (https://oss.sonatype.org/content/repositories/snapshots) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

@stephanrauh
Copy link
Collaborator

@cljk I didn't find out how to load dependencies simultaneously from the Maven Central Release repo and from the Maven Central Snapshots repo. The only workaround I've found so for is to run mvn install, deactivate the snapshot repo, and to run mvn install again. This ways, every dependency is stored local. Also see #369.

@stephanrauh
Copy link
Collaborator

stephanrauh commented Feb 5, 2018

@chongma I believe I've found something. Unfortunately, it's a bug that happens only when the select model is a hash map. Which is not exactly your scenario. If you've got a spare minute, can you have a look at my commit, please?

stephanrauh added a commit that referenced this issue Feb 5, 2018
…r was used and the select model is a hash map
@chongma
Copy link
Collaborator Author

chongma commented Feb 5, 2018

@stephanrauh i haven't been using hashmap but maybe it helps for all scenarios? is it available in 1.2.1-SNAPSHOT?

@cljk it works on mine but maybe because the packages are already locally available in my .m2 repository. i guess because sonatype is defined in the pom.xml under repositories it is trying to pick everything up from there. you can either comment out the whole repositories section and change BootsFaces to 1.2.0, or add maven central to the list of repositories

@stephanrauh
Copy link
Collaborator

Yes, I've uploaded a new developer snapshot. But my bugfix is very specific for hash maps. I'm just afraid it breaks the other cases :).

@cljk
Copy link
Contributor

cljk commented Feb 7, 2018

@chongma Yes, I didn´t have a look in the pom. I think it contains a SNAPSHOT-repo and is missing the central repo ... so the prod-releases cannot be downloaded. Minor issue but had no time to elaborate

@chongma
Copy link
Collaborator Author

chongma commented Feb 7, 2018

@cljk I have updated the test project pom.xml to include maven central. if you have the time please pull and retry as it would be great if you can reproduce the same bug your end

funnily enough i got the instructions to add maven central repos from https://maven.apache.org/guides/introduction/introduction-to-the-pom.html which is the introduction to using a pom (which i have never read before) and it specifies that a basic pom should always contain maven repos. you learn something every day!

@chongma
Copy link
Collaborator Author

chongma commented Apr 7, 2018

#919 fixes this converter issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants