<commit_before><!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	template="/template/template.xhtml">

<ui:define name="pageTitle">Todo Task List</ui:define>
<ui:define name="body">

	<p:panel>
	<f:facet name="header">Here's looking at your Todos  - #{todoList.findAll().size()} of them.</f:facet>

	<h:outputText value="#{hintList.random}"/>

	<h:form id="form">

	<h:messages id="msgs"/>

	<!-- Print the table, or, an error -->
	<h:outputText
		value="Arrr, Billy! I can't find any tasks. Did we add any yet??"
		rendered="#{empty todoList.findAll()}"/>

	<!-- Display the main part of the whole page. -->
	<p:dataTable border='1' 
		rendered="#{!empty todoList.findAll()}"
		var="todo" value="#{todoList.findAll()}" 
		>
		<p:column width="5%" sortBy="#{todo.id}">
			<f:facet name="header">Id</f:facet>
			<h:outputText value="#{todo.id}"/>
		</p:column>

		<p:column width="5%" sortBy="#{todo.priority.ordinal()}">
			<f:facet name="header">Priority</f:facet>
			<h:outputText value="#{todo.priority}"/>
		</p:column>

		<p:column sortBy="#{todo.name}">
			<f:facet name="header">Name</f:facet>
			<h:outputText value="#{todo.name}"/>
		</p:column>
		
		<p:column width="10%" sortBy="#{todo.context.name}">
			<f:facet name="header">Context</f:facet>
			<h:outputText value="#{todo.context}"/>
		</p:column>

		<p:column width="5%" sortBy="#{todo.status.ordinal()}">
			<f:facet name="header">Status</f:facet>
			<h:outputText value="#{todo.status}"/>
		</p:column>

		<p:column style="width: 15%">
			<f:facet name="header">Operations</f:facet>
			<p:splitButton value="Mark Done" actionListener="#{todo.toggleDone}" icon="ui-icon-check">
			    <p:menuitem value="Edit" url="TodoEdit.web?todoId=#{todo.id}" icon="ui-icon-edit"/>
			    <p:menuitem value="Delete" ajax="false" actionListener="#{todoHome.remove(todo)}" icon="ui-icon-close" />
			</p:splitButton>
		</p:column>
	</p:dataTable>
	<p:button outcome="TodoEdit.web" value="Add"/><commit_msg>Use _var convention to avoid conflicts<commit_after><!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	template="/template/template.xhtml">

<ui:define name="pageTitle">Todo Task List</ui:define>
<ui:define name="body">

	<p:panel>
	<f:facet name="header">Here's looking at your Todos  - #{todoList.findAll().size()} of them.</f:facet>

	<h:outputText value="#{hintList.random}"/>

	<h:form id="form">

	<h:messages id="msgs"/>

	<!-- Print the table, or, an error -->
	<h:outputText
		value="<NAME>! I can't find any tasks. Did we add any yet??"
		rendered="#{empty todoList.findAll()}"/>

	<!-- Display the main part of the whole page. -->
	<p:dataTable border='1' 
		rendered="#{!empty todoList.findAll()}"
		var="_todo" value="#{todoList.findAll()}" 
		>
		<p:column width="5%" sortBy="#{_todo.id}">
			<f:facet name="header">Id</f:facet>
			<h:outputText value="#{_todo.id}"/>
		</p:column>

		<p:column width="5%" sortBy="#{_todo.priority.ordinal()}">
			<f:facet name="header">Priority</f:facet>
			<h:outputText value="#{_todo.priority}"/>
		</p:column>

		<p:column sortBy="#{_todo.name}">
			<f:facet name="header">Name</f:facet>
			<h:outputText value="#{_todo.name}"/>
		</p:column>
		
		<p:column width="10%" sortBy="#{_todo.context.name}">
			<f:facet name="header">Context</f:facet>
			<h:outputText value="#{_todo.context}"/>
		</p:column>

		<p:column width="5%" sortBy="#{_todo.status.ordinal()}">
			<f:facet name="header">Status</f:facet>
			<h:outputText value="#{_todo.status}"/>
		</p:column>

		<p:column style="width: 15%">
			<f:facet name="header">Operations</f:facet>
			<p:splitButton value="Mark Done" actionListener="#{_todo.toggleDone}" icon="ui-icon-check">
			    <p:menuitem value="Edit" url="TodoEdit.web?todoId=#{_todo.id}" icon="ui-icon-edit"/>
			    <p:menuitem value="Delete" ajax="false" actionListener="#{todoHome.remove(_todo)}" icon="ui-icon-close" />
			</p:splitButton>
		</p:column>
	</p:dataTable>
	<p:button outcome="TodoEdit.web" value="Add"/>
{'fraction_non_alphanumeric': 0.23017958826106, 'fraction_numerical': 0.008322382829610162, 'mean_word_length': 4.77370417193426, 'pattern_counts': {'":': 0, '<': 104, '<?xml version=': 0, '>': 104, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 10}, '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': '2951344', 'n_tokens_mistral': 1954, 'n_tokens_neox': 1779, 'n_words': 275}