Changeset 1918 for trunk/www/analyze/index.jsp
- Timestamp:
- Feb 6, 2006, 2:59:19 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/analyze/index.jsp
r1889 r1918 169 169 final ItemContext cc = Base.getAndSetCurrentContext(sc, basType, pageContext, defaultContext); 170 170 final ModeInfo mode = ModeInfo.get(request.getParameter("mode")); 171 ItemResultList<BioAssay> baList = null; 171 172 172 173 /* Command validation */ … … 244 245 var submitPage = 'index.jsp'; 245 246 var formId = 'bioassaysets'; 246 247 function configureColumns() 248 { 249 Table.configureColumns('<%=ID%>', formId, '<%=itemType.name()%>', '<%=(String)cc.getObject("defaultColumns")%>'); 250 } 247 251 function viewExperiment() 248 252 { … … 284 288 function switchTab(tabControlId, tabId) 285 289 { 286 TabControl.setActiveTab(tabControlId, tabId); 290 if(tabId == 'overviewplots') 291 { 292 location.replace('index.jsp?ID=<%=ID%>&experiment_id=<%=experimentId%>&item_id=<%=itemId%>&tabId=overviewplots'); 293 } 294 else 295 { 296 TabControl.setActiveTab(tabControlId, tabId); 297 } 298 287 299 } 288 300 </script> … … 371 383 baQuery.include(Include.REMOVED); 372 384 baQuery.include(Include.OTHERS); 373 ItemResultList<BioAssay>baList = baQuery.list(dc);385 baList = baQuery.list(dc); 374 386 for(BioAssay ba : baList) {%> 375 387 <option value="<%=ba.getId()%>" <%=(bioassayId == ba.getId()) ? "selected=selected": ""%>><%=HTML.encodeTags(ba.getName())%>[<%=ba.getNumSpots()%>]</option> … … 419 431 # --> extra value, not implemented 420 432 % --> channel, eg. %1, %2 421 */ 422 List<String> selectionList = new LinkedList<String>(); 433 */ 423 434 List<TableColumn> cols = new LinkedList<TableColumn>(); 435 436 /* Column definitions */ 424 437 cols.add( new TableColumn("position", "POSITION", "int", "Position") ); 425 438 cols.add( new TableColumn("ch1", "%1", "float", "Ch 1") ); 426 439 cols.add( new TableColumn("ch2", "%2", "float", "Ch 2") ); 427 440 cols.add( new TableColumn("externalId", "@externalId", "string", "External Id") ); 441 cols.add( new TableColumn("name", "@name", "string", "Name") ); 442 cols.add( new TableColumn("symbol", "@symbol", "string", "Symbol") ); 443 cols.add( new TableColumn("ch1FgMedian", "$ch1FgMedian", "float", "ch1FgMedian") ); 444 445 /* End column definitions */ 446 List<String> selectionList = new LinkedList<String>(); // Used when configuring query 428 447 429 448 for(TableColumn c : cols) … … 446 465 DynamicResultIterator spots = dynQuery.iterate(dc); 447 466 %> 467 468 <tbl:toolbar> 469 <tbl:button 470 image="columns.gif" 471 onclick="configureColumns()" 472 title="Columns…" 473 tooltip="Show, hide and re-order columns" 474 /> 475 </tbl:toolbar> 448 476 <tbl:navigator 449 477 page="<%=cc.getPage()%>" … … 466 494 </tr> 467 495 <tbl:rows> 468 <% 469 470 int reporter_i = spots.getIndex("externalId"); 471 int ch1 = spots.getIndex("ch1"); 472 int ch2 = spots.getIndex("ch2"); 473 int position_i = spots.getIndex("position"); 496 <% 497 int[] indexValues = new int[cols.size()]; 498 int i = 0; 499 for(TableColumn c : cols) 500 { 501 indexValues[i] = spots.getIndex(c.getId()); 502 i++; 503 } 474 504 while(spots.hasNext()) 475 { 476 505 { 477 506 SqlResult r = spots.next(); 478 507 %> 479 508 <tbl:row> 480 509 <th colspan="3" class="index"> </th> 481 <tbl:cell column="externalId"><%=r.getString(reporter_i) == null ? "" : r.getString(reporter_i)%></tbl:cell> 482 <tbl:cell column="ch1"><%=r.getFloat(ch1)%></tbl:cell> 483 <tbl:cell column="ch2"><%=r.getFloat(ch2)%></tbl:cell> 484 <tbl:cell column="position"><%=r.getInt(position_i)%></tbl:cell> 510 <% 511 i = 0; 512 for(TableColumn c : cols) 513 {%> 514 <tbl:cell column="<%=c.getId()%>"> 515 <%=r.getString(indexValues[i]) == null ? "" : r.getString(indexValues[i])%> 516 </tbl:cell> 517 <% 518 i++; 519 }%> 485 520 </tbl:row> 486 521 <% … … 499 534 /> 500 535 </tbl:table> 536 <%}%> 537 </t:tab> 538 <t:tab id="overviewplots" title="Overview plots"> 539 <%if(tabId.equals("overviewplots")){%> 540 <%for(BioAssay ba : baList) {%> 541 <img src="<%=root%>/analyze/jfreeplot/<%=ID%>/<%=itemId%>/<%=ba.getId()%>"/> 542 <%}%> 501 543 <%}%> 502 544 </t:tab>
Note: See TracChangeset
for help on using the changeset viewer.