13 Replies Latest reply on Sep 21, 2009 6:26 PM by clerum

    3.1M3 JSF Issues

    clerum

      Not sure how you would call the behavior but on previous releases if I an editing an .xhtml page and if I'm inside an <h:outputText /> tag there is a properties frame in eclipse that shows the various attributes which I can set on the tag.

      This behavior seems to have gone away for h: and f: tags. It works fine for rich:, a:, s: as far as I can tell. Is this a known issue with a workaround or should I open a JIRA on it?

        • 1. Re: 3.1M3 JSF Issues
          yzhishko

          Could you provide a build id of JBDS and installed environment if it's possible?

          • 2. Re: 3.1M3 JSF Issues
            clerum

            Windows 7, x64
            Java 6_16 x64
            Eclipse 3.5 32bit

            Tools - Version: 2.1.0.v200909110340M-H277-M3

            • 3. Re: 3.1M3 JSF Issues
              clerum

              I installed Eclipse 3.4.2 and Tools 3.0 Stable and it works as expected there so it must be something with Tools 3.1 or Eclipse 3.5

              • 4. Re: 3.1M3 JSF Issues
                elmarweber

                Hi,

                I can confirm the problem. It exists when I use a seam-gen project.
                When I try to get content assist working in a xhtml page on any JSF tags all I get is "Content assist is not available at this location".

                However, everything works when I create a fresh JSF project via the Eclipse wizard. After some debugging and meddling with the Eclipse project natures and class files I got it working in the seem gen project by adding jsf-impl.jar, richfaces-impl.jar and richfaces-ui.jar to the projects classpath.

                I checked the same project without the three classpath entries in Jboss Tools 3.0 on Eclipse 3.4.1 and there the content assist works without the entries.
                My best guess at the source of the problem is that the JSF editor content assist swallows a NoClassDefFound Exception somewhere and just outputs "Content asssist is not available .." instead of logging the exception. Maybe the named libs where in the JBoss Tools classpath in 3.0?

                Is this something for the JIRA and/or seam project so that seam-gen adds the three libs.

                ciao,
                elm

                • 5. Re: 3.1M3 JSF Issues
                  akazakov

                  elmarweber,
                  Before JBT 3.1.M3 we had not used TLD/facet libs to provide content assist in XHTML editor. So if there is not proper tag lib in project classpath then our CA doesn't work for tags from this lib. See more details in wiki: http://www.jboss.org/community/wiki/NewKBplug-inandCodeAssistinJBossTools310M3

                  clerum,
                  I'm confused... What version of JBoss Tools are you using? 2.1 or 3.1?

                  • 6. Re: 3.1M3 JSF Issues
                    clerum

                    What I'm missing is the auto populated properties/values in the Properties panel in eclipse when editing a tag in an xhtml file.

                    I checked this morning and it works in tools 3.0 but not in 3.1

                    • 7. Re: 3.1M3 JSF Issues
                      akazakov

                      clerum,
                      Code assist works but Properties view doesn't, correct?
                      Hm... actually these features use the same mechanism to provide attributes. And I can't reproduce this bug. How did you install JBT? Updated from old version or fresh installation?

                      • 8. Re: 3.1M3 JSF Issues
                        clerum

                        Update. but I can toast the whole thing and reinstall eclipse 3.5 from scratch if need be. I've been going through the steps to add "JSF Capabilities" via JBTools (never was setup by seam-gen originally I guess) and the verification is taking quite a bit. Is that even necessary to add JSF support?

                        • 9. Re: 3.1M3 JSF Issues
                          akazakov

                          It should work anyway but please verify it for fresh instalation to make sure it's not a problem of installation. Thanks!

                          • 10. Re: 3.1M3 JSF Issues
                            clerum

                            Well adding the "JSF Capabilities" worked.


                            However now I have some annoying errors warnings.

                            They seem to be related to tools not knowing about default seam components..

                            for example in my components.xml

                            <factory name="remoteAddr" value="#{facesContext.externalContext.request.remoteAddr}" auto-create="true"/>

                            complains that remoteAddr cannot be resolved. Any idea?

                            • 11. Re: 3.1M3 JSF Issues
                              akazakov

                              #{facesContext.externalContext.request} returns java.lang.Object. We can't know the real implementation which will be returned by runtime there.

                              • 12. Re: 3.1M3 JSF Issues
                                elmarweber

                                @akazakov

                                Thanks for the details and explanation.

                                • 13. Re: 3.1M3 JSF Issues
                                  clerum

                                  Switching to

                                  <factory name="remoteAddr" value="#{facesContext.externalContext.request.getRemoteAddr()}" auto-create="true"/>

                                  fixes the issue.

                                  On the main issue I'm not sure the seam runtime and support was configured correctly on the project (something that didn't import with seam-gen) seems to have fixed it.