Need thread safe way to access read-only objects

I have been working on a lot of projects and all the developers agree that they want thread safe code when called by many threads. It's rare developers are making statement like: "Data are not corrupted often so don't bother" or "It's not thread safe, but that will not often create issues".
In TopLink client session itself is thread safe but not the persistent object themselves. Via client session, if you want thread safe access you need to put a lock on CacheKey and it's not a public/supported API. So the only thread safe access is via unit of work.
We would like fast access to objects. We have a batch process that just need read-only access to objects. We need to read via unit of work to get thread safe access. But we just need the clone when we read via unit of work, we don't need the backup for change detection.
However, TopLink doesn't have a mean to do that.
Please push implementation of Bug5998333[WANT THREAD SAFE AND CORRECT ISOLATION WITH OBJECTS FROM ADDREADONLYCLASS]
In Hibernate, by design, all access are always thread safe. Accessing read-only object just create one copy (a clone), no backup needed.
Oracle claims that TopLink is fast. I wonder if their performance testing code is thread safe, so access objects via unit of work or they take the shortcut of accessing objects from client session. Also, reliable performance comparison should use conform in unit of work.

As you stated the UnitOfWork offers you your desired functionality, you would just like an improvement in performance.
In TopLink 10.1.3 (or 11g preview) you have a few options:
- Use a UnitOfWork an live with the slight overhead of the back copies (it will only add 5-30 % overhead to your processing)
- Instead use an isolated client session, this will not require any cloning or backup clones, but also does not allow any caching.
- Use change tracking, TopLink added attribute-level change tracking in 10.1.3, when used the UnitOfWork does not create backup clones. In 10.1.3 it was mainly used for CMP and requires code generation, but you could implement or weave the code yourself. In TopLink 11g, change tracking is weaved by default with JPA and the weaver can also be used with POJO objects.
I agree that having a feature to mark an object as transactionally read-only would be desirable, it seems like you have logged the enhancement. You could try escalting the enhancement through Oracle support, but since it is an enhancement and not a bug, it is probably beyond what support offers. You may wish to investigate services, or potentially join the open source Eclipse EclipseLink project which the next version of TopLink is being developed under and take part in the feature yourself.

