This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | inserting <f:ajax> tag doesn't insert namespace | ||
---|---|---|---|
Product: | javaee | Reporter: | driscoll <driscoll> |
Component: | JSF | Assignee: | Martin Fousek <marfous> |
Status: | RESOLVED WONTFIX | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | Macintosh | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
driscoll
2009-10-01 22:03:35 UTC
Works fine for me in latest trunk builds. Can you please describe the precise usecase if you can still reproduce it? Thanks. Using 200910070250 promoted: Create a default JSF project. Enter the following text: <h:commandButton> <f:ajax/> </h:commandButton> Enjoy the thrill of little red squiggly lines. f:event does the same thing. f:actionListener works fine. I am not able to reproduce whatsoever. I tried several projects, files and scenarios, but the completion always adds the nemaspace, no squiggly lines. Please, try to repeat these steps: 1) start the IDE with a new userdir 2) add the Glassfish appserver 3) create a brand new web project, check the JSF framework, use default values. 4) in the generated index.xhtml file type <f: anywhere and complete any of the f prefixed tags => is the declaration xmlns:f="http://java.sun.com/jsf/core" really not added???? If this scenario works, but you can still reproduce using the original steps, can you please check if the problem is project/file specific? If so, can you attach the project/file? I am also confused about your last comment - some of the jsf/core tags being completed adds the namespace and some of them not - hmm, there is something rotten... do you happen to use another library which uses the "f" as default prefix? I am sorry for not being able to help so far :-| I can reproduce it. The problem is when the html root tag missing. Like in this example <ui:composition template="#{TemplateBean.currentTemplate.path}/template.xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"> this is my root tag. When i add f:ajax the f namespace is not added. As well the unused imports don't work correctly. While that may be related to the bug that I see, it's not the same: I have the html root tag defined - in fact, I'm using the default template page. One difference I see is that inserts seem to work for me *after* I save with cmd-S. I'm at a conference, but will attempt to do a full repro with a clean setup after I return. OK, steps to repro: Install SE nightly 200910100201. Install JSF to Netbeans. Install v3, via the Netbeans prompts. Create a new JSF project from scratch. Use the v3 JSF library. Open index.xhtml Directly after <h:head>, enter <h:inputText></h:inputText> Then, edit it to say <h:inputText> <f:ajax> </h:inputText> I *NEVER*, *EVER* get the f: namespace inserted following this example flow. And that's been true for a month now. Aha! I've finally figured out why it's not working for me in some cases: If I type the full command in, by typing <f:ajax/ Then the header isn't inserted. If I type in: <f:aja{ctl-space} Then the header is inserted. If I type: <f:aja and then select from the drop down, then the header is inserted. So that's the problem. Bug? I think so. But you may disagree. At a minimum, its a usability failure. Sometimes, you don't do autocomplete - but you would certainly want the header inserted regardless. Jim, it makes sense, but what you desribed is kind of enhancement, not defect. This has never supposed to work. Moreover if you type less than char "<" the completion opens automatically so it is IMHO natural to use it instead of just typing the text manually. This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss |