Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-9509

ClientScriptLookupService unit tests and implementation

    Details

    • Estimated Difficulty:
      Low

      Description

      ClientScriptLookupService looks for client-side version of Java class ( for Converter or Validator )
      o On startup, lookup for resources in classpath "/META-INF/csv.xml". If found, read it and build default class-to-resource mapping.

      • getScript method gets Java class for JSF Validator or JSR-303 annotation and returns instance of ClientScript interface that describes JavaScript resource and function name. First ( minimal ) implementation:
        o Tries to get resource in the org.richfaces.csv with the same name as Java class, but with ".js" extension. If such resource exists, use it with default function name ( java class name with first letter lowercase.
        o If no .js resource found, try to use table from XML ...
        o If still resource found, try to use Java Annotations on custom validators or BeanValidator ...
        o Throws ScriptNotFoundException otherwise.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  alexsmirnov Alexander Smirnov
                  Reporter:
                  alexsmirnov Alexander Smirnov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: