<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:composite="http://java.sun.com/jsf/composite"
	xmlns:sigh="http://java.sun.com/jsf/composite/sigh">

<composite:interface>
	<composite:attribute name="controller" required="true"
		type="py.una.med.base.controller.ISIGHBaseController"
		displayName="Controllador que rige esta vista, por defecto sera marcado como el controlador activo" />
	<composite:attribute name="urlForm" required="true" />
	<composite:attribute name="withCancelButton" default="true" />
	<composite:attribute name="headerTitle" />
	<composite:attribute name="acceptButtonText"
		default="#{msg['BASE_FORM_EDIT']}" />
	<composite:attribute name="createAcceptButtonText"
		default="#{msg['BASE_FORM_CREATE']}" />
	<composite:attribute name="withConfirmPanel" default="true" />
	<composite:facet name="preMainForm" />
	<composite:facet name="moreButtons" />

</composite:interface>
<composite:implementation>
	<h:outputScript library="scripts" name="navigation_checker.js"
		target="head" />
	<composite:renderFacet name="preMainForm" />
	<h:form id="base_abm_form"
		rendered="#{authorityController.hasRole(cc.attrs.controller.defaultPermission)}">
		<rich:messages ajaxRendered="true" showDetail="true"
			id="#{cc.attrs.controller.messageIdName}" globalOnly="true" />
		<rich:panel>
			<f:facet name="header">
				<h:outputLabel value="#{cc.attrs.controller.headerText}" />
			</f:facet>
			<h:panelGrid columns="6"
				columnClasses="form_label,form_input,form_error,form_label,form_input,form_error"
				style="width:100%">
				<ui:include src="#{cc.attrs.urlForm}" />
			</h:panelGrid>

			<rich:panel rendered="#{cc.attrs.withConfirmPanel}">
				<h:commandButton action="#{cc.attrs.controller.doEdit()}"
					onclick="no_alert()" value="#{cc.attrs.acceptButtonText}"
					rendered="#{cc.attrs.controller.edit and authorityController.hasRole(cc.attrs.controller.editPermission)}" />
				<h:commandButton action="#{cc.attrs.controller.doCreate()}"
					value="#{cc.attrs.createAcceptButtonText}" onclick="no_alert()"
					rendered="#{cc.attrs.controller.create  and authorityController.hasRole(cc.attrs.controller.createPermission)}" />
				<h:commandButton action="#{cc.attrs.controller.doDelete()}"
					onclick="no_alert()" value="#{msg['BASE_FORM_DELETE']}"
					rendered="#{cc.attrs.controller.isDelete() and authorityController.hasRole(cc.attrs.controller.deletePermission)}" />
				<composite:renderFacet name="moreButtons" />
				<h:commandButton action="#{cc.attrs.controller.preList()}"
					rendered="#{cc.attrs.withCancelButton}"
					value="#{cc.attrs.controller.cancelText}" immediate="true" />
			</rich:panel>
		</rich:panel>
	</h:form>


</composite:implementation>
</html><commit_msg>Accion ajax en ABM-Simple<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:composite="http://java.sun.com/jsf/composite"
	xmlns:sigh="http://java.sun.com/jsf/composite/sigh">

<composite:interface>
	<composite:attribute name="controller" required="true"
		type="py.una.med.base.controller.ISIGHBaseController"
		displayName="Controllador que rige esta vista, por defecto sera marcado como el controlador activo" />
	<composite:attribute name="urlForm" required="true" />
	<composite:attribute name="withCancelButton" default="true" />
	<composite:attribute name="headerTitle" />
	<composite:attribute name="acceptButtonText"
		default="#{msg['BASE_FORM_EDIT']}" />
	<composite:attribute name="createAcceptButtonText"
		default="#{msg['BASE_FORM_CREATE']}" />
	<composite:attribute name="withConfirmPanel" default="true" />
	<composite:attribute name="saveOnComple" default="" />
	<composite:attribute name="saveAction" method-signature="void f()" />
	<composite:attribute name="saveRender" default="" />
	<composite:attribute name="ajaxSave" default="false"
		displayName="Determina cuando un botón es o no ajax, por defecto es false, es decir, cuando se presionan se refresca la página," />
	<composite:facet name="preMainForm" />
	<composite:facet name="moreButtons" />

