Package org.dspace.app.xmlui.wing

Examples of org.dspace.app.xmlui.wing.WingException


            for (String v : VIEW_TYPES) {
                viewSelect.addOption((v.equals(getParameterView())), v, message("xmlui.ArtifactBrowser.AbstractSearch.view." + v));
            }
        }
        catch (Exception e) {
            throw new WingException("Unable to get view options", e);
        }

        // Create a control for the number of records to display
        Cell rppCell = controlsRow.addCell();
        rppCell.addContent(T_rpp);
        Select rppSelect = rppCell.addSelect("rpp");
        for (int i : RESULTS_PER_PAGE_PROGRESSION) {
            rppSelect.addOption((i == getParameterRpp()), i, Integer.toString(i));
        }

        /*
        Cell groupCell = controlsRow.addCell();
        try {
            // Create a drop down of the different sort columns available
            groupCell.addContent(T_group_by);
            Select groupSelect = groupCell.addSelect("group_by");
            groupSelect.addOption(false, "none", T_group_by_none);

           
            String[] groups = {"publication_grp"};
            for (String group : groups) {
                groupSelect.addOption(group.equals(getParameterGroup()), group,
                        message("xmlui.ArtifactBrowser.AbstractSearch.group_by." + group));
            }

        }
        catch (Exception se) {
            throw new WingException("Unable to get group options", se);
        }
        */
       
        Cell sortCell = controlsRow.addCell();
        try {
            // Create a drop down of the different sort columns available
            sortCell.addContent(T_sort_by);
            Select sortSelect = sortCell.addSelect("sort_by");
            sortSelect.addOption(false, "score", T_sort_by_relevance);
            for (SortOption so : SortOption.getSortOptions()) {
                if (so.isVisible()) {
                    sortSelect.addOption((so.getMetadata().equals(getParameterSortBy())), so.getMetadata(),
                            message("xmlui.ArtifactBrowser.AbstractSearch.sort_by." + so.getName()));
                }
            }
        }
        catch (SortException se) {
            throw new WingException("Unable to get sort options", se);
        }

        // Create a control to changing ascending / descending order
        Cell orderCell = controlsRow.addCell();
        orderCell.addContent(T_order);
View Full Code Here


              outputter.setLexicalHandler(filter);
        outputter.output(dissemination);
      }
            catch (JDOMException jdome)
      {
        throw new WingException(jdome);
      }
      catch (AuthorizeException ae)
      {
        // just ignore the authorize exception and continue on with
        //out parsing the xml document.
View Full Code Here

    {
      // Fixme add some caching here
      DisseminationCrosswalk crosswalk = (DisseminationCrosswalk) PluginManager.getNamedPlugin(DisseminationCrosswalk.class, crosswalkName);

      if (crosswalk == null)
          throw new WingException("Unable to find named DisseminationCrosswalk: " + crosswalkName);
     
      return crosswalk;
    }
View Full Code Here

                }
            }
        }
        catch (SortException se)
        {
            throw new WingException("Unable to get sort options", se);
        }

        // Create a control to changing ascending / descending order
        Cell orderCell = controlsRow.addCell();
        orderCell.addContent(T_order);
View Full Code Here

         */
        private void renderChoiceSelectField(List form, String fieldName, Collection coll, DCInput dcInput, DCValue[] dcValues, boolean readonly) throws WingException
        {
                String fieldKey = MetadataAuthorityManager.makeFieldKey(dcInput.getSchema(), dcInput.getElement(), dcInput.getQualifier());
                if (MetadataAuthorityManager.getManager().isAuthorityControlled(fieldKey))
                    throw new WingException("Field "+fieldKey+" has choice presentation of type \""+Params.PRESENTATION_SELECT+"\", it may NOT be authority-controlled.");

                // Plain old select list.
                Select select = form.addItem().addSelect(fieldName,"submit-select");

                //Setup the select field
View Full Code Here

            pageMeta.addMetadata("xhtml_head_item").addContent(sw.toString());
        }
        catch (CrosswalkException ce)
        {
            // TODO: Is this the right exception class?
            throw new WingException(ce);
        }
    }
View Full Code Here

                    }
                }
            }
            catch (SortException se)
            {
                throw new WingException("Unable to get sort options", se);
            }
        }

        // Create a control to changing ascending / descending order
        controlsForm.addContent(T_order);
View Full Code Here

              outputter.setLexicalHandler(filter);
        outputter.output(dissemination);
      }
            catch (JDOMException jdome)
      {
        throw new WingException(jdome);
      }
      catch (AuthorizeException ae)
      {
        // just ignore the authorize exception and continue on
        // without parsing the xml document.
View Full Code Here

      // FIXME add some caching here
      DisseminationCrosswalk crosswalk = (DisseminationCrosswalk) PluginManager.getNamedPlugin(DisseminationCrosswalk.class, crosswalkName);

      if (crosswalk == null)
        {
            throw new WingException("Unable to find named DisseminationCrosswalk: " + crosswalkName);
        }
     
      return crosswalk;
    }
View Full Code Here

                    outputter.setLexicalHandler(filter);
                                outputter.output(dissemination);
                        }
            catch (JDOMException jdome)
                        {
                                throw new WingException(jdome);
                        }
                        catch (AuthorizeException ae)
                        {
                                // just ignore the authorize exception and continue on
                                // without parsing the xml document.
View Full Code Here

TOP

Related Classes of org.dspace.app.xmlui.wing.WingException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.