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.

Bug 173533 - inserting <f:ajax> tag doesn't insert namespace
Summary: inserting <f:ajax> tag doesn't insert namespace
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF (show other bugs)
Version: 6.x
Hardware: Macintosh All
: P3 blocker (vote)
Assignee: Martin Fousek
Depends on:
Reported: 2009-10-01 22:03 UTC by driscoll
Modified: 2016-07-07 08:56 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description driscoll 2009-10-01 22:03:35 UTC
Code completion for inserting new tag namespaces seems broken recently, under the Sep 30 build.

If I type:


then the f: namespace is *not* automatically inserted into the html header on a facelets page.

This worked as recently as two weeks ago.
Comment 1 Marek Fukala 2009-10-07 14:53:46 UTC
Works fine for me in latest trunk builds. Can you please describe the precise usecase if you can still reproduce it? Thanks.
Comment 2 driscoll 2009-10-07 18:06:33 UTC
Using 200910070250 promoted:

Create a default JSF project.

Enter the following text:


Enjoy the thrill of little red squiggly lines.

Comment 3 driscoll 2009-10-07 18:10:00 UTC
f:event does the same thing.

f:actionListener works fine.
Comment 4 Marek Fukala 2009-10-08 12:49:51 UTC
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="" 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 :-|
Comment 5 Michal Mocnak 2009-10-12 13:43:35 UTC
I can reproduce it. The problem is when the html root tag missing. Like in this example


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.
Comment 6 driscoll 2009-10-12 17:43:55 UTC
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.
Comment 7 driscoll 2009-10-14 06:55:29 UTC
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 

I *NEVER*, *EVER* get the f: namespace inserted following this example flow.  And that's been true for a month now.

Comment 8 driscoll 2009-10-14 07:03:11 UTC

I've finally figured out why it's not working for me in some cases:

If I type the full command in, by typing 


Then the header isn't inserted.

If I type in:


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.
Comment 9 Marek Fukala 2009-10-14 10:03:38 UTC
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.
Comment 10 Martin Balin 2016-07-07 08:56:49 UTC
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