How to insertString in document listener

I always got java.lang.IllegalStateException: Attempt to mutate in notification.
I do not want to extend defaultstyleddocument. is there any solution for it.
thanks a lot.

Hello,
what do you want to achieve ? Offer some source-code.
If you want your special behaviour for your document override its insertString method. For example if you want a maximum length try this:public void insertString(int offs, String str, AttributeSet a)
                    throws BadLocationException
     int length = getLength();
     if ((length += str.length()) > maxChar)
          //don't insert if current chars > max chars
          return;
     super.insertString(offs, str, a);
}regards,
Tim

Similar Messages

  • How can I open and listen to the PDF documents with audio in my iPad?

    How can I open and listen to the PDF documents with audio in my iPad?

    You need to use a PDF reader that supports multimedia. Adobe Reader 10.3 does not. Adobe has not stated whether it will support multimedia in the future.
    In the meantime, you could buy an application that does like PDF Expert. Read about it here:
    Finding the Best Tablet PDF Reader

  • How to link PDF document in Report Layout??

    I need to display the contents of PDF document after the form letter report. I tried OLE object but at the runtime it does not display the content. Does any one knows how to attach PDF document in reports layout?
    Thanks
    Ravindra

    you will have to concatinate your report output with the static PDF document. in reprots 10g you can create a cusotm destination that could implement this functionality.
    out of the box, reports does not provide the ability to add static content in PDF to reports' generated PDF output.
    thanks,
    philipp

  • How to create shipment document with out inbound delivery document

    Dear Friends
    How to create shipment document with out outbound/inbound delivery document.
    In my client scenario, there is no inbound delivery for normal purchases.
    Just there are raising the PO to vendor, then they are doing MIGO for goods receipt.
    Can we do shipment creation with reference to PO?
    If it is possible, how it will be?
    Please let it solve
    With regards
    Lakshmikanth

    Dear Sameer,
    Please go to transaction VT01N here you enter Transportation planning point and shipment type then press enter.
    Now system will take you to the shipment document creation screen here you click on Select deliveries or press F6 now system will take you to the select outbound deliveries screen in this screen you enter selection data then execute, now deliveries will get assigned to that shipment.
    After assigning the deliveries enter the remaining data then complete the shipment finally save the shipment document.
    For more information please go through this SAP help link
    Note:- Shipment process need to be carry out for the deliveries before PGI.
    http://help.sap.com/saphelp_47x200/helpdata/en/f5/04898047bd11d2bf750000e8a7386f/frameset.htm
    I hope this will help you,
    Regards,
    Murali.

  • How do we send document from one group to other through sharepoint designer??

    Hi SharePointers,
    Looking for help..
    Requirement: I have 3 groups 1.requestors 2. Approvers 3. Vendors.
    In Requestor group, there are so many Requestors and every Requestor logged in to subsite and  create a new document in the same DocHub. But No Requestor can see documents created by others. ie, Requestor can see his own documents not by others created.
    How to implement this. Is UserProfile service useful here or any other?
    Finally , when Requestor click on save button then I have to send the particular document to Approvers group for approve/rejection.
    Can you please suggest me that how to send the document to others through Designer workflows.? 
    Note: Currently we are using ootb
    Kindly show me the way to do this.
    Many thanks in advance..

    Hi Praveen,
    By OOB option, we cannot send documents as attachment via workflow.
    You could use document url as workaround or use code to achieve it:
    http://community.office365.com/en-us/f/154/t/204397.aspx
    http://sharepointstuff.codeplex.com/
    http://sharepointconnoisseur.blogspot.com/2012/03/emailing-documents-as-attachments.html
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How can I move documents from my iPad to the cloud?

    I am trying to move documents into the cloud from my iPad. Every time I select the upload icon, only my photos show up. How do I find my documents?

    squirrels,
    To save a single PDF document on iPad to Acrobat.com (i.e. one document at a time)
    Open a PDF document in Adobe Reader for iOS.
    Tap anywhere in the document to display the toolbar.
    Tap this icon in the toolbar.
    Select "Save to Acrobat.com".
    If prompted, sign in with your Adobe ID.
    If you want to transfer a lot of PDF documents on your iPad to any cloud storage service, you can transfer them to your Windows/Mac desktop computer using iTunes first.
    How to transfer PDF documents from your iPad/iPhone to your computer
    and upload them to the cloud storage service of your choice via a web browser.
    Does it answer your question?
    Please let us know if you still have a problem with uploading files.

  • How can i share documents with different users on the same mac?

    How can i share documents with different users on the same mac?

    Shared how? The other users can read the documents or you all can read and write the documents?
    The first is easy just place the documents in /Users/Shared anyone can access the files there and the other users will be able to read them.
    The second is a bit trickier.

  • I`d like to know how can i insert documents, xls/doc/pdf into iCloud and have them in my iPhone and my iPad. I just found one way, through ibooks, but i think it isn't a practical option.

    I`d like to know how can i insert documents, xls/doc/pdf into iCloud and have them in my iPhone and my iPad. I just found one way, through ibooks, but i think it isn't a practical option.

    Just use Drop Box instead.

  • How to show sharepoint documents in salesforce ?

    How to show sharepoint documents in salesforce ?
    I should also be able to upload documents from salesforce directly to sharepoint document library/list if the users attach a document for a record in salesforce.   Any idea how to achieve this?
    What are the things need to be done if my sharepoint is available in intranet Or if it is SharePoint Online , how can we link this to salesforce (as Salesforce is global and can be accessed from anywhere). What are the security measures that I need to look
    at and how to achieve this? 
    Ex:- I have a record in salesforce account object. I have to attach a document for that record which should be directly uploaded to sharepoint and shouldn't exist in salesforce, but it should display the listview to the users once its uploaded to sharepoint
    and they should see them as if they exist inside salesforce, once they click on the link in the listview of the relatedlist, it should open the document from sharepoint.
    Thanks in advance.

    Hi,
    According to your post, my understanding is that you want to show SharePoint documents in salesforce.
    You need to integrate SharePoint with Salesforce.
    Nick Swan
    has written an article on how to integrate Salesforce and SharePoint 2007 through the Business Data Catalog.
    But it might be useful as the theory is the same for using SharePoint 2010 and the Business Connectivity Services:
    Salesforce and SharePoint
    Outside of that, there are some useful third-party products you can have a look at.
    Cloud Connector: http://www.layer2.de/en/community/FAQs/cloud-connector/Pages/Office-365-Salesforce-Integration-Migration-Replication.aspx
    DocAve Data Replication: http://www.avepoint.com/salesforce-data-replication/?gclid=CNjZ8sGwl6kCFYEc4Qod-xD-uQ
    DataZoom Script: http://www.siafoo.net/snippet/261
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to print material document in header level?

    Hi Guys,
    How to print material document from header level. I can only print them in item level. But i want that in header level. For example, I have 4 movements inside a material document and I want to issue only one output from the header level.
    I can see the option Goto -> Additional Function -> output, but it is disabled. Please let me know hot to acheive this and if you need further info on this. Please throw some light on this.
    Thanks
    Yasin.

    HIi
      Your question is not clear.  What exactly you want to be.
    1.  To print material header in your smart form / Sap Script what is the problem. Itu2019s quite easy you can do it. Let me know what problem you are facing.
    2. The option is disables because of business functionality ask your functional guys to help you on the same.
    Regards
    Swati

  • How to print a document in Pages

    just got iMac computer and downloaded Pages.  Can not work out how to print a document I just created

    Hi LL,
    There's a great piece of free documentation for Pages called the Pages User Guide. It can be downloaded from the Help menu. I suggest that you read the well-written guide some quiet evening. It will get you off and running with your new computer and Pages.
    Printing documents on a Mac is the same as on a Windows system: File > Print.
    Jerry

  • How do I save documents from my PC to icloud

    How do I save documents from my PC to iCloud

    You can't.  iCloud doesn't support general file/document storage.  Try a different cloud service like Dropbox.

  • How to create a document folder using ListData.svc

    Hi All,
    I've recently been put on a project where I need to use the REST services (ListData.svc) to retrieve and add documents to the document library. It all has been smooth sailing until I hit the point where I want to save a document in a path that doesn't exist.
    I get an error if I try to save a file where the folder structure doesn't exist. I then went about it a different way trying to create the folder structure first. This also didn't work and I get an error message saying that the entity type is marked with the
    MediaEntry attribute but no save stream was set for the entity. Not too sure what set for the save stream if I'm just adding a folder.
    So my question is can a file be added to a folder structure that doesn't exist where it automatically creates the folders. If not can the service create folders?
    Some sample code I've been using:
    var folder = new SampleDocumentLibraryItem();
    folder.Name = "Sample";
    folder.Title = "Sample";
    folder.ContentType = "Folder";
    folder.Path = "/sample/folder1/folder2";
    spContext.AddToSampleDocumentLibrary(folder);
    spContext.SaveChanges();
    Thanks in advance,
    Damo

    Hi All,
    Finally managed to figure this one out. For anyone who needs source on how to create a document folder. Some sample source is below...
    var folder = new DocumentLibraryItem();
    folder.Name = "Folder Name";
    folder.Title = "Folder Name";
    folder.ContentType = "Folder";
    folder.Path = path;
    spContext.AddtoDocumentLibrary(folder);
    spContext.SetSaveStream(folder, stream, false, folder.ContentType, folder.Path + folder.Name + "|0x0120009BCC19899CEBC6468FF4EEAC7B8CF4F5"
    spContext.SaveChanges();
    So the important differences in the code above. The content type of the object and stream MUST be set to "Folder". I'm not sure why but you still need to set the save stream to be a valid stream even though you're only adding a folder. So just keep the stream
    open and then pass "true" to close it when you actually save the file. The other important element as noted from the URL's in the previous comments is you need to add a "|" + Content Type ID of a folder. You'll be able to get this ID by visiting the rest service
    for an existing document library and view source to see the actual content type id for a folder.
    Thanks everyone for your help,
    Damo

  • How to create a Document Set in SharePoint 2013 using JavaScript Client Side Object Model (JSOM)?

    Hi,
    The requirement is to create ""Document Sets in Bulk" using JSOM. I am using the following posts:-
    http://blogs.msdn.com/b/mittals/archive/2013/04/03/how-to-create-a-document-set-in-sharepoint-2013-using-javascript-client-side-object-model-jsom.aspx
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/1904cddb-850c-4425-8205-998bfaad07d7/create-document-set-using-ecma-script
    But, when I am executing the code, I am getting error "Cannot read property 'DocumentSet' of undefined "..Please find
    below my code. I am using Content editor web part and attached my JS file with that :-
    <div>
    <label>Enter the DocumentSet Name <input type="text" id="txtGetDocumentSetName" name="DocumentSetname"/> </label> </br>
    <input type="button" id="btncreate" name="bcreateDocumentSet" value="Create Document Set" onclick="javascript:CreateDocumentSet()"/>
    </div>
    <script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"> </script>
    <script type="text/javascript">
       SP.SOD.executeFunc('sp.js','SP.ClientContext','SP.DocumentSet','SP.DocumentManagement.js',CreateDocumentSet);
    // This function is called on click of the “Create Document Set” button. 
    var ctx;
    var parentFolder;
    var newDocSetName;
    var docsetContentType;
    function CreateDocumentSet() {
        alert("In ClientContext");
        var ctx = SP.ClientContext.get_current(); 
        newDocSetName = $('#txtGetDocumentSetName').val(); 
        var docSetContentTypeID = "0x0120D520";
        alert("docSetContentTypeID:=" + docSetContentTypeID);
        var web = ctx.get_web(); 
        var list = web.get_lists().getByTitle('Current Documents'); 
        ctx.load(list);
        alert("List Loaded !!");
        parentFolder = list.get_rootFolder(); 
        ctx.load(parentFolder);
        docsetContentType = web.get_contentTypes().getById(docSetContentTypeID); 
        ctx.load(docsetContentType);
        alert("docsetContentType Loaded !!");
        ctx.executeQueryAsync(onRequestSuccess, onRequestFail);
    function onRequestSuccess() {       
        alert("In Success");
        SP.DocumentSet.DocumentSet.create(ctx, parentFolder, newDocSetName, docsetContentType.get_id());
        alert('Document Set creation successful');
    // This function runs if the executeQueryAsync call fails.
    function onRequestFail(sender, args) {
        alert("Document Set creation failed" + + args.get_message());
    Please help !!
    Vipul Jain

    Hello,
    I have already tried your solution, however in that case I get the error - "UncaughtSys.ArgumentNullException: Sys.ArgumentNullException:
    Value cannot be null.Parameter name: context"...
    Also, I tried removing SP.SOD.executeFunc
    from my code, but no success :(
    Kindly suggest !!!
    Vipul Jain

  • How to change the document type while creating a PO by ME59N

    Hi,
    I  have 2 groups of PR's, for group one the document type is picked as NB and PO is created and for the group 2 it should pick as XYZ and PO should be created using ME59N tcode.
    How to change the document type for group 2 in ME59N? Which user exists to use to change the document type while creating PO in ME59N? 
    Can any one suggest me.

    Hi,
    There a config area, where you can define default PO doc types for a particular Pr doc type. If you maintain the settings properly there, then your requirement can be fulfilled.
    SPRO->IMG->MM->Purchasing->Purchase requisation->Define doc types.
    This will serve your purpose.
    Thanks,
    Srinu

Maybe you are looking for