[jira] [Commented] (TOBAGO-1915) Vertical button group for tc:selectManyShuttle
[ https://issues.apache.org/jira/browse/TOBAGO-1915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16619467#comment-16619467 ] Hudson commented on TOBAGO-1915: SUCCESS: Integrated in Jenkins build Tobago Trunk #1517 (See [https://builds.apache.org/job/Tobago%20Trunk/1517/]) TOBAGO-1915 Vertical button group for tc:selectManyShuttle (hnoeth: rev fb03e831811fb0c12edaf68b086b240f90582fd9) * (edit) tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SelectManyShuttleRenderer.java * (edit) tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/BootstrapClass.java > Vertical button group for tc:selectManyShuttle > -- > > Key: TOBAGO-1915 > URL: https://issues.apache.org/jira/browse/TOBAGO-1915 > Project: MyFaces Tobago > Issue Type: Improvement > Components: Core, Themes >Affects Versions: 4.2.1 >Reporter: Henning Noeth >Assignee: Henning Noeth >Priority: Minor > > Use vertical button group for tc:selectManyShuttle buttons. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (TOBAGO-1879) tc:date does not support Calendar and DateTime
[ https://issues.apache.org/jira/browse/TOBAGO-1879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16619353#comment-16619353 ] ASF GitHub Bot commented on TOBAGO-1879: henningn closed pull request #12: TOBAGO-1879 tc:date does not support Calendar and DateTime URL: https://github.com/apache/myfaces-tobago/pull/12 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/convert/DateTimeConverter.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/convert/DateTimeConverter.java new file mode 100644 index 0..313711677 --- /dev/null +++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/convert/DateTimeConverter.java @@ -0,0 +1,175 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.myfaces.tobago.convert; + +import org.apache.myfaces.tobago.internal.util.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.faces.component.UIComponent; +import javax.faces.component.UIInput; +import javax.faces.context.FacesContext; +import javax.faces.convert.ConverterException; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.OffsetDateTime; +import java.time.OffsetTime; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.time.temporal.TemporalAccessor; +import java.util.Calendar; +import java.util.Locale; +import java.util.TimeZone; + +import static org.apache.myfaces.tobago.convert.DateTimeConverter.CONVERTER_ID; + +@org.apache.myfaces.tobago.apt.annotation.Converter(id = CONVERTER_ID) +public class DateTimeConverter extends javax.faces.convert.DateTimeConverter { + + private static final Logger LOG = LoggerFactory.getLogger(DateTimeConverter.class); + + public static final String CONVERTER_ID = "org.apache.myfaces.tobago.DateTime"; + + private static final String TYPE_DATE = "date"; + private static final String TYPE_TIME = "time"; + private static final String TYPE_BOTH = "both"; + private static final String TYPE_CALENDAR = "calendar"; + private static final String TYPE_LOCAL_DATE = "localDate"; + private static final String TYPE_LOCAL_TIME = "localTime"; + private static final String TYPE_LOCAL_DATE_TIME = "localDateTime"; + private static final String TYPE_OFFSET_TIME = "offsetTime"; + private static final String TYPE_OFFSET_DATE_TIME = "offsetDateTime"; + private static final String TYPE_ZONED_DATE_TIME = "zonedDateTime"; + + @Override + public Object getAsObject(FacesContext facesContext, UIComponent component, String string) throws ConverterException { +if (StringUtils.isBlank(string)) { + return null; +} else { + final String type = getType(); + if (TYPE_DATE.equals(type) || TYPE_TIME.equals(type) || TYPE_BOTH.equals(type)) { +return super.getAsObject(facesContext, component, string); + } else if (TYPE_CALENDAR.equals(type)) { +final Locale locale = getLocale(); +final String pattern = getPattern(); +final TimeZone timeZone = getTimeZone(); +final Calendar calendar; +if (component instanceof UIInput && ((UIInput) component).getValue() != null) { + calendar = (Calendar) ((UIInput) component).getValue(); +} else { + if (timeZone != null && locale != null) { +calendar = Calendar.getInstance(timeZone, locale); + } else if (locale != null) { +calendar = Calendar.getInstance(locale); + } else if (timeZone != null) { +calendar = Calendar.getInstance(timeZone); + } else { +calendar = Calendar.getInstance(); + } +} + +SimpleDateFormat sdf = locale != null ? new SimpleDateFormat(pattern, locale) : new SimpleDateFormat(pattern); +try { +
[jira] [Commented] (TOBAGO-1879) tc:date does not support Calendar and DateTime
[ https://issues.apache.org/jira/browse/TOBAGO-1879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16619352#comment-16619352 ] ASF GitHub Bot commented on TOBAGO-1879: henningn commented on issue #12: TOBAGO-1879 tc:date does not support Calendar and DateTime URL: https://github.com/apache/myfaces-tobago/pull/12#issuecomment-422456341 Already comitted. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > tc:date does not support Calendar and DateTime > -- > > Key: TOBAGO-1879 > URL: https://issues.apache.org/jira/browse/TOBAGO-1879 > Project: MyFaces Tobago > Issue Type: Improvement > Components: Core >Affects Versions: 4.1.0 >Reporter: Henning Noeth >Assignee: Henning Noeth >Priority: Major > Fix For: 4.3.0 > > > Implement support for java.util.Calendar and java.time.DateTime. > MyFaces 2.3 has implemented java.time.DateTime for f:convertDateTime already. > This issue is mainly for backporting this functionality to JSF 2.2 and lower. > Usage is: -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] henningn commented on issue #12: TOBAGO-1879 tc:date does not support Calendar and DateTime
henningn commented on issue #12: TOBAGO-1879 tc:date does not support Calendar and DateTime URL: https://github.com/apache/myfaces-tobago/pull/12#issuecomment-422456341 Already comitted. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] henningn closed pull request #12: TOBAGO-1879 tc:date does not support Calendar and DateTime
henningn closed pull request #12: TOBAGO-1879 tc:date does not support Calendar and DateTime URL: https://github.com/apache/myfaces-tobago/pull/12 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/convert/DateTimeConverter.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/convert/DateTimeConverter.java new file mode 100644 index 0..313711677 --- /dev/null +++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/convert/DateTimeConverter.java @@ -0,0 +1,175 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.myfaces.tobago.convert; + +import org.apache.myfaces.tobago.internal.util.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.faces.component.UIComponent; +import javax.faces.component.UIInput; +import javax.faces.context.FacesContext; +import javax.faces.convert.ConverterException; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.OffsetDateTime; +import java.time.OffsetTime; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.time.temporal.TemporalAccessor; +import java.util.Calendar; +import java.util.Locale; +import java.util.TimeZone; + +import static org.apache.myfaces.tobago.convert.DateTimeConverter.CONVERTER_ID; + +@org.apache.myfaces.tobago.apt.annotation.Converter(id = CONVERTER_ID) +public class DateTimeConverter extends javax.faces.convert.DateTimeConverter { + + private static final Logger LOG = LoggerFactory.getLogger(DateTimeConverter.class); + + public static final String CONVERTER_ID = "org.apache.myfaces.tobago.DateTime"; + + private static final String TYPE_DATE = "date"; + private static final String TYPE_TIME = "time"; + private static final String TYPE_BOTH = "both"; + private static final String TYPE_CALENDAR = "calendar"; + private static final String TYPE_LOCAL_DATE = "localDate"; + private static final String TYPE_LOCAL_TIME = "localTime"; + private static final String TYPE_LOCAL_DATE_TIME = "localDateTime"; + private static final String TYPE_OFFSET_TIME = "offsetTime"; + private static final String TYPE_OFFSET_DATE_TIME = "offsetDateTime"; + private static final String TYPE_ZONED_DATE_TIME = "zonedDateTime"; + + @Override + public Object getAsObject(FacesContext facesContext, UIComponent component, String string) throws ConverterException { +if (StringUtils.isBlank(string)) { + return null; +} else { + final String type = getType(); + if (TYPE_DATE.equals(type) || TYPE_TIME.equals(type) || TYPE_BOTH.equals(type)) { +return super.getAsObject(facesContext, component, string); + } else if (TYPE_CALENDAR.equals(type)) { +final Locale locale = getLocale(); +final String pattern = getPattern(); +final TimeZone timeZone = getTimeZone(); +final Calendar calendar; +if (component instanceof UIInput && ((UIInput) component).getValue() != null) { + calendar = (Calendar) ((UIInput) component).getValue(); +} else { + if (timeZone != null && locale != null) { +calendar = Calendar.getInstance(timeZone, locale); + } else if (locale != null) { +calendar = Calendar.getInstance(locale); + } else if (timeZone != null) { +calendar = Calendar.getInstance(timeZone); + } else { +calendar = Calendar.getInstance(); + } +} + +SimpleDateFormat sdf = locale != null ? new SimpleDateFormat(pattern, locale) : new SimpleDateFormat(pattern); +try { + calendar.setTime(sdf.parse(string)); +} catch (ParseException e) { + throw new ConverterException("string='" + string + "'", e); +} + +return calendar; + } else if (TYPE_LOCAL_DATE.equals(type)) { +
[jira] [Commented] (TOBAGO-1932) Refactor Bootstrap Theme Building
[ https://issues.apache.org/jira/browse/TOBAGO-1932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16619348#comment-16619348 ] ASF GitHub Bot commented on TOBAGO-1932: lofwyr14 opened a new pull request #13: TOBAGO-1932 Refactor Bootstrap Theme Building URL: https://github.com/apache/myfaces-tobago/pull/13 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Refactor Bootstrap Theme Building > - > > Key: TOBAGO-1932 > URL: https://issues.apache.org/jira/browse/TOBAGO-1932 > Project: MyFaces Tobago > Issue Type: Improvement >Reporter: Udo Schnurpfeil >Priority: Major > > The theme building is currently a bit unusual. Refactor it like described > here: [https://getbootstrap.com/docs/4.0/getting-started/theming/] > For that, we need a package.json and our own node build process. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] lofwyr14 opened a new pull request #13: TOBAGO-1932 Refactor Bootstrap Theme Building
lofwyr14 opened a new pull request #13: TOBAGO-1932 Refactor Bootstrap Theme Building URL: https://github.com/apache/myfaces-tobago/pull/13 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[jira] [Created] (TOBAGO-1932) Refactor Bootstrap Theme Building
Udo Schnurpfeil created TOBAGO-1932: --- Summary: Refactor Bootstrap Theme Building Key: TOBAGO-1932 URL: https://issues.apache.org/jira/browse/TOBAGO-1932 Project: MyFaces Tobago Issue Type: Improvement Reporter: Udo Schnurpfeil The theme building is currently a bit unusual. Refactor it like described here: [https://getbootstrap.com/docs/4.0/getting-started/theming/] For that, we need a package.json and our own node build process. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (TOBAGO-1928) Required has no effect for tc:file
[ https://issues.apache.org/jira/browse/TOBAGO-1928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henning Noeth resolved TOBAGO-1928. --- Resolution: Fixed Required attribute only works for single file upload. For multiple file upload, there is another issue: TOBAGO-1930 > Required has no effect for tc:file > -- > > Key: TOBAGO-1928 > URL: https://issues.apache.org/jira/browse/TOBAGO-1928 > Project: MyFaces Tobago > Issue Type: Bug > Components: Core >Affects Versions: 4.2.1 >Reporter: Henning Noeth >Assignee: Henning Noeth >Priority: Major > Fix For: 4.3.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (TOBAGO-1931) TobagoBundle class doesn't work correctly
Udo Schnurpfeil created TOBAGO-1931: --- Summary: TobagoBundle class doesn't work correctly Key: TOBAGO-1931 URL: https://issues.apache.org/jira/browse/TOBAGO-1931 Project: MyFaces Tobago Issue Type: Bug Components: Core Affects Versions: 4.2.1, 3.0.6 Reporter: Udo Schnurpfeil -- This message was sent by Atlassian JIRA (v7.6.3#76005)