8 Replies Latest reply on Oct 20, 2008 2:04 AM by Max Rydahl Andersen

    Facelets code completion

    César Pérez Newbie

      Hi,

      I am just starting to work on facelets and trying JBoss tools 3.0 Alpha with it but I have a problem, in my .xhtml file only facelets ui: tags are auto completed. The rest of my tags - h, f, rich and a4j are not autocompleted.

      Is it supposed to be like this or am I doing something wrong?

      Thanks

        • 1. Re: Facelets code completion
          Max Rydahl Andersen Master

          are you using JBoss Tools XML editor, the Visual Page Editor or just the basic eclipse XML editor ?

          The latter does not autocomplete correctly - the two first should.

          • 2. Re: Facelets code completion
            César Pérez Newbie

            I was using VPE but after restarting my machine it worked. Thanks.

            I just have a small problem with JSP pages and some parts of my code, the following snippet is marked as an error:

            Syntak error on token "invalid character" throw expected. The invalid character is the # before the EL sxpression eventhough this is perfectly valid.

            <h:outputLink id="addProjectButton" onclick="#{rich:component('addProjectPanel')}.show(); return false;" value="#" />




            • 3. Re: Facelets code completion
              César Pérez Newbie

              Sorry I forgot to say the error is on the onclick event

              • 4. Re: Facelets code completion
                Max Rydahl Andersen Master

                could you report it in jira with a sample file reporting the issue ?

                thanks

                • 5. Re: Facelets code completion
                  César Pérez Newbie

                  I am having code completion problems again.
                  When I create a new project everything works fine but after some time I lose code completion on standard JSF tags: h: and f: but it works perfectly fine with rich: and a4j: .

                  The error I see in the log is:

                  null
                  Error
                  Mon Oct 06 13:49:24 CDT 2008
                  Unhandled event loop exception
                  
                  java.lang.LinkageError: org/eclipse/jst/jsf/common/runtime/internal/model/component/ComponentTypeInfo
                  at org.eclipse.jst.jsf.facelet.core.internal.registry.FaceletMetaResolvingStrategy.resolve(FaceletMetaResolvingStrategy.java:101)
                  at org.eclipse.jst.jsf.facelet.core.internal.registry.FaceletMetaResolvingStrategy.resolve(FaceletMetaResolvingStrategy.java:1)
                  at org.eclipse.jst.jsf.designtime.internal.view.model.jsp.AbstractTagResolvingStrategy.perform(AbstractTagResolvingStrategy.java:42)
                  at org.eclipse.jst.jsf.designtime.internal.view.model.jsp.AbstractTagResolvingStrategy.perform(AbstractTagResolvingStrategy.java:1)
                  at org.eclipse.jst.jsf.common.internal.strategy.StrategyComposite.perform(StrategyComposite.java:43)
                  at org.eclipse.jst.jsf.designtime.internal.view.model.jsp.CompositeTagResolvingStrategy.resolve(CompositeTagResolvingStrategy.java:63)
                  at org.eclipse.jst.jsf.facelet.core.internal.tagmodel.FaceletNamespace$TaglibFaceletNamespaceData.getAndInitIfMissing(FaceletNamespace.java:137)
                  at org.eclipse.jst.jsf.facelet.core.internal.tagmodel.FaceletNamespace$TaglibFaceletNamespaceData.getViewElement(FaceletNamespace.java:126)
                  at org.eclipse.jst.jsf.facelet.core.internal.tagmodel.FaceletNamespace.getViewElement(FaceletNamespace.java:69)
                  at org.eclipse.jst.jsf.facelet.core.internal.cm.NamespaceCMAdapter.getNamedItem(NamespaceCMAdapter.java:56)
                  at org.eclipse.jst.jsf.facelet.core.internal.cm.DocumentNamespaceCMAdapter.getNamedItem(DocumentNamespaceCMAdapter.java:32)
                  at org.eclipse.jst.jsf.facelet.core.internal.cm.FaceletDocumentFactory.createCMElementDeclaration(FaceletDocumentFactory.java:82)
                  at org.eclipse.jst.jsf.facelet.ui.internal.contentassist.XHTMLContentAssistProcessor.getCMElementDeclaration(XHTMLContentAssistProcessor.java:234)
                  at org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor.addTagCloseProposals(AbstractContentAssistProcessor.java:734)
                  at org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor.computeTagCloseProposals(AbstractContentAssistProcessor.java:1608)
                  at org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor.computeCompletionProposals(AbstractContentAssistProcessor.java:1304)
                  at org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor.computeCompletionProposals(AbstractContentAssistProcessor.java:1409)
                  at org.eclipse.jst.jsf.facelet.ui.internal.contentassist.XHTMLContentAssistProcessor.computeCompletionProposals(XHTMLContentAssistProcessor.java:62)
                  at org.eclipse.wst.sse.ui.internal.contentassist.CompoundContentAssistProcessor.computeCompletionProposals(CompoundContentAssistProcessor.java:300)
                  at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1836)
                  at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:553)
                  at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$16(CompletionProposalPopup.java:550)
                  at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:485)
                  at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
                  at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:479)
                  at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1664)
                  at org.eclipse.wst.sse.ui.internal.StructuredTextViewer.doOperation(StructuredTextViewer.java:437)
                  at org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor$JSPStructuredTextViewer.doOperation(JSPTextEditor.java:674)
                  at org.eclipse.ui.texteditor.TextOperationAction$1.run(TextOperationAction.java:131)
                  at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
                  at org.eclipse.ui.texteditor.TextOperationAction.run(TextOperationAction.java:129)
                  at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
                  at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:185)
                  at org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:109)
                  at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
                  at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
                  at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
                  at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:472)
                  at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:824)
                  at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:882)
                  at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:571)
                  at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:512)
                  at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:127)
                  at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
                  at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1184)
                  at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002)
                  at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
                  at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)
                  at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1040)
                  at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1036)
                  at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1352)
                  at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3894)
                  at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:341)
                  at org.eclipse.swt.widgets.Control.windowProc(Control.java:3787)
                  at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:337)
                  at org.eclipse.swt.widgets.Display.windowProc(Display.java:4528)
                  at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
                  at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2371)
                  at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3420)
                  at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
                  at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
                  at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
                  at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
                  at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
                  at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
                  at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
                  at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
                  at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
                  at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
                  at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
                  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
                  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                  at java.lang.reflect.Method.invoke(Unknown Source)
                  at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
                  at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
                  at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
                  
                  


                  Also in the tags that code completion works I get duplicated options, e.g.:

                  id
                  name
                  rendered
                  id
                  name
                  rendered

                  instead of
                  id
                  name
                  rendered

                  • 6. Re: Facelets code completion
                    Max Rydahl Andersen Master

                    You seem to be using Eclipse WTP JSF editor and not JBoss Tools so not sure what I can do ;(

                    Could you try with the JBoss XHTML editor ?

                    • 7. Re: Facelets code completion
                      César Pérez Newbie

                      Im using JBoss editor, look the screenshot: the parameters appear twice

                      http://img515.imageshack.us/img515/6776/bugsu2.png

                      • 8. Re: Facelets code completion
                        Max Rydahl Andersen Master

                        kpolice - please report in jira with example files/projects. thanks.