Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-49327

aui:input tag does not consider default value / bean value when its type is "timeZone"

    Details

      Description

      The <aui:input> tag, when used in conjunction with <aui:model-context> tag, sets its own value with the value of a bean. However, if the input is of the type "timeZone", it does not behave this way. If a instance of the bean is given, <aui:input> fails, as well as if no instance is given.

      Steps to reproduce

      1. Create a portlet which:
        • has a service whose entity has a "timeZoneId" string field (cf. service.xml).
        • has a form to create and edit such entities, using <aui:form>, <aui:model-context> and <aui:input>. The aui:input corresponding to the "timeZoneId" field should be of the type "timeZone" (cf edit_city.jsp).
        • The attached "Input Time Zone Portlet" (Eclipse project, WAR file) has this properties.
      2. Deploy the portlet.
      3. Manually add an instance of the entity above to the database.
        • The lportal.sql dump file has an entire database ready for testing.
      4. Access the form to add a new entity.
      5. Access the form to edit the entity added to the database.

      Expected results

      • In step 4, the time zone input should appear and the selected time zone should be the portal's default.
      • In step 5, the time zone input should appear and the selected time zone should be the entity's time zone id.

      Actual results

      • In step 4, the time zone input does not appear. A NullPointerException stack trace appears in the logs.
      • In step 5, the time zone input does not appear. A NullPointerException stack trace appears in the logs.

        Attachments

        1. edit_city.jsp
          0.8 kB
        2. input-time-zone-portlet.zip
          114 kB
        3. input-time-zone-portlet-7.0.0.1.war
          178 kB
        4. lportal.sql
          582 kB
        5. service.xml
          0.5 kB

          Issue Links

            Activity

              People

              • Assignee:
                haoliang.wu Haoliang Wu (Inactive)
                Reporter:
                adam.brandizzi Adam Brandizzi
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 14 weeks, 6 days ago

                  Packages

                  Version Package
                  7.0.0 M1