[JBoss JIRA] Created: (GTNPORTAL-1944) DateTimeValidator has superflous code that breaks localized date timestamps
by Matt Davis (JIRA)
DateTimeValidator has superflous code that breaks localized date timestamps
---------------------------------------------------------------------------
Key: GTNPORTAL-1944
URL: https://issues.jboss.org/browse/GTNPORTAL-1944
Project: GateIn Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: WebUI
Affects Versions: 3.1.0-GA
Reporter: Matt Davis
http://anonsvn.jboss.org/repos/gatein/epp/portal/tags/EPP_5_1_0_GA/webui/...
has an additional check where the date input value needs to match the (not localized) DATETIME_REGEX, which is superfluous and causes localized date input to fail:
Index: core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java
===================================================================
--- core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java (revision 6667)
+++ core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java (working copy)
@@ -43,17 +43,11 @@
public class DateTimeValidator implements Validator
{
- static private final String SPLIT_REGEX = "/|\\s+|:";
-
- static private final String DATETIME_REGEX =
- "^(\\d{1,2}\\/\\d{1,2}\\/\\d{1,4})\\s*(\\s+\\d{1,2}:\\d{1,2}:\\d{1,2})?$";
-
public void validate(UIFormInput uiInput) throws Exception
{
if (uiInput.getValue() == null || ((String)uiInput.getValue()).trim().length() == 0)
return;
String s = (String)uiInput.getValue();
- DateFormat stFormat = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
UIFormDateTimeInput uiDateInput = (UIFormDateTimeInput)uiInput;
SimpleDateFormat sdf = new SimpleDateFormat(uiDateInput.getDatePattern_().trim());
@@ -79,24 +73,5 @@
{
throw new MessageException(new ApplicationMessage("DateTimeValidator.msg.Invalid-input", args, ApplicationMessage.WARNING));
}
- if (s.matches(DATETIME_REGEX) && isValidDateTime(s))
- return;
-
- throw new MessageException(new ApplicationMessage("DateTimeValidator.msg.Invalid-input", args, ApplicationMessage.WARNING));
}
-
- private boolean isValidDateTime(String dateTime)
- {
- String[] arr = dateTime.split(SPLIT_REGEX, 7);
- int valid = Integer.parseInt(arr[0]);
- if (valid < 1 || valid > 12)
- return false;
- Calendar date = new GregorianCalendar(Integer.parseInt(arr[2]), valid - 1, 1);
- if (Integer.parseInt(arr[1]) > date.getActualMaximum(Calendar.DAY_OF_MONTH))
- return false;
- if (arr.length > 3
- && (Integer.parseInt(arr[3]) > 23 || Integer.parseInt(arr[4]) > 59 || Integer.parseInt(arr[5]) > 59))
- return false;
- return true;
- }
}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 4 months
[JBoss JIRA] Moved: (GTNPORTAL-1974) Add Node button always create new node on the top level
by Honza Fnukal (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-1974?page=com.atlassian.jira.pl... ]
Honza Fnukal moved JBEPP-1034 to GTNPORTAL-1974:
------------------------------------------------
Project: GateIn Portal (was: JBoss Enterprise Portal Platform)
Key: GTNPORTAL-1974 (was: JBEPP-1034)
Affects Version/s: (was: 5.1.0.CR01)
(was: 5.1.1.DEV01)
Fix Version/s: (was: 5.2.0.DEV02)
> Add Node button always create new node on the top level
> -------------------------------------------------------
>
> Key: GTNPORTAL-1974
> URL: https://issues.jboss.org/browse/GTNPORTAL-1974
> Project: GateIn Portal
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Michal Vanco
> Assignee: Honza Fnukal
> Labels: EPP_5.1.x_Triage
>
> Using Add Node button in Navigation Management (Site or Group) always create new node at the top level.
> When you have some subnode selected and Add Node button is used, node is created at the top level.
> Only way to create subnode is to use context menu otherwise node selection is ignored.
> Maybe it's wanted behavior, but IMO users would appreciate to create node on current selection.
> Or is there reason for this behavior?
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 4 months
[JBoss JIRA] Created: (GTNPORTAL-1933) actionScopedRequestAttributes not available for portlets
by m l (JIRA)
actionScopedRequestAttributes not available for portlets
--------------------------------------------------------
Key: GTNPORTAL-1933
URL: https://issues.jboss.org/browse/GTNPORTAL-1933
Project: GateIn Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Common integration
Affects Versions: 3.1.0-GA
Environment: Java6
Reporter: m l
javax.portlet.actionScopedRequestAttributes do not seem to be functioning.
This blog post descibes what it should do:
http://wpcertification.blogspot.com/2011/02/actionscopedrequestattributes...
They make possible to call request.setAttribute() from processAction() to RenderRequest, to be available in the PortletFilter.
There is a workaround by using response.setRenderParameter(), but I have a portlet that is already working in Liferay and I'd like to port it to GateIn by having this feature available.
I have this in my portlet.xml:
<container-runtime-option>
<name>javax.portlet.actionScopedRequestAttributes</name>
<value>true</value>
</container-runtime-option>
Still those attributes I set in processAction get lost, and are not available by RenderRequest.getAttribute()
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 4 months