</composite:interface>
<composite:implementation>
	<h:outputScript library="scripts" name="navigation_checker.js"
		target="head" />
	<composite:renderFacet name="preMainForm" />
	<h:form id="base_abm_form"
		rendered="#{authorityController.hasRole(cc.attrs.controller.defaultPermission)}">
		<rich:messages ajaxRendered="true" showDetail="true"
			id="#{cc.attrs.controller.messageIdName}" globalOnly="true" />
		<rich:panel>
			<f:facet name="header">
				<h:outputLabel value="#{cc.attrs.controller.headerText}" />
			</f:facet>
			<h:panelGrid columns="6"
				columnClasses="form_label,form_input,form_error,form_label,form_input,form_error"
				style="width:100%">
				<ui:include src="#{cc.attrs.urlForm}" />
			</h:panelGrid>
			<rich:panel rendered="#{cc.attrs.withConfirmPanel and not cc.attrs.ajaxSave}">
				<h:commandButton action="#{cc.attrs.controller.doEdit()}"
					onclick="no_alert()" value="#{cc.attrs.acceptButtonText}"
					rendered="#{cc.attrs.controller.edit and authorityController.hasRole(cc.attrs.controller.editPermission)}" />
				<h:commandButton action="#{cc.attrs.controller.doCreate()}"
					value="#{cc.attrs.createAcceptButtonText}" onclick="no_alert()"
					rendered="#{cc.attrs.controller.create  and authorityController.hasRole(cc.attrs.controller.createPermission)}" />
				<h:commandButton action="#{cc.attrs.controller.doDelete()}"
					onclick="no_alert()" value="#{msg['BASE_FORM_DELETE']}"
					rendered="#{cc.attrs.controller.isDelete() and authorityController.hasRole(cc.attrs.controller.deletePermission)}" />
				<composite:renderFacet name="moreButtons" />
				<h:commandButton action="#{cc.attrs.controller.preList()}"
					rendered="#{cc.attrs.withCancelButton}"
					value="#{cc.attrs.controller.cancelText}" immediate="true" />
			</rich:panel>
			<rich:panel rendered="#{cc.attrs.withConfirmPanel and cc.attrs.ajaxSave}">
			
				<a4j:commandButton action="#{cc.attrs.saveAction}"
					value="#{cc.attrs.acceptButtonText}"
					render="#{cc.attrs.saveRender}"
					oncomplete="#{cc.attrs.saveOnComple}" />
				<a4j:commandButton action="#{cc.attrs.saveAction}"
					value="#{msg['BASE_FORM_CREATE']}"
					rendered="#{cc.attrs.controller.create  and authorityController.hasRole(cc.attrs.controller.createPermission)}"
					render="#{cc.attrs.saveRender}"
					oncomplete="#{cc.attrs.saveOnComple}" />
				<a4j:commandButton action="#{cc.attrs.controller.doDelete()}"
					onclick="no_alert()" value="#{msg['BASE_FORM_DELETE']}"
					rendered="#{cc.attrs.controller.isDelete() and authorityController.hasRole(cc.attrs.controller.deletePermission)}" />
				<composite:renderFacet name="moreButtons" />
				<a4j:commandButton action="#{cc.attrs.controller.preList()}"
					rendered="#{cc.attrs.withCancelButton}"
					value="#{cc.attrs.controller.cancelText}" immediate="true" />
			</rich:panel>
		</rich:panel>
	</h:form>

</composite:implementation>
</html>
{'fraction_non_alphanumeric': 0.18124918503064286, 'fraction_numerical': 0.005737384274351285, 'mean_word_length': 5.953762466001813, 'pattern_counts': {'":': 0, '<': 88, '<?xml version=': 2, '>': 88, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 18}, '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': '7378725', 'n_tokens_mistral': 2830, 'n_tokens_neox': 2534, 'n_words': 317}