Similar Messages

  • SSRS - Is there a multi thread safe way of displaying information from a DataSet in a Report Header?

     In order to dynamically display data in the Report Header based in the current record of the Dataset, we started using Shared Variables, we initially used ReportItems!SomeTextbox.Value, but we noticed that when SomeTextbox was not rendered in the body
    (usually because a comment section grow to occupy most of the page if not more than one page), then the ReportItem printed a blank/null value.
    So, a method was defined in the Code section of the report that would set the value to the shared variable:
    public shared Params as String
    public shared Function SetValues(Param as String ) as String
    Params = Param
    Return Params 
    End Function
    Which would be called in the detail section of the tablix, then in the header a textbox would hold the following expression:
    =Code.Params
    This worked beautifully since, it now didn't mattered that the body section didn't had the SetValues call, the variable persited and the Header displayed the correct value. Our problem now is that when the report is being called in different threads with
    different data, the variable being shared/static gets modified by all the reports being run at the same time. 
    So far I've tried several things:
    - The variables need to be shared, otherwise the value set in the Body can't be seen by the header.
    - Using Hashtables behaves exactly like the ReportItem option.
    - Using a C# DLL with non static variables to take care of this, didn't work because apparently when the DLL is being called by the Body generates a different instance of the DLL than when it's called from the header.
    So is there a way to deal with this issue in a multi thread safe way?
    Thanks in advance!
     

    Hi Angel,
    Per my understanding that you want to dynamic display the group data in the report header, you have set page break based on the group, so when click to the next page, the report hearder will change according to the value in the group, when you are using
    the shared variables you got the multiple thread safe problem, right?
    I have tested on my local environment and can reproduce the issue, according to the multiple safe problem the better way is to use the harshtable behaves in the custom code,  you have mentioned that you have tryied touse the harshtable but finally got
    the same result as using the ReportItem!TextBox.Value, the problem can be cuased by the logic of the code that not works fine.
    Please reference to the custom code below which works fine and can get all the expect value display on every page:
    Shared ht As System.Collections.Hashtable = New System.Collections.Hashtable
    Public Function SetGroupHeader( ByVal group As Object _
    ,ByRef groupName As String _
    ,ByRef userID As String) As String
    Dim key As String = groupName & userID
    If Not group Is Nothing Then
    Dim g As String = CType(group, String)
    If Not (ht.ContainsKey(key)) Then
    ' must be the first pass so set the current group to group
    ht.Add(key, g)
    Else
    If Not (ht(key).Equals(g)) Then
    ht(key) = g
    End If
    End If
    End If
    Return ht(key)
    End Function
    Using this exprssion in the textbox of the reportheader:
    =Code.SetGroupHeader(ReportItems!Language.Value,"GroupName", User!UserID)
    Links belowe about the hashtable and the mutiple threads safe problem for your reference:
    http://stackoverflow.com/questions/2067537/ssrs-code-shared-variables-and-simultaneous-report-execution
    http://sqlserverbiblog.wordpress.com/2011/10/10/using-custom-code-functions-in-reporting-services-reports/
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu

  • Console Access - Read Only Permissions

    How would I go about granting read-only access to a particular set of driver packages and read-write access to others? I understand the concept of security roles and scopes, but I'm not seeing a way to adjust read-only/read-write based on
    scope.
    Appreciate the help! 

    The first thing that pops-up in my mind, is two security roles and two security scopes.
    Scope 1 is scoped to a few driver packages and role 1 only provides read-access to driver packages. Attach these two to the administrative user/group that should have read-only access.
    Scope 2 is scoped to the other driver packages and role 2 provides read-write access to driver packages. Attach these two to the administrative user/group that should have read-write access.
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

  • CU upgrade error; [ERROR] Save() is not supported on a read-only object.

    Hi All,
    When we try to update or Exchange 2013 CU3 environment to CU7 we get some errors when we try to prepare ad.
    It fails at 98% with an error:
    [2] [ERROR] Save() is not supported on a read-only object.
    [2] [WARNING] An unexpected error has occurred and a Watson dump is being generated: Save() is not supported on a read-only object.
    We have checked all the security settings with our test environment where it is working. Running command prompt as an admin and we have all necessary domain rights. Also checked alle the objects with Adsi edit, but no difference with our test environment.
    Exchange error log:
    [03/18/2015 20:17:47.0096] [2] Used domain controller <FQDN> to read object CN=Exchange Servers,OU=Microsoft Exchange Security Groups,DC=prod,DC=local.
    [03/18/2015 20:17:47.0096] [2] Used domain controller <FQDN> to read object CN=Exchange Servers,OU=Microsoft Exchange Security Groups,DC=prod,DC=local.
    [03/18/2015 20:17:47.0096] [2] [ERROR] Save() is not supported on a read-only object.
    [03/18/2015 20:17:47.0096] [2] [WARNING] An unexpected error has occurred and a Watson dump is being generated: Save() is not supported on a read-only object.
    [03/18/2015 20:17:47.0962] [1] The following 1 error(s) occurred during task execution:
    [03/18/2015 20:17:47.0962] [1] 0.  ErrorRecord: Save() is not supported on a read-only object.
    [03/18/2015 20:17:47.0962] [1] 0.  ErrorRecord: System.InvalidOperationException: Save() is not supported on a read-only object.
       at Microsoft.Exchange.Data.Directory.ADDataSession.Save(ADObject instanceToSave, IEnumerable`1 properties, Boolean bypassValidation)
       at Microsoft.Exchange.Management.Tasks.InitializeDomainPermissions.InternalProcessRecord()
       at Microsoft.Exchange.Configuration.Tasks.Task.<ProcessRecord>b__8()
       at Microsoft.Exchange.Configuration.Core.LatencyTrackerExtension.StartAndEndInternalTracking(LatencyTracker latencyTracker, String groupName, String funcName, Boolean logDetailsAlways, Action action)
       at Microsoft.Exchange.Configuration.Core.CmdletLatencyTracker.StartAndEndInternalTracking(Guid cmdletUniqueId, String groupName, String funcName, Boolean logDetailsAlways, Action action)
       at Microsoft.Exchange.Configuration.Tasks.Task.<ProcessRecord>b__7()
       at Microsoft.Exchange.Configuration.Core.LatencyTrackerExtension.StartAndEndInternalTracking(LatencyTracker latencyTracker, String groupName, String funcName, Boolean logDetailsAlways, Action action)
       at Microsoft.Exchange.Configuration.Core.CmdletLatencyTracker.StartAndEndInternalTracking(Guid cmdletUniqueId, String groupName, String funcName, Boolean logDetailsAlways, Action action)
       at Microsoft.Exchange.Configuration.Tasks.Task.ProcessRecord()
       at System.Management.Automation.CommandProcessor.ProcessRecord()
    Thanks!
    Regards, Raymond

    Hello,
    Please check the current schema version:
    https://support.microsoft.com/en-us/kb/558112?wa=wsignin1.0
    Try updating the schema by the following command:
    Setup.exe /PrepareSchema
    https://technet.microsoft.com/en-us/library/bb125224(v=exchg.150).aspx
    Thanks,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Simon Wu
    TechNet Community Support

  • Which List should be used, to remove in a thread safe way?

    Hello all,
    I plan to have a List, where n number of Threads will accessing the List.
    When two or more thread trying to remove an equals items from the List, only one of the thread will remove successfully (i,e, remove(Object o) will return true). The rest of the threads will realize remove(Object o) returns false
    I wish to achieve this. I know that I can achieve by using :
    Collections.synchronizedList(new ArrayList(...))However, I afraid having the synchronized block will slow down my execution speed. Is there other way, that I achieve the same objective with faster speed? For example, using CopyOnWriteArrayList?
    Thanks!

    Sorry,
    I said "badly" because it is synchornized by putting "synchronized" keyword on most of the methods prototypes.
    Which equals to synchronizing on "this".
    In my opinion, one problem of this implementation is that 2 calls to a get() method will be synchronized wherever they dont need to. (As get() does not modify the vector). [See Edit]
    One other is you can synchronize on the Vector's mutex (itself) outside of the Vector's code.
    And at last, as synchronizedList is not implemented by a Vector and is more recent than the Vector implementation...
    I guess they implemented it in another way for many good reasons...
    [Edit]
    As i can see in Collections, the synchronizedList is implemented in the same way.
    BUT, as the synchronized keyword is not in the method's prototype, we can expect the implementation to be changed a day...
    And vector is a kind of old object kept for backward compatibility i guess. (someone can confirm ?). ("As of the Java 2 platform v1.2, this class has been retrofitted to implement List, so that it becomes a part of Java's collection framework.")
    @KwangHooi
    You can write your own implementation of a List which will not synchronize on the same token for both read/write operations. (but, i guess it could be hard to avoid deadlocks)

  • How can I use a Selector in a thread safe way?

    Hello,
    I'm using a server socket with a java.nio.channels.Selector contemporarily by 3 different threads (this number may change in the future).
    From the javadoc: Selectors are themselves safe for use by multiple concurrent threads; their key sets, however, are not.
    Following this advise, I wrote code in this way:
             List keys = new LinkedList(); //private key list for each thread
             while (true) {
              keys.clear();
              synchronized(selector) {
                  int num = selector.select();
                  if (num == 0)
                   continue;
                  Set selectedKeys = selector.selectedKeys();
                  //I expected this code to produce disjoint key sets on each thread...
                  keys.addAll(selectedKeys);
                  selectedKeys.clear();
              Iterator it = keys.iterator();
              while (it.hasNext()) {
                  SelectionKey key = (SelectionKey) it.next();
                  if ((key.readyOps() & SelectionKey.OP_ACCEPT) == SelectionKey.OP_ACCEPT) {
                   Socket s = serverSocket.accept();
                   SocketChannel sc = s.getChannel();
                   sc.configureBlocking( false );
                   sc.register( selector, SelectionKey.OP_READ );
                  } else if ((key.readyOps() & SelectionKey.OP_READ) == SelectionKey.OP_READ) {
    //.....Unfortunately synchronizing on the selector didn't have the effect I expected. When another thread select()s, it sees the same key list as the other thread that select()ed previously. When control arrives to serverSocket.accept(), one thread goes ahead and the other two catch an IllegalBlockingModeException.
    I'm not willing to handle this exception, the right thing to do is giving disjoint key sets to each thread. How can I achieve this goal?
    Thanks in advance

    A single thread won't be enough cause after reading data from the socket I do some processing on it that may take long.So despatch that processing to a separate thread.
    Most of this processing is I/O boundI/O bound on the socket? or something else? If it's I/O bound on the socket that's even more of a reason to use a single thread.
    Anyway I think I'll use a single thread with the selector, put incoming data in a queue and let other 2 or 3 threads read from it.Precisely. Ditto outbound data.
    Thanks for your replies. But I'm still curious: why is a selector thread safe if it can't be used with multiple threads because of it's semantics?It can, but there are synchronization issues to overcome (with Selector.wakeup()), and generally the cost of solving these is much higher than the cost of a single-threaded selector solution with worker threads for the application processing.

  • Is there a way to set read-only on a file manually?

    Is there a secret keypress combo that will allow me to set
    the read-only attribute on files in the file inspector window? I
    can not use the check-in/out function because, IMHO, it is broken.
    Macromedia has given a menu ability to "reset" (turn off) the
    read-only attribute but they left out the "turn on" function. Would
    certainly help me a lot...anyone?
    Thanks!
    p.s. in order to defray wasted back-n-forth postings, here is
    why it is broken:
    1. I run DW8 locally while connected to the network with
    mapped fileserver drives (M:, P:, etc)
    2. I have the default website set up pointing to our
    DEVELOPMENT file server
    3. when I do a PUT the files are FTP'd to a different web
    server for public consumption
    4. the error is that if check-in/out is enabled, the files
    are pulled from the PUBLIC web server instead of just opening them
    from the DEVELOPMENT server like I clicked on...if I wanted to edit
    the live files I would have changed my site pointer to remote
    instead of local (good grief)
    5. this is bad because everyone else in the company uses that
    cr@ppy Frontpage and are constantly editing their division's
    webpages, which are in various stages of readiness. When I edit one
    of those pages I need to be editing the one they have been working
    on, NOT the one that is currently published to the public website!
    DW8 is doing more work than I want it to do by going out and
    grabbing the published page instead of simply opening the one I
    clicked on in the file manager window. That makes NO sense at all,
    and as a developer I certainly wouldn't have programmed it that
    way...

    quote:
    Originally posted by:
    Michael Hager
    The problem with any boxed software is that the developers
    can NEVER know how every possible customer will use the software.
    That's why, as a developer, they need to make
    the software have MANY more checkboxes in the options screen to
    allow the user to use the software the way they need to, not the
    way the developers THINK they will need to. Just look at Microsoft
    as a poor example of this--I am never so frustrated as when trying
    to use ANY of their Office products, which make easy tasks
    difficult and do not include some of the most common options that
    competing products have.
    quote:
    The Dreamweaver check out system actually works very well if
    it’s set up properly and administered strictly. If you set it
    up on your testing server with everyone set up on their work
    stations correctly it will tell you who has a file locked for
    editing. Once everyone is working as a team with good supervision
    and division of tasks under a strict policy set by management,
    Dreamweaver will work very well for your purposes. You
    shouldn’t have to lock and unlock files manually since the
    check in-check out function will do it for you nicely. When you are
    satisfied that all is well with the site or particular pages, then
    someone in a managing position can release or authorize release to
    the live site.
    The problem is that I am the only person using
    DW in the organization, everyone else is using Frontpage...blah...
    You and Murray have both alluded to a separate "testing"
    server. Perhaps I can make this system work by setting up the
    testing server as a duplicate of the development server in my site
    manager. Then I would have to manually publish the files from the
    testing server to the live production server myself. What a pain!!!
    I can not believe that I am the only person in the world that has a
    setup like this -- it seems very common to me. I would assume most
    government organizations are set up identically as us.
    <sigh>

  • Access read-only LDAP for username/password, Directory Server LDAP for rest

    Hello! I keep trying to find documentation on the above, but thus far I have been unable to find something that explains this well (and my attempts at figuring out thus far have failed).
    I have a read-only LDAP that is used University wide, and I am not allowed to change how it currently operates. It uses double-bind authentication in that you search for a user to get their DN, then bind to that DN with the users password to see if it was correct.
    I'd like to use the above setup to verify a user's credential as well as return some basic information about them (name, email, etc). After this, I'd like to use another freshly installed Directory Server LDAP to manage the roles that seem to be needed for Portal Server (as I cannot write to the original LDAP).
    Any help or advice on the above would be appreciated! Thank you.

    The authentication you described is the default way LDAP authentication works.
    AM Ldap auth-module allows you to 'pull' attributes from the LDAP server you're using for authentication and store it in it's 'amSDK' Directory Server - which is leveraged by Portal Server (if you're talking about Sun's Portal Server).
    However this is only done if the profile is created (set 'dynamic profile generation' in auth - service).
    As Portal Server does not support the new 'identity repsoistory API' of AM you have to stick to AM's legacy mode when using Portal Server.
    To keep the the data in sync (if needed) you have to write a post-auth class.
    -Bernhard

  • I created a Custom list New Form and need to make the text fields read only

    When I use SharePoint Designer and add the read only attribute  to the  SharePoint form field, then it throws  a web part error.
    but here is the thing, I have current user Filters populating the Form Fields. So the form fields  populate First name , last name etc. and I need these fields read-only....
    the Client doesn t want the end user to Change those fields.  Is there any way to "LOCK" the form fields?
    As I have only 7 text fields that need to be locked down. and one field is a signature line that is a true input field.. where the  user has to inter their initials.
    Any ideas? as I have tried most of the items available thru searches nothing works, or it throws that web part error message.
    Steve Athey

    Daniel: ( I'm now at work, a different ID is logged on for me)
    I used SharePoint Designer.
    Steps:
     created a web part page
    then on the SharePoint Designer ribbon I then went to insert:
    new item form
    Then I selected my data source (list)
    then I placed the 8 columns on the page
    a page viewer web part to pull the manual that people have to read.
    and 7 current user filter webparts. (1 for each form field) Yes it is over kill, but I'm trying to keep this straight out of box as much as possible...
    then for the form fields
    I added a parameter and the read only tag see below in bold:
    <asp:TextBox runat="server" text="{$ParamEmployID}" id="ff17{$Pos}" __designer:bind="{ddwrt:DataBind('i',concat('ff17',$Pos),'Text','TextChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Employee_x0020_ID')}" 
    ReadOnly="True" />
    I also  added the parameters in the ribbon area
    the error message doesn't tell me much, it just send me to web part maintenance page... 
    if I removed the  ReadOnly = True then the error  goes away.....   So I was trying to find a  quick simple  JQuery and or javascript   code item that would  make  the 7 text fields readonly and leave the
    8th  text field alone  to allow people to place their initials on the page to say that they read the manual.
    I have  created hundreds of these types of pages .. this is the first time I have run into this issue, but it also the first time I have tried to use the ReadOnly = True item.
    Any Ideas  and or thought on how to make the  items read only? and not throw the error.
    Steve

  • Help needed with 'Conditions' for field with read only on demand

    Hy guys,
    I really need your help now, i have two items named P22_LOGIN_TYPE (..wich can be 'Default' or 'Special') and P22_PASSWORD, i need to turn to 'read only' the second item when the first item is 'Default', i'v tryied the conditional option but with no success, i know is managed from there but it's not working for me, it seems that i don't know exactly how to do it. By the way, i have APEX 2.2.
    I need an exact guide (explanation) on how to do it, thank you very much.
    Best regards,
    Victor

    Firstly you could set your First item to be a select list with submit. Make the branch go to the same page.
    Secondly, on the read-only conditions for your second item, use the condition when item in expression 1 = value in expression 2, and set that to 'Default' in expression 2.
    Essentially this will re-submit your page when you make a selection either 'Default' or 'Special'. If 'Default' is selected, then the PASSWORD item will be rendered as read-only. If you don't want to display the PASSWORD item at all, you can put the above condition for the read-only, into the conditions section of the item.
    Hope this helps and is not too confusing. It reads a lot worse than it actually is ;)
    Cj

  • DFS-R hub server - which way to make read-only?

    Hi all,
    This is more of a technical clarification than a problem we're having...
    Firstly, we have a bunch of file servers in various EMEA regions, which are set up to replicate back to a central hub server at our UK datacentre in order to take backups. These spoke servers are the only location where the data is changed.
    We are in the middle of migrating the hub server over to Windows Server 2008R2, meaning we can use the supported one-way replication method instead of disabling one end of the member connections.
    My question is this:
    Which member do we need to make read-only? This would have seemed obvious to me, however there is some confusion amongst our systems engineers.
    I would have said that you make the spoke member read-only, as you don't want the hub replicating anything back to it. This makes perfect sense to me, but not everyone is so sure.
    Could someone please clarify?

    I think it is what I want to achieve - many remote spoke/writeable downstream servers talking with one central/hub server so only this hub has the content of them all - but what do You mean saying "configure
    your DFS targets ... such that the HubServerB is disabled"? Isn't it by making it read-only?
    I've just found this -
    Make a Replicated Folder Read-Only on a Particular Member (http://technet.microsoft.com/en-us/library/dd759239.aspx).
    Well. There is a clear explanation that users cannot add or change files on read-only replicated folder but all three examples show remote servers as read-only while hub server is always writeable, isn't it?
    RODC example is clear - for safety reason no user-made changes are allowed on remote DC but it gets changes from writeable (central/hub) DC/DC's.
    Reports files generated and changed only on hub server - OK. But I can imagine an opposite situation where branch offices are responsible for producing and changing reports which are read-only in company's headquarter. Do the remote offices do it all on the
    hub server? Then the reports are replicated to remote read-only member servers? What for?
    But keeping installation files on remote servers is not understandable for me. I would rather keep them on central/hub server and propagate them to remote servers and make hub server read-only to prevent from backward replication.
    I'm not a native English speaker so maybe I don't get the exact sense of this article. Somebody help me, please?
    Krzysztof

  • Need to make a dff field read only if it has data

    Hi,
    we added dffs to the manage sites page, i am extending the controller to do some validations of this DFF page. I need to make dff read only if it has some data. The following code is not working.
    public void processRequest(OAPageContext pageContext,OAWebBean webBean)
    super.processRequest(pageContext,webBean);
    OAApplicationModule xam = paramOAPageContext.getApplicationModule(paramOAWebBean);
    OAViewObjectImpl DffVO = (OAViewObjectImpl)xam.findViewObject("SitesFlexVO");
    OAViewRowImpl DffRow = (OAViewRowImpl)DffVO.getCurrentRow();
    if(DffRow.getAttribute("Attribute1")!= null)
    OADescriptiveFlexBean dffBean = (OADescriptiveFlexBean)webBean.findChildRecursive("Attribute1");
    dffBean.setReadOnly(true);
    can you please suggest whats wrong and give me a correct solution.
    Thanks,
    Kiran M.

    Thanks for the reply nani,
    it didnot work, i am getting the following exception.
    ## Detail 0 ##
    java.lang.NullPointerException
         at xxtjx.oracle.apps.pos.supplier.webui.XXTJXByrMngSiteDFFCO50.processRequest(XXTJXByrMngSiteDFFCO50.java:43)
    The error line 43 in my code is
    dffBean.setReadOnly(true);
    so i feel there is something wrong with this command. I kept this validation in process request and i am able to fetch attribute values in process request. so i feel there is no issue fetching the attribute value. i feel its the issue with the set command.
    Let me know if you have any other solution.
    Thanks,
    Kiran M.

  • Does anyone know a simple way of creating read-only DMGs from card media?

    We're looking for a simple workflow to copy/archive card media from cameras.
    Can anyone recommend a utility / Droplet / Applescript that will create a read-ony DMG directly from mounted card media?
    Preferably something where the disk name of the DMG can be set when its created.
    Thanks!
    Nick

    Thanks! That's a handy start.
    I'll take a look at the command line options of hdiutil. Ultimately, we're looking for a workflow for non-terminal users so I imagine we'll wrap it up in AppleScript.
    The idea is to make a simple drag+drop process for people shooting digital video to archive card media as read-only  dmgs with custom reel names. Something like...
    - select the card/folder (or drag onto AppleScript)
    - enter name and location of dmg in file dialogue
    - create and verify dmg
    Cheers
    Nick

  • Need help making digital signature field read only if required fields are null

    Using Adobe LiveCycle Designer, I have a digital signature field.  I want to prevent users from being able to digitally sign the pdf if any required fields in the pdf are null or blank.  I'm a newbie to scripting so any detailed help would be greatly appreciated.  The required fields in the pdf include radio buttons, check boxes, text field, etc.  I appreciate any help anyone can provide.
    Thanks

    Exactly how you check a field for being empty depends on what type of field it is. For text fields, you should get the field's value as a string and compare it to an empty string, something like:
    var val = getField("Text1").valueAsString;
    if (val) {
        app.alert("Field is not empty");
    If there is a default value that needs to be changed, you would compare to the default value:
    var f = getField("Text1");
    var val = f.valueAsString;
    if (val !== f.defaultValue) {
        app.alert("Field value is OK");
    For check boxes and radio buttons, you'd compare to the string "Off", which means none in the group is selected.
    For dropdowns (combo boxes) and list boxes, there is normally one value selected, so you would have to get the value and check against the default value (or something else) to see if the field is properly filled in.
    You could place the script there, but I usually use a separate button that I encourage the user to click in order to check the field. The problem with using the Will Save event is you can't prevent the save from happening.
    The script can loop through all of the fields (and test all required ones), or you could set up an array of field names to check.

  • How to create a user with read only access for ESB / BPEL Console

    I need to create a user with read only access to ESB Console & BPEL Console. I have created a user
    (esbreadonly) and assigned ascontrol_monitor role but user is still able to
    delete services from ESB systems (such as DefaultSystem). Is there any way to
    create a user that has strickly read only access to ESB Console & BPEL
    Console
    Thanks
    Dinesh Patel

    Check out this post.. I'm in the process of testing.
    http://chintanblog.blogspot.com/2007/12/i-saw-numerous-people-asking-about-bpel_290.html

Maybe you are looking for

  • How do I change my email for my Adobe account?

    I am going to be making a new email soon and I want to know how to change the email for my Adobe account. I have purchased things on this account so I want to make sure that I can keep those purchases. Thanks!

  • "Merge into" statement doesn't work

    Hi Reader, It seems that in some of our installed machines merge into statement doesn't;t work. We've already experienced this issue on databases installed within virtual machines, but also found on other configurations sporadically. Using statement

  • Create an NSString for number in scientific notation from double?

    Hi Given a double, I want to create a string in scientific notation. e.g for a double with a value of 123.456, I want the NSString to be "1.23456e+2" for entering in to a UITextField. I've looked through the docs but can't find a formatter. (There is

  • NB200 - Virtual screen resolution on Windows 7

    Quote: +The 10.1-inch glossy screen features a resolution of 1,024 x 600, and is bright and pleasant to use.+ +If you find that some programs have elements which appear off the screen, the graphics drivers support a virtual resolution up to 1,600 x 1

  • Here one for ya, buttons information still exists, but menu is wrong

    Please bear with me, I feel explaining the situation first will be beneficial to seeking help. Ok, I've been trying to tackle this problem for about a week now. When I simulate my menu in DVD Studio Pro 4.0.3, it works fine as day. But after I build