You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by James Barrow <ja...@gmail.com> on 2008/09/30 12:11:06 UTC

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

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

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

Posted by James Barrow <ja...@gmail.com>.
https://issues.apache.org/jira/browse/TRINIDAD-1257

I left the priority as major, wasn't sure if it is or not.

On Tue, Oct 14, 2008 at 1:02 PM, Matthias Wessendorf <ma...@apache.org> wrote:
> can you file a bug ?
>

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

Posted by Matthias Wessendorf <ma...@apache.org>.
can you file a bug ?

On Tue, Oct 14, 2008 at 11:21 AM, jamiebarrow <ja...@gmail.com> wrote:
>
> Any feedback on the below? Anybody else experience this?
>
>
> jamiebarrow wrote:
>>
>> 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:
>>
>>
>>
>>       <input id="j_id21:inputFileID" class="af_inputFile_content"
>> type="file" name="j_id21:inputFileID"/>
>>
>>
>> -----
>>
>> <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="">
>>
>>  X
>>
>>       </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">
>>         The file could not be uploaded because it
>> is too large.
>>       </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
>>
>>
>
> --
> View this message in context: http://www.nabble.com/-Trinidad--tr%3AinputFile-simple%3D%22true%22-still-shows-error-message-and-label-tp19739355p19969828.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

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

Posted by jamiebarrow <ja...@gmail.com>.
Any feedback on the below? Anybody else experience this?


jamiebarrow wrote:
> 
> 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:
> 
>  
>       
>       <input id="j_id21:inputFileID" class="af_inputFile_content"
> type="file" name="j_id21:inputFileID"/>
> 
> 
> -----
> 
> <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="">
> 
>  X 
> 
>       </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">
>         The file could not be uploaded because it
> is too large.
>       </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
> 
> 

-- 
View this message in context: http://www.nabble.com/-Trinidad--tr%3AinputFile-simple%3D%22true%22-still-shows-error-message-and-label-tp19739355p19969828.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.