Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316834 - Missing metadata for JSF (1.2) HTML's graphicImage/url and commandButton/image attrs
Summary: Missing metadata for JSF (1.2) HTML's graphicImage/url and commandButton/imag...
Status: NEW
Alias: None
Product: Java Server Faces
Classification: WebTools
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: Future   Edit
Assignee: Ian Trimble CLA
QA Contact:
URL: ORACLE_P2
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-14 17:20 EDT by Preston Appel CLA
Modified: 2011-10-13 14:18 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Preston Appel CLA 2010-06-14 17:20:20 EDT
Build Identifier: I20100527-1700

Even though the JSF 1.2 tag lib documentation shows that the "url" attribute of the JSF HTML "graphicImage" tag and the "image" attribute of the "commandButton" tag are ValueExpressions, the metadata does not reflect this.  It doesn't look like the metadata automatically shows this for every attribute that can be a ValueExpression, but it would be useful to have it for these attributes.  Thanks.

Reproducible: Always

Steps to Reproduce:
1.  This happens in our product (Oracle Enterprise Pack for Eclipse) when we access the metadata for these two attribute.
2.  I don't know a good repro case for straight JSF, but inspecting the metadata directly should show what I'm talking about.
Comment 1 Raghunathan Srinivasan CLA 2010-08-24 18:10:38 EDT
Duplicate of  bug 319189 ?
Comment 2 Ian Trimble CLA 2010-08-24 18:21:17 EDT
(In reply to comment #1)
> Duplicate of  bug 319189 ?

No, I don't believe this has anything to do with DTInfo metadata - I could be wrong. Preston?
Comment 3 Preston Appel CLA 2010-08-25 10:49:56 EDT
I thought it had to do with the metadata in org.eclipse.jst.jsf.standard.tagsupport/metadata.  Specifically, I was looking for something like:

<entity id="graphicImage" type="tag">
  ...
  <entity id="url">
    <trait id="attribute-value-runtime-type">
      <value xsi:type="mdt:StringValue">org.eclipse.jst.jsf.core.attributevalues.ValueBindingType</value>
      ...
    </trait>
  ...
</entity>

And the same for the "image" attribute of the "commandButton" tag.  Instead, it has type org.eclipse.jst.jsf.core.attributevalues.WebPathType.

This is all in the jsf_html.xml file.

I'm no expert in this, but I think this is where the issue lies.
Comment 4 Ian Trimble CLA 2010-08-25 12:09:47 EDT
(In reply to comment #3)
> I thought it had to do with the metadata in
> org.eclipse.jst.jsf.standard.tagsupport/metadata.  Specifically, I was looking
> for something like:
> <entity id="graphicImage" type="tag">
>   ...
>   <entity id="url">
>     <trait id="attribute-value-runtime-type">
>       <value
> xsi:type="mdt:StringValue">org.eclipse.jst.jsf.core.attributevalues.ValueBindingType</value>
>       ...
>     </trait>
>   ...
> </entity>
> And the same for the "image" attribute of the "commandButton" tag.  Instead, it
> has type org.eclipse.jst.jsf.core.attributevalues.WebPathType.
> This is all in the jsf_html.xml file.
> I'm no expert in this, but I think this is where the issue lies.

Right. It looks like it's metadata-related, but this is different metadata than is used for "tag converting" for rendering, so this bug is not a duplicate of Bug 319189.
Comment 5 Ian Trimble CLA 2010-08-25 17:10:18 EDT
Preston, what exactly is affected by this "missing metadata"? This is not metadata that I am familiar with, so please advise what behaviour or functionality is missing or broken and what is expected instead.

Thanks,
 - Ian
Comment 6 Raghunathan Srinivasan CLA 2010-09-06 12:10:09 EDT
Deferred due to lack of resources.
Comment 7 Preston Appel CLA 2011-03-16 11:36:21 EDT
Let's look at this one from the symptoms; I'll stop trying to say what I suspect the metadata should look like.

So, back to the JSF 1.2 document: the "url" attribute of the JSF HTML "graphicImage" tag and the "image" attribute of the "commandButton" tag are ValueExpressions.

Given that, I have a call to 

return MetaDataEnabledProcessingFactory
           .getInstance()
               .getAttributeValueRuntimeTypeFeatureProcessors(
                   adapterType, // IValidELValues.class
                   sdContext,   // DefaultStructuredDocumentContext
                   uri,         // http://java.sun.com/jsf/html
                   elementName, // graphicImage
                   attrName);   // url

Why does it return Collections$EmptyList for the IValidELValues adapter type when the JSF 1.2 docs say the attribute is a ValueExpression?
Comment 8 Ian Trimble CLA 2011-03-16 12:22:36 EDT
Preston,

Thanks for the info. I have also spoken to others about this. What I am asking is what functionality is broken by this, what feature fails to work, etc? How do I test this (other than by writing code and observing the return value)? 

Based on what I have learned, I suspect that the observable functionality is possibly minimal within the JSF Tools project itself but much more obvious in adopter products that make use of API/features offered by the JSF Tools project.

Again, thanks,
 - Ian
Comment 9 Preston Appel CLA 2011-03-16 13:24:19 EDT
Ian, you're right in saying that the observable functionality is in the adopter products that make use of API/features offered by the JSF Tools project.

Our product puts up an EL dialog when it detects the value expression case (and others too).  Without this fix, we don't know to put up the EL dialog.

I don't have a case where you can test this in the open source code.
Comment 10 Raghunathan Srinivasan CLA 2011-05-26 14:17:15 EDT
Mass Triage: Deferred from Indigo
Comment 11 Raghunathan Srinivasan CLA 2011-05-26 14:19:24 EDT
Changing the Target Milestone to future