Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352018

Summary: [JSF2.0] Facelet code completion should suggest HTML tags even if the parent tag is not HTML
Product: [WebTools] WTP Source Editing Reporter: Alexey Kazakov <alkazako>
Component: wst.htmlAssignee: wst.html <wst.html-inbox>
Status: NEW --- QA Contact: Nick Sandonato <nsand.dev>
Severity: normal    
Priority: P4 CC: cameron.bateman, ian.trimble, psuzzi, raghunathan.srinivasan, thatnitind, zalapa
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Alexey Kazakov CLA 2011-07-13 14:37:18 EDT
Build Identifier: I20110613-1736

Facelet code completion should suggest HTML tags even if the parent tag is not HTML.

Reproducible: Always

Steps to Reproduce:
1. Create a Dynamic Web Project.
2. Add JSF 2 facet to the project.
3. Create the following test.xhtml file into WebContent foler:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <h:body>

        <!-- HTML code completion DOES NOT work here -->

        <table>
        
             <!-- HTML code completion works here -->
        </table>
    </h:body>
</html>

4. Open that file with HTML or Web Page editor
5. Try Ctrl+Space at the next line after <h:body>
There is NO HTML tags available in the proposal list.
6. Try Ctrl+Space at the next line after <table>
There IS HTML tags available in the proposal list.
Comment 1 Raghunathan Srinivasan CLA 2012-01-05 12:52:40 EST
For review
Comment 2 Raghunathan Srinivasan CLA 2012-05-31 13:57:50 EDT
Mass update: Moving Target to Juno SR1 release as we are in ramp down phase for Juno.
Comment 3 Raghunathan Srinivasan CLA 2012-09-06 14:18:02 EDT
Triage: Consider fro 3.5
Comment 4 Cameron Bateman CLA 2013-04-19 17:31:00 EDT
This doesn't appear to be a JSF problem.  The selection of basic html tags that appear in content assist is governed by wst.html in source editing.  I am going to reassign there to see if we can get more info on how this might work.
Comment 5 Nitin Dahyabhai CLA 2013-04-24 14:30:51 EDT
Cameron, Alexey, is this even still happening in Juno SR2?
Comment 6 Nick Sandonato CLA 2013-05-08 10:39:44 EDT
(In reply to comment #4)
> This doesn't appear to be a JSF problem.  The selection of basic html tags
> that appear in content assist is governed by wst.html in source editing.  I
> am going to reassign there to see if we can get more info on how this might
> work.

Hi, Cameron. We had a similar situation with custom tags in JSPs. To fix it, we updated the model query extension for taglibs so that it would include valid HTML elements for the tag's context [1]. I'd imagine you could do the same.

[1] http://git.eclipse.org/c/sourceediting/webtools.sourceediting.git/commit/?id=3828b11664356f783564620031d2418f0af917e9
Comment 7 Alexey Kazakov CLA 2013-05-08 12:23:04 EDT
Nitin, I didn't try Juno but it seems to be fixed in Kepler.
Comment 8 Salvador Zalapa CLA 2013-07-30 09:25:44 EDT
this is still an issue in Kepler as well, as Nick comment in comment#4, the issue is similar the JSP tags. However the class that should be modified is on the jsf stuff, more precisely in (so far with my investigation) 
org.eclipse.jst.jsf.facelet.ui.internal.contentassist.MyModelQueryExtension, i think we should move this bug to the jsf team.
Comment 9 Salvador Zalapa CLA 2013-07-30 09:27:00 EDT
sorry, i meant Nick's comment#6