Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-5715

Fix Java EE getting started guide code snippet

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.5.0, 7.5.0-alpha4
    • Component/s: documentation
    • Labels:
      None

      Description

      Problem:
      The code snippet in https://docs.camunda.org/get-started/javaee6/task-form/#create-a-jsf-form-task-form is wrong:

      <!DOCTYPE HTML>
      <html lang="en" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
      
      <f:view>
      <f:metadata>
        <!-- Start working on a task. Task Id is read internally from
             request parameters and cached in the CDI conversation scope.
        -->
      
        <f:event type="preRenderView" listener="#{camundaTaskForm.startTaskForm()}" />
      </f:metadata>
      <h:head>
        <title>Approve Order</title>
      </h:head>
      <h:body>
        <h1>Order:</h1>
        Customer: #{approveOrderController.orderEntity.customer}
        Address: #{approveOrderController.orderEntity.address}
        Pizza: #{approveOrderController.orderEntity.pizza}
        <h:form id="submitForm">
          <h:outputLabel>Approve Order?</h:outputLabel>
          <h:selectBooleanCheckbox value="#{approveOrderController.orderEntity.approved}"/><br/>
          <h:commandButton id="submit_button" value="Approve Order" action="#{approveOrderController.submitForm()}" />
        </h:form>
      </h:body>
      </f:view>
      </html>
      </script>
      
      <script type="text/html" id="preparepizza.xhtml">
      <!DOCTYPE HTML>
      <html lang="en" xmlns="http://www.w3.org/1999/xhtml"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core">
      
      <f:view>
        <f:metadata>
          <!-- Start working on a task. Task Id is read internally from
               request parameters and cached in the CDI conversation scope.
          -->
      
          <f:event type="preRenderView" listener="#{camundaTaskForm.startTaskForm()}" />
        </f:metadata>
        <h:head>
          <title>Prepare Pizza</title>
        </h:head>
        <h:body>
          <h1>Please prepare pizza</h1>
          <h:form id="submitForm">
            <h:commandButton id="submit_button" value="Done" action="#{camundaTaskForm.completeTask()}" />
          </h:form>
        </h:body>
      </f:view>
      </html>
      

      Should be:

      <!DOCTYPE HTML>
      <html lang="en" xmlns="http://www.w3.org/1999/xhtml"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core">
      
      <f:view>
        <f:metadata>
          <!-- Start working on a task. Task Id is read internally from
               request parameters and cached in the CDI conversation scope.
          -->
      
          <f:event type="preRenderView" listener="#{camundaTaskForm.startTaskForm()}" />
        </f:metadata>
        <h:head>
          <title>Approve Order</title>
        </h:head>
        <h:body>
          <h1>Order:</h1>
          <p>Customer: #{approveOrderController.orderEntity.customer}</p>
          <p>Address: #{approveOrderController.orderEntity.address}</p>
          <p>Pizza: #{approveOrderController.orderEntity.pizza}</p>
          <h:form id="submitForm">
            <h:outputLabel>Approve Order?</h:outputLabel>
            <h:selectBooleanCheckbox value="#{approveOrderController.orderEntity.approved}"/><br/>
            <h:commandButton id="submit_button" value="Approve Order" action="#{approveOrderController.submitForm()}" />
          </h:form>
        </h:body>
      </f:view>
      </html>
      

        Activity

        Hide
        sebastian.menski Sebastian Menski added a comment -

        Please release the get-started after review.

        Show
        sebastian.menski Sebastian Menski added a comment - Please release the get-started after review.

          People

          • Assignee:
            matthijs.burke Matthijs Burke
            Reporter:
            matthijs.burke Matthijs Burke
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development