Simple example of a custom annotation    for log

Please help me write me my custom annotations. I like to use them to provide log ,security etc . I did not find articles where I can write my annotation to change the behaviour. Suppoe I decare annotation on a method , I want jvm to call code in my annotation where I can control the behaviour of the method similar to aop stuff ,
here is what i need
MyClass {
  @MyCustomAnnotation
   void myMethod(){
}now I want MyCustomAnnotation to log that this method is begin called can I do this ?

I can think of only one way to do something like this, and it's messy:
Let's say your code looks like this:
public class MyClass
    @MyLogging
    public void myMethod(String arg)
}Have your @MyLogging annotation processing generate a new Class source that extends your original class and overrides the methods that you've annotated with code that looks something like this:
public class MyClassGenerated extends MyClass
   Log log = ... // create a logger
    @Override
    public void myMethod(String arg)
        log.info("myMethod called");
        super.myMethod(arg);
}Now you'll have to change your code to use MyClassGenerated instead of MyClass, which presents its own problems... you may be able to add in some kind of factory mechanism or something to make that work easier.

Similar Messages

  • Using Customized page for logging in

    Hi all,
    I am trying to use an html page for logging into Sun Identity manager.
    Actually we have an html page, on which we have a section in which the user can enter the credentials.
    Now when he clicks the submit button, then the user should be able to login SIM.
    I thought that in backend we can pass the values entered in html page to user/login.jsp.
    But i am not getting in which attributes, we should get these values on user/login.jsp because i think,in backend it also calls some form and i am unable to get which form it is calling.
    Any pointers can be helpful.
    Thanks

    i dont thik its possible use a separate html page for login.you can customise the login page(bit difficult but you can do it there are some css and .properties files are associated with that)

  • Custom Tag for Logging?

              I would think that there must be a weblogic custom tag that I can use in my jsp
              to access the weblog.log file - but I can't find any info on it. How should I
              be logging from within jsp's?
              Thanks,
              Dave
              

    You can use the NonCatalogLogger class:
              http://e-docs.bea.com/wls/docs61////javadocs/weblogic/logging/NonCatalogLogger.html
              It's pretty easy to wrap this class in a little wrapper class or custom
              tag.
              Hope that helps,
              Nils
              David Finkbeiner wrote:
              >
              > I would think that there must be a weblogic custom tag that I can use in my jsp
              > to access the weblog.log file - but I can't find any info on it. How should I
              > be logging from within jsp's?
              > Thanks,
              > Dave
              ============================
              [email protected]
              

  • Custom Annotation showing Error: is missing clinit

    Hi!
    I have created some custom annotations for use in my project. Sometimes they show error: is missing <clinit> and sometimes they don't. I'm confused. If I create a jar and use that jar in another project this error appears at compiletime .
    Here is the source of one of my custom annotations....
    import java.lang.annotation.ElementType;
    import java.lang.annotation.Retention;
    import java.lang.annotation.RetentionPolicy;
    import java.lang.annotation.Target;
    * User: yogeshd
    * Date: Mar 30, 2007
    * Time: 10:54:31 AM
    @Constraint
    @Retention(RetentionPolicy.RUNTIME)
    @Target(ElementType.FIELD)
    public @interface ConstraintMaxIntValue {
    public Validator validator = new MaxIntValidator();
    int value() default 0;
    The strange thing is that this error doesnot appears all the time...
    If anyone can explain the reason I will be enlightened. ;) thnx.

    yogeshd,
    It might be that the .class file for the annotation that you are compiling against is the one you have given us the source code for above, but when you run the program, the class file for the annotation is not the same, and is one that was compiled before you added the static field.
    This can happen if your classpath is wrong. (and would explain why the problem only occurs sometimes - because it is only failing when the classpath is wrong).
    If you run the following program with the Fully qualified name of your annotation as the argument, and with the same classpath as you run your program, it can tell you where it is finding the annotation class file. Check that this is the same one that you are compiling to.
    class WhereLoaded {
        public static void main(String[] args) {
            Class theClass=null;
            if(args.length > 0) {
                try {
                    theClass=Class.forName(args[0]);
                } catch (Exception e) {
                    e.printStackTrace();
                    theClass=Object.class;
            } else {
                System.out.println(
                    "The first argument should be a fully qualified class name," +
                    " using java.lang.Object instead"
                theClass=Object.class;
            String name=theClass.getName();
            name=name.substring(name.lastIndexOf(".")+1) + ".class";
            System.out.println(name + " loaded from " + theClass.getResource(name));
    }regards
    Bruce

  • Custom StyledEditorKit: simple example/tutorial?

    I'm trying to write a simple EditorKit to color specific parts of a text (and later different fonts). I extended StyledEditorKit for this, but can't get any text to be colored in my JTextPane. The Java Tutorial and also what I've found in this forum and google didn't show how to start writing a simple EditorKit.

    Well, I have a simple example that shows how to start. Of course it's brute force colorizing always the complete text and only works for well-formed XML, but it's a working example of how to write your own EditorKit. It shows that only a few things have to be done.
    public class XMLEditorKit extends StyledEditorKit {
         * Constructor.
        public XMLEditorKit() {
            super();
        }//XMLEditorKit()
         * Overwrites super.
        public String getContentType() {
            return "text/xml";
        }//getContentType()
         * Overwrites super.
        public Document createDefaultDocument() {
            return new XMLDocument();
        }//createDefaultDocument()
    }//XMLEditorKit
    class XMLDocument extends DefaultStyledDocument {
        /** Attributes for XML element tag. */
        private MutableAttributeSet tag = null;
        /** Attributes for element value. */
        private MutableAttributeSet elementValue = null;
         * Constructor.
        public XMLDocument() {
            tag = new SimpleAttributeSet();
            StyleConstants.setForeground(tag, Color.blue);
            elementValue = new SimpleAttributeSet();
            StyleConstants.setForeground(elementValue, Color.black);
        }//XMLDocument()
         * Override AbstractDocument.
        public void insertString(int offset, String str, AttributeSet a) throws BadLocationException {
            super.insertString(offset, str, a);
            colorize();
        }//insertString()
         * Override AbstractDocument.
        public void remove(int offset, int length) throws BadLocationException {
            super.remove(offset, length);
            colorize();
        }//remove()
         * Called when document content changed to revalidate syntax highlightning.
         * Only works correctly for well-formed XML.
        private void colorize() throws BadLocationException {
            String text = getText(0, getLength());
            int startIndex = 0;
            int endIndex = text.length() + 1;
            int openIndex = 0;
            int closeIndex = 0;
            boolean outOfTag = true;
            while (startIndex <= endIndex) {
                openIndex  = text.indexOf('<', startIndex); //next '<'
                closeIndex = text.indexOf('>', startIndex); //next '>'
                if (outOfTag) {
                    if (openIndex >= 0) {
                        setCharacterAttributes(startIndex, openIndex - startIndex, elementValue, false);
                        startIndex = openIndex;
                        outOfTag = false;
                    } else {
                        setCharacterAttributes(startIndex, endIndex + 1, elementValue, false);
                        break;
                } else { //withinTag
                    if (closeIndex >= 0) {                       
                        setCharacterAttributes(startIndex, closeIndex - startIndex + 1, tag, false);
                        startIndex = closeIndex + 1;
                        outOfTag = true;
                    } else {
                        setCharacterAttributes(startIndex, endIndex + 1, tag, false);
                        break;
                }//next occurence
        }//colorize()
    }//XMLDocumentSo, to start write a custom EditorKit,
    1. extend StyledEditorKit (or DefaultEditorKit, if you like)
    2. create a document class extending DefaultStyledDocument
    3. overwrite insertString()/remove() in your document class to implement your custom text styling.

  • Looking for a simple example of the Minimax algorithm in java

    Hey everyone,
    I'm currently working on a Gameboy emulator program as a pet project, and for one of the game's I'd like for the enemy AI to use the Minimax algorithm, but I don't have any experience with it (or recursion in general, for that matter). Could anyone maybe post a simple example of how this algorithm works?

    WTF? I'm sure you can find plenty of examples on google. It's on you to take the time to go through them, study them, and, if you still don't understand something, post a clear, concrete question that indicates what you read and what you didn't understand about it.
    As is, you're essentially treating folks here as your research flunkies and saying, "Give me an example that's better than all the ones already easily available to me. Read my mind to know why I didn't like them."

  • I need for a simple example of  reading a xml file using jdom

    Hello
    I have been looking for a simple example that uses Jdom to read am xml file and use the information for anything( ), and I just can't find one.since I'm just beggining to understand how things work, I need a good example.thanks
    here is just a simple cod for example:
    <xmlMy>
         <table>
              <item name="first" value="123" createdDate="1/1/90"/>
              <item name="second" value="456" createdDate="1/4/96"/>
         </table>
         <server>
              <property name="port" value="12345"/>
              <property name="maxClients" value="3"/>
         </server>
    </xmlMy>Dave

    Hi,
            FileInputStream fileInputStream = null;
            try {
                fileInputStream = new FileInputStream("my_xml_file.xml");
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } finally{
                if (fileInputStream == null) return;
            SAXBuilder saxBuilder = new SAXBuilder();
            saxBuilder.setEntityResolver(new EntityResolver() {
                public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
                    return new InputSource(new StringReader(""));
            Document document = null;
            try {
                document = saxBuilder.build(fileInputStream);
            } catch (JDOMException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
                if (document == null) return;
            Element element = document.getRootElement();
            System.out.println(element.getName());
            System.out.println(element.getChild("table").getName());

  • Could u plz help me to find simple example for how to save data file in a spread sheet or any other way in the real time controller for Sbrio 9642 using memory or usb flash memory

    Could u plz help me to find simple example for how to save data file in a spread sheet or any other way in the real time controller for Sbrio 9642 using memory or usb flash memory

    Here are a few Links to a helpful Knowledge Base article and a White Paper that should help you out: http://digital.ni.com/public.nsf/allkb/BBCAD1AB08F1B6BB8625741F0082C2AF and http://www.ni.com/white-paper/10435/en/ . The methods for File IO in Real Time are the same for all of the Real Time Targets. The White Paper has best practices for the File IO and goes over how to do it. 
    Alex D
    Applications Engineer
    National Instruments

  • I need some simple examples to start with for Oracle ESB

    Hi All,
    Please share some simple examples to startwith for Oracle ESB.
    I need to understand, what are the files are created, once created an ESB project.
    What is the use of the files how to edit them with out using JDeveloper.
    Iam trying to create a simple example.
    I would like to create a file which has only "HELLO" in that file, simple text file inside a folder "INPUT" in my c:\ drive.
    I wanted to create a ESB service which picks up the file and add a string to it like "HELLO" + "ESB" and drop this file into "OUTPUT" folder in c:\ drive.
    How do i do that. I tried to do it when i deploy the integration server connection is gettting hit badly. I dont see that connection any more and i dont see that connection in my JDeveloper.
    I dont want to start with existing code.
    Please help
    Regards,
    Vijay.B
    Message was edited by:
    Vijay.B
    Message was edited by:
    Vijay.B

    Hi,
    If you want to do it from scratch you can basically do the following:
    Make sure you have created an application server and integration server connection in JDeveloper.
    1) Create a new JDeveloper project of type ESB project.
    2) Possibly add a ESB System/Group (open the esb file and click "Create System/Group") to group ESB projects.
    3) Create an XML schema describing your input XML file. Probably one element of type xsd:string.
    4) Create an example XML file which is well-formed and valid according to the XSD from step 3.
    5) Create a new File adapter (inbound/read). A routing service is automatically created.
    6) Create a new File adapter (outbound/write).
    7) Create a routing rule in the routing service in which you invoke the write method of the outbound file adapter. Possibly add a transformation using the XSL mapper.
    8) Deploy the ESB project to the server.
    9) Drop your XML file (from step 4) in the directory in which the inbound file adapter is polling.
    10) If it is ok, the file should be picked up, transformed and dropped in the outbound directory. A new ESB instance should be visible in the ESB console.
    See what files are generated on the filesystem in each of the above steps.
    Regards, Ronald

  • Is there a custom function available which can be used for logging errors captured in a sp in a sql table

    Is there a custom function  available which can be used for logging errors captured in a sp during and after execution in a sql table?
    Basically we  would like to utilize such function  in every sp and log errors of each sp in a error log table
    Mudassar

    Thanks .
    I was able to write this however I am thinking I am missing something
    CREATE FUNCTION testfunction1()
    RETURNS @temp_error TABLE (
    id int identity(1,1),
    procedure_name varchar(255),
    line_number int,
    error_number int,
    error_message varchar(max),
    error_state int,
    error_severity int,
    occurence_datetime datetime default current_timestamp,
    user_name sysname default suser_name(),
    login_name sysname default suser_name()
    AS
    BEGIN
    insert @temp_error(procedure_name,line_number,error_number,error_message,error_state,error_severity)
    select error_procedure(),error_line(),error_number(),error_message(),error_state(),error_severity()
    RETURN;
    END;
    CREATE TYPE test_type AS TABLE(
    id int identity(1,1),
    procedure_name varchar(255),
    line_number int,
    error_number int,
    error_message varchar(max),
    error_state int,
    error_severity int,
    occurence_datetime datetime default current_timestamp,
    user_name sysname default suser_name(),
    login_name sysname default suser_name()
    GO
    create proc usp_error_test
    @test_type AS test_type READONLY
    as
    begin
    begin try
    select 1/0
    end try
    begin catch
    select * from testfunction1(@test_type)
    end catch
    end
    Mudassar

  • I need simple example for alv grid

    hi
    i need code for simple example for alv grid.
    thanks.

    hi bharat,
                  this is report with most of the functionality.
    report zus_alv_demo_grid .
    tables:     ekko.
    type-pools: slis.
    types: begin of t_ekko,
    ebeln type ekpo-ebeln,
    ebelp type ekpo-ebelp,
    statu type ekpo-statu,
    aedat type ekpo-aedat,
    matnr type ekpo-matnr,
    menge type ekpo-menge,
    meins type ekpo-meins,
    netpr type ekpo-netpr,
    peinh type ekpo-peinh,
    line_color(4) type c, "Used to store row color
    end of t_ekko.
    data: it_ekko type standard table of t_ekko initial size 0,
           wa_ekko type t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid.
    Data declaration for EVENT and PRINT PARAMETER.
    data: gt_events type slis_t_event,
           gd_prntparams type slis_print_alv.
    data declaration for sorting.
    data : it_sortcat   type slis_sortinfo_alv occurs 1,
           wa_sort like line of it_sortcat.
    data :  i_list_comments type slis_t_listheader.
    start-of-selection.
      perform data_retrieval.
    perform user_command.
      perform build_fieldcatalog.
      perform build_layout.
      perform build_events.
      perform build_print_params.
      perform build_sortcat.
      perform display_alv_report.
    end-of-selection.
    *TOP-OF-PAGE.
    PERFORM top-of-page.
    end-of-page.
    *&      Form  build_fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    form build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      fieldcatalog-do_sum = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " build_fieldcatalog
    *&      Form  build_layout
          text
    -->  p1        text
    <--  p2        text
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    Set layout field for row attributes(i.e. color)
      gd_layout-info_fieldname =      'LINE_COLOR'.
    gd_layout-totals_only        = 'X'.
    gd_layout-f2code            = 'DISP'.  "Sets fcode for
    *when double
                                            "click(press f2)*
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text       = 'helllllo'.
    endform.                    " build_layout
    *&      Form  data_retrieval
          text
    -->  p1        text
    <--  p2        text
    form data_retrieval.
      data: ld_color(1) type c.
      select ebeln ebelp statu aedat matnr menge meins netpr
    peinh from ekpo  into table it_ekko.
    *Populate field with color attributes
      loop at it_ekko into wa_ekko.
    Populate color variable with colour properties
    Char 1 = C (This is a color property)
    Char 2 = 3 (Color codes: 1 - 7)
    Char 3 = Intensified on/off ( 1 or 0 )
    Char 4 = Inverse display on/off ( 1 or 0 )
              i.e. wa_ekko-line_color = 'C410'
        ld_color = ld_color + 1.
    Only 7 colours so need to reset color value
        if ld_color = 8.
          ld_color = 1.
        endif.
        concatenate 'C' ld_color '10' into wa_ekko-line_color.
    wa_ekko-line_color = 'C410'.
        modify it_ekko from wa_ekko.
      endloop.
    endform.                    " data_retrieval
    *&      Form  display_alv_report
          text
    -->  p1        text
    <--  p2        text
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program       = gd_repid
                is_layout                = gd_layout
                i_callback_top_of_page   = 'TOP-OF-PAGE'
                i_callback_user_command  = 'USER_COMMAND'
                i_callback_pf_status_set = 'SET_PF_STATUS'
                it_event                 = gt_events
                is_print                 = gd_prntparams
                it_fieldcat              = fieldcatalog[]
                it_sort                 = it_sortcat
                i_save                   = 'X'
           tables
                t_outtab                 = it_ekko
           exceptions
                program_error            = 1
                others                   = 2.
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.              " DISPLAY_ALV_REPORT
    *&      Form  user_command
          text
    -->  p1        text
    <--  p2        text
    *&      Form  top-of-page
          text
    -->  p1        text
    <--  p2        text
    form top-of-page.
    *ALV Header declarations
      data: t_header type slis_t_listheader,
            wa_header type slis_listheader,
            t_line like wa_header-info,
            ld_lines type i,
            ld_linesc(10) type c.
    Title
      wa_header-typ  = 'H'.
      wa_header-info = 'EKKO Table Report'.
      append wa_header to t_header.
      clear wa_header.
    Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      concatenate  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
       sy-datum(4) into wa_header-info."todays date
      append wa_header to t_header.
      clear: wa_header.
    Total No. of Records Selected
      describe table it_ekko lines ld_lines.
      ld_linesc = ld_lines.
      concatenate 'Total No. of Records Selected: ' ld_linesc
         into t_line separated by space.
      wa_header-typ  = 'A'.
      wa_header-info = t_line.
      append wa_header to t_header.
      clear: wa_header, t_line.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
           it_list_commentary = t_header
           i_logo             = 'GANESH_LOGO'.
    endform.                    " top-of-page
          FORM user_command                                             *
    -->  R_UCOMM                                                       *
    -->  RS_SELFIELD                                                   *
    form user_command using r_ucomm like sy-ucomm
    rs_selfield type slis_selfield.
      case r_ucomm.
        when '&IC1'.
          if rs_selfield-fieldname = 'EBELN'.
            read table it_ekko into wa_ekko index rs_selfield-tabindex.
            set parameter id 'BES' field wa_ekko-ebeln.
            call transaction 'ME23N' and skip first screen.
          endif.
        when 'ULHAS'.
          if rs_selfield-fieldname = 'EBELN'.
            read table it_ekko into wa_ekko index rs_selfield-tabindex.
            set parameter id 'BES' field wa_ekko-ebeln.
            call transaction 'ME23N' and skip first screen.
          endif.
      endcase.
    endform.
          FORM set_pf_status                                            *
    -->  RT_EXTAB                                                      *
    form set_pf_status using rt_extab type slis_t_extab.
      set pf-status 'ZNEWSTATUS'.
    endform.
    *&      Form  build_events
          text
    -->  p1        text
    <--  p2        text
    form build_events.
      data: ls_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
       exporting
         i_list_type           = 0
       importing
         et_events             = gt_events[]
    EXCEPTIONS
      LIST_TYPE_WRONG       = 1
      OTHERS                = 2
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
      read table gt_events with key name =  slis_ev_end_of_page
                  into ls_event.
      if sy-subrc = 0.
        move 'END_OF_PAGE' to ls_event-form.
        append ls_event to gt_events.
      endif.
      read table gt_events with key name =  slis_ev_end_of_list
                  into ls_event.
      if sy-subrc = 0.
        move 'END_OF_LIST' to ls_event-form.
        append ls_event to gt_events.
      endif.
    endform.                    " build_events
    *&      Form  build_print_params
          text
    -->  p1        text
    <--  p2        text
    form build_print_params.
      gd_prntparams-reserve_lines = '3'.   "Lines reserved for footer
      gd_prntparams-no_coverpage = 'X'.
    endform.                    " build_print_params
          FORM END_OF_PAGE                                              *
    form end_of_page.
      data: listwidth type i,
      ld_pagepos(10) type c,
      ld_page(10)    type c.
      write: sy-uline(50).
      skip.  write:/40 'Page:', sy-pagno .
    endform.
          FORM END_OF_LIST                                              *
    form end_of_list.
      data: listwidth type i,
      ld_pagepos(10) type c,
      ld_page(10)    type c.
      skip.  write:/40 'Page:', sy-pagno .
    endform.
    *&      Form  build_sortcat
          text
    -->  p1        text
    <--  p2        text
    form build_sortcat.
    wa_sort-spos      = 1.
    wa_sort-fieldname = 'EBELN'.
    append wa_sort to it_sortcat.
    wa_sort-spos      = 2.
    wa_sort-fieldname = 'EBELP'.
    append wa_sort to it_sortcat.
    endform.                    " build_sortcat
    Rewards if helpfull
    regards
    vijay dwivedi

  • An simple Example for beginer ...

    Hi:
    I want to generate a pdf-file from somefile.xml and somefile.xsl using fop. And it doesn't work. Could somebody provide a simple example, how to do it? It would be very nice.
    Thanks a lot.

    Here is my code-example:
    import java.io.*;
    import org.apache.fop.apps.*;
    import org.xml.sax.*;
    import java.util.logging.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class TestClass extends HttpServlet
         public void doGet(HttpServletRequest request, HttpServletResponse response)
         throws ServletException, IOException
              PrintWriter pw = new PrintWriter(new FileOutputStream("C:/Temp/logFile.log"));
              String xmlFileName = "C:/xml/xmlfile.xml";
              String xslFileName = "C:/xsl/xslfile.xsl";
              ServletOutputStream outStream = response.getOutputStream();
              ByteArrayOutputStream arr = new ByteArrayOutputStream(); 
              try
                   XSLTInputHandler in = new XSLTInputHandler(new File(xmlFileName), new File(xslFileName));         
                   Driver driver = new Driver();           
                   driver.setRenderer(Driver.RENDER_PDF);           
                   driver.setOutputStream(arr);                                   
                   InputSource inputSource = in.getInputSource();           
                   XMLReader xmlReader = in.getParser();   // Error! Unknown Source !!!                                            
                   driver.render(xmlReader, inputSource);       
              catch (Exception ex)
                   ex.printStackTrace(pw);
                   pw.close();
              response.setContentType("application/pdf");
              response.setContentLength(arr.size());
              arr.writeTo(outStream);
              outStream.flush();
    }Any idea? Thanks.

  • Provide simple example for Arbitrary data sending through NI4551(DSA)

    We Converted NI-DSA function palette
    in LabVIEW under Application
    Examples>>Advanced>>Arbitrary Output Example.
    But, We not exactly getting arbitrary wave. Our arbitrary data is correct. I think there is a problem with FFT settings. So Please Provide simple example for Arbitrary data sending through NI4551(DSA)

    Hello Sateesh!
    First, what versions of LabVIEW and NI-DSA are you using.  I have been searching around for the example you are refering too and I am not able to find it.  Are you creating and arb. wave in the frequency domain and then performing an FFT to get it to the time domain?  Next, remember your wave will only be as exact as the AO specs. of the hardware...
    The output conversions occur simultaneously at software-programmable rates from 1.25 to 51.2 kS/s in increments of 47.684 µS/s. The analog output circuitry uses eight-times oversampling interpolators with 64-times oversampling delta-sigma modulators to generate high-quality signals. Software-programmable attenuation of 0, -20, or -40 dB is available on the output channels. The PCI-4451 has excellent amplitude flatness of ±0.2 dB within DC to 23 kHz, and a THD of -90 dB at 1 kHz.
    Now, as far as obtaining other examples If you use the LabVIEW example finder and goto Hardware Input and Output>>Traditional DAQ>>Analog Output.  I would also in the lower right hand corner of the Example Finder select your 4451 this will show you all examples that work with your hardware.  I hope this helps a little but please give me more details we will go from there.   Have a great day!
    Allan S.
    National Instruments

  • How to edit/delete a custom label for a tel number for example in contacts?

    How to edit/delete a custom label for a tel number for example in contacts?

    Alfre311 wrote:
    I've been trying to find a way to do this since I updated to IOS 7, and I've just found the solution/explanation, even tho is a bit heavy to carry out.
    IOS 6 creates custom labels and save them giving you the option to delete them.
    IOS 7 creates custom labels but don't save them, so there is no need to have the option to delete them.
    But here comes the problem, if you have some custom labes saved in you Iphone / Ipad with IOS 6 and you update it to IOS 7, the device will keep those labels saved, but you wont be able to delete them.
    I realized this by going to contacts on Icloud. There those labels that I had on my devices weren't there. So simply restoring your device and configuring it as a new one to later sync your Icloud Contacts, will solve the problem.
    I know this post is old, but I might just try this with iOS 8. I have outdated custom labels that annoy me, because I still seem them in the list as options. If I get desperate enough, I may try your solution.

  • Simple question! Is it possible to have a custom icon for an app part?

    Hi All
    Title says it all: is it possible to have a custom icon for an app part / client web part?
    It used to be straightforward with the previous dev tools, but the ImageUrl was typically to a hive folder (which is obviously out of bounds now).
    I've "Binged" with no joy. None of the samples I've seen have a custom icon.
    So - can it be done?
    Regards
    Nigel

    Hi Nigel,
    Updating the AppIcon.png in Napa
    You can upload a new AppIcon.png in into the /Images folder in the file tree in Napa:
    Updating the AppIcon.png in Visual Studio 20102
    You can update a new AppIcon.png in into the Images folder in your Visual Studio solution:
    Keith Tuomi | Twitter: @itgroove_keith | Blog:
    http://yalla.itgroove.net
    Please click "Propose As Answer" if a post solves your problem or "Vote As Helpful" if a post has been useful to you.

Maybe you are looking for

  • Intel (r) Series Chipset PCI Express x4 Ports 3-7

    I have seen several of these questions but no one seem to have the answer. I am running Windows XP Pro with new MAC Pro using the latest Bootcamp and Firmware. Every thing seem to be peachy except for these 4 exclamation marks on these devices in my

  • Audit Current logged in User activity

    Dear Legends, As I am trying out to find who are all logged in to  our Database and what are queries executed by the users. So while trying out the below query QUERY SELECT DISTINCT   USERNAME,   STATUS,   SCHEMANAME,   OSUSER,   MACHINE,   TO_CHAR(A

  • OM unit's creations

    Dear Team, One of my clients has the following requirement in OM unit's creations:- Description                         number range Organization unit - 100000000-20000000 Position unit -    200000001-300000000 Jobs-     30000001-40000000 Please sugg

  • Problem with Adobe Flash Player, download the new update

    Hello, I have a problem when I try to download the new version of Adobe Flash Player. I have no problem to download the file on my computer ( install_flashplayer13x32_mssd_aaa_aih.exe ) (Adobe - Installer Adobe Flash Player), When I clicked on it ask

  • Iphoto won't open as it says it's being updated..

    iphoto won't open as it says it is being updated! but there are no updates happening...! help please.  I have no backup for my photos so don't want to uninstall iphoto incase I loose all my photos.