[
http://jira.jboss.com/jira/browse/JBIDE-1296?page=comments#action_12387317 ]
Andy Gibson commented on JBIDE-1296:
------------------------------------
Thinking about the Seam variable validator, there is another problem with it, one which I
don't think you can fix, but it is related, so I'll mention it here.
It is possible that a JSF facelet has unbound variables due to those values being
parameters in the facelet. The IDE has no clue what the values of the parameters are, nor
could it since it is only realized when included in another document and the param is
passed in. Therefore any parameters would appear with warnings. As I said, I doubt that
there is a lot you can do about it without changes to the libraries to allow some kind of
parameter declaration at the start of the facelet.
I'm just posing the problem, and wondering whether it is better to have warnings when
there are none, or to drop the warnings altogether, which would in some ways be correct
since if I mis-type my Seam component name, the IDE can't know whether it is a typo or
the name of a facelet param. The validator could be kept in place for JSP pages because I
don't think they have params the way facelets does.
Make the editor aware of Local var variables in JSF datatables
--------------------------------------------------------------
Key: JBIDE-1296
URL:
http://jira.jboss.com/jira/browse/JBIDE-1296
Project: JBoss Tools
Issue Type: Feature Request
Components: JSF
Environment: Boss Tools nightly from 11/11/2007, Win XP SP2, JBoss 4.2.2, Seam
2.0 project , Eclipse 3.3.1.1
Reporter: Andy Gibson
Fix For: 2.0.1, 2.1
This request comes as two items related to the same issue. There are plenty of times when
a JSF page will use a local variable for a datatable:
<h:dataTable values="#{myResults}" var="v_localVar">
<h:column>
<h:outputText value="#{v_localVar.id}"/>
</h:column>
</h:dataTable>
The problem is that in the text editor for the JSF page, references to v_localVar come up
as warnings since it cannot see the declaration of v_localVar. In addition, v_LocalVar
does not come up in the code suggestions. The reason I feel this is an important issue is
because every single JSF table has this problem, and developers cannot use the code
assist to specify values that are obtained from that local var. Generally speaking most
pages are either a data entry form/display, or a list of items in a table using a local
var. That means that you lose the code suggest ability for nearly 50% of your JSF code
because it uses the locally declared var in the JSF datatable.
The problem also occurs when you use the <s:selectItems var="v_item"> tag
from the seam libraries.
As a result a number of pages are marked with warnings due to the IDE not recognizing
this source for variables making it easier for genuine warnings to be missed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira