Changeset 3773
- Timestamp:
- Aug 18, 2010, 10:51:48 AM (13 years ago)
- Location:
- trunk/client/servlet/src/org/proteios
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/servlet/src/org/proteios/action/ActionFactory.java
r3723 r3773 39 39 import org.proteios.RoleController; 40 40 import org.proteios.action.execute.ViewLoginForm; 41 import org.proteios.action.execute.Login; 41 42 import org.proteios.action.extract.ViewExtract; 42 43 import org.proteios.action.file.ViewFile; … … 318 319 } 319 320 320 // Special case for Login action, must check the owner parameter aswell 321 if(lastAction == null || owner != null) 321 log.debug(action.getId() + " : Owner is " + owner); 322 // Special case for Login action, must check the lastAction id aswell 323 if(lastAction == null || lastAction.getId().equals(Login.class.getName())) 322 324 { // Create new factories and stuff for this action 323 325 log.debug(action.getId() + " : Creating new factories and stuff"); -
trunk/client/servlet/src/org/proteios/action/hit/ViewHitSubHits.java
r2909 r3773 57 57 throws ActionException, InvalidParameterValue 58 58 { 59 /* 60 * Get hit id from valid parameter and set it as session attribute. 61 */ 62 Integer hitId = getValidInteger(FormFactory.VID); 63 log.debug("hitId = " + hitId); 64 /*********************************************************************** 65 * Get external id data 66 */ 67 // Define 59 Integer hitId; 68 60 Table tbl; 69 61 RowLayout layout; 70 Title title; 62 Title title; DbControl dc; 63 ItemFactory factory; 64 Hit hit; 65 List<Hit> hits; 66 67 hitId = getValidInteger(FormFactory.VID); 71 68 tbl = (Table) getRequest().getAttribute("table"); 69 70 log.debug("hitId = " + hitId); 71 72 72 if (tbl == null) 73 73 { 74 74 // Let ConfigureTableFactory2 action create the table for us 75 setAttribute(ConfigureTableFactory2.VWRAPPERCLASS, Hit.class 76 .getName()); 77 setAttribute(ConfigureTableFactory2.VDATACLASS, HitData.class 78 .getName()); 79 setAttribute(ConfigureTableFactory2.VFORWARDTO, 80 ViewHitSubHits.class.getName()); 75 setAttribute(ConfigureTableFactory2.VWRAPPERCLASS, Hit.class.getName()); 76 setAttribute(ConfigureTableFactory2.VDATACLASS, HitData.class.getName()); 77 setAttribute(ConfigureTableFactory2.VFORWARDTO, ViewHitSubHits.class.getName()); // Back to this action 81 78 setAttribute(ConfigureTableFactory2.VONLYINPROJECT, true); 82 79 setAttribute(ConfigureTableFactory2.VUSEDEFAULT, false); … … 85 82 else 86 83 { 87 DbControl dc = newDbControl(); 88 ItemFactory factory = getItemFactory(dc); 89 Hit hit = factory.getById(Hit.class, hitId); 90 List<Hit> hits = new ArrayList<Hit>(); 84 title = new Title("HitsCombination"); 85 dc = newDbControl(); 86 factory = getItemFactory(dc); 87 88 hit = factory.getById(Hit.class, hitId); 89 hits = new ArrayList<Hit>(); 91 90 hits.add(hit); 92 91 hits.addAll(hit.getSubHitsInCombination()); 93 for (Hit h : hits) 94 { 95 log.error("Hit " + h.getScoreType() + " " + h.getScore()); 96 } 92 97 93 getTableFactory2().setIterator(hits.iterator()); 98 94 tbl = getTableFactory2().build(); 99 95 tbl.setTitle("Hit"); 100 // List the hits 101 /******************************************************************* 102 * Layout 103 */ 104 title = new Title("HitsCombination"); 96 105 97 layout = getLayoutFactory().getRowLayout(); 106 98 layout.add(title); -
trunk/client/servlet/src/org/proteios/gui/table/TableFactory2.java
r3314 r3773 90 90 public Table build() 91 91 { 92 log.debug("Building table for [" + classDescriptor.getDescribedClass() 93 92 if(classDescriptor == null) { log.error("TableFactory2 is missconfigured. classDescriptor is null, make sure you call TableFactory2.setClassDescriptor prior to TableFactory2.build()"); return null; } 93 log.debug("Building table for [" + classDescriptor.getDescribedClass().getName() + "]"); 94 94 Table table = null; 95 95 if (verify()) 96 96 { 97 table = new Table(classDescriptor.getDescribedClass() 98 .getSimpleName()); 97 table = new Table(classDescriptor.getDescribedClass().getSimpleName()); 99 98 table.setHeader(columns); 100 99 while (iterator.hasNext())
Note: See TracChangeset
for help on using the changeset viewer.