Last tweaks done for big bigfix on add/edit/remove for all components.

This commit is contained in:
travismccauley 2003-12-21 18:21:40 +00:00
parent afa2f340a1
commit c944cfc0d1
18 changed files with 30 additions and 23 deletions

View file

@ -22,7 +22,7 @@ log4j.rootLogger=warn, stdout
log4j.logger.net.sf.hibernate=info, file
log4j.logger.org.thdl.lex=info, lex-out
log4j.logger.org.thdl.lex=debug, lex-out
### enable the following line if you want to track down connection ###
### leakages when using DriverManagerConnectionProvider ###

View file

@ -93,6 +93,9 @@ public class RemoveCommand extends LexCommand implements Command
else if ( component instanceof Translatable && null != ( (Translatable) component ).getTranslationOf() )
{
Translatable translation = (Translatable) component;
LexLogger.debug( "Checking translation state before looking for its source" );
LexLogger.debugComponent( translation );
Translatable source = null;
try
{
@ -105,6 +108,9 @@ public class RemoveCommand extends LexCommand implements Command
source.setMetaId( translation.getTranslationOf() );
source.setParentId( translation.getParentId() );
source = (Translatable) term.findChild( source );
LexLogger.debug( "Checking source state before looking for its translation list" );
LexLogger.debugComponent( source );
List translationList = source.getTranslations();
ILexComponent doomedComponent = (ILexComponent) translationList.get( translationList.indexOf( translation ) );
doomedComponent.setDeleted( Boolean.TRUE );

View file

@ -192,15 +192,6 @@ public abstract class BaseSubdefinition extends LexComponent implements org.thdl
*/
public void setPrecedence( java.lang.Integer precedence )
{
if ( null == precedence )
{
int i = getGlosses().size();
}
if ( ( new Integer( -1 ) ).equals( precedence ) )
{
Object o = new String();
Integer i = (Integer) o;
}
this.precedence = precedence;
}

View file

@ -227,6 +227,14 @@ public abstract class LexComponent extends BaseLexComponent implements Serializa
{
label = "transitionalData";
}
else if ( label.equals( "grammaticalFunction" ) )
{
label = "functions";
}
else if ( label.equals( "speechRegister" ) )
{
label = "registers";
}
else
{
label = label + "s";

View file

@ -14,7 +14,7 @@
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=definition&amp;metaId=${ definition.metaId }" title="Edit this Definition"><img alt="Edit this Definition" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getTranslationForm&amp;comp=definition&amp;parentId=${definition.parentId}&amp;translationOf=${definition.metaId}" title="Translate this Definition"><img alt="Translate this Definition" src="/lex/images/trans.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getInsertForm&amp;comp=subdefinition&amp;parentId=${definition.metaId}" title="Add a Subdefinition"><img alt="Add a Subdefinition" src="/lex/images/subdef.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=definition&amp;metaId=${ definition.metaId }" title="Remove this Definition"><img alt="Remove this Definition" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=definition&amp;metaId=${ definition.metaId }&amp;parentId=${definition.parentId}" title="Remove this Definition"><img alt="Remove this Definition" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>

View file

@ -9,7 +9,7 @@
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=encyclopediaArticle&amp;metaId=${ encyclopediaArticle.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=encyclopediaArticle&amp;metaId=${ encyclopediaArticle.metaId }" title="Edit this encyclopediaArticle"><img alt="Edit this encyclopediaArticle" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=encyclopediaArticle&amp;metaId=${ encyclopediaArticle.metaId }" title="Remove this encyclopediaArticle"><img alt="Remove this encyclopediaArticle" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=encyclopediaArticle&amp;metaId=${ encyclopediaArticle.metaId }&amp;parentId=${encyclopediaArticle.parentId}" title="Remove this encyclopediaArticle"><img alt="Remove this encyclopediaArticle" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>
<!--<span class="label">Encyclopedia Article:</span>-->

View file

@ -48,7 +48,9 @@ Back to:
<c:out value='<input type="hidden" name="comp" value="${param.comp}"/>' escapeXml="false"/>
<c:out value='<input type="hidden" name="metaId" value="${ param.metaId }"/>' escapeXml="false"/>
<c:out value='<input type="hidden" name="parentId" value="${ param.parentId }"/>' escapeXml="false"/>
<c:if test="${ null != param.translationOf }">
<c:out value='<input type="hidden" name="translationOf" value="${ param.translationOf }"/>' escapeXml="false"/>
</c:if>
<c:out value='<input type="hidden" name="token" value="${ sessionScope.visit.token }" />' escapeXml="false" />
<strong>Warning!!</strong> This is your last chance. Are you sure you want to remove this component and all of its sub-components?
<input type="submit" value="Yes, I am sure. Delete Now"/>

View file

@ -7,7 +7,7 @@
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=grammaticalFunction&amp;metaId=${ function.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=grammaticalFunction&amp;metaId=${ function.metaId }" title="Edit this component"><img alt="Edit this component" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=grammaticalFunction&amp;metaId=${ function.metaId }" title="Remove this component"><img alt="Remove this component" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=grammaticalFunction&amp;metaId=${ function.metaId }&amp;parentId=${function.parentId}" title="Remove this component"><img alt="Remove this component" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>

View file

@ -11,7 +11,7 @@
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=keyword&amp;metaId=${ keyword.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=keyword&amp;metaId=${ keyword.metaId }" title="Edit this keyword"><img alt="Edit this keyword" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=keyword&amp;metaId=${ keyword.metaId }" title="Remove this keyword"><img alt="Remove this keyword" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=keyword&amp;metaId=${ keyword.metaId }&amp;parentId=${keyword.parentId}" title="Remove this keyword"><img alt="Remove this keyword" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>

View file

@ -12,7 +12,7 @@
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=modelSentence&amp;metaId=${ modelSentence.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=modelSentence&amp;metaId=${ modelSentence.metaId }" title="Edit this modelSentence"><img alt="Edit this modelSentence" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getTranslationForm&amp;comp=modelSentence&amp;parentId=${modelSentence.parentId}&amp;translationOf=${modelSentence.metaId}" title="Translate this modelSentence"><img alt="Translate this modelSentence" src="/lex/images/trans.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=modelSentence&amp;metaId=${ modelSentence.metaId }" title="Remove this modelSentence"><img alt="Remove this modelSentence" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=modelSentence&amp;metaId=${ modelSentence.metaId }&amp;parentId=${modelSentence.parentId}" title="Remove this modelSentence"><img alt="Remove this modelSentence" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>

View file

@ -12,7 +12,7 @@
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=passage&amp;metaId=${ passage.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=passage&amp;metaId=${ passage.metaId }" title="Edit this passage"><img alt="Edit this passage" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getTranslationForm&amp;comp=passage&amp;parentId=${passage.parentId}&amp;translationOf=${passage.metaId}" title="Translate this passage"><img alt="Translate this passage" src="/lex/images/trans.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=passage&amp;metaId=${ passage.metaId }" title="Remove this passage"><img alt="Remove this passage" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=passage&amp;metaId=${ passage.metaId }&amp;parentId=${ passage.parentId }" title="Remove this passage"><img alt="Remove this passage" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>

View file

@ -12,7 +12,7 @@
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=pronunciation&amp;metaId=${ pronunciation.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=pronunciation&amp;metaId=${ pronunciation.metaId }" title="Edit this component"><img alt="Edit this component" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=pronunciation&amp;metaId=${ pronunciation.metaId }" title="Remove this component"><img alt="Remove this component" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=pronunciation&amp;metaId=${ pronunciation.metaId }&amp;parentId=${pronunciation.parentId}" title="Remove this component"><img alt="Remove this component" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>

View file

@ -11,7 +11,7 @@
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=speechRegister&amp;metaId=${ register.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=speechRegister&amp;metaId=${ register.metaId }" title="Edit this speechRegister"><img alt="Edit this speechRegister" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=speechRegister&amp;metaId=${ register.metaId }" title="Remove this speechRegister"><img alt="Remove this speechRegister" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=speechRegister&amp;metaId=${ register.metaId }&amp;parentId=${register.parentId}" title="Remove this speechRegister"><img alt="Remove this speechRegister" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>
<!--<span class="label">Speech Register:</span>-->

View file

@ -10,7 +10,7 @@
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=relatedTerm&amp;metaId=${ relatedTerm.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=relatedTerm&amp;metaId=${ relatedTerm.metaId }" title="Edit this relatedTerm"><img alt="Edit this relatedTerm" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=relatedTerm&amp;metaId=${ relatedTerm.metaId }" title="Remove this relatedTerm"><img alt="Remove this relatedTerm" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=relatedTerm&amp;metaId=${ relatedTerm.metaId }&amp;parentId=${relatedTerm.parentId}" title="Remove this relatedTerm"><img alt="Remove this relatedTerm" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>

View file

@ -7,7 +7,7 @@
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=spelling&amp;metaId=${ spelling.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=spelling&amp;metaId=${ spelling.metaId }" title="Edit this component"><img alt="Edit this component" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=spelling&amp;metaId=${ spelling.metaId }" title="Remove this component"><img alt="Remove this component" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=spelling&amp;metaId=${ spelling.metaId }&amp;parentId=${spelling.parentId}" title="Remove this component"><img alt="Remove this component" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>

View file

@ -20,7 +20,7 @@
<c:out value='<a href="/lex/action?cmd=getInsertForm&amp;comp=relatedTerm&amp;parentId=${subdefinition.metaId}" title="Add a Related Term"><img alt="Add a Related Term" src="/lex/images/rel-term.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getInsertForm&amp;comp=passage&amp;parentId=${subdefinition.metaId}" title="Add a Passage"><img alt="Add a Passage" src="/lex/images/pass.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getInsertForm&amp;comp=speechRegister&amp;parentId=${subdefinition.metaId}" title="Add a Speech Register"><img alt="Add a Speech Register" src="/lex/images/reg.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=subdefinition&amp;metaId=${ subdefinition.metaId }" title="Remove this subdefinition"><img alt="Remove this subdefinition" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=subdefinition&amp;metaId=${ subdefinition.metaId }&amp;parentId=${subdefinition.parentId}" title="Remove this subdefinition"><img alt="Remove this subdefinition" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>

View file

@ -13,7 +13,7 @@
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=transitionalData&amp;metaId=${ transitionalData.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=transitionalData&amp;metaId=${ transitionalData.metaId }" title="Edit this component"><img alt="Edit this component" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=transitionalData&amp;metaId=${ transitionalData.metaId }" title="Remove this component"><img alt="Remove this component" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=transitionalData&amp;metaId=${ transitionalData.metaId }&amp;parentId=${transitionalData.parentId}" title="Remove this component"><img alt="Remove this component" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>

View file

@ -11,7 +11,7 @@
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=translationEquivalent&amp;metaId=${ translationEquivalent.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=translationEquivalent&amp;metaId=${ translationEquivalent.metaId }" title="Edit this translationEquivalent"><img alt="Edit this translationEquivalent" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=translationEquivalent&amp;metaId=${ translationEquivalent.metaId }" title="Remove this translationEquivalent"><img alt="Remove this translationEquivalent" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=translationEquivalent&amp;metaId=${ translationEquivalent.metaId }&amp;parentId=${translationEquivalent.parentId}" title="Remove this translationEquivalent"><img alt="Remove this translationEquivalent" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>