Author: fdesbois Date: 2010-03-08 14:33:31 +0100 (Mon, 08 Mar 2010) New Revision: 2900 Log: Ano #131 : can't update a big list when updating the poll Modified: branches/pollen-1.2.3-1.2.x/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/PollModification.java branches/pollen-1.2.3-1.2.x/pollen-ui/src/main/resources/org/chorem/pollen/ui/pages/poll/PollModification_en.properties branches/pollen-1.2.3-1.2.x/pollen-ui/src/main/resources/org/chorem/pollen/ui/pages/poll/PollModification_fr.properties branches/pollen-1.2.3-1.2.x/pollen-ui/src/main/webapp/poll/PollModification.tml Modified: branches/pollen-1.2.3-1.2.x/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/PollModification.java =================================================================== --- branches/pollen-1.2.3-1.2.x/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/PollModification.java 2010-03-08 13:23:02 UTC (rev 2899) +++ branches/pollen-1.2.3-1.2.x/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/PollModification.java 2010-03-08 13:33:31 UTC (rev 2900) @@ -489,6 +489,11 @@ } } + public boolean isListSizeAlert() { + return votingList.getPollAccountDTOs().size() > + PollCreation.LIST_MAX_SHOW_PERSONS; + } + public boolean isInPoll() { return step == PollStep.POLL; } Modified: branches/pollen-1.2.3-1.2.x/pollen-ui/src/main/resources/org/chorem/pollen/ui/pages/poll/PollModification_en.properties =================================================================== --- branches/pollen-1.2.3-1.2.x/pollen-ui/src/main/resources/org/chorem/pollen/ui/pages/poll/PollModification_en.properties 2010-03-08 13:23:02 UTC (rev 2899) +++ branches/pollen-1.2.3-1.2.x/pollen-ui/src/main/resources/org/chorem/pollen/ui/pages/poll/PollModification_en.properties 2010-03-08 13:33:31 UTC (rev 2900) @@ -63,6 +63,7 @@ groupWeight-label=Weight list-validate=Persons names must be unique. lists-validate=Lists names must be unique. +list-maxSize-cant-update=The voting list is too large to be updated. #choices choicesLegend=Step %d: poll choices Modified: branches/pollen-1.2.3-1.2.x/pollen-ui/src/main/resources/org/chorem/pollen/ui/pages/poll/PollModification_fr.properties =================================================================== --- branches/pollen-1.2.3-1.2.x/pollen-ui/src/main/resources/org/chorem/pollen/ui/pages/poll/PollModification_fr.properties 2010-03-08 13:23:02 UTC (rev 2899) +++ branches/pollen-1.2.3-1.2.x/pollen-ui/src/main/resources/org/chorem/pollen/ui/pages/poll/PollModification_fr.properties 2010-03-08 13:33:31 UTC (rev 2900) @@ -63,6 +63,7 @@ groupWeight-label=Poids list-validate=Les noms des votants doivent \u00EAtre uniques. lists-validate=Les noms des listes doivent \u00EAtre uniques. +list-maxSize-cant-update=La liste de votants est trop grande pour \u00EAtre modifi\u00E9e. #choices choicesLegend=\u00C9tape %d : les choix de votre sondage Modified: branches/pollen-1.2.3-1.2.x/pollen-ui/src/main/webapp/poll/PollModification.tml =================================================================== --- branches/pollen-1.2.3-1.2.x/pollen-ui/src/main/webapp/poll/PollModification.tml 2010-03-08 13:23:02 UTC (rev 2899) +++ branches/pollen-1.2.3-1.2.x/pollen-ui/src/main/webapp/poll/PollModification.tml 2010-03-08 13:33:31 UTC (rev 2900) @@ -128,16 +128,21 @@ <t:textfield t:id="groupName" t:value="votingList.name" validate="required" /> - ${message:groupWeight-label} ${weightAsInt} </div> - <div t:type="loop" t:source="votingList.pollAccountDTOs" t:value="votingListPerson" t:volatile="true"> - <t:label for="personName" /> - <t:textfield t:id="personName" t:value="votingListPerson.votingId" validate="required" t:disabled="votingListPerson.hasVoted"/> - - - <t:label for="personEmail" /> - <t:textfield t:id="personEmail" t:value="votingListPerson.email" validate="regexp" t:disabled="votingListPerson.hasVoted"/> - - - <t:label for="personWeight" /> - <t:textfield t:id="personWeight" t:value="votingListPerson.weight" t:size="1" validate="required,min=1" t:disabled="votingListPerson.hasVoted"/> - </div> + <t:unless t:test="listSizeAlert"> + <div t:type="loop" t:source="votingList.pollAccountDTOs" t:value="votingListPerson" t:volatile="true"> + <t:label for="personName" /> + <t:textfield t:id="personName" t:value="votingListPerson.votingId" validate="required" t:disabled="votingListPerson.hasVoted"/> + - + <t:label for="personEmail" /> + <t:textfield t:id="personEmail" t:value="votingListPerson.email" validate="regexp" t:disabled="votingListPerson.hasVoted"/> + - + <t:label for="personWeight" /> + <t:textfield t:id="personWeight" t:value="votingListPerson.weight" t:size="1" validate="required,min=1" t:disabled="votingListPerson.hasVoted"/> + </div> + <p:else> + ${message:list-maxSize-cant-update} + </p:else> + </t:unless> </div> </fieldset> <div class="buttons">