<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2014 satrapu.

Licensed 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.
-->
<ui:composition template="#{context_path}/resources/templates/page.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:my="http://java.sun.com/jsf/composite/components"
                xmlns:p="http://primefaces.org/ui"
                xmlns:ui="http://java.sun.com/jsf/facelets">
    <ui:define name="title">
        #{msg['pages.persons.remove.title']}
    </ui:define>
    <ui:define name="content">
        <f:metadata>
            <f:viewParam name="id"
                         value="#{personHome.id}"
                         converter="personIdConverter"/>
            <f:event type="preRenderView"
                     listener="#{personHome.beginConversation}"/>
        </f:metadata>
        <h:panelGrid rendered="#{not personHome.new}"
                     columns="1">
            <my:labelAndText componentId="id"
                             label="#{msg['entities.person.fields.id']}"
                             value="#{personHome.instance.id}"/>
            <my:labelAndText componentId="firstName"
                             label="#{msg['entities.person.fields.firstName']}"
                             value="#{personHome.instance.firstName}"/>
            <my:labelAndText componentId="middleName"
                             label="#{msg['entities.person.fields.middleName']}"
                             value="#{personHome.instance.middleName}"/>
            <my:labelAndText componentId="lastName"
                             label="#{msg['entities.person.fields.lastName']}"
                             value="#{personHome.instance.lastName}"/>
            <my:labelAndText componentId="emailAddress"
                             label="#{msg['entities.person.fields.emailAddress']}"
                             value="#{personHome.instance.emailAddress}"/>
        </h:panelGrid>
        <p:separator/>
        <div class="actions">
            <p:commandButton action="#{personHome.remove}"
                             value="#{msg['global.actions.remove']}"
                             rendered="#{not personHome.new}">
                <p:confirm header="#{msg['pages.persons.remove.confirmationDialog.title']}"
                           message="#{msg['pages.persons.remove.confirmationDialog.text']}"
                           icon="ui-icon-alert"/>
            </p:commandButton>
            <p:commandButton action="#{personHome.cancel}"
                             value="#{msg['global.actions.cancel']}"
                             ajax="false"
                             immediate="true"/>
        </div>
    </ui:define>
</ui:composition><commit_msg>Ensured the JSF message is displayed in case the remove action fails and one such message is created.<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2014 satrapu.

Licensed 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.
-->
<ui:composition template="#{context_path}/resources/templates/page.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:my="http://java.sun.com/jsf/composite/components"
                xmlns:p="http://primefaces.org/ui"
                xmlns:ui="http://java.sun.com/jsf/facelets">
    <ui:define name="title">
        #{msg['pages.persons.remove.title']}
    </ui:define>
    <ui:define name="content">
        <f:metadata>
            <f:viewParam name="id"
                         value="#{personHome.id}"
                         converter="personIdConverter"/>
            <f:event type="preRenderView"
                     listener="#{personHome.beginConversation}"/>
        </f:metadata>
        <h:panelGrid rendered="#{not personHome.new}"
                     columns="1">
            <my:labelAndText componentId="id"
                             label="#{msg['entities.person.fields.id']}"
                             value="#{personHome.instance.id}"/>
            <my:labelAndText componentId="firstName"
                             label="#{msg['entities.person.fields.firstName']}"
                             value="#{personHome.instance.firstName}"/>
            <my:labelAndText componentId="middleName"
                             label="#{msg['entities.person.fields.middleName']}"
                             value="#{personHome.instance.middleName}"/>
            <my:labelAndText componentId="lastName"
                             label="#{msg['entities.person.fields.lastName']}"
                             value="#{personHome.instance.lastName}"/>
            <my:labelAndText componentId="emailAddress"
                             label="#{msg['entities.person.fields.emailAddress']}"
                             value="#{personHome.instance.emailAddress}"/>
        </h:panelGrid>
        <p:separator/>

        <div class="actions">
            <p:commandButton action="#{personHome.remove}"
                             value="#{msg['global.actions.remove']}"
                             rendered="#{not personHome.new}"
                             update=":messages">
                <p:confirm header="#{msg['pages.persons.remove.confirmationDialog.title']}"
                           message="#{msg['pages.persons.remove.confirmationDialog.text']}"
                           icon="ui-icon-alert"/>
            </p:commandButton>
            <p:commandButton action="#{personHome.cancel}"
                             value="#{msg['global.actions.cancel']}"
                             ajax="false"
                             immediate="true"/>
        </div>
    </ui:define>
</ui:composition>
{'fraction_non_alphanumeric': 0.13602565971715994, 'fraction_numerical': 0.0049569908149876074, 'mean_word_length': 1.8512053200332501, 'pattern_counts': {'":': 1, '<': 55, '<?xml version=': 2, '>': 55, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3391022', 'n_tokens_mistral': 1790, 'n_tokens_neox': 1740, 'n_words': 323}