@Override
 public void findCourse() {
   iFilter.setAriaLabel(
       isAllowFreeTime() ? ARIA.courseFinderFilterAllowsFreeTime() : ARIA.courseFinderFilter());
   AriaStatus.getInstance().setText(ARIA.courseFinderDialogOpened());
   if (iTabs != null) for (CourseFinderTab tab : iTabs) tab.changeTip();
   center();
   RootPanel.getBodyElement().getStyle().setOverflow(Overflow.HIDDEN);
   Scheduler.get()
       .scheduleDeferred(
           new ScheduledCommand() {
             public void execute() {
               iFilter.setFocus(true);
             }
           });
 }
Ejemplo n.º 2
0
 protected void updateCourseDetails() {
   if (iCourses.getSelectedRow() < 0
       || iCourses.getRows() == null
       || iCourses.getRows().length == 0) {
     if (iDetails != null)
       for (CourseFinderCourseDetails detail : iDetails) {
         detail.setValue(null);
       }
     AriaStatus.getInstance().setHTML(ARIA.courseFinderNoCourse());
   } else {
     WebTable.Row row = iCourses.getRows()[iCourses.getSelectedRow()];
     String courseName = MESSAGES.courseName(row.getCell(0).getValue(), row.getCell(1).getValue());
     if ("false".equals(row.getId()))
       courseName =
           MESSAGES.courseNameWithTitle(
               row.getCell(0).getValue(), row.getCell(1).getValue(), row.getCell(2).getValue());
     for (CourseFinderCourseDetails detail : iDetails) detail.setValue(courseName);
     String title = row.getCell(3).getValue();
     String note = row.getCell(4).getValue();
     if (title.isEmpty()) {
       if (note.isEmpty()) {
         AriaStatus.getInstance()
             .setHTML(
                 ARIA.courseFinderSelected(
                     1 + iCourses.getSelectedRow(),
                     iCourses.getRowsCount(),
                     row.getCell(0).getValue(),
                     row.getCell(1).getValue()));
       } else {
         AriaStatus.getInstance()
             .setHTML(
                 ARIA.courseFinderSelectedWithNote(
                     1 + iCourses.getSelectedRow(),
                     iCourses.getRowsCount(),
                     row.getCell(0).getValue(),
                     row.getCell(1).getValue(),
                     note));
       }
     } else {
       if (note.isEmpty()) {
         AriaStatus.getInstance()
             .setHTML(
                 ARIA.courseFinderSelectedWithTitle(
                     1 + iCourses.getSelectedRow(),
                     iCourses.getRowsCount(),
                     row.getCell(0).getValue(),
                     row.getCell(1).getValue(),
                     title));
       } else {
         AriaStatus.getInstance()
             .setHTML(
                 ARIA.courseFinderSelectedWithTitleAndNote(
                     1 + iCourses.getSelectedRow(),
                     iCourses.getRowsCount(),
                     row.getCell(0).getValue(),
                     row.getCell(1).getValue(),
                     title,
                     note));
       }
     }
   }
 }