Skip to content

Commit

Permalink
Remove javascript calls from completed callback
Browse files Browse the repository at this point in the history
  • Loading branch information
BartChris committed Sep 24, 2024
1 parent eded39f commit 8032950
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
styleClass="#{not item.editable or readOnly ? 'read-only disabled' : ''}"
onkeydown="metadataEditor.metadataTree.handleKeyDown(event, this)">
<p:ajax event="change"
oncomplete="preserveMetadata(); #{item.leading ? (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadataWithTable();' : 'updateProcessMetadata();') : (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadata();' : '')}"/>
oncomplete="#{item.leading ? (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadataWithTable();' : 'updateProcessMetadata();') : ''}"/>
</p:inputText>
</h:panelGroup>

Expand All @@ -81,7 +81,7 @@
required="#{item.required and (not empty param['editForm:save'] or not empty param['editForm:saveContinue'])}"
styleClass="#{not item.editable or readOnly ? 'read-only disabled' : ''}">
<p:ajax event="change"
oncomplete="preserveMetadata(); #{item.leading ? (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadataWithTable();' : 'updateProcessMetadata();') : (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadata();' : '')}"/>
oncomplete="#{item.leading ? (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadataWithTable();' : 'updateProcessMetadata();') : ''}"/>
</p:inputTextarea>
</h:panelGroup>

Expand All @@ -95,7 +95,7 @@
required="#{item.required and (not empty param['editForm:save'] or not empty param['editForm:saveContinue'])}"
styleClass="#{not item.editable or readOnly ? 'read-only disabled' : ''}">
<p:ajax event="change"
oncomplete="preserveMetadata(); #{item.leading ? (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadataWithTable();' : 'updateProcessMetadata();') : (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadata();' : '')}"/>
oncomplete="#{item.leading ? (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadataWithTable();' : 'updateProcessMetadata();') : ''}"/>
</p:spinner>
</h:panelGroup>

Expand All @@ -110,7 +110,7 @@
required="#{item.required and (not empty param['editForm:save'] or not empty param['editForm:saveContinue'])}"
disabled="#{not item.editable or readOnly}">
<p:ajax event="dateSelect"
oncomplete="preserveMetadata(); #{item.leading ? (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadataWithTable();' : 'updateProcessMetadata();') : (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadata();' : '')}"/>
oncomplete="#{item.leading ? (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadataWithTable();' : 'updateProcessMetadata();') : ''}"/>
</p:calendar>
</h:panelGroup>

Expand All @@ -128,7 +128,7 @@
filterMatchMode="contains">
<f:selectItems value="#{item.items}"/>
<p:ajax event="change"
oncomplete="preserveMetadata(); #{item.leading ? (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadataWithTable();' : 'updateProcessMetadata();') : (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadata();' : '')}"/>
oncomplete="#{item.leading ? (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadataWithTable();' : 'updateProcessMetadata();') : ''}"/>
</p:selectManyMenu>
</h:panelGroup>

Expand All @@ -151,7 +151,7 @@
noSelectionOption="true"/>
<f:selectItems value="#{item.items}"/>
<p:ajax event="change"
oncomplete="preserveMetadata(); #{item.leading ? (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadataWithTable();' : 'updateProcessMetadata();') : (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadata();' : '')}"/>
oncomplete="#{item.leading ? (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadataWithTable();' : 'updateProcessMetadata();') : ''}"/>
</p:selectOneMenu>
</h:panelGroup>

Expand All @@ -167,7 +167,8 @@
layout="grid"
columns="1">
<f:selectItems value="#{item.items}"/>
<p:ajax oncomplete="preserveMetadata(); #{item.leading ? (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadataWithTable();' : 'updateProcessMetadata();') : (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadata();' : '')}"/>
<p:ajax event="change"
oncomplete="#{item.leading ? (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadataWithTable();' : 'updateProcessMetadata();') : ''}"/>
</p:selectOneRadio>
</h:panelGroup>

Expand All @@ -180,7 +181,7 @@
required="#{item.required and (not empty param['editForm:save'] or not empty param['editForm:saveContinue'])}"
value="#{item.active}">
<p:ajax event="change"
oncomplete="preserveMetadata(); #{item.leading ? (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadataWithTable();' : 'updateProcessMetadata();') : (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadata();' : '')}"/>
oncomplete="#{item.leading ? (request.requestURI.contains('metadataEditor') ? 'updateTitleMetadataWithTable();' : 'updateProcessMetadata();') : ''}"/>
</p:selectBooleanCheckbox>
</h:panelGroup>

Expand Down Expand Up @@ -232,5 +233,4 @@
</span>
</p:column>
</p:treeTable>
<p:remoteCommand name="updateTitleMetadata" update="@(.ui-tree, .stripe.selected)"/>
</ui:composition>
</ui:composition>

0 comments on commit 8032950

Please sign in to comment.