You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "James Barrow (JIRA)" <de...@myfaces.apache.org> on 2008/10/14 15:42:44 UTC
[jira] Issue Comment Edited: (TRINIDAD-1257) [Trinidad]
tr:inputFile simple="true" still shows error message and label
[ https://issues.apache.org/jira/browse/TRINIDAD-1257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639417#action_12639417 ]
jamiebarrow edited comment on TRINIDAD-1257 at 10/14/08 6:41 AM:
------------------------------------------------------------------
[after.jpg]
This is after uploading a file that is greater than the allowable maximum. The inputFile is simple, and so I would not expect the error link to be rendered, but it is.
Code snippet:
<h:panelGroup id="imagesPanelId">
<fieldset>
<legend>Images</legend>
<p>
<tr:inputFile id="inputFileID" simple="true" label="File"
valueChangeListener="#{QuestionUpdateController.valueChangeUploadedFile}"/>
</p>
<table>
<tr>
<td>
<h:outputLabel id="fileDescriptionLabelId"
for="fileDescriptionInputId">Description</h:outputLabel>
</td>
<td>
<h:inputText id="fileDescriptionInputId" styleClass="inputText"
value="#{QuestionUpdateController.questionImageDescription}"/>
</td>
</tr>
</table>
<h:commandLink id="fileButtonId" value="Upload"
action="#{QuestionUpdateController.uploadQuestionImage}"/>
=====
Generated HTML snippet:
<fieldset>
<legend>Images</legend>
<p><a name="_msgAnc_j_id21:inputFileID"/><span class="af_inputFile"><input type="file" class="af_inputFile_content" name="j_id21:inputFileID" id="j_id21:inputFileID"/><label class="p_OraHiddenLabel" for="j_id21:inputFileID">File</label></span>
</p>
<table>
<tbody><tr>
<td><label for="j_id21:fileDescriptionInputId" id="j_id21:fileDescriptionLabelId">
Description</label>
</td>
<td><input type="text" class="inputText" value="dfasdf" name="j_id21:fileDescriptionInputId" id="j_id21:fileDescriptionInputId"/>
</td>
</tr>
</tbody></table><a href="#" class="OraLink" onclick="submitForm('j_id21',1,{source:'j_id21:fileButtonId'});return false;" name="j_id21:fileButtonId" id="j_id21:fileButtonId">Upload</a>
was (Author: jamiebarrow):
This is after uploading a file that is greater than the allowable maximum. The inputFile is simple, and so I would not expect the error link to be rendered, but it is.
Code snippet:
<h:panelGroup id="imagesPanelId">
<fieldset>
<legend>Images</legend>
<p>
<tr:inputFile id="inputFileID" simple="true" label="File"
valueChangeListener="#{QuestionUpdateController.valueChangeUploadedFile}"/>
</p>
<table>
<tr>
<td>
<h:outputLabel id="fileDescriptionLabelId"
for="fileDescriptionInputId">Description</h:outputLabel>
</td>
<td>
<h:inputText id="fileDescriptionInputId" styleClass="inputText"
value="#{QuestionUpdateController.questionImageDescription}"/>
</td>
</tr>
</table>
<h:commandLink id="fileButtonId" value="Upload"
action="#{QuestionUpdateController.uploadQuestionImage}"/>
=====
Generated HTML snippet:
<fieldset>
<legend>Images</legend>
<p><a name="_msgAnc_j_id21:inputFileID"/><span class="af_inputFile"><input type="file" class="af_inputFile_content" name="j_id21:inputFileID" id="j_id21:inputFileID"/><label class="p_OraHiddenLabel" for="j_id21:inputFileID">File</label></span>
</p>
<table>
<tbody><tr>
<td><label for="j_id21:fileDescriptionInputId" id="j_id21:fileDescriptionLabelId">
Description</label>
</td>
<td><input type="text" class="inputText" value="dfasdf" name="j_id21:fileDescriptionInputId" id="j_id21:fileDescriptionInputId"/>
</td>
</tr>
</tbody></table><a href="#" class="OraLink" onclick="submitForm('j_id21',1,{source:'j_id21:fileButtonId'});return false;" name="j_id21:fileButtonId" id="j_id21:fileButtonId">Upload</a>
> [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
> Attachments: after.jpg, before.jpg
>
>
> 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.