[Trinidad] tr:inputFile simple="true" still shows error message and label
-------------------------------------------------------------------------

                 Key: TRINIDAD-1257
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1257
             Project: MyFaces Trinidad
          Issue Type: Bug
    Affects Versions: 1.2.9-core, 1.2.10-core, 1.2.10-sandbox
         Environment: Java 1.6.0_04, Windows XP Pro Service Pack 2
            Reporter: James Barrow


Hi,

I am using Trinidad 1.2.9 and 1.2.10-SNAPSHOT, but in both versions it
seems that, as in the below example, an inputFile with simple="true"
still renders the Trinidad error icon next to the component (I'm
uploading a file that is too large), and also leaves out the links
style of 'AFErrorIconStyle'. I want to only use the FacesContext error
message that is generated (in 1.2.10) that notifies a user that the
upload file was too large, and don't want to display any Trinidad
errors next to the actual component, but it seems to be generating the
error icon still.

=====

Example:

<tr:inputFile id="inputFileID" simple="true"
                    valueChangeListener="#{mybean.uploadMethod}"/>

will generate:

<a name="_msgAnc_j_id21:inputFileID"/>
      <span class="af_inputFile">
      <input id="j_id21:inputFileID" class="af_inputFile_content"
type="file" name="j_id21:inputFileID"/>
</span>

-----

<tr:inputFile id="inputFileID" simple="false"
                    valueChangeListener="#{mybean.uploadMethod}"/>

generates:

<table id="j_id21:inputFileID__xc_" class="af_inputFile"
cellspacing="0" cellpadding="0" border="0" summary="">
  <tbody>
    <tr>
      <td class="af_inputFile_label" nowrap="">
<span id="j_id21:inputFileID::icon">
<a class="AFErrorIconStyle" title="Error"
name="_msgAnc_j_id21:inputFileID">X</a>
</span>
      </td>
      <td class="AFContentCell" nowrap="" valign="top">
        <input id="j_id21:inputFileID" class="af_inputFile_content"
type="file" name="j_id21:inputFileID"/>
      </td>
    </tr>
    <tr>
      <td/>
      <td class="AFComponentMessageCell">
        <span id="j_id21:inputFileID::msg"
class="OraInlineErrorText">The file could not be uploaded because it
is too large.</span>
      </td>
    </tr>
  </tbody>
</table>

=====

And I really don't want that table being generated, rather just a nice
simple input. Is the generating of the link a bug? Or is this how
simple="true" is intended to work... and if so, why does it not
generate the style? Then I could just use the below to solve my
problem of seeing the icon.

.AFErrorIconStyle {
  display: none;
}

Regards,

James Barrow 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to