Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-6480

Design proposal for DynamicUiProperty as a composite component

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Sprint:
      EJBCA Sprint 7

      Description

      Ticket description

      Instead of doing this

      <h:panelGroup rendered="#{!property.multiValued}">
          <h:inputText  disabled="#{approvalProfilesMBean.viewOnly}" rendered="#{property.type.simpleName eq 'String'}" 
              value="#{property.value}" style="width: 100%" >
          <f:converter converterId="stringConverter"/>
          <f:validator validatorId="#{property.validatorType}"/>
          </h:inputText>
          <h:inputTextarea disabled="#{approvalProfilesMBean.viewOnly}"
              rendered="#{property.type.simpleName eq 'MultiLineString'}" 
              value="#{property.value.value}" style="width: 100%" >
          <%-- snip %-->
      </h:panelGroup>
      <%-- snip %-->
      

      We should build a composite component which we can reuse.

      <ui:include src="#{dynamicJsfComponent.facelet}">
          <ui:param name="component" value="#{dynamicJsfComponent}"/>
      </ui:include>
      

      Where dynamicJsfComponent returns the correct facelet. Instead of serialising DynamicJsfComponent and base64-encode it, we should be able to convert it into JSON.

      I am not sure JSF works exactly like I want it to, but I think its worth a try.

      Links

      http://ovaraksin.blogspot.se/2013/06/multiple-dynamic-includes-with-one-jsf.html?m=1
      https://docs.oracle.com/javaee/6/tutorial/doc/giqzr.html

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bastianf Bastian Fredriksson
              Reporter:
              bastianf Bastian Fredriksson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 3 days
                  3d
                  Remaining:
                  Time Spent - 5 hours Remaining Estimate - 2 days, 3 hours
                  2d 3h
                  Logged:
                  Time Spent - 5 hours Remaining Estimate - 2 days, 3 hours
                  5h