Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
augustientje
Post subject: JSF validation bug  PostPosted: Aug 19, 2006 - 12:24 PM



Joined: Sep 04, 2004
Posts: 27

In my JSF files, the MyEclipse editor in 5.01 flags every occurance of i18n keys as a warning. The way I'm using i18n keys is straight from the book and I'm sure I didn't make a mistake there. It's simply a loadbundle tag like this: <f:loadBundle basename="app.bundle.messages" var="msg"/>.

Everywhere msg is used in EL, a warning appears.

When I run my web application I can see al my text. Switching between languages also works.

So the MyEclipse editor is lying to me?

Why?
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Aug 21, 2006 - 03:53 AM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23855

Can you give me an example of how you are using "msg" when it's flagged? Locally I have no flagged errors *and* I get autocomplete with the msg bundle for the keys included inside of the bundle even.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
iddorin
Post subject:   PostPosted: Sep 14, 2006 - 03:48 PM



Joined: Jul 13, 2006
Posts: 5

I have the same problem, I have alot of Warning messages in Eclipse related to bundle.

Here is the code used:


<f:view locale="it">
<h:form id="loginForm" rendered="true">
<f:loadBundle basename="com.company.ResourceBundle" var="mesaj"/>
<h:outputLabel rendered="true">
<h:outputText value="#{mesaj.WelcomeText}"/>
</h:outputLabel>
</h:form>
</f:view>


The warning message is (Yellow underline):
'mesaj cannot be resolved'

Appreciate any help
Thanks
 
 View user's profile Send private message  
Reply with quote Back to top
iddorin
Post subject:   PostPosted: Sep 14, 2006 - 03:55 PM



Joined: Jul 13, 2006
Posts: 5

And I have another validation bug. When I use for example:

<h:graphicImage rendered="true" value="/images/green02.gif" width="100%" height="1" />

I got a warning saying:
'Value is not a valid integer'

And the "100%" is underlined with the yellow line.
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Sep 14, 2006 - 05:30 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23855

iddorin,
Is this a Web Project with JSF capabilities added to it? The fastest way to check is to open your project properties, go to MyEclipse and tell me which icons are highlighted.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
iddorin
Post subject:   PostPosted: Sep 15, 2006 - 09:37 AM



Joined: Jul 13, 2006
Posts: 5

Yes, it is a Web Project. I created it as a Web Project, and added JSF capabilities to it.

The other JSF features work fine (autocomplete, validations, and so on), but I only have those 2 issues with the warnings.

It's important to test MyEclipse well because my company is starting a new project and we might choose to work with MyEclipse and they will buy some licenes for the company if everything is fine.


As to project properties, under the MyEclipse menu are highlighted the following:
-Add Struts capabilities
-Add Tapestry capabilities
-Add JSTL capabilities
-Remove Web Project capabilities


The following items are already disabled (because I added those capabilities):
-Add Hibernate capabilities
-Add JSF capabilities
-Add Spring capabilities
-Add Web Project capabilities


Thanks
Dorin
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Sep 15, 2006 - 03:14 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23855

Doring,
This is very strange. Can you create a small test project that exhibits this same problem and email it to me at support@myeclipseide.com ATTN Riyad, with a link to this discussion?

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
iddorin
Post subject:   PostPosted: Sep 19, 2006 - 09:06 AM



Joined: Jul 13, 2006
Posts: 5

I sent you a small project with all those issues.
Before give me a final answer can you tell me at least if you got the same warnings?

Thanks
Dorin
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Sep 19, 2006 - 11:54 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23855

Dorin,
I sure did see the same problem, and when I renamed one of your property bundles from _en.properties to remove the extension and just callde it ResourceBundle.properties, then cleaned the project, the error went away.

This looks like a bug to me actually, the validator is not honoring the platform encoding and looking for the respective file, it is instead looking for exactly the bundle with the givne base name. What you can do to work around the problem is to specify the exact basename you want, like ResourceBundle_it, but I realize that isn't what you want. I think you want to keep exactly what you have and I'll file a bug to have us look into this.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
iddorin
Post subject:   PostPosted: Sep 20, 2006 - 08:18 AM



Joined: Jul 13, 2006
Posts: 5

Riyad,
Thanks for your quick answering. Do you think this issue will be solved in the next release?

Because the application will be multilanguage. The language will be specified in view, and will be take from a bean, so will not be fixed.

Example:
now it is: <f:view locale="it">
but in the real application it will be: <f:view locale="#{LoginBean.userLanguage}">

So the load bundle should look in the general way as it is right now and not particularizated like you adviced me to do

<f:loadBundle basename="it.acse.crm.resource.ResourceBundle" var="bundle"/>
and not
<f:loadBundle basename="it.acse.crm.resource.ResourceBundle_it" var="bundle"/>



What about the percentage warning? (see details the 6'th above message in this thread)

Thanks
Dorin
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Sep 20, 2006 - 02:14 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23855

Dorin,
I don't think this will get fixed in the next release just because we have an existing list of top priority items that have to get addressed first that effect more users unfortunately (prioritizing these releases to cover the most user requirements is tricky).

As for the percentage warning, I would suggest turning off the HTML validator. I persoally leave it off as it's a bit too pedantic for me. We are improving it with each release, but right now I still notice it flagging more unnecessary warnings than it should.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
craigrpeters
Post subject:   PostPosted: Feb 09, 2007 - 04:34 AM
Veteran Member
Veteran Member


Joined: Apr 06, 2004
Posts: 21

I'd like to add my vote for the bundle issue listed above...my code is riddled with warnings because of this issue, plus one other.

I use a lot of data tables, and the iterator variable is also unrecognized by MyEclipse parsing

example:

Code:

 
<h:dataTable id="ManagerList" value="#{managersBean.managerList}" var="item"
      rows="20" cellpadding="4" styleClass="tableBody">
   <h:column id="LocationName">
      <f:facet name="header">
         <h:outputText value="#{bundle.worklocation}"/>
      </f:facet>
      <h:commandLink   id="EditLocMgrBtn"
            action="editmanager"
            actionListener="#{managerBean.selectLocation}">
            <h:outputText value="#{item.workLocName}" />
            <f:param id="locCode" name="loc" value="#{item.workLocCd}"/>
      </h:commandLink>
   </h:column>
.
.
.



Every reference to both "bundle" and "item" is flagged as a warning.

Yikes!!

Thanks,
-Craig
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
ratewatch
Post subject:   PostPosted: Feb 09, 2007 - 02:40 PM
Registered Member
Registered Member


Joined: Oct 28, 2006
Posts: 5

We have the same issue as craigrpeters. Our project is peppered with yellow underlining for both "bundle cannot be resolved" and "item cannot be resolved" issues. Every dataTable, dataList, etc, the "var" variable is underlined everywhere it is used as "cannot be resolved".
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Feb 09, 2007 - 04:13 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23855

We don't like that the editor is creating extra noise for you guys, I"m sorry about that. This is still on our TODO list and will likely be addressed to some extent in 6.0.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits