Big Update to fix rampant bugs with basic add/edit/remove of everything

This commit is contained in:
travismccauley 2003-12-21 16:51:08 +00:00
parent 136340ab79
commit afa2f340a1
30 changed files with 771 additions and 308 deletions

View File

@ -39,6 +39,10 @@
<name>maxActive</name>
<value>15</value>
</parameter>
<parameter>
<name>removeAbandoned</name>
<value>true</value>
</parameter>
</ResourceParams>
<Resource name="jdbc/thdl-users-datasource" scope="Shareable" type="javax.sql.DataSource"/>
@ -87,6 +91,10 @@
<name>maxActive</name>
<value>15</value>
</parameter>
<parameter>
<name>removeAbandoned</name>
<value>true</value>
</parameter>
</ResourceParams>
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs/access" prefix="lex_access_log." suffix=".txt" pattern="combined" resolveHosts="true"/>

View File

@ -137,9 +137,10 @@ public class LexActionServlet extends HttpServlet
rd.forward( req, res );
LexLogger.debug( "Checking Request state at end of LexActionServlet.service()" );
LexLogger.logRequestState( req );
LexLogger.debug( "Checking Session state at end of LexActionServlet.service()" );
LexLogger.logSessionState( req );
LexLogger.debug( "Checking Context state at end of LexActionServlet.service()" );
LexLogger.logContextState( getServletContext() );
}
@ -199,7 +200,6 @@ public class LexActionServlet extends HttpServlet
commands.put( "addAnnotation", new AddAnnotationCommand( "displayEntry.jsp", Boolean.TRUE ) );
*/
commands.put( "insert", new InsertCommand( "displayEntry.jsp", Boolean.FALSE ) );
commands.put( "addAnnotation", new InsertCommand( "displayEntry.jsp", Boolean.FALSE ) );
commands.put( "insertTerm", new InsertCommand( "displayEntry.jsp", Boolean.TRUE ) );
commands.put( "update", new UpdateCommand( "displayEntry.jsp", Boolean.FALSE ) );

View File

