How to implement a simple paragraph system in CQ

Hi,
I have some problems in implementing a paragraph system in CQ.
I have to implement it in CQ 4.2.
Does any one explain it to me in simple words?
Thanks a lot in advance, Seboeh

I found the solution.
I could implement a paragraph system now.
I shortly describe the most important things.
1. the spooler script should not have any carriage return
2. for a component the spooling works only with following link.
<img src='<% cc.getPage().getHandle() + ".spool." + cc.getQualident() + ".jsp" %>' width=200px>
Further on, in the "Component Definitions" for this script only "spool" should be written as globbing. Not "*spool" or "spool*".
This is also the reason, why we have cc.getQualident() after spool in the img-tag.
3. Further on it is important for a paragraph system to include the following initialization.
<%
Style actstyle = null;
%>
<cfc:initComponent cellId="body" componentId="/libs/Components/body">
<% actstyle = componentContext.getStyle(); %>
</cfc:initComponent>
<cfc:includeComponent cellId="body" componentId="/libs/Components/body" />
<cfc:includeComponent cellId="parsys"
                        componentId="/apps/emb/Components/parsys" />
4. in side the spooler script, you get the atom by:
                        String[] selectors = cqReq.getSelectors();
                        String qualident = selectors[1] + "." + selectors[2];
                        Container local = (Container) actpage.getElement(qualident);
                      Atom atom = local.getAtom("myImageSrc");
where "myImageSrc" is the atom.xml content definition.
The selcorts[2] is either "Single" or somthing like "parsys.0001".
5. In simple components, you need also this kind of code to initialize a edit bar.
<%
ComponentContext cc = (ComponentContext) request.getAttribute("componentContext");
ComponentInfo ci = cc.getComponentInfo();
%>
<cfc:editbar
                        parName="<%= cc.getContainerList() %>"
                        parNum="<%= cc.getContainerLabel() %>"
                        storagePre="<%= cc.getStoragePre() %>"
                        dialogAny="<%= ci.getContentDialog() %>"
/>
I hope this could help you creating the paragraph system.
Kind regards, [email protected]

