[JBoss JIRA] (GTNWSRP-346) Multipart requests are not handeled if there is no attached file
by Chris Laprun (JIRA)
[ https://issues.jboss.org/browse/GTNWSRP-346?page=com.atlassian.jira.plugi... ]
Chris Laprun updated GTNWSRP-346:
---------------------------------
Status: Pull Request Sent (was: Pull Request Sent)
Git Pull Request: https://github.com/gatein/gatein-wsrp/pull/65, https://github.com/gatein/gatein-wsrp/pull/64 (was: https://github.com/gatein/gatein-wsrp/pull/65)
> Multipart requests are not handeled if there is no attached file
> ----------------------------------------------------------------
>
> Key: GTNWSRP-346
> URL: https://issues.jboss.org/browse/GTNWSRP-346
> Project: GateIn WSRP
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 2.1.7-GA, 2.2.2.Final
> Reporter: Martin Weiler
> Assignee: Chris Laprun
> Fix For: 2.1.8-GA, 2.2.3.Final
>
>
> We have html multipart form in a wsrp portlet:
> {code:xml}
> <form enctype="multipart/form-data" method="post" ...
> {code}
> with an optional input field for an attachment:
> {code:xml}
> <input type="file" value="org.springframework.web.multipart.commons.CommonsMultipartFile@f3af1" name="attachement">
> {code}
> The "org.gatein.wsrp.consumer.handlers.ActionHandler" handles the request correctly and tries to create a UploadContext with the help of the WSRPTypeFactory:
> {code}
> UploadContext uploadContext = WSRPTypeFactory.createUploadContext(contentType, baos.toByteArray());
> {code}
> The problem is, that the createUploadContext throws an exception if the byte array has a content lenght of 0 and so the rest of the parameteres are not handled correctly:
> {code}
> public static UploadContext createUploadContext(String mimeType, byte[] uploadData)
> {
> ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(mimeType, "MIME Type", "UploadContext");
> if (uploadData == null || uploadData.length == 0)
> {
> throw new IllegalArgumentException("Must pass non-null, non-empty upload data");
> }
>
> UploadContext uploadContext = new UploadContext();
> uploadContext.setMimeType(mimeType);
> uploadContext.setUploadData(uploadData);
> return uploadContext;
> }
> {code}
> So currently the post request with WSRP works only if really a file is attached. Without WSRP it runs with and without an attached file.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (GTNWSRP-346) Multipart requests are not handeled if there is no attached file
by Chris Laprun (JIRA)
[ https://issues.jboss.org/browse/GTNWSRP-346?page=com.atlassian.jira.plugi... ]
Chris Laprun updated GTNWSRP-346:
---------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/gatein/gatein-wsrp/pull/65
> Multipart requests are not handeled if there is no attached file
> ----------------------------------------------------------------
>
> Key: GTNWSRP-346
> URL: https://issues.jboss.org/browse/GTNWSRP-346
> Project: GateIn WSRP
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 2.1.7-GA, 2.2.2.Final
> Reporter: Martin Weiler
> Assignee: Chris Laprun
> Fix For: 2.1.8-GA, 2.2.3.Final
>
>
> We have html multipart form in a wsrp portlet:
> {code:xml}
> <form enctype="multipart/form-data" method="post" ...
> {code}
> with an optional input field for an attachment:
> {code:xml}
> <input type="file" value="org.springframework.web.multipart.commons.CommonsMultipartFile@f3af1" name="attachement">
> {code}
> The "org.gatein.wsrp.consumer.handlers.ActionHandler" handles the request correctly and tries to create a UploadContext with the help of the WSRPTypeFactory:
> {code}
> UploadContext uploadContext = WSRPTypeFactory.createUploadContext(contentType, baos.toByteArray());
> {code}
> The problem is, that the createUploadContext throws an exception if the byte array has a content lenght of 0 and so the rest of the parameteres are not handled correctly:
> {code}
> public static UploadContext createUploadContext(String mimeType, byte[] uploadData)
> {
> ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(mimeType, "MIME Type", "UploadContext");
> if (uploadData == null || uploadData.length == 0)
> {
> throw new IllegalArgumentException("Must pass non-null, non-empty upload data");
> }
>
> UploadContext uploadContext = new UploadContext();
> uploadContext.setMimeType(mimeType);
> uploadContext.setUploadData(uploadData);
> return uploadContext;
> }
> {code}
> So currently the post request with WSRP works only if really a file is attached. Without WSRP it runs with and without an attached file.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (GTNPORTAL-2799) Changing Portlet Icon doesn't work
by Son Tran (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-2799?page=com.atlassian.jira.pl... ]
Son Tran commented on GTNPORTAL-2799:
-------------------------------------
The css background attribute of default PortletIcon class always overrode other chosen PortletIcon.
For instance:
- choosing AcrobatFile as portlet icon
- The div will be: <div class="PortletIcon AcrobatFile">Home Page portlet</div>
- The background icon of PortletIcon is displayed instead of AcrobatFile => Therefore it's always the Earth image.
> Changing Portlet Icon doesn't work
> ----------------------------------
>
> Key: GTNPORTAL-2799
> URL: https://issues.jboss.org/browse/GTNPORTAL-2799
> Project: GateIn Portal
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: WebUI
> Affects Versions: 3.5.0.Final
> Reporter: Trong Tran
> Priority: Trivial
> Labels: portal-s70
> Attachments: Portal Navigation_1358312135866, Portal Navigation_1358312135866.png, Screen Shot 2013-01-16 at 11.56.05 AM.png
>
>
> Go to the Portlet Edit form to change the Icon, then save ==> it doesn't work (see attached images)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (GTNPORTAL-2680) Can't change password after recovery
by H. Trang Vu (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-2680?page=com.atlassian.jira.pl... ]
H. Trang Vu updated GTNPORTAL-2680:
-----------------------------------
Issue Type: Bug (was: Feature Request)
> Can't change password after recovery
> ------------------------------------
>
> Key: GTNPORTAL-2680
> URL: https://issues.jboss.org/browse/GTNPORTAL-2680
> Project: GateIn Portal
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: User Interface
> Affects Versions: 3.4.0.Final
> Environment: - JBoss AS 5 distro
> - Google Chrome 22.0.1229.94 m
> Reporter: Fernando Ribeiro
> Priority: Critical
>
> When I click the "Save" or "Close" buttons in the Forget Password from, I get the following error in the console:
> "Uncaught TypeError: Cannot call method 'submitForm' of undefined"
> The issue is caused by the browser not finding the "exo.webui.UIForm" object used in the form:
> <a href="javascript:window.scroll(0,0);" onclick="javascript:eXo.webui.UIForm.submitForm('UIResetPassword','Save',true)" class="ActionButton LightBlueStyle">Salvar</a>
> <a href="javascript:window.scroll(0,0);" onclick="javascript:eXo.webui.UIForm.submitForm('UIResetPassword','Close',true)" class="ActionButton LightBlueStyle">Fechar</a>
> I can't tell if that object is really missing or the form should submit the form otherwise.
> Please advise.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months