<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    JSF 2.0 and other issues in Visual Editor
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/henk53">henk de boer</a> in <i>JBoss Tools</i> - <a href="http://community.jboss.org/message/584074#584074">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>When using JSF 2.0 &amp; Facelets, a few problem occur in the JBoss Tools Visual Editor. I'm using 3.2 CR1.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 12pt;"><strong>EL methods with parameters</strong></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>When I call a method via EL with parameters (which thus results in a value) an error is flagged:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><a href="http://community.jboss.org/servlet/JiveServlet/showImage/2-584074-11266/el_parameters.png"><span> http://community.jboss.org/servlet/JiveServlet/downloadImage/2-584074-11266/450-54/el_parameters.png </span></a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Because a method is involved, the editor seems to think it's a method expression, but this is clearly not the case. Even with the == operator no method expression is involved here. The == operator should even make it more clear the component to which this EL expression is bound will receive a value.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Needless to say, the code runs perfectly well on JBoss AS 6.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 12pt;"><strong>Annotated managed beans</strong></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 10pt;">When I annotate a JSF managed bean instead of declaring it in faces-config.xml, the editor does not seem to have any knowledge of the bean. Neither navigate into and auto-completion work. E.g. if I have the following bean:</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-java"><font color="navy"><b>import</b></font> javax.annotation.PostConstruct;
<font color="navy"><b>import</b></font> javax.faces.bean.ManagedBean;
<font color="navy"><b>import</b></font> javax.faces.bean.ViewScoped;
<font color="navy"><b>import</b></font> javax.faces.event.ActionEvent;
&#160;
@ManagedBean
@ViewScoped
<font color="navy"><b>public</b></font> <font color="navy"><b>class</b></font> MyBean <font color="navy">{</font>
&#160;
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;<font color="navy"><b>public</b></font> String getFoo() <font color="navy">{</font> <font color="navy"><b>return</b></font> <font color="red">"foo"</font>; <font color="navy">}</font>
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;<font color="navy"><b>public</b></font> <font color="navy"><b>void</b></font> setFoo(String foo) <font color="navy">{</font><font color="navy">}</font>
&#160;
<font color="navy">}</font>
&#160;
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 10pt;">And a simple Facelet using this bean:</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag"><span>&lt;html xmlns="</span><a class="jive-link-external-small" href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a><span>"
&#160; xmlns:h="</span><a class="jive-link-external-small" href="http://java.sun.com/jsf/html" target="_blank">http://java.sun.com/jsf/html</a><span>"
&#160; xmlns:f="</span><a class="jive-link-external-small" href="http://java.sun.com/jsf/core" target="_blank">http://java.sun.com/jsf/core</a><span>"&gt;</span></span>

&#160; <span class="jive-xml-tag">&lt;h:body&gt;</span>&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;h:outputText value="#{myBean.foo}" /&gt;</span>&#160; 
&#160; <span class="jive-xml-tag">&lt;/h:body&gt;</span>
<span class="jive-xml-tag">&lt;/html&gt;</span>

</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 10pt;">Then I can't do anything in the editor with "myBean". Here too, the code runs fine on JBoss AS 6.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 12pt;"><strong>Implicit EL Objects</strong></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 10pt;">The editor does not seem to have full knowledge about the EL implicit objects. When trying to auto-complete an EL expression bound to a component, e.g. &lt;h:outputText value="#{...}"/&gt; certain EL implicit objects pop up, but others not.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 10pt;">Available are:</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><ul><li>applicationScope</li><li>component</li><li>cc</li><li>cookie</li><li>facesContext</li><li>flash</li><li>header</li><li>headerValues</li><li>initParam</li><li>param</li><li>paramValues</li><li>requestScope</li><li>resource</li><li>sessionScope</li><li>view</li><li>viewScope</li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Missing are thus:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><ul><li>application</li><li>request</li><li>session</li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Then for some of those implicit EL objects it makes sense to be able to navigate into them and have auto-completion. This is exactly what the default Eclipse 3.6.1 "HTML Editor" allows. E.g. navigating into <em>view</em> would bring me to UIViewRoot and navigating into <em>component</em> would bring me to UIComponent. For auto-completion this is even more convenient.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Finally, for some reason implicit objects are only available in the editor when I bind an expression to a component's attribute. If I directly start a #{} expression on a Facelet and try to auto complete, then no implicit objects show up at all.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 12pt;"><strong>Duplicate tag suggestions</strong></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 10pt;">When I try to auto complete tags, the editor shows me a lot of duplicate suggestions:</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><a href="http://community.jboss.org/servlet/JiveServlet/showImage/2-584074-11267/duplicate_tag_suggestions.png"><span> http://community.jboss.org/servlet/JiveServlet/downloadImage/2-584074-11267/425-475/duplicate_tag_suggestions.png </span></a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 10pt;">As can be seen, basically every suggestion appears twice. When I first restarted Eclipse after the initial installation of JBoss Tools Visual Editor (Richfaces), I even saw the same ones appearing 3 times. This is not the end of the world, but it does look a little awkward.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 10pt;">I hope this feedback will be valuable to you <span> ;) </span><br/></span></p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/584074#584074">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Tools at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>