Similar Messages

  • How to implement a simple node-edge graph?

    Can any one give me some advice on how to implement a simple node-edge graph in a frame? Every node is a rectangle which can be moved by mouse, and every edge is a arc between two nodes.
    Should the node class extend JPanel, and the edge class extend Graphics? and so on?

    It is impossible to generate similar update from OWB.
    Does your table1 contain primary key columns? What is the number of rows in this table?
    The only working solution in this case - use table1 twice in mapping - as source and as target (with UPDATE operation),
    link these operators with primary key columns and specify matching by PK columns.
    Updated column link to Constant operator attribute.
    In this case OWB generate SQL like
    merge table1 a
    using table1 b
    on (a.pk_column=b.pk_column)
    when matched then update set column1=1
    Regards,
    Oleg

  • How to make a simple Plugin system?

    hey guys, first let me say I see very much hostility here, and I'm not here to annoy anyone, so if you don't feel like answering then simply don't.
    I want to design a simple Plugin System for my application. I think what I need is a bit of reassurance and redirection if I'm making wrong assumptions.
    here is the stages I see:
    1. the system has a HashMap<String,PluginTypeData> that holds types of plugins, and the folder of the application that hold the libraries files for the plugins among other details.
    (this would be saved in the application configuration file)
    2. once the application starts/on request the system would load the libraries into the memory.
    3. in each library there should be a file that holds the textual fully qualified name of the classes that this plugin would require to operate properly.
    4. the objects in the library would have to be familiar to the application, therefore they must implement or extend a known base object from the application, and once loaded a reference to that known base object is assigned to the new object.
    5. and then if I want to load a GUI component from the plugin I just get it from the reference.
    lets start with how does that sound? I would like to get a feed back, just a serious one please, that may help me understand any mistakes I might be doing, and not just to understand that I'm wrong....
    Thanks in advance,
    Adam Zehavi.
    Edited by: Adam-Z. on Dec 19, 2009 12:34 AM

    well, English is not my native, so I find it hard to describe, sometimes I feel the lack of words to describe what I want, and I have to take a break, and use a dictionary to find the right word to use, and sometimes these are basic words that I miss so I'm sorry if I'm not clear.
    And this will be required for every single plugin in exactly the same way? If not then each plugin should include a factory.Yes, they are all saved the save way, every plugin has a method that create an instance of a basic class J2MeDataChunk.
    The types of the data chunks are defined on the J2Me platform and only there.
    The reason that they are defined on the J2Me platform is because of the first limitation of the J2Me platform.
    1. I cannot import into the build path of the project any external libraries.Therefore in the future when I would like to add more chunk types, I would have to add them into the J2Me project as classes, and not as a jar in the build path, but the plugin would have to refer to the J2Me project and to know which chunk type it is going to edit.
    Each plugin knows how to edit a different type of J2MeDataChunk, the data chunks saves them selfs into a data output stream using a serialize method in each of them, and the serialize method is invoked from the plugin itself when the user (me) press the save button.
    "produce"? You mean a factory?No, I meant that the object I posted earlier (J2MeDataChunkType) is an object that represent the type of the data chunk for each of the data chunk types, and that there can only be one instance of the object that represent the type of the data chunk, and that single instance of the object that represent the type of the data chunk is the one that can create new instances of that data chunk type, it can create an empty data chunk,or to deserialize the data chunk type using a DataInputStream, and it has an abstract method, that returns Swing component only on the J2Se platform (a class that extends the J2MeDataChunkType object on the J2Se platform that overrides the abstract method for the editing Frame/Panel).
    What do you mean "external" libraries? Your code doesn't count right?I mean that a J2Me project cannot import other jar files into its build path, only the classes files that are in the project are known to the complier.
    The other two limitations are not limitations at all as far as I can see.well the third one might not be a limitation but it is a pain in the .. S since I have to implement every object I want to serialize myself
    but the second one, well, if you don't use the full strength of the 1.5 then you might not miss it, but there are so many elements I miss when programming on J2Me platform... like this one, I don't know how it is called:
    class A {
    class B  extends A {
    class C {
          A getA() {
    //  return instance of A
    class D extends C{
          B getA() {    // this is not implementable on J2Me, and I miss this for better implementation of things since I try to integrate my J2Me platform I'm building with J2Se application.
    //  return instance of B
    }moreover I miss enumeration, god I love using the
    for(Object o: objectList)very useful very efficient to use...
    and how could I leave generics out... wow no generics... terrible oh, and enums, no enums... hell if there were enums on J2Me... life would have been less gray.
    so yes I see all this as limitations, it slows me down allot, and it makes my code less readable.
    well since I try to build a bridge between the J2Me and J2Se platforms, and since there are some limitation to the J2Me platform* I needed to
    define a few things in a few objects, it was possible to make all the data to fit into one object, but it would make that object too heavy for the
    J2Me platform (besides I rather having two objects it felt more OOD right way to do), where one is a type definer that can produce only one
    instance of this object although it is inheritable,
    Memory in terms of the class or the instance? If the instance then it doesn't have much to do with this discussion. If the class then that impacts >your design because with a limited memory size and large impact then unloading might come up - and that requires a class loader.well this design actually adds an extra class for each type I decide to add to my platform although at the end I intend to join all the objects that represent the type of the data chunk into one object only on the J2Me platform which would actually add only one class to the memory on the phone, it is just easier for me to see things clearer now as I design this bridge application between the platforms, besides it allows maximum flexibility to create new types of chunks, and that was my main aim, to make as many types to be saved on files that I can transfer via a wireless onto the phone and the platform on the phone would know exactly what to use them the data chunks for with out any user intervention.
    as for instances, this way I reduce the memory each of the chunks would use and in the total calculation it would improve memory usage while creating objects from these chunks.
    Presumably you are managing the data items because the base class is going to provide functionality relevant to them.Right, the base class is the most common ground I could find for all the chunks together.
    Presuming that each "type" really is a type (say you have 4 interfaces any of which might be implemented) then you would need the following in
    a configuration file for each entry.
    1. Type of the implemented class.
    2. Full name of the implemented class
    3. Full name of the GUI dialog object.
    4. Optional Name of this entry. I suggest this as it allows you to report errors using this name rather than plugin class names
    Per your requirements there is no path nor jar is needed nor can be specified.well I hope that by now you did get that I generalized all the data chunk types that I created into one basic object which I posted earlier, this object handles everything, and the plugin main object would be design on the J2Se platform and would extend that J2MeDataChunkType class and it would return the Swing frame/panel when the J2Se application calls the getPanel method and an empty chunk on the getDataChunk() method.
    well, in my case it would extend an abstract class from the J2Me platform, maybe two object I'm still thinking about a better implementation >> so the plugin would be more simple, consist of only one object, that needs to be loaded.It shouldn't matter to you how the class is implemented.But of course it does, I want to make my life as simple as possible when I implement new plugins, having one object with abstract method, that when I extend it Eclipse would automatically add the abstract method for me to implement, and just a short glimpse at another implementation of the plugin would let me design another plugin in seconds.(with out making the GUI for the data chunk editing obviously).
    I think I got my head around this, especially now that it feels like I could explain what I'm making better in words.
    Thank you for taking the time to respond to my posts, I see you currently have 37k post so I guess you are a very quick typer, yet you take the time to try and understand my design. Thank you.
    Adam Zehavi.

  • How to implement a security sub-system?

    Hi Everyone,
    I got the following task below from my team leader. I don't know where to start to get the following task done. If you have any idea on how to get the following task done, please give me the steps on how to complete the following task. Or give me some links (websites) which can get me start on getting the following task done. Thanks for your time and help in advance!
    Your next task is depicted in the case scenario as follows:
    Some remote process is able to view a directory listing of the files on the directory and then selects a JSP file to execute. It runs without any enforced permission on the server and the remote process is able to view the output or that the JSP file is executed without the proper caller - a DocIt system process (JSP, Javabean). How can we solve this problem?
    For one thing the directory listing permissions should only be permitted explicitly by the server "system security/permission objects" (configured by the administrator/root) on win32/Linux. Second, all JSP files must include a security module as part of it's code base before even a single line of code is written by the programmer. This ensures that at least the caller is allowed certain permissions to execute the code residing in the JSP file. The granularity of the permissions depend directly on the type of caller. Is it a "user", a "power user", a "system admin", a "pre-defined DocIt system object" (forms subsystem), and so on. We need a powerful yet flexible security system as it is important to register the permitted objects to execute only the rightful code determined by the DocIt system security policy.
    This task is less specific and thus you have more flexibility to provide a solution. Please describe and analyze a security policy to prevent any executable code from running without its proper caller for the case scenario above. Be creative in determining the requirements for identifying the calling object and the code that checks for the proper credentials before permitting execution of the code. Say you have an hierarchy of inheritable permission objects. The code must be able to check that the caller belongs to the set of permission objects. Please use diagrams, cases scenarios, and other designs to provide a basis for implementation. After the designs are reviewed along side any other requirements we will implement this security sub-system in the near future

    You may also want to look at JAAS. http://java.sun.com/developer/technicalArticles/Security/jaasv2/
    It's probably a tad overkill for some JSP applications, but it would give you an additional layer of protection for documents, i.e., you can control access to actual files based on roles. I say it's a bit of overkill because Tomcat incorporates most of the ideas into their realms.

  • How to implement a kerberos server system

    Hi
    I want to develop a simple kerberos system which has just one client and one service server. I couldnt find any tutorials about kerberos. Could you please help me

    You may also want to look at JAAS. http://java.sun.com/developer/technicalArticles/Security/jaasv2/
    It's probably a tad overkill for some JSP applications, but it would give you an additional layer of protection for documents, i.e., you can control access to actual files based on roles. I say it's a bit of overkill because Tomcat incorporates most of the ideas into their realms.

  • How to modify below simple chat system?Please help!

    Dear,
    I have a ChatServer.java files as below. It is a round robin chating system. There are two client chatting. Now I want to modify below file that allow the discussion to keep going until one of the user input is "BYE" in uppercase without any preceding and trailing characters. After one user input of "BYE" will terminates everyone else including the server. How do I modifty? Please help!
    import java.io.*;
    import java.net.*;
    public class ChatServer.java
    // Valid PORT_NUMBER ranges from 1 to 65,535. However the numbers from 1 to 1023
    // are reserved, for example, 80 is reserved for http.
    private final static int PORT_NUMBER = 3030;
    public static void main (String[] args) throws IOException
    Socket socket1, socket2;
    DataInputStream dataIn1, dataIn2;
    DataOutputStream dataOut1, dataOut2;
    String line;
    System.out.println ( "\r\n-- Server Started --\r\n" );
    // We need to create a ServerSocket at a free port number.
    ServerSocket server = new ServerSocket ( PORT_NUMBER );
    // Calling the accept method, the server waits for a client to make a TCP connection.
    socket1 = server.accept ();
    socket2 = server.accept ();
    // ServerSocket is only needed to handle connection request. Once the connection
    // is made, the ServerSocket can be closed even the sockets remain open.
    // Normally, the ServerSocket won't be closed this early because real applications
    // are designed to handle arbitrarily many clients. However we only handle two.
    server.close ();
    try
    // There should be a pair of input and output streams for each socket.
    // The output stream of the server corresponds to the input stream of the client.
    // Therefore if we send a line on the output stream, the client should read
    // the line in the corresponding input stream.
    dataIn1 = new DataInputStream (new BufferedInputStream (socket1.getInputStream ()));
    dataOut1 = new DataOutputStream (new BufferedOutputStream (socket1.getOutputStream ()));
    dataIn2 = new DataInputStream (new BufferedInputStream (socket2.getInputStream ()));
    dataOut2 = new DataOutputStream (new BufferedOutputStream (socket2.getOutputStream ()));
    for ( int i=0; i < 3; i++)
    // Read a line from the client 1
    line = dataIn1.readUTF ( );
    // Write a line to client 2
    dataOut2.writeUTF ( line );
    dataOut2.flush ( );
    // Show the line on the server's screen
    System.out.println ( "\r\nClient 1: " + line);
    System.out.flush( );
    // Read a line from the client 2
    line = dataIn2.readUTF ( );
    // Write a line to client 1
    dataOut1.writeUTF ( line );
    dataOut1.flush ( );
    // Show the line on the server's screen
    System.out.println ( "Client 2: " + line);
    System.out.flush( );
    catch (IOException ex)
    throw ex;
    finally
    System.out.println ("\r\n-- Shutdown --");
    socket1.close ();
    socket2.close ();

    In this section here do this:
    The chat client 1:
    // Show the line on the server's screen
    String printTheLine="\r\nClient 1:" + line;
    System.out.println (printTheLine);
    System.out.flush( );
    if(printTheLine.equals("\r\nClient 1:BYE"){
    //exit prog
    }Client 2
    // Show the line on the server's screen
    String printTheLine="\r\nClient 2:" + line;
    System.out.println (printTheLine);
    System.out.flush( );
    if(printTheLine.equals("\r\nClient 2:BYE"){
    //exit prog
    }All you have to do is exit the prog. I am not sure if you need in the .eguals part (when you are comparing the strings), the \r\n. Anyway, once you put the code to exit your prog in the if conditionals, it will exit if the output on the screen looks like:
    Client 1:BYE or
    Client 2:BYE
    If this helps, could I have some duke dollars?
    Virum

  • How to create a simple filing system for my personal material

    --After using Windows for several years, I have bought my first Apple computer last month: MacBook Pro, with OS X Mavericks 10.9.5. I find that just creating files, saving text/photos etc in them, and then creating a folder and saving the files in the folder, is a major operation for me. Obviously there must be a simple, straightforward way to do it, that I don't know. I have not found anything in my Apple books - too basic for them. If somebody could help me, I will appreciate. I am new to the Apple system, so please describe to me step-by-step the way.
    --Also, should I download the new Yosemite 10.10 now? Thanks.

    Hi ..
    You can save text files to the Documents folder.
    You can save photos to the Pictures folder.
    Open the Finder. From the Finder menu bar click Finder > Preferences then select the Sidebar tab.
    The Finder can also be opened by clicking the Finder icon in the Dock.
    Select both:  Documents and Pictures
    That makes it convenient to save text files and photos.
    As far as Yosemite goes, since you're coming from Windows, it be better to learn Mac OS X there first, then upgrade to Yosemite at a later date. It's free and available at the App Store. The App Store icon should be in your Dock.
    Bob LeVitus writes a very helpful Dummies for Mavericks manual for sale at Amazon here.

  • How to implement simple CEV rules?

    Hi,
    I have some doubts how to implement very simple CEV rules (ex: When enddate is filled then determinationdate is sysdate)
    When i follow the CDM Guidelines then I have to create a custom routine and make a derivation expression for the column.
    When i use commom sense I do a update in the BR implementation. Saves a lot of work.
    What is the opinion of the Headstart team?
    Regards, Jan-Derk

    Hi Kathyaini,
    For using a XML connection as data source then you have to follow the below:
    Configure the following elements as described below:
    u2022 <JavaDir>
    u2022 <Classpath>
    u2022 <JDBCURL>
    u2022 <JDBCUserName>
    u2022 <JDBCClassName>
    It will prompt you for the class name and path of the URL using, that also depends upon the data base you use.
    It is different for each database like oracle, sql and DB2.
    For configuring the connection you should follow the process for each database.
    JDBCURL  - The JDBCURL parameter value is the default JDBC connection URL that will be displayed in Crystal Reports when you create a new JDBC data connection. The exact format of the connection URL is specific to the database driver and is provided by the database driver vendor.
    For example, the connection URL for the Oracle JDBC driver is:
    jdbc:oracle:thin:@<hostname>:<port>:<sid>
    Sample for SQL Server:
    jdbc:microsoft:sqlserver://SERVERNAME:1433
    Sample for DB2:
    jdbc:db2:XTREME
    JDBCUserName  - Default username for the Database
    JDBCDriverName - The JDBCDriverName is the default full classname of the JDBC driver that will be displayed in Crystal Reports when creating a new JDBC data connection..
    Oracle: oracle.jdbc.driver.OracleDriver
    Let me know if any.
    Regards,
    Naveen.

  • HELP! Export indd- epub AUTOMATION. How to Implement! thanks!

    Hi. In need some help. Im an intermidiate .net programmer. i need  some help on how to implement a simple automation on exporting indd to epub.
    What language suitable to use?
    do i need indesign server ion this simple automation?
    Thanks!

    Jerome,
    These days, Flex is the best way to "drive" InDesign and InDesign Server.
    Because it has all the hooks for telling InDesign what you want it to do,
    and because you can quickly build something with a nice UI. So, I think you
    want to build an InDesign extension, using Flex / ActionScript.
    A big help would be to use the Flex-based new-for-InDesign-5.0 Creative
    Suite Extension Builder system. See
    http://www.adobe.com/devnet/creativesuite/cs-extension-builder.html
    A CS Extension Builder extension is a full AIR application, so it has full
    access to the file system, enabling you to implement hot folders if you
    wish.
    The hard part is figuring out how to "translate" into an ePub format. You
    could have a team of several programmers working for a year and still not
    have a perfect system to do this.  BUT, you're in luck, because Adobe has
    already written software to convert to HTML. It doesn't do a perfect job,
    of course, but Adobe put a lot of effort into it.  And ePub format is
    HTML5-based, I believe.
    So, probably what you want to do is first tell InDesign to run it's
    InDesign-to-HTML conversion feature, and then post-process the result into
    the desired ePub format.
    Cheers,
    Stephen
    http://sterlingcomputing.com

  • How to implement a conversion rule in KC7R (External Data transfer-Tool)

    Hi,
    I am familiar with programming conversion rules in ABAP in the LSMW and IS-U Migration workbench.
    Unfortunately we have to work with EDT (transaction KCLJ).
    I need to implement a simple conversion rule: migration file has the external BP number BPEXT and I must retrieve the internalone (PARTNER) for the migration program.
    So I must implement a short ABAP code (select single * from BUT000 ...).
    Now I see that in KC7R you can use constants and conversion rules. There are also "General Ruels" and "conversion routines".
    Can someone explain how to implement this simple ABAP conversion rule in KC7R giving a short example?
    This would be great.
    EDT is the workst of all SAP Standard Migration Tools I have seen.....
    Kind regards,
    Thomas

    Thomas,
    Coud you please share your findings as I am now in a similar to your original post.
    ie I too would like to know how to code convesions for use within the transfer rules used by KCLJ.
    Kind Regards,
    Hiten Mistry.

  • How to build a simple Editor with GEF 4 MVC

    Hallo,
    I have Experience with GEF 3.x graphical editors, and I would like to make experiments with GEF4 MVC in an Eclipse E4 Application.
    Below there is a schema representing the basic architecture of a GEF 3.x MVC Editor :
    The base Ideas in GEF 3.x are :
    - There is an Editor class containing a Graphical Viewer.
    - There are a Root Edit Part and an Edit Part Factory to initialize the Controllers (EditParts)
    - There are Views (Figures) and Models (POJO), independent each other, and controlled by the Controllers.
    The GEF4 MVC Technology is quite powerful - because one can build Standalone, Eclipse RCP and Web applications.
    Anyway it is not perfectly clear to me - yet , how to implement a Simple GEF4 Editor on E4 Application.
    So, this is what I understood :
    - No more Draw2D in GEF4 - it uses JavaFx Scene and Parent
    - In a Scene graph we can put SWTControls (heavyweight) and Figures (lightweight)
    - a Canvas (heaviweight) will contain the JavaFX Figures and also possibly a CanvasFigure (lightweight)
    So, if I build an Eclipse E4 application with one ViewPart containing a GEF 4 Editor, I suppose the setup of my application will be as follows:
    1. Create An Eclipse E4 Application with JavaFx support
    2. Add a ViewPart that contains a Canvas
    3. Use GEF4 MVC to Create / Edit my MVC tree.
    At this point, it is not very clear to me how to implement the real MVC Architecture in GEF 4.
    I expect GEF4 MVC will work in some way like the GEF 3.x - as visible in the top image - but I'm not clear on that.
    Therefore, these are questions:
    - Is the GEF 4 MVC architecture somewhat equivalent to the GEF 3.x one ?
    - Where I can find details on the MVC implementation of GEF 4 ?
    - Is there any component to provide - out of the box - a Flyout Palette, like it is available in GEF 3.x ?
    Thank you for providing this very powerful library and for spending time on this post.
    By the way, I'm available to contribute the project.
    Kind Regards.
    Patrik

    [quote title=Patrik Suzzi wrote on Tue, 14 July 2015 04:07]Hallo,
    Therefore, these are questions:
    - Is the GEF 4 MVC architecture somewhat equivalent to the GEF 3.x one ?
    - Where I can find details on the MVC implementation of GEF 4 ?
    It is quite comparable in general but has some significant differences in detail. The best entry points for learning about GEF4 MVC is the reference documentation at https://wiki.eclipse.org/GEF/GEF4/MVC. It also provides some information about differences between GEF (MVC) 3.x and GEF4 MVC (last section about migration). The slides provided at http://de.slideshare.net/AlexanderNyssen/gef4-our-mission-to-mars explain some of the concepts (unfortunately the interesting slides concerning MVC seem to have been messed up when uploading the slides; I will try to update them).
    - Is there any component to provide - out of the box - a Flyout Palette, like it is available in GEF 3.x ?
    No, not yet. I was thinking to integrate it into one of our examples after the Mars SR1 release.

  • How to implement erase function of paint program?

    Hello all:
    there are many demo programs on the website that indicates how to implement
    a simple draw line java program.
    However, i didn't find available source to learn how to implement the erase function,
    so that we can erase part of line or all lines.
    Some programs present the methods to do undo operations, however none of them
    related directly to how to implement erase function.
    thank you for comments
    -Daniel

    Hello all:
    there are many demo programs on the website that
    indicates how to implement
    a simple draw line java program.
    However, i didn't find available source to learn how
    to implement the erase function,
    so that we can erase part of line or all lines.
    Some programs present the methods to do undo
    operations, however none of them
    related directly to how to implement erase function.
    thank you for comments
    -DanielThere are a few ways depending on the app requirement or design.
    The simplest one is to draw with the background color, typically white.

  • How to implement an audit system to track ADF applications DML activity?

    We have implemented a complete audit system for one of our databases in order to keep history for every table and every value that has been modified.
    The solution that we currently have can be split into two discrete parts:
    1. Keeping a record of all connections to the db account
    This is achieved via a table ‘user_sessions’ into which we record data for every session in the database with the help of on-logon and on-logoff triggers and some PL/SQL procedures:
    Column name        |  Explanation
    -------------------|-------------------------------------------
    US_ID              | PK, based on a sequence
    SESSION_ID         | sys_context('USERENV' ,'SESSIONID')  
    USER_NAME          | sys_context('USERENV' ,'OS_USER')
    LOGON_TIME         | when the on-logon trigger fires
    LOGOFF_TIME        | when the on-logoff trigger fires
    USER_SCHEMA        | sys_context('USERENV' ,'SESSION_USER')
    IP_ADDRESS         | sys_context('USERENV' ,'IP_ADDRESS')
    us_id |session_id |user_name|user_sschema|ip_address|logon_time               |logoff_time     
    560066|8498062       |BOB      |ABD         |1.1.1.2   |14-SEP-06 03.51.52.000000|14-SEP-06 03.52.30.000000
    560065|8498061       |ALICE    |ABC         |1.1.1.1   |14-SEP-06 02.45.31.000000|14-SEP-06 04.22.43.0000002. Keeping the history of every change of data made by a given user
    For every table in the account there is a corresponding history table with all of the columns of the original table plus columns to denote the type of the operation (Insert, Delete, Update), start and end time of validity for this record (createtime, retiretime) and us_id (which points to the user_sessions table).
    The original table has triggers, which fire if there is an insert, update or delete and they insert the data into the corresponding history table. For every record inserted into a history table the us_id taken from the user_sessions table is recorded as well, allowing us to determine who has modified what data via the combination of these two tables.
    Below is an example of a table TASKS, the history related triggers and the history table TASKS_HIST.
    At the moment we are developing new applications by using ADF. Since there is an Application Module Pool and Database Connection Pool implemented for the ADF, one connection to the database could be used by several users at different moments of time. In that case the history records will point to a database session logged into the user_sessions table, but we will not know who actually modified the data.
    Could you, please, give us a suggestion, how we can know at any moment of time who (which of our users currently making use of an ADF application) is using a given database connection?
    By way of an example of the problem we are facing, here is how we solved the same problem posed by the use of Oracle Forms applications.
    When the user starts to work with a given Forms application, user_sessions table would attempt to record the relevant information about he user, but since the db session was created by the application server, would in actual fact record the username and ip address of the application server itself.
    The problem was easy to solve due to the fact that there is no connection pooling and when a user opens their browser to work with Forms applications, a db connection is opened for the duration of their session (until they close their browser window).
    In that case, the moment when the user is authenticated (they log in), there is a PL/SQL procedure called from the login Form, which updates the record in the user_sessions table with the real login name and ip address of the user.
    Example of a table and its ‘shadow’ history table
    CREATE TABLE TASKS (
         TASKNAME     VARCHAR2(40),
         DESCRIPTION  VARCHAR2(80)
    ALTER TABLE TASKS ADD (
         CONSTRAINT TASKS_PK PRIMARY KEY (TASKNAME));
    CREATE OR REPLACE TRIGGER TASKS_HISTSTMP
    BEFORE INSERT OR UPDATE OR DELETE ON TASKS
       BEGIN
         HISTORY.SET_OPERATION_TIME('TASKS');
       EXCEPTION
         WHEN OTHERS THEN
           ERROR.REPORT_AND_GO;
    END TASKS_HISTSTMP;
    CREATE OR REPLACE TRIGGER TASKS_WHIST
      AFTER INSERT OR UPDATE OR DELETE ON TASKS
      FOR EACH ROW
      BEGIN
    CASE
          WHEN INSERTING THEN
            UPDATE TASKS_HIST
               SET retiretime = HISTORY.GET_OPERATION_TIME
             WHERE createtime = (SELECT MAX(createtime)
                                   FROM TASKS_HIST
                                  WHERE retiretime IS NULL AND TASKNAME=:NEW.TASKNAME)
               AND retiretime IS NULL AND TASKNAME=:NEW.TASKNAME;
            INSERT INTO TASKS_HIST (TASKNAME      ,DESCRIPTION      ,optype
                                    ,createtime                    
                                    ,us_id)
                   VALUES          (:NEW.TASKNAME ,:NEW.DESCRIPTION ,'I'
                                    ,HISTORY.GET_OPERATION_TIME    
                                    ,USER_SESSION.GET_USER_SESSIONS_ID);
          WHEN UPDATING THEN
            UPDATE TASKS_HIST
               SET retiretime = HISTORY.GET_OPERATION_TIME
             WHERE createtime = (SELECT MAX(createtime)
                                   FROM TASKS_HIST
                                  WHERE TASKNAME=:OLD.TASKNAME) 
               AND TASKNAME=:OLD.TASKNAME;
            INSERT INTO TASKS_HIST (TASKNAME      ,DESCRIPTION      ,optype
                                    ,createtime
                                    ,us_id)
                   VALUES          (:NEW.TASKNAME ,:NEW.DESCRIPTION ,'U'
                                    ,HISTORY.GET_OPERATION_TIME
                                    ,USER_SESSION.GET_USER_SESSIONS_ID);
          ELSE
            UPDATE TASKS_HIST
               SET retiretime = HISTORY.GET_OPERATION_TIME
             WHERE createtime = (SELECT MAX(createtime)
                                   FROM TASKS_HIST
                                  WHERE TASKNAME=:OLD.TASKNAME) 
               AND TASKNAME=:OLD.TASKNAME;
            INSERT INTO TASKS_HIST (TASKNAME      ,DESCRIPTION      ,optype
                                    ,createtime
                                    ,us_id)
                   VALUES          (:OLD.TASKNAME ,:OLD.DESCRIPTION ,'D'
                                    ,HISTORY.GET_OPERATION_TIME
                                    ,USER_SESSION.GET_USER_SESSIONS_ID);
        END CASE;
      EXCEPTION
        WHEN OTHERS THEN
          ERROR.REPORT_AND_GO;
    END TASKS_WHIST;
    CREATE TABLE TASKS_HIST (
         TASKNAME       VARCHAR2(40),
         DESCRIPTION    VARCHAR2(80),
         OPTYPE         VARCHAR2(1),
         CREATETIME     TIMESTAMP(6),
         RETIRETIME     TIMESTAMP(6),
         US_ID          NUMBER
    ALTER TABLE TASKS_HIST ADD (
         CONSTRAINT TASKS_HIST_PK PRIMARY KEY (TASKNAME, CREATETIME)
           );

    Frank,
    Thanks for your reply.
    I checked the site that you mentioned.
    I try the sample “demo with bundle. The sample worked.
    But it needed to start separately with the application.
    I do not know how to build a help system with the existed web application developed with Jdeveloper (It has two projects: model and user-view-control. It is deployed on Oracle Application server).
    Could you help me step by step to build the help system?

  • How to implement a file system in my app?

    How to implement a file system in my app? So that we can connect to my iPhone via Finder->Go->Connect to Server. And my iPhone will show as a shared disk. Any ideas about it? Thanks.

    Hi Rain--
    From webdav.org:
    DAV-E is a WebDAV client for iPhone, with free and full versions. It provides remote file browsing via WebDAV, and can be used to upload pictures taken with the iPhone.
    http://greenbytes.de/dav-e.html
    http://www.greenbytes.de/tech/webdav/
    Hope this helps.

  • How to implement the security notes in Java System.

    Hi All,
    For the ABAP systems we use RSECNOTE to implement the security notes, but how do we do that in Java systems?
    Any reference or guidance will be of great help.
    Thanks,
    Akash.

    RSECNOTE is for ABAP only, and I dont think there is any equivalent for Java.
    For Java , security note will guide you on how to implement.
    It could be manual changes or via SDM or JSPM.
    Regards,
    Pinkle

Maybe you are looking for

  • Home screen icons - no text

    Hoping someone can help, I have a user who has lost the text portion of the icons on the home screen. The user is less than computer savvy so requies the prompts for the functions. I have tried restting the themes and checking the fonts - any other s

  • Problem using custom color profiles in Camera Raw

    Dear Adobe Community,   I've created a custom color profile using the DNG profile editor, and I've been able to open that custom .dcp file in Adobe Camera Raw (ACR) through Adobe Bridge.  However, when I apply the color profile to the same image, I d

  • How do you a file to plain text?

    I Have a resume that i want to change to plain text, it's driving me crazy, someone help.

  • FileMerge needs horizontal scroll

    The Developer tool FileMerge is the best visual diff I've seen so far. It actually shows you want is different on the line not just highlight the whole line. However, I can't scroll to the right and see the rest of my file. Workaround: I turned on wo

  • Can anyone tell me how to merge my two Apple accounts?

    Can anyone tell me how to merge my two Apple IDs?