Last tweaks done for big bigfix on add/edit/remove for all components.
This commit is contained in:
parent
afa2f340a1
commit
c944cfc0d1
18 changed files with 30 additions and 23 deletions
|
@ -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 ###
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<c:out value='<a href="/lex/action?cmd=getUpdateForm&comp=definition&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&comp=definition&parentId=${definition.parentId}&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&comp=subdefinition&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&comp=definition&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&comp=definition&metaId=${ definition.metaId }&parentId=${definition.parentId}" title="Remove this Definition"><img alt="Remove this Definition" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
|
||||
</span>
|
||||
</c:if>
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<span class="compEditOptions">
|
||||
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&comp=encyclopediaArticle&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&comp=encyclopediaArticle&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&comp=encyclopediaArticle&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&comp=encyclopediaArticle&metaId=${ encyclopediaArticle.metaId }&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>-->
|
||||
|
|
|
@ -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"/>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<span class="compEditOptions">
|
||||
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&comp=grammaticalFunction&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&comp=grammaticalFunction&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&comp=grammaticalFunction&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&comp=grammaticalFunction&metaId=${ function.metaId }&parentId=${function.parentId}" title="Remove this component"><img alt="Remove this component" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
|
||||
</span>
|
||||
</c:if>
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<span class="compEditOptions">
|
||||
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&comp=keyword&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&comp=keyword&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&comp=keyword&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&comp=keyword&metaId=${ keyword.metaId }&parentId=${keyword.parentId}" title="Remove this keyword"><img alt="Remove this keyword" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
|
||||
</span>
|
||||
</c:if>
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&comp=modelSentence&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&comp=modelSentence&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&comp=modelSentence&parentId=${modelSentence.parentId}&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&comp=modelSentence&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&comp=modelSentence&metaId=${ modelSentence.metaId }&parentId=${modelSentence.parentId}" title="Remove this modelSentence"><img alt="Remove this modelSentence" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
|
||||
</span>
|
||||
</c:if>
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&comp=passage&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&comp=passage&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&comp=passage&parentId=${passage.parentId}&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&comp=passage&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&comp=passage&metaId=${ passage.metaId }&parentId=${ passage.parentId }" title="Remove this passage"><img alt="Remove this passage" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
|
||||
</span>
|
||||
</c:if>
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<span class="compEditOptions">
|
||||
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&comp=pronunciation&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&comp=pronunciation&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&comp=pronunciation&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&comp=pronunciation&metaId=${ pronunciation.metaId }&parentId=${pronunciation.parentId}" title="Remove this component"><img alt="Remove this component" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
|
||||
</span>
|
||||
</c:if>
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<span class="compEditOptions">
|
||||
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&comp=speechRegister&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&comp=speechRegister&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&comp=speechRegister&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&comp=speechRegister&metaId=${ register.metaId }&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>-->
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<span class="compEditOptions">
|
||||
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&comp=relatedTerm&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&comp=relatedTerm&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&comp=relatedTerm&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&comp=relatedTerm&metaId=${ relatedTerm.metaId }&parentId=${relatedTerm.parentId}" title="Remove this relatedTerm"><img alt="Remove this relatedTerm" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
|
||||
</span>
|
||||
</c:if>
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<span class="compEditOptions">
|
||||
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&comp=spelling&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&comp=spelling&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&comp=spelling&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&comp=spelling&metaId=${ spelling.metaId }&parentId=${spelling.parentId}" title="Remove this component"><img alt="Remove this component" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
|
||||
</span>
|
||||
</c:if>
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<c:out value='<a href="/lex/action?cmd=getInsertForm&comp=relatedTerm&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&comp=passage&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&comp=speechRegister&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&comp=subdefinition&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&comp=subdefinition&metaId=${ subdefinition.metaId }&parentId=${subdefinition.parentId}" title="Remove this subdefinition"><img alt="Remove this subdefinition" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
|
||||
|
||||
</span>
|
||||
</c:if>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<span class="compEditOptions">
|
||||
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&comp=transitionalData&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&comp=transitionalData&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&comp=transitionalData&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&comp=transitionalData&metaId=${ transitionalData.metaId }&parentId=${transitionalData.parentId}" title="Remove this component"><img alt="Remove this component" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
|
||||
</span>
|
||||
</c:if>
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<span class="compEditOptions">
|
||||
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&comp=translationEquivalent&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&comp=translationEquivalent&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&comp=translationEquivalent&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&comp=translationEquivalent&metaId=${ translationEquivalent.metaId }&parentId=${translationEquivalent.parentId}" title="Remove this translationEquivalent"><img alt="Remove this translationEquivalent" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
|
||||
</span>
|
||||
</c:if>
|
||||
|
||||
|
|
Loading…
Reference in a new issue