@ -267,6 +267,33 @@ public class LexComponentRepository
}
/**
* Description of the Method
*
* @param pk Description of the Parameter
* @return Description of the Return Value
* @exception LexRepositoryException Description of the Exception
*/
public static ITerm findTermByPk( Integer pk ) throws LexRepositoryException
{
ITerm term = null;
beginTransaction();
String queryString = " FROM org.thdl.lex.component.ITerm as term WHERE term.metaId = " + pk.toString();
try
{
Query query = getSession().createQuery( queryString );
term = (ITerm) query.uniqueResult();
}
catch ( HibernateException he )
{
throw new LexRepositoryException( he );
}
endTransaction( false );
return term;
}
/**
* Description of the Method
*
@ -274,7 +301,7 @@ public class LexComponentRepository
* @exception LexRepositoryException Description of Exception
* @since
*/
public static void loadTermByPk( ITerm term ) throws LexRepositoryException
public static void loadTerm( ITerm term ) throws LexRepositoryException
{
try
{
@ -299,7 +326,7 @@ public class LexComponentRepository
{
beginTransaction();
ITerm term = assertTerm( lexQuery.getQueryComponent() );
loadTermByPk( term );
loadTerm( term );
lexQuery.setEntry( term );
if ( !lexQuery.getResults().containsKey( term.getMetaId() ) )
{

View File

@ -182,15 +182,20 @@ public class LexLogger
*/
public static void debugComponent( Object component )
{
if ( null == component )
{
debug( "debugComponent was just handed a null component" );
return;
}
try
{
LOGGER.debug( "Describing:: " + component );
LOGGER.debug( "Describing: " + component );
String label = component instanceof ILexComponent ? ( (ILexComponent) component ).getLabel() : component.toString();
Iterator it = BeanUtils.describe( component ).entrySet().iterator();
while ( it.hasNext() )
{
Map.Entry entry = (Map.Entry) it.next();
LOGGER.debug( label + " property:: " + entry.getKey() + " = '" + entry.getValue() + "'" );
LOGGER.debug( label + " property: " + entry.getKey() + " = '" + entry.getValue() + "'" );
}
}
catch ( Exception e )
@ -198,8 +203,20 @@ public class LexLogger
StringWriter writer = new StringWriter();
e.printStackTrace( new PrintWriter( writer ) );
String stackTrace = writer.getBuffer().toString();
LOGGER.debug( "LexLogger caught an Exception:: " + stackTrace );
LOGGER.debug( "LexLogger caught an Exception: " + stackTrace );
}
}
/**
* Description of the Method
*
* @param term Description of the Parameter
*/
public static void debugTerm( ITerm term )
{
debugComponent( term );
}
}

View File

@ -74,7 +74,7 @@ public class DisplayCommand extends LexCommand implements Command
}
else
{
LexComponentRepository.loadTermByPk( term );
LexComponentRepository.loadTerm( term );
query.setEntry( term );
if ( query.getResults().keySet().size() < 1 )
{

View File

@ -88,7 +88,7 @@ public class GetInsertFormCommand extends LexCommand implements Command
{
AnalyticalNote note = new AnalyticalNote();
note.setParentId( component.getMetaId() );
note.setAnalyticalNote( req.getParameter( "analyticalNote" ) );
//note.setAnalyticalNote( req.getParameter( "analyticalNote" ) );
note.setPrecedence( new Integer( 0 ) );
component.setAnalyticalNotes( new LinkedList() );
component.getAnalyticalNotes().add( note );

View File

@ -74,6 +74,13 @@ public class GetRemoveFormCommand extends LexCommand implements Command
{
component = query.getEntry();
}
else if ( component instanceof IAnalyticalNote )
{
ILexComponent parent = term.findParent( component.getParentId() );
List notes = parent.getAnalyticalNotes();
int index = notes.indexOf( component );
component = (ILexComponent) notes.get( index );
}
else if ( component instanceof Translatable && null != ( (Translatable) component ).getTranslationOf() )
{
LexComponentRepository.update( term );

View File

@ -68,12 +68,19 @@ public class GetUpdateFormCommand extends LexCommand implements Command
try
{
LexLogger.debug( "Checking component state from getUpdateFormCommand BEFORE component assignment" );
LexLogger.debugComponent( component );
if ( isTermMode() )
{
component = query.getEntry();
}
else if ( component instanceof IAnalyticalNote )
{
ILexComponent parent = term.findParent( component.getParentId() );
List notes = parent.getAnalyticalNotes();
int index = notes.indexOf( component );
component = (ILexComponent) notes.get( index );
LexLogger.debug( "Checking component state from getUpdateFormCommand AFTER assignment to analytical Note" );
LexLogger.debugComponent( component );
}
else if ( component instanceof Translatable && null != ( (Translatable) component ).getTranslationOf() )
{
LexComponentRepository.update( term );

View File

@ -83,13 +83,22 @@ public class InsertCommand extends LexCommand implements Command
if ( isTermMode() )
{
term = (ITerm) component;
//term.populate( req.getParameterMap() );
query.setEntry( (ITerm) component );
term = query.getEntry();
}
else if ( component instanceof AnalyticalNote )
{
LexLogger.debug( "Debugging Component before inserting analytical note" );
LexLogger.debugComponent( component );
ILexComponent parent = term.findParent( component.getParentId() );
parent.getAnalyticalNotes().add( component );
List list = parent.getAnalyticalNotes();
if ( null == list )
{
list = new LinkedList();
}
list.add( component );
parent.setAnalyticalNotes( list );
//term.addSiblingList( parent, component, list );
}
else if ( component instanceof Translatable && null != ( (Translatable) component ).getTranslationOf() )
{
@ -106,8 +115,13 @@ public class InsertCommand extends LexCommand implements Command
source.setMetaId( translation.getTranslationOf() );
source.setParentId( translation.getParentId() );
source = (Translatable) term.findChild( source );
List l = source.getTranslations();
l.add( translation );
List list = source.getTranslations();
if ( null == list )
{
list = new LinkedList();
}
list.add( translation );
source.setTranslations( list );
}
else
{
@ -124,6 +138,8 @@ public class InsertCommand extends LexCommand implements Command
component.getMeta().setCreatedBy( user.getId() );
component.getMeta().setModifiedBy( user.getId() );
LexComponentRepository.save( term );
if ( !isTermMode() )
{
term.getMeta().setModifiedOn( now );
@ -134,6 +150,7 @@ public class InsertCommand extends LexCommand implements Command
{
AnalyticalNote note = new AnalyticalNote();
note.setAnalyticalNote( req.getParameter( "analyticalNote" ) );
note.setParentId( component.getMetaId() );
note.setPrecedence( new Integer( 0 ) );
component.setAnalyticalNotes( new LinkedList() );
component.getAnalyticalNotes().add( note );
@ -146,9 +163,10 @@ public class InsertCommand extends LexCommand implements Command
LexLogger.debugComponent( component );
LexLogger.debugComponent( term );
LexComponentRepository.save( term );
LexComponentRepository.update( term );
msg = "Successful Update";
visit.setDisplayMode( "edit" );
}
else
{
@ -167,6 +185,8 @@ public class InsertCommand extends LexCommand implements Command
finally
{
req.setAttribute( LexConstants.MESSAGE_REQ_ATTR, msg );
LexLogger.debug( "Showing Term Map at end of InsertCommand.execute()" );
LexLogger.debugTerm( ( (Visit) req.getSession( false ).getAttribute( "visit" ) ).getQuery().getEntry() );
}
}

View File

@ -82,6 +82,14 @@ public class RemoveCommand extends LexCommand implements Command
LexComponentRepository.update( term );
query.setEntry( null );
}
else if ( component instanceof AnalyticalNote )
{
LexLogger.debug( "Debugging Component before inserting analytical note" );
LexLogger.debugComponent( component );
ILexComponent parent = term.findParent( component.getParentId() );
List notes = parent.getAnalyticalNotes();
notes.remove( component );
}
else if ( component instanceof Translatable && null != ( (Translatable) component ).getTranslationOf() )
{
Translatable translation = (Translatable) component;

View File

@ -86,6 +86,15 @@ public class UpdateCommand extends LexCommand implements Command
term.getMeta().populate( req.getParameterMap() );
component = term;
}
else if ( component instanceof AnalyticalNote )
{
LexLogger.debug( "Debugging Component before updating analytical note" );
LexLogger.debugComponent( component );
ILexComponent parent = term.findParent( component.getParentId() );
List notes = parent.getAnalyticalNotes();
ILexComponent ilc = (ILexComponent) notes.get( notes.indexOf( component ) );
ilc.populate( component );
}
else if ( component instanceof Translatable && null != ( (Translatable) component ).getTranslationOf() )
{
Translatable translation = (Translatable) component;
@ -125,7 +134,7 @@ public class UpdateCommand extends LexCommand implements Command
LexLogger.debugComponent( component );
LexLogger.debugComponent( term );
LexComponentRepository.save( term );
LexComponentRepository.update( term );
msg = "Successful Update";
visit.setDisplayMode( "edit" );
}

View File

@ -4,191 +4,460 @@ import java.io.Serializable;
import java.util.List;
import org.apache.commons.lang.builder.ToStringBuilder;
/** @author Hibernate CodeGenerator */
abstract public class BaseSubdefinition extends LexComponent implements org.thdl.lex.component.ISubdefinition,org.thdl.lex.component.Translatable, org.thdl.lex.component.LexComponentNode,Serializable {
/** nullable persistent field */
private java.lang.Integer parentId;
/**
* @author Hibernate CodeGenerator
* @created December 20, 2003
*/
public abstract class BaseSubdefinition extends LexComponent implements org.thdl.lex.component.ISubdefinition, org.thdl.lex.component.Translatable, org.thdl.lex.component.LexComponentNode, Serializable
{
/** nullable persistent field */
private java.lang.Integer precedence;
/**
* nullable persistent field
*/
private java.lang.Integer parentId;
/** nullable persistent field */
private java.lang.String subdefinition;
/**
* nullable persistent field
*/
private java.lang.Integer precedence;
/** nullable persistent field */
private java.lang.Integer translationOf;
/**
* nullable persistent field
*/
private java.lang.String subdefinition;
/** nullable persistent field */
private org.thdl.lex.component.ILexComponent parent;
/**
* nullable persistent field
*/
private java.lang.Integer translationOf;
/** persistent field */
private List translations;
/**
* nullable persistent field
*/
private org.thdl.lex.component.ILexComponent parent;
/** persistent field */
private List glosses;
/**
* persistent field
*/
private List translations;
/** persistent field */
private List keywords;
/**
* persistent field
*/
private List glosses;
/** persistent field */
private List modelSentences;
/**
* persistent field
*/
private List keywords;
/** persistent field */
private List translationEquivalents;
/**
* persistent field
*/
private List modelSentences;
/** persistent field */
private List relatedTerms;
/**
* persistent field
*/
private List translationEquivalents;
/** persistent field */
private List passages;
/**
* persistent field
*/
private List relatedTerms;
/** persistent field */
private List registers;
/**
* persistent field
*/
private List passages;
/** full constructor */
public BaseSubdefinition(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, java.lang.Integer parentId, java.lang.Integer precedence, java.lang.String subdefinition, java.lang.Integer translationOf, org.thdl.lex.component.ILexComponent parent, List translations, List glosses, List keywords, List modelSentences, List translationEquivalents, List relatedTerms, List passages, List registers) {
super(deleted, analyticalNotes, meta);
this.parentId = parentId;
this.precedence = precedence;
this.subdefinition = subdefinition;
this.translationOf = translationOf;
this.parent = parent;
this.translations = translations;
this.glosses = glosses;
this.keywords = keywords;
this.modelSentences = modelSentences;
this.translationEquivalents = translationEquivalents;
this.relatedTerms = relatedTerms;
this.passages = passages;
this.registers = registers;
}
/**
* persistent field
*/
private List registers;
/** default constructor */
public BaseSubdefinition() {
}
/** minimal constructor */
public BaseSubdefinition(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, List translations, List glosses, List keywords, List modelSentences, List translationEquivalents, List relatedTerms, List passages, List registers) {
super(deleted, analyticalNotes, meta);
this.translations = translations;
this.glosses = glosses;
this.keywords = keywords;
this.modelSentences = modelSentences;
this.translationEquivalents = translationEquivalents;
this.relatedTerms = relatedTerms;
this.passages = passages;
this.registers = registers;
}
/**
* full constructor
*
* @param deleted Description of the Parameter
* @param analyticalNotes Description of the Parameter
* @param meta Description of the Parameter
* @param parentId Description of the Parameter
* @param precedence Description of the Parameter
* @param subdefinition Description of the Parameter
* @param translationOf Description of the Parameter
* @param parent Description of the Parameter
* @param translations Description of the Parameter
* @param glosses Description of the Parameter
* @param keywords Description of the Parameter
* @param modelSentences Description of the Parameter
* @param translationEquivalents Description of the Parameter
* @param relatedTerms Description of the Parameter
* @param passages Description of the Parameter
* @param registers Description of the Parameter
*/
public BaseSubdefinition( java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, java.lang.Integer parentId, java.lang.Integer precedence, java.lang.String subdefinition, java.lang.Integer translationOf, org.thdl.lex.component.ILexComponent parent, List translations, List glosses, List keywords, List modelSentences, List translationEquivalents, List relatedTerms, List passages, List registers )
{
super( deleted, analyticalNotes, meta );
this.parentId = parentId;
this.precedence = precedence;
this.subdefinition = subdefinition;
this.translationOf = translationOf;
this.parent = parent;
this.translations = translations;
this.glosses = glosses;
this.keywords = keywords;
this.modelSentences = modelSentences;
this.translationEquivalents = translationEquivalents;
this.relatedTerms = relatedTerms;
this.passages = passages;
this.registers = registers;
}
public java.lang.Integer getParentId() {
return this.parentId;
}
public void setParentId(java.lang.Integer parentId) {
this.parentId = parentId;
}
/**
* default constructor
*/
public BaseSubdefinition() { }
public java.lang.Integer getPrecedence() {
return this.precedence;
}
public void setPrecedence(java.lang.Integer precedence) {
this.precedence = precedence;
}
/**
* minimal constructor
*
* @param deleted Description of the Parameter
* @param analyticalNotes Description of the Parameter
* @param meta Description of the Parameter
* @param translations Description of the Parameter
* @param glosses Description of the Parameter
* @param keywords Description of the Parameter
* @param modelSentences Description of the Parameter
* @param translationEquivalents Description of the Parameter
* @param relatedTerms Description of the Parameter
* @param passages Description of the Parameter
* @param registers Description of the Parameter
*/
public BaseSubdefinition( java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, List translations, List glosses, List keywords, List modelSentences, List translationEquivalents, List relatedTerms, List passages, List registers )
{
super( deleted, analyticalNotes, meta );
this.translations = translations;
this.glosses = glosses;
this.keywords = keywords;
this.modelSentences = modelSentences;
this.translationEquivalents = translationEquivalents;
this.relatedTerms = relatedTerms;
this.passages = passages;
this.registers = registers;
}
public java.lang.String getSubdefinition() {
return this.subdefinition;
}
public void setSubdefinition(java.lang.String subdefinition) {
this.subdefinition = subdefinition;
}
/**
* Gets the parentId attribute of the BaseSubdefinition object
*
* @return The parentId value
*/
public java.lang.Integer getParentId()
{
return this.parentId;
}
public java.lang.Integer getTranslationOf() {
return this.translationOf;
}
public void setTranslationOf(java.lang.Integer translationOf) {
this.translationOf = translationOf;
}
/**
* Sets the parentId attribute of the BaseSubdefinition object
*
* @param parentId The new parentId value
*/
public void setParentId( java.lang.Integer parentId )
{
this.parentId = parentId;
}
public org.thdl.lex.component.ILexComponent getParent() {
return this.parent;
}
public void setParent(org.thdl.lex.component.ILexComponent parent) {
this.parent = parent;
}
/**
* Gets the precedence attribute of the BaseSubdefinition object
*
* @return The precedence value
*/
public java.lang.Integer getPrecedence()
{
return this.precedence;
}
public java.util.List getTranslations() {
return this.translations;
}
public void setTranslations(java.util.List translations) {
this.translations = translations;
}
/**
* Sets the precedence attribute of the BaseSubdefinition object
*
* @param precedence The new precedence value
*/
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;
}
public java.util.List getGlosses() {
return this.glosses;
}
public void setGlosses(java.util.List glosses) {
this.glosses = glosses;
}
/**
* Gets the subdefinition attribute of the BaseSubdefinition object
*
* @return The subdefinition value
*/
public java.lang.String getSubdefinition()
{
return this.subdefinition;
}
public java.util.List getKeywords() {
return this.keywords;
}
public void setKeywords(java.util.List keywords) {
this.keywords = keywords;
}
/**
* Sets the subdefinition attribute of the BaseSubdefinition object
*
* @param subdefinition The new subdefinition value
*/
public void setSubdefinition( java.lang.String subdefinition )
{
this.subdefinition = subdefinition;
}
public java.util.List getModelSentences() {
return this.modelSentences;
}
public void setModelSentences(java.util.List modelSentences) {
this.modelSentences = modelSentences;
}
/**
* Gets the translationOf attribute of the BaseSubdefinition object
*
* @return The translationOf value
*/
public java.lang.Integer getTranslationOf()
{
return this.translationOf;
}
public java.util.List getTranslationEquivalents() {
return this.translationEquivalents;
}
public void setTranslationEquivalents(java.util.List translationEquivalents) {
this.translationEquivalents = translationEquivalents;
}
/**
* Sets the translationOf attribute of the BaseSubdefinition object
*
* @param translationOf The new translationOf value
*/
public void setTranslationOf( java.lang.Integer translationOf )
{
this.translationOf = translationOf;
}
public java.util.List getRelatedTerms() {
return this.relatedTerms;
}
public void setRelatedTerms(java.util.List relatedTerms) {
this.relatedTerms = relatedTerms;
}
/**
* Gets the parent attribute of the BaseSubdefinition object
*
* @return The parent value
*/
public org.thdl.lex.component.ILexComponent getParent()
{
return this.parent;
}
public java.util.List getPassages() {
return this.passages;
}
public void setPassages(java.util.List passages) {
this.passages = passages;
}
/**
* Sets the parent attribute of the BaseSubdefinition object
*
* @param parent The new parent value
*/
public void setParent( org.thdl.lex.component.ILexComponent parent )
{
this.parent = parent;
}
public java.util.List getRegisters() {
return this.registers;
}
public void setRegisters(java.util.List registers) {
this.registers = registers;
}
/**
* Gets the translations attribute of the BaseSubdefinition object
*
* @return The translations value
*/
public java.util.List getTranslations()
{
return this.translations;
}
public String toString() {
return new ToStringBuilder(this)
.append("metaId", getMetaId())
.toString();
}
/**
* Sets the translations attribute of the BaseSubdefinition object
*
* @param translations The new translations value
*/
public void setTranslations( java.util.List translations )
{
this.translations = translations;
}
/**
* Gets the glosses attribute of the BaseSubdefinition object
*
* @return The glosses value
*/
public java.util.List getGlosses()
{
return this.glosses;
}
/**
* Sets the glosses attribute of the BaseSubdefinition object
*
* @param glosses The new glosses value
*/
public void setGlosses( java.util.List glosses )
{
this.glosses = glosses;
}
/**
* Gets the keywords attribute of the BaseSubdefinition object
*
* @return The keywords value
*/
public java.util.List getKeywords()
{
return this.keywords;
}
/**
* Sets the keywords attribute of the BaseSubdefinition object
*
* @param keywords The new keywords value
*/
public void setKeywords( java.util.List keywords )
{
this.keywords = keywords;
}
/**
* Gets the modelSentences attribute of the BaseSubdefinition object
*
* @return The modelSentences value
*/
public java.util.List getModelSentences()
{
return this.modelSentences;
}
/**
* Sets the modelSentences attribute of the BaseSubdefinition object
*
* @param modelSentences The new modelSentences value
*/
public void setModelSentences( java.util.List modelSentences )
{
this.modelSentences = modelSentences;
}
/**
* Gets the translationEquivalents attribute of the BaseSubdefinition object
*
* @return The translationEquivalents value
*/
public java.util.List getTranslationEquivalents()
{
return this.translationEquivalents;
}
/**
* Sets the translationEquivalents attribute of the BaseSubdefinition object
*
* @param translationEquivalents The new translationEquivalents value
*/
public void setTranslationEquivalents( java.util.List translationEquivalents )
{
this.translationEquivalents = translationEquivalents;
}
/**
* Gets the relatedTerms attribute of the BaseSubdefinition object
*
* @return The relatedTerms value
*/
public java.util.List getRelatedTerms()
{
return this.relatedTerms;
}
/**
* Sets the relatedTerms attribute of the BaseSubdefinition object
*
* @param relatedTerms The new relatedTerms value
*/
public void setRelatedTerms( java.util.List relatedTerms )
{
this.relatedTerms = relatedTerms;
}
/**
* Gets the passages attribute of the BaseSubdefinition object
*
* @return The passages value
*/
public java.util.List getPassages()
{
return this.passages;
}
/**
* Sets the passages attribute of the BaseSubdefinition object
*
* @param passages The new passages value
*/
public void setPassages( java.util.List passages )
{
this.passages = passages;
}
/**
* Gets the registers attribute of the BaseSubdefinition object
*
* @return The registers value
*/
public java.util.List getRegisters()
{
return this.registers;
}
/**
* Sets the registers attribute of the BaseSubdefinition object
*
* @param registers The new registers value
*/
public void setRegisters( java.util.List registers )
{
this.registers = registers;
}
/**
* Description of the Method
*
* @return Description of the Return Value
*/
public String toString()
{
return new ToStringBuilder( this )
.append( "metaId", getMetaId() )
.toString();
}
}

View File

@ -3,6 +3,7 @@ package org.thdl.lex.component;
import java.io.Serializable;
import java.util.*;
import org.thdl.lex.*;
import org.apache.commons.beanutils.MethodUtils;
/**
@ -58,14 +59,18 @@ public class Definition extends BaseDefinition implements Serializable, Translat
}
LexComponentNode node = (LexComponentNode) component.getParent();
list = (List) node.getChildMap().get( component.getLabel() );
LexLogger.debug( "[Definition] List derived from " + node + ": " + list );
if ( null == list )
{
Iterator it = getSubdefinitions().iterator();
while ( it.hasNext() )
if ( null != getSubdefinitions() )
{
ISubdefinition subdef = (ISubdefinition) it.next();
list = subdef.findSiblings( component );
Iterator it = getSubdefinitions().iterator();
while ( it.hasNext() )
{
ISubdefinition subdef = (ISubdefinition) it.next();
list = subdef.findSiblings( component );
}
}
}
@ -129,13 +134,15 @@ public class Definition extends BaseDefinition implements Serializable, Translat
child = findChild( list, pk );
}
Iterator subdefinitions = getSubdefinitions().iterator();
while ( subdefinitions.hasNext() && null == child )
if ( null != getSubdefinitions() )
{
ISubdefinition def = (ISubdefinition) subdefinitions.next();
child = def.findChild( pk );
Iterator subdefinitions = getSubdefinitions().iterator();
while ( subdefinitions.hasNext() && null == child )
{
ISubdefinition def = (ISubdefinition) subdefinitions.next();
child = def.findChild( pk );
}
}
return child;
}
@ -150,13 +157,16 @@ public class Definition extends BaseDefinition implements Serializable, Translat
public ILexComponent findChild( List list, Integer pk )
{
ILexComponent child = null;
for ( Iterator it = list.iterator(); it.hasNext(); )
if ( null != list )
{
ILexComponent lc = (LexComponent) it.next();
if ( lc.getMetaId().equals( pk ) )
for ( Iterator it = list.iterator(); it.hasNext(); )
{
child = lc;
break;
ILexComponent lc = (LexComponent) it.next();
if ( lc.getMetaId().equals( pk ) )
{
child = lc;
break;
}
}
}
return child;

View File

@ -1,5 +1,7 @@
package org.thdl.lex.component;
import java.util.List;
/**
* Description of the Interface
@ -181,5 +183,16 @@ public interface ILexComponent
* @exception LexComponentException Description of the Exception
*/
public void populate( ILexComponent component ) throws LexComponentException;
/**
* Adds a feature to the SiblingList attribute of the LexComponentNode object
*
* @param component The feature to be added to the SiblingList attribute
* @param list The feature to be added to the SiblingList attribute
* @param parent The feature to be added to the SiblingList attribute
* @exception LexComponentException Description of the Exception
*/
public void addSiblingList( ILexComponent parent, ILexComponent component, List list ) throws LexComponentException;
}

View File

@ -3,6 +3,7 @@ import java.io.Serializable;
import java.util.*;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.beanutils.MethodUtils;
/**
@ -206,6 +207,44 @@ public abstract class LexComponent extends BaseLexComponent implements Serializa
}
/**
* Uses component.label to find the correct sibling list in 'parent' and set it to 'list'
*
* @param component The feature to be added to the SiblingList attribute
* @param list The feature to be added to the SiblingList attribute
* @param parent The feature to be added to the SiblingList attribute
* @exception LexComponentException Description of the Exception
*/
public void addSiblingList( ILexComponent parent, ILexComponent component, List list ) throws LexComponentException
{
String label = component.getLabel();
if ( label.equals( "etymology" ) )
{
label = "etymologies";
}
else if ( label.equals( "transitionalData" ) )
{
label = "transitionalData";
}
else
{
label = label + "s";
}
char[] chars = label.toCharArray();
chars[0] = Character.toUpperCase( chars[0] );
label = "set" + new String( chars );
try
{
Object iAmVoid = MethodUtils.invokeMethod( parent, label, list );
}
catch ( Exception e )
{
throw new LexComponentException( e );
}
}
/**
* Description of the Method
*
@ -214,12 +253,17 @@ public abstract class LexComponent extends BaseLexComponent implements Serializa
*/
public boolean equals( Object o )
{
boolean b = false;
boolean rVal = false;
if ( o instanceof ILexComponent )
{
b = this.metaId.equals( ( (ILexComponent) o ).getMetaId() );
Integer a = ( (ILexComponent) o ).getMetaId();
Integer b = this.getMetaId();
if ( null != a && null != b )
{
rVal = a.equals( b );
}
}
return b;
return rVal;
}
//constructors

View File

@ -1,5 +1,7 @@
package org.thdl.lex.component;
import java.util.List;
/**
* Description of the Interface
@ -29,5 +31,6 @@ public interface LexComponentNode extends ILexComponent
* @exception LexComponentException Description of the Exception
*/
public java.util.List findSiblings( ILexComponent component ) throws LexComponentException;
}

View File

@ -3,6 +3,7 @@ package org.thdl.lex.component;
import java.io.Serializable;
import java.util.*;
import org.thdl.lex.*;
import org.apache.commons.beanutils.MethodUtils;
@ -87,6 +88,8 @@ public class Subdefinition extends BaseSubdefinition implements Serializable, Tr
}
/**
* Gets the persistentChild attribute of the Term object
*
@ -133,13 +136,16 @@ public class Subdefinition extends BaseSubdefinition implements Serializable, Tr
public ILexComponent findChild( List list, Integer pk )
{
ILexComponent child = null;
for ( Iterator it = list.iterator(); it.hasNext(); )
if ( list != null )
{
ILexComponent lc = (LexComponent) it.next();
if ( lc.getMetaId().equals( pk ) )
for ( Iterator it = list.iterator(); it.hasNext(); )
{
child = lc;
break;
ILexComponent lc = (LexComponent) it.next();
if ( lc.getMetaId().equals( pk ) )
{
child = lc;
break;
}
}
}
return child;

View File

@ -5,6 +5,7 @@ import java.util.*;
import org.thdl.lex.*;
/**
* Description of the Class
*
@ -102,18 +103,21 @@ public class Term extends BaseTerm implements Serializable, LexComponentNode
}
LexComponentNode node = (LexComponentNode) component.getParent();
list = (List) node.getChildMap().get( component.getLabel() );
LexLogger.debug( "List derived from " + node + ": " + list );
LexLogger.debug( "[Term] List derived from " + node + ": " + list );
if ( null == list )
{
LexLogger.debug( "findSiblings returned a null list" );
LexLogger.debugComponent( component );
Iterator it = getDefinitions().iterator();
while ( it.hasNext() )
if ( null != getDefinitions() )
{
IDefinition def = (IDefinition) it.next();
list = def.findSiblings( component );
Iterator it = getDefinitions().iterator();
while ( it.hasNext() )
{
IDefinition def = (IDefinition) it.next();
list = def.findSiblings( component );
}
}
}
@ -160,20 +164,6 @@ public class Term extends BaseTerm implements Serializable, LexComponentNode
}
/**
* Description of the Method
*
* @param child Description of the Parameter
* @exception LexComponentException Description of the Exception
*/
public void removeChild( ILexComponent child ) throws LexComponentException
{
List list = findSiblings( child );
child = findChild( list, child.getMetaId() );
list.remove( child );
}
/**
* Description of the Method
*
@ -184,21 +174,21 @@ public class Term extends BaseTerm implements Serializable, LexComponentNode
public ILexComponent findChild( Integer pk ) throws LexComponentException
{
ILexComponent child = null;
Iterator childMapValues = getChildMap().values().iterator();
while ( childMapValues.hasNext() && null == child )
{
List list = (List) childMapValues.next();
child = findChild( list, pk );
}
Iterator definitions = getDefinitions().iterator();
while ( definitions.hasNext() && null == child )
if ( null != getDefinitions() )
{
IDefinition def = (IDefinition) definitions.next();
child = def.findChild( pk );
Iterator definitions = getDefinitions().iterator();
while ( definitions.hasNext() && null == child )
{
IDefinition def = (IDefinition) definitions.next();
child = def.findChild( pk );
}
}
return child;
}
@ -210,16 +200,20 @@ public class Term extends BaseTerm implements Serializable, LexComponentNode
* @param pk Description of the Parameter
* @return Description of the Return Value
*/
public ILexComponent findChild( List list, Integer pk )
{
ILexComponent child = null;
for ( Iterator it = list.iterator(); it.hasNext(); )
if ( list != null )
{
ILexComponent lc = (LexComponent) it.next();
if ( lc.getMetaId().equals( pk ) )
for ( Iterator it = list.iterator(); it.hasNext(); )
{
child = lc;
break;
ILexComponent lc = (LexComponent) it.next();
if ( lc.getMetaId().equals( pk ) )
{
child = lc;
break;
}
}
}
return child;
@ -235,9 +229,29 @@ public class Term extends BaseTerm implements Serializable, LexComponentNode
public void addChild( ILexComponent component ) throws LexComponentException
{
List list = findSiblings( component );
if ( list == null )
{
list = new LinkedList();
LexComponentNode parent = (LexComponentNode) component.getParent();
parent.addSiblingList( parent, component, list );
parent.getChildMap().put( component.getLabel(), list );
}
list.add( component );
int precedence = list.indexOf( component );
component.setPrecedence( new Integer( precedence ) );
}
/**
* Description of the Method
*
* @param child Description of the Parameter
* @exception LexComponentException Description of the Exception
*/
public void removeChild( ILexComponent child ) throws LexComponentException
{
List list = findSiblings( child );
int index = list.indexOf( child );
list.remove( index );
}

View File

@ -5,9 +5,10 @@
<c:choose>
<c:when test="${ ! empty param.formMode && param.formMode == 'insert'}">
<c:set var="updateMode" value="${ false }" />
<c:set var="newCmd" value="addAnnotation" />
<c:set var="newCmd" value="insert" />
<c:set var="analyticalNote" value="" />
<c:set var="metaId" value="" />
</c:when>
<c:when test="${ ! empty param.formMode && param.formMode == 'update'}">
<c:set var="updateMode" value="${ true }" />

View File

@ -26,29 +26,38 @@
<jsp:include page="displayMeta.jsf" />
</p>
<c:if test="${sessionScope.visit.helper.showTranslations }">
<!--translation-->
<c:set value="${definition.translations}" target="${sessionScope.visit.helper}" property="collection"/>
<c:if test="${ sessionScope.visit.helper.collectionSize > 0 }">
<h3>Translations</h3>
<ul>
<c:forEach var="translation" items="${ definition.translations }" >
<c:set var='href' value='#'/>
<li>
<p class="data">
<c:if test="${ editMode }">
<c:set var='href' value='/lex/action?cmd=getUpdateForm&amp;comp=definition&amp;metaId=${ translation.metaId }' />
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=definition&amp;metaId=${ translation.metaId }&amp;translationOf=${ translation.translationOf }&amp;parentId=${ translation.parentId }" 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=getRemoveForm&amp;comp=definition&amp;metaId=${ translation.metaId }&amp;translationOf=${ translation.translationOf }&amp;parentId=${ translation.parentId }" title="Remove this definition"><img alt="Remove this definition" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>
<c:out value='<a class="meta" href="${href} ">'escapeXml="false" /><img src="/lex/images/trans.gif" alt="view/edit translation" />
<span class="translation">
<!--<span class="label">Definition ${translation.precedence}:</span>-->
<c:out value="${ translation.definition }" escapeXml="false" />
</span></a>
<c:set target="${ sessionScope.visit.helper }" property="component" value="${ translation }" />
<jsp:include page="displayMeta.jsf" />
</p>
</li>
</c:forEach>
</ul>
</c:if>
</c:if>
<jsp:include page="displayNotes.jsf" />
</p>

View File

@ -37,6 +37,7 @@
</form>
</div>
<c:if test="${ ! empty sessionScope.visit.query.results}">
<div id="results" class="highlightBox">
<h2> Search Results </h2>
<ol>
@ -52,6 +53,7 @@
</c:forEach>
</ol>
</div><!--END MENU-->
</c:if>
</div>

View File

@ -34,6 +34,7 @@
<jsp:include page="displayMeta.jsf" />
</p>
<c:if test="${sessionScope.visit.helper.showTranslations }">
<!--translation-->
@ -44,20 +45,19 @@
<c:forEach var="translation" items="${ etymology.translations }" >
<li>
<%-- <c:set var='href' value='#'/>
<p class="data">
<c:if test="${ editMode }">
<c:set var='href' value='/lex/action?cmd=getUpdateForm&amp;comp=etymology&amp;metaId=${ translation.metaId }' />
</c:if>
<c:out value='<a class="meta" href="${href} ">'escapeXml="false" /><img src="/lex/images/trans.gif" alt="view/edit translation" />--%>
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=etymology&amp;metaId=${ translation.metaId }&amp;translationOf=${ translation.translationOf }&amp;parentId=${ translation.parentId }" title="Edit this etymology"><img alt="Edit this etymology" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=etymology&amp;metaId=${ translation.metaId }&amp;translationOf=${ translation.translationOf }&amp;parentId=${ translation.parentId }" title="Remove this etymology"><img alt="Remove this etymology" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>
<span class="translation">
<!--<span class="label">Etymology:</span>-->
<c:out value="${ translation.etymologyDescription }" escapeXml="false" /> <br />
<!--<span class="label">Etymology Type:</span>-->
<c:out value="${ applicationScope.flatData.etymologyTypes[ translation.etymologyType ] }" escapeXml="false" /> <br />
<!--<span class="label">Loan Language:</span>-->
<c:out value="${ applicationScope.flatData.languages[ translation.loanLanguage ] }" escapeXml="false" /> <br />
<!--<span class="label">Derivation:</span>-->
<c:out value="${ translation.derivation }" escapeXml="false" />
</span>
@ -65,6 +65,7 @@
<c:set target="${ sessionScope.visit.helper }" property="component" value="${ translation }" />
<jsp:include page="displayMeta.jsf" />
<c:set target="${ sessionScope.visit.helper }" property="component" value="${ originalComponent }" />
</p>
</li>
</c:forEach>
</ul>
@ -74,5 +75,4 @@
<jsp:include page="displayNotes.jsf" />
</p>

View File

@ -61,11 +61,12 @@ Back to:
<c:choose>
<c:when test="${ param.cmd == 'getRemoveForm' && param.comp == 'analyticalNote' }">
<p><jsp:include page="displayAnalyticalNote.jsf" /></p>
<h2>Note</h2>
<p><c:out value="${ component.analyticalNote }" escapeXml="false" /></p>
</c:when>
<c:when test="${ param.cmd == 'getRemoveTermForm' && param.comp == 'term' }">
<p><p><jsp:include page="displayTerm.jsf" /></p></p>
<p><jsp:include page="displayTerm.jsf" /></p>
</c:when>
<c:when test="${ param.cmd == 'getRemoveForm' && param.comp == 'pronunciation'}">
@ -126,7 +127,7 @@ Back to:
<%--Insert Form--%>
<c:when test="${ param.cmd == 'getAnnotationForm' }">
<c:when test="${ param.cmd == 'getAnnotationForm' || param.comp == 'analyticalNote' }">
<jsp:include page="analyticalNoteForm.jsf" />
</c:when>

View File

@ -40,14 +40,6 @@
<span class="label">Dialect: </span><c:out value="${ applicationScope.flatData.majorDialectFamilies[ component.meta.dialect ] }" default="unknown" escapeXml="false"/>
<br />
<span class="label">Translation: </span>
<%-- <c:choose>
<c:when test="${ component.translationOf > 0 }">
Yes (of <c:out value="${ component.translationOf }" default="unknown" escapeXml="false"/>)
</c:when>
<c:otherwise>
No
</c:otherwise>
</c:choose> --%>
<br />
<span class="label">Note: </span><c:out value="${ component.meta.note }" default="unknown" escapeXml="false"/> <br />
</c:if>

View File

@ -18,49 +18,46 @@
<!--<span class="label">Model Sentence:</span>-->
<c:out value="${ modelSentence.modelSentence }" escapeXml="false" />
<jsp:include page="displayMeta.jsf" />
</p>
<c:if test="${sessionScope.visit.helper.showTranslations }">
<!--translation-->
<c:set value="${modelSentence.translations}" target="${sessionScope.visit.helper}" property="collection"/>
<c:if test="${ sessionScope.visit.helper.collectionSize > 0 }">
<h3>Translations</h3>
<ul>
<c:forEach var="translation" items="${ modelSentence.translations }" >
<li>
<%--
<c:set var='href' value='#'/>
<c:if test="${ editMode }">
<c:set var='href' value='/lex/action?cmd=getUpdateForm&amp;comp=modelSentence&amp;metaId=${ translation.metaId }' />
</c:if>
<c:out value='<a class="meta" href="${href} ">'escapeXml="false" /><img src="/lex/images/trans.gif" alt="view/edit translation" /> --%>
<span class="translation">
<!--<span class="label">Model Sentence:</span>-->
<c:out value="${ translation.modelSentence }" escapeXml="false" />
</span>
<p class="data">
<c:if test="${ editMode }">
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=modelSentence&amp;metaId=${ translation.metaId }&amp;translationOf=${ translation.translationOf }&amp;parentId=${ translation.parentId }" 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=getRemoveForm&amp;comp=modelSentence&amp;metaId=${ translation.metaId }&amp;translationOf=${ translation.translationOf }&amp;parentId=${ translation.parentId }" title="Remove this modelSentence"><img alt="Remove this modelSentence" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>
<c:out value="${ translation.modelSentence }" escapeXml="false" />
<c:set var="originalComponent" value="${ modelSentence }" />
<c:set target="${ sessionScope.visit.helper }" property="component" value="${ translation }" />
<jsp:include page="displayMeta.jsf" />
<c:set target="${ sessionScope.visit.helper }" property="component" value="${ originalComponent }" />
</p>
</li>
</c:forEach>
</c:forEach>
</ul>
</c:if>
</c:if>
<jsp:include page="displayNotes.jsf" />
</p>

View File

@ -11,10 +11,11 @@
<ol class="notes">
<c:forEach var="note" items="${ sessionScope.visit.helper.component.analyticalNotes }">
<li>
<p class = "data">
<c:if test="${ editMode }">
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=analyticalNote&amp;metaId=${ note.metaId }" title="Edit this analyticalNote"><img alt="Edit this analyticalNote" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=analyticalNote&amp;metaId=${ note.metaId }" title="Remove this analyticalNote"><img alt="Remove this analyticalNote" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=analyticalNote&amp;metaId=${ note.metaId }&amp;parentId=${ note.parentId }" title="Edit this analyticalNote"><img alt="Edit this analyticalNote" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=analyticalNote&amp;metaId=${ note.metaId }&amp;parentId=${ note.parentId }" title="Remove this analyticalNote"><img alt="Remove this analyticalNote" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>
@ -31,6 +32,7 @@
<c:set target="${ sessionScope.visit.helper }" property="component" value="${ parent }" />
</span>
</p>
</li>
</c:forEach>
</ol>

View File

@ -56,9 +56,9 @@
<jsp:include page="displayMeta.jsf" />
</p>
<c:if test="${sessionScope.visit.helper.showTranslations }">
<!--translation-->
<c:set value="${passage.translations}" target="${sessionScope.visit.helper}" property="collection"/>
<c:if test="${ sessionScope.visit.helper.collectionSize > 0 }">
<h3>Translations</h3>
@ -72,15 +72,9 @@
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=passage&amp;metaId=${ translation.metaId }&amp;translationOf=${ translation.translationOf }&amp;parentId=${ translation.parentId }" title="Remove this passage"><img alt="Remove this passage" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>
<%-- <c:set var='href' value='#'/>
<c:if test="${ editMode }">
<c:set var='href' value='/lex/action?cmd=getUpdateForm&amp;comp=passage&amp;metaId=${ translation.metaId }' />
</c:if> --%>
<%-- <span class="translation"> --%>
<c:set var="source" value="${ LexFlatDataRepository.literarySources[ translation.literarySource ] }"/>
<c:if test="${ ! empty source }">
<!--<span class="label">Literary Source:</span>-->
<c:out value="${ source }" /> <br />
</c:if>
@ -95,7 +89,6 @@
</c:if>
<c:out value="${ translation.passage }" />
<%-- </span> --%>
<c:set var="originalComponent" value="${ passage }" />
<c:set target="${ sessionScope.visit.helper }" property="component" value="${ translation }" />
@ -113,5 +106,4 @@
<jsp:include page="displayNotes.jsf" />
</p>

View File

@ -25,33 +25,38 @@
</span>
</c:if>
<!--<span class="label">Subdefinition:</span>-->
<c:out value="${ subdefinition.subdefinition }" escapeXml="false" />
<jsp:include page="displayMeta.jsf" />
<c:if test="${sessionScope.visit.helper.showTranslations }">
<!--translation-->
<c:forEach var="translation" items="${ subdefinition.translations }">
<c:set var='href' value='#'/>
</p>
<c:if test="${sessionScope.visit.helper.showTranslations }">
<c:set value="${subdefinition.translations}" target="${sessionScope.visit.helper}" property="collection"/>
<c:if test="${ sessionScope.visit.helper.collectionSize > 0 }">
<h3>Translations</h3>
<ul>
<c:forEach var="translation" items="${ subdefinition.translations }" >
<li>
<p class="data">
<c:if test="${ editMode }">
<c:set var='href' value='/lex/action?cmd=getUpdateForm&amp;comp=subdefinition&amp;metaId=${ translation.metaId }' />
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=subdefinition&amp;metaId=${ translation.metaId }&amp;translationOf=${ translation.translationOf }&amp;parentId=${ translation.parentId }" title="Edit this subdefinition"><img alt="Edit this subdefinition" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=subdefinition&amp;metaId=${ translation.metaId }&amp;translationOf=${ translation.translationOf }&amp;parentId=${ translation.parentId }" title="Remove this subdefinition"><img alt="Remove this subdefinition" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>
<c:out value='<a class="meta" href="${href} ">'escapeXml="false" /><img src="/lex/images/trans.gif" alt="view/edit translation" />
<span class="translation">
<!--<span class="label">Subdefinition:</span>-->
<c:out value="${ translation.subdefinition }" escapeXml="false" />
</span>
</a>
<c:out value="${ translation.subdefinition }" escapeXml="false" />
<c:set target="${ sessionScope.visit.helper }" property="component" value="${ translation }" />
<jsp:include page="displayMeta.jsf" />
</c:forEach>
</p>
</li>
</c:forEach>
</ul>
</c:if>
</c:if>
<jsp:include page="displayNotes.jsf" />

View File

@ -12,7 +12,7 @@
<c:set var="source" value="${ sessionScope.visit.preferences.source }" />
<c:set var="projectSubject" value="${ sessionScope.visit.preferences.projectSubject }" />
<c:set var="script" value="${ sessionScope.visit.preferences.script }" />
<%-- <c:set var="precedence" value="1" /> --%>
<c:set var="precedence" value="0" />
<c:set var="note" value="${ sessionScope.visit.preferences.note }" />
</c:when>
<c:when test="${ ! empty param.formMode && param.formMode == 'update'}">
@ -22,7 +22,7 @@
<c:set var="source" value="${ component.meta.source }" />
<c:set var="projectSubject" value="${ component.meta.modifiedByProjSub }" />
<c:set var="script" value="${ component.meta.script }" />
<%-- <c:set var="precedence" value="${ component.meta.precedence }" /> --%>
<c:set var="precedence" value="${ component.precedence }" />
<c:set var="note" value="${ component.meta.note }" />
</c:when>
<c:otherwise>
@ -32,17 +32,18 @@
<c:set var="source" value="ERROR" />
<c:set var="projectSubject" value="ERROR" />
<c:set var="script" value="ERROR" />
<%-- <c:set var="precedence" value="ERROR" /> --%>
<c:set var="note" value="ERROR" />
</c:otherwise>
</c:choose>
<c:out value='<input type="hidden" name="precedence" value="${ component.precedence }" />'escapeXml="false" />
<c:out value='<input type="hidden" name="parentId" value="${ component.parentId }" />' escapeXml='false' />
<%-- <c:if test="${ translateMode && ! empty component.translationOf}">
<c:out value='<input type="hidden" name="translationOf" value="${ component.translationOf }" />'escapeXml="false" />
<c:set var="parentId" value="${ component.parentId }" />
<%-- <c:if test="${ parentId == null || component.parentId < 1 }">
<c:set var="parentId" value="${ param.parentId }" />
</c:if> --%>
<c:out value=' <input type="hidden" name="parentId" value="${parentId}" /> ' escapeXml='false' />
<c:out value='<input type="hidden" name="precedence" value="${ precedence }" />'escapeXml="false" />
<c:if test="${ ! updateMode && param.cmd != 'getAnnotationForm' && param.cmd != 'getTranslationForm' }">
<p>
@ -71,7 +72,6 @@ Language:
</c:if>
<c:out value='<option value="${ prefLangs }" ${ sel }>${ applicationScope.flatData.languages[ prefLangs ] }</option>' escapeXml="false" />
</c:forEach>
<%-- <option disabled="disabled" value="">----------------</option> --%>
<c:forEach var="langs" items="${ applicationScope.flatData.languages }">
<c:set var="printOption" value="${ true }" />
<c:forEach var="prefLangs" items="${ sessionScope.visit.preferences.languageSet }">

View File

@ -48,7 +48,7 @@
<c:out value="${ originalSubdefinition }" escapeXml='false'/>
Subdefinition: <br />
<textarea name="subdefinition" rows="8" cols="90"><c:out value='${ subdefinition }' escapeXml='false' /> </textarea>
<textarea name="subdefinition" rows="8" cols="90"><c:out value='${ component.subdefinition }' escapeXml='false' /> </textarea>
<br />
<%-- Precedence: <c:out value='<input type="text" value="${ precedence }" name="precedence" size="3"/>' escapeXml='false' /> <br />