Design advice for custom painting

Hi,
Can someone give me some high-level design advice on designing a JPanel subclass for custom painting? My panel class is becoming very complex, with lots of drawing and scaling methods, so I'm wondering if I could abstract away some of these graphical elements by creating new classes to make the design more object-oriented. However, I'm finding that there are also disadvantages in representing some of my graphic components as classes. Specifically,
1. It will lead to a much higher level of class coupling. My panel will depend on all these new classes to work correctly. In fact the situation is even worse because my panel is an inner class and, to do some of the scaling, needs to use methods from an object stored in the parent class. I would therefore have to also pass this object reference as an argument to many of these new classes.
2. It will lead to a lot of awkward passing of data between classes. For example, I need to use g2.drawImage(img, x, y, w, h, this), so I will have to pass not only the graphics context but also the panel reference itself.
Is it common for panel subclasses that do custom painting to be complex?
thanks,
Eric

I wrote the map view for a commercial GIS system. Drawing and scaling on a JPanel is challenging, but it need not be complex.
1. To eliminate class coupling, you need to create a couple of interfaces: Renderable (what you want drawn) and Renderer (the thing doing the low-level drawing). Renderer will have before and after setup and reset methods (to do things like scaling and rotation), and methods that the renderables can use to draw graphics. The Renderable interface can be as simple as a single method: draw(Renderer).
Every type of graphic that you draw on the screen would be a different class that implements Renderable, and which knows how to draw itself using whatever lower-level drawing commands you put in the Renderer. If you construct each Renderable in terms of java.awt.Shape, then Renderable.draw() could call a method Renderer.draw(java.awt.Shape, java.awt.Color).
2. The Panel becomes fairly simple. It has a Renderer and a collection of Renderable objects. Its paint() method calls the Renderer setup method, calls Renderable.draw(Renderer) on each object, and calls the Renderer reset method. Each Renderable in turn calls Renderable.draw(java.awt.Shape, java.awt.Color) one or more times.
Renderer should get a Graphics2D from the Panel when the setup method is called. That's when the Renderer does all of the scaling, positioning, and rotation on the Graphics2D. The Renderable implementations shouldn't even need to know about it.
I don't think custom painting code is necessarily complex, merely challenging to write. If you're only drawing a few lines and circles, you probably don't have to be too concerned about design elegance and code maintainability. The map view I designed for our GIS system, on the other hand, has to handle all kinds of map geometry, icons, text, and aerial photos.

Similar Messages

  • Purpose for payment advice for customer

    Hi Gurus,
    I would like to understand that the Purpose for payment advice for customer in sap. Please provide some example to understand the purpose of payment advice for cutomer.
    Thanks
    Risha

    u2018Payment Adviceu2019 helps in the automatic searching of u2018open itemsu2019 during the u2018clearingu2019 process to find a match for an u2018incoming payment.u2019 This is possible because you can use the u2018payment adviceu2019 number instead of specifying parameters in the u2018selection screen.u2019 A typical payment advice may contain details such as document number, amount, currency, reason for underpayment, etc. The payment advices are of various categories; the first 2 digits of the payment advice number
    help to differentiate one payment advice from another
    Regards,
    Raja

  • Payment Advice for Customer from F-28

    Dear All.
    We would like to  know how can i get Payment advice for customer after receiving the payment thro F-28.
    Do suggest.
    Regards

    Hi,
    you need to create Correspondence for the same and customise the form with the help of ABAPer according to your requirment.
    Then use the transaction Code FB03 insert Payment Document and execute Correspondence option from the menu now you need to execute T. Code F.64 for Payment advice outputs.
    Regards,
    JA

  • Time-series / temporal database - design advice for DWH/OLAP???

    I am in front of task to design some DWH as effectively as it can be - for time series data analysis - are there some special design advices or best practices available? Or can the ordinary DWH/OLAP design concepts be used? I ask this - because I have seen the term 'time series database' in academia literature (but without further references) and also - I have heard the term 'temporal database' (as far as I have heard - it is not just a matter for logging of data changes etc.)
    So - it would be very nice if some can give me some hints about this type design problems?

    Hi Frank,
    Thanks for that - after 8 years of working with Oracle Forms and afterwards the same again with ADF, I still find it hard sometimes when using ADF to understand the best approach to a particular problem - there is so many different ways of doing things/where to put the code/how to call it etc... ! Things seemed so much simplier back in the Forms days !
    Chandra - thanks for the information but this doesn't suit my requirements - I originally went down that path thinking/expecting it to be the holy grail but ran into all sorts of problems as it means that the dates are always being converted into users timezone regardless of whether or not they are creating the transaction or viewing an earlier one. I need the correct "date" to be stored in the database when a user creates/updates a record (for example in California) and this needs to be preserved for other users in different timezones. For example, when a management user in London views that record, the date has got to remain the date that the user entered, and not what the date was in London at the time (eg user entered 14th Feb (23:00) - when London user views it, it must still say 14th Feb even though it was the 15th in London at the time). Global settings like you are using in the adf-config file made this difficult. This is why I went back to stripping all timezone settings back out of the ADF application and relied on database session timezones instead - and when displaying a default date to the user, use the timestamp from the database to ensure the users "date" is displayed.
    Cheers,
    Brent

  • Design approach for custom Fiori application

    Dear Experts,
    Good day to all...!
    I am having a query on finalizing design approach for one of my custom Fiori Application development  using SAP UI5.
    Current Application design and  Features:
    As now we are having application, which is been used in laptops. The application structure is like (SAP R3 --> SUP -->UI (using .net) [back-end à Middlewareà UI).
    The UI is hosted on IIS server and the application type is desktop, so the users can use the application in offline as well.
    Once its connected to internet, they push all the data back to SAP via SUP.
    Proposal :
    We are planning to migrate the same application into Fiori with same offline features and extending to mobiles and devices.
    I have few queries here.
    What will be the best approach to deploy the application either SUP(Latest version of SMP) or SAP R3.
    If SAP R3 to deploy App:
    If we choose to deploy the application in R3, How to support the offline usage mobile and devices.
    Will the HTML5 local storage or indexed DB’s are sufficient to support the offline usage.
    In this case, Shall we drop the SUP/SMP, Since the application directly accessed from SAP R3 ..?
    SUP/SMP to deploy the app:
    In this case, I need to create (wrap the ui5 files into hybrid application) a hybrid application to support the mobile and devises as native application..? Correct me If I am wrong..:)
    Hope I can use the SUP/SMP local storage options to support my offline usage..? Correct me If I am wrong..:)
    What will be the best option to support desktop offline  usage.
    We are yet to take a decision on this.. Please provide your valuable inputs , which will help us to take some decisions.
    Thanks & Regards
    Rabin D

    Hi Anusha,
    considering the reusability aspect the components approach is the much better one (see also the best practices dev guide chapter regarding components SAPUI5 SDK - Demo Kit).
    It allows you to reuse that component in different applications or other UI components.
    I also think that the Application.js approch will not work with Fiori, cause the Fiori Launchpad loads the Components.js of the Fiori app in an Component Container.
    Best Regards, Florian

  • Java EE design advice for a re-designed DB app

    I'm currently tasked with rewriting a legacy DB app in Java. The original was written in Delphi. It worked great for a number of years, but the powers that be have recently decided to redesign and rewrite it in Java. Basically I just have the same set of business requirements as the original did.
    Overall, the app is a desktop GUI application that helps track contents of a natural history museum collection. The collection contains a bunch of specimens (dead animals) collected all over the globe at various times over the last 200 years. Multiple users (1 - 10 uesrs) will have to have access to the data at the same time. I also have to provide a nice Swing GUI for it.
    Here's my question: Is this the type of app that lends itself to a Java EE design? I'm imagining using a Java EE app server that connects to the DB. The app server would provide DB access, producing entity beans, as well as managing a number of session beans (EJBs) that implement the business logic (security, user management/session management). I would also have a Swing GUI that would connect to the beans remotely. This sounds like it would help me keep a good disconnect between the UI layer (Swing), the business logic (EJBs), and the data layer (entity beans accessed using the Java Persistance API). Does this sound reasonable? I'm a veteran Swing developer, but not a seasoned Java EE developer/designer.
    Also, if I use this architecture, I can imagine one issue that I might run into (I'm sure there are many others). I can imagine that I would want to retrieve the entity beans (lets say mypackage.MyPersonBean) through some call to an EJB, and then use the bean in some rendered Swing component. What happens when the Swing component needs to access the results of MyPersonBean.getAddresses() if the addresses are lazy loaded?
    As you can probably tell, I really have more than one design question here. Help/comments about any of this is greatly appreciated.

    I was thinking the same thing, but don't have a
    successful experience to validate my gut feelings.
    Here's my only suggestion (which dubwai could
    hopefully confirm or correct): write your entity
    classes/data model classes with no knowledge of
    lazy-loading etc. Then subclass them, overriding
    just the getChildren() type of methods and build the
    lazy-loading knowledge into the subclass.More or less, yes. Don't over-think it, though. If you define your basic data 'types' as interfaces, you don't need to get into complex type hierarchies or multiple versions of the types unless that becomes necessary and if it does, the changes should not affect the presentation layer.
    Since you are on-board with this and I think you are completely following, there is a technique for the lazy loading that you can use here.
    In the case where it's a one-to-one relationship, you can do the lazy-loading by creating a simple wrapper class for the child object. This class will have a reference to either null or a filled in Object. This is a little more OO because the Object is taking care of itself. Whether this abstraction is useful to you, you will have to decide.
    In the case of a one-to-many relationship, you can create a custom Collection (List or Set) that manages the stub loading. If you make a generic abstract version and subclass it for the different child types, you might be able to reuse a lot of the data retrieval code. You can do the same thing with the wrapper too.
    I will caution you to try to keep it as simple as you can without painting yourself into a corner. Only do things that you are going to use now and write things so they can be expanded upon later. Reducing coupling is a core technique for that.
    When the
    GUI asks for an object in the getData() call, hand
    them a subclass object, but don't let them know it.
    In other words, have the method "public DataClass
    getData()" return a SubDataClass object. The caller
    will only know that they received a DataClass
    object, but lazy-loading awareness will be built
    into it. This way, the lazy-loading stuff is
    completely transparent to the caller but you still
    have simple data classes that can be used outside of
    a lazy-loading context.Yes this is the idea, but don't write the other versions until you need them.
    It's also possible to use
    this method if you need to add transparent
    lazy-loading to classes that you aren't the author
    of. (Only classes that have been tagged 'final' or
    have 'final' public methods would be beyond this
    method's reach.)Yes, you can use the wrapper approach above but if the author of that class made a lot of unecessary assumptions you might have trouble.
    This approach allows for some enhancements, too.You
    can create a thread that retrieves the children of
    Foo (e.g. bars) incrementally after the Foo is
    returned to the caller. Often you can load the
    bars
    in the time it takes the user to click around to
    the
    point where they are needed or at least be partly
    done. This will make the app seem very fast to the
    user because they get the Foo very quickly (because
    you didn't load the chidren) and then the bars
    really
    quickly (because you loaded them during user
    'think-time').
    I love this idea. I'm hoping to code this into my
    GUI app soon.I would advise that you get the main lazy-loading working without this (keep in mind when writing the code) and do it once you are sure you will finish on time.

  • Design considerations for custom C223

    Hi all,
    I'm building a custom report using C223 as a base. I think I've determined that the struct mkal-expand is used to store the record set returned upon executing the transaction. I want to add a couple of fields to the struct by including another struct, which I define, in the mkal-expand struct. Is that a good aprroach for adding my fields to the report? Also, when I view the screen layout in design mode all of the fields which are displayed in the executed report are NOT displayed? Why...and would I add my fields in that case?
    regards,
    Mat

    Hi WalterLaan
    Thanks again for your assistance. I still think I might be better off drawing my own charts because I know that I have a bunch of unique stuff that I have to add to the charts (results of custom market analysis techniques)... e.g. if I have to draw custom annotations above (and/or between) the 5th and 10th bars on the chart, it will be easier for me to do this if I have drawn the bars myself (i.e. I'll know exactly where the bars are on the screen... to the pixel)... whereas there may be guesswork involved if I have to find the location on the screen of the 5th bar drawn by a third-partly library (unless they explicitly provide that in their API, to determine the x and y co-ordinates of a particular bar).... but even if they provide this, I may have to deal with the complexity of having to add a transparent pane above the chart element (or some other complexity) just so that I can go ahead and draw my own custom annotations to the chart.
    Again, for now I'm thinking I should just draw the charts myself... that doesn't sound too hard. The most important thing I needed to get my head around was the interactions between the data processing piece and the GUI components. I think you have laid out a pretty reasonable system for me in that regard... so thank you.
    Just a quick question.... Does repaint() have to be called from the Event Dispatch Thread? I'm thinking not because as far as I understand it just schedules a paint event. I think what you said made sense... just call repaint after each new piece of data is processed.
    Thanks for all your help
    Eddie

  • JSF Design support for custom controls

    I am creating some custom JSF components, for use in my projects. They work fine, but I was not able to make them display correctly in design time (I am using Websphere).They appear like small rectangles, even when they are grids. What is the standard way to provide design time support to my controls? Or al least a way to show them properly in Websphere designer? There must be some way to make it work, because standard components and IBM components are displayed correctly.
    Some hint?

    At the moment, the best you can do is fill out all the metadata in faces-config.xml for your component and renderer. Beyond that, each tool developer is currently defining proprietary XML metadata and/or programmatic extensions to provide better tool support. This is, of course, an awful state of affairs, and there are the beginning of efforts today to work towards common metadata and extensions for component developers.
    -- Adam Winer (EG member)

  • Design Suggestion for Custom ADF Application

    Hi
    I have a custom database table.
    I have a custom database view which has query from multiple tables including the above table.
    The custom table in the view is joined with other tables by columns like inventory_item_id, organization_id etc.
    I have to show user a screen where the results of this view are shown in a table.
    The user should be able to enter some data in the screen for these rows.
    (he will be able to enter the data only for fields from my custom table)
    When he press save button, we should enter the new data given by user into the custom table
    along with some other values from view rows .. like inventory_item_id, organization_id etc ..
    Can you suggest a best approach to achieve this ?
    I have to use BC4J for Model and ADF For UI.
    As far as my knowledge goes, I think we will not be able to do this with an updateable view since we might hit the error
    ORA-01779: cannot modify a column which maps to a non key-preserved table
    Is there a design pattern we can follow in BC4J so that this can be achieved?
    Thanks for any help.
    Sameer

    Any view can be made updatable if you write INSTEAD OF triggers for it. That might be a good solution for you. You can also base a View Object on more than one Entity Object, and as long as there are good associations between the EOs it ought to work fine.

  • Arch workflow design advice for a designer?

    Sorry for the ambiguous title, I couldn't figure out what to call this post.
    I'm new to Arch, though not Linux, and I must say, this is an amazing distro (I'm on the 64bit version). Dead simple, super fast, and nearly as flexible as a Gentoo system (that can use binaries!). Pacman is rockin'.
    I'm a designer by trade: Web, video, and image. And I STILL boot into Windows for important tasks like Flash work, video work, and ftp work. I would obviously like to reduce that dependency, though there is little hope in the video department, right now.
    But for web, I see no reason I couldn't do it all in linux. But I'm not sure how to go about it. Here is the workflow I need, and I was wondering if you could advise how I might set up such a system (I have just a base system with Gnome installed right now):
    * WYSIWYG html and CSS editting (NVU/Kompose is fine for html, but NOT for CSS) for the design phase
    * A way to output image slices with html (does GIMP do this?)
    * Accurate web fonts
    * Reliable ftp, preferably one with drag n' drop functionality (I use filezilla on Windows, but I think the linux version lacks the drag n' drop)
    It's not a real complicated workflow, I just need to save time wherever possible because I need to work very fast. In windows, it's like having a ball and chain strapped to your leg, but it does work. With linux, I will very much appreciate access to terminal and file management advantages.
    I'm not stuck on Gnome, I just like the simplicity. I'm mainly interested in speed and efficiency (NOTE efficiency... I like time savers and fluxbox always seems to add clicks to my tasks). Let me know what you think! I may be able to move my flash work over with a little help from VirtualBox too, but I think I'm stuck when it comes to video . Thanks for any advice you might have!

    No offense, but using WYSIWYG to design web pages doesn't sound very professional imo. They just don't offer the control that one would want with the code. I have tried a few (Frontpage, Dreamweaver, NVU, Bluefish, ...) and they all suck. They just don't do what you want it to. You drag something or add some formatting and it just messes up the code. It's better to just use a text editor and view the results in browser. Maybe that's slow or inefficient for you, but I find that's the best way to do it.
    As for image slicing, I find that annoying as well. In Photoshop I never really liked the way it worked. I sliced a few images and then trashed most of the others. I tend to go for simple designs and focus on making it mostly CSS, so when I slice images it's usually a 1px wide/high gradient which would get repeated. I don't need image slicing for that. As for graphic intensive sites... well... really, you should review that. People still have slow connections and having a lot of graphics is just bad, even if your client wants it. You might as well go with flash, and waste some more bandwidth
    If you really want to do it though, I think Inkscape is quite a nice tool. I do all my designing in it, and though I don't use slicing, you can do it quite easily (though it's a bit hackish) by adding a layer and creating transparent rectangles around the stuff you want, then just select the rectangle and export it. I'm not sure if there's a more automatic way - there are plenty of tutorials.
    The MS-fonts should be fine, I just want to know that I am looking at an accurate representation of what I my windows customers will see.
    Fonts won't help you much there. You know most people use IE, so you need to view the website in IE regardless, and that means you need Windows (I think wine uses some weird IE version which uses gecko). Maybe there's some good Linux alternative for viewing stuff in IE, but I just view it on Windows. Also the font shouldn't change the general layout of the site... I don't see how that would be a problem unless it's some weird font that not everyone has, in which case you'd use @font-face anyway...

  • Advice for custom transformation script to change table FK Associations

    Hello,
    I am attempting to write a transformation script that will cycle through tables in a large model and modify some
    FK associations to change the remote table in the FK. As an aside, the reason for this is that our logical model
    has logical entities that represent many small lookup code domains. However our relational/physical model has a
    single utility code repository physical table which contains all these code domains. So part of the transformation
    from our logical model to relational model is to swing all the FK associations for these lookup code domains
    into the common code table. Then the tables representing the lookup domains can be hard deleted.
    In any case, I'm looking at the
    oracle.dbtools.crest.model.design.relational.FKIndexAssociation
    or the
    oracle.dbtools.crest.model.design.relational.Index
    to see if one of these can be manipulated to perform the transformation I want to accomplish.
    When I perform the equivalent process manually via property sheets there are several ways of accomplishing this.
    a) The neatest method seems to be to modify the existing FK in place by clicking on the FK in the relational diagram and then changing
    the property called 'PK / UK Index'. Change that to the PK of the utility code repository table that is replacing the original
    table (representing the lookup domain). A side effect of this results in the mapping of the FK
    columns being nulled out. So they need to be remapped to the original columns (which are retained).
    So in two steps the existing FK is detached from the original table, reattached to the new table and then
    the FK columns are reused in place for the new FK mapping.
    b) The brute force method is to delete the original FK and then create an entirely new FK to the new table. There are
    multiple dialogs which allow you to retain the original FK columns and reuse them in the new FK.
    I realize this is a somewhat complex transformation but I'd appreciate some algorithmic advice on which path to take
    to try to accomplish this. In particular, is there a scripting equivalent to the first process above?
    I don't even know if the FK that is represented on the relational diagram is represented by the FKIndexAssociation or Index
    class in the scripting object model. In other words, as I loop through the tables in the relational model what would be my
    starting point:
    fks = table.getFKAssociationsList();
    or
    fkIndexes = table.getAllInds_FKeyInds();
    or something else. The names of the properties in the user interface don't always match with the scripting properties so
    it's a little tricky to figure this stuff out.
    Once I get access to the object that is equivalent to the FK in the diagram/property sheet, what
    is the best way to manipulate it via scripting. How can I change the parent/remote end of the FK to point to the new table.
    Or if I have to delete the original FK and then recreate it - is there a way to save the original FK columns and reuse them
    while creating the new FK?
    One other question. What is the best way to delete tables from a relational model. I note that there is an undocumented (?) remove()
    method that is available on Table. It is probably on a superclass so other things can be removed as well.
    When I try to use this method in a loop the script throws up dialogs similar to the dialogs that appear while performing a delete
    manually via the UI. Is there any way to intercept and respond to the dialogs programmatically?
    So for instance if I get a dialog popup like
    Do you want to delete generated FK columns 'FOO' in table 'BAR'?
    is there a way to intercept that dialog in the script and then answer Yes or No to it via the script?
    If it turns out to be too difficult to perform this type of transformation via scripting the fallback
    is to perform the transformation on the generated DDL file. But it would be cleaner to be able
    to perform the transformation in the DM Relational model if possible.
    Any advice appreciated.
    Rgds, BP

    Philip,
    This is good info. I was able to get a rough version of my transformation script to work.
    However I'd like to clean it up a bit.
    In your notes it is not clear how the FKIndexAssociation and associated Index are related.
    Is there a getter on FKIndexAssociation that references the associated Index?
    It looks like the method fk.changeKeyObject() takes an Index object as its first parameter.
    What would be the cleanest way to extract the PK Index from the Code table that I want
    to point to? I used something like:
    cdTable = model.getTableSet().getByName("CD_REPOSITORY");
    cdPkIndex = cdTable.getIndexByName("CD_REPOSITORY_PK");
    I used the latter method because it's the only one that returns an object of type Index
    which is required as input to FKIndexAssociation.changeKeyObject(). However this method
    requires the name of the index. That's fine but I'd like to just grab the PK's supporting index
    directly if possible (without knowing the name).
    I'm curious if there is a getter on Table or FKIndexAssociation that can just grab the index of the PK of
    a table directly?
    I don't see such a getter on FKIndexAssocation. On the Table class there are many getters that might be
    of some use but the only one I could get to work was getIndexByName() as shown above.
    I tried to use getIndexes() and then use isPk() on the result of that in a loop but that didn't return any result.
    It looks like getters getIndexes(), getPKs(), getUKeys() return collections of DesignObject which are just the
    superclass of FKIndexAssociation which is not what I need (i.e. which IS the actual underlying Index object).
    So I guess the general question is what is the best way to get access to the Index objects in two scenarios.
    First for the PK and UKs (typically on the 'parent-referenced' table) and secondly for FKs (typically on the 'child-referencing' table).
    If I were imagining how this would work I would imagine getters on the Table for the former and a getter
    on the FKIndexAssociation for the latter. But that's not how it works.
    Also, as an aside - this 'Index' is somewhat confusing since these seem to be 'potential indexes' and not true database indexes.
    These 'indexes' seem to be more closely related to database constraints and not actual indexes. I know that Primary Keys are
    implemented in Oracle via a unique index but I'd like to confirm that the class
    oracle.dbtools.crest.model.design.relational.Index
    is not the same thing as a DDL database Index.
    Secondary question. I notice when I run the script which loops through all the tables and redirects the FKs - the
    diagram does not refresh. I had to save the model and then reload it for the graphical representation
    of the FKs to change and redirect to the new table.
    Is there a way to force the refresh to occur right away?
    I've noticed that other transformation scripts I've written HAVE resulted in the diagram being refreshed
    right away (even while the script is running). In this case it does not.
    Rgds, BP

  • Design advice for vertical list calculations

    I'm extending a product management life cycle sharpoint 365 site,
    With purchase orders, magazine store, production targets (date based) and sold dates.
    So that in our production environment we can see how much is stored, how much can be sold, and what we need to buy in etc.
    The thing i'm a bit troubled about that sharepoint lists are not Excel, but this has to be done with Sharepoint lists.
    They prefer not to have edits directly in the aspX code, but editing workflows in Sharepoint designer is OK
    In excel one could easily add a cell formula with the content of Sum the value in the row left of me and add it to the value of myself one row earlier (like B2 contained  = A2+B1 ); and then copy that formula to the whole B column
    The nice thing with Excel is that when you change some value in A, like A2 = 10 and and later A5=10 then B7 would be 20
    Changing later a value like A3 =4 would recalculate quickly and re- totals the B column.
    Sharepoint Lists, calculated fields work only horizontally, so to do some vertical actions one needs a workflow, and do some lookup based upon (calculated previous) ID field, ea ID -1. Or stepp through to All ID's till current. What borders me a bit, is that
    my list will grow large at some point. So stepping through all ID's to sum them till current Item seams 'slow' to me, on the other hand if i only check the previous version then the whole column (B) wouldnt be recalculated, if someone changed an older entry.
    Extremly simplified i have a single list with the columns below (where stored act as my B column).
    bought | stored | sold
    0 | 5 | 0
    2 | 5 | 0  (raw products need to be manufactured before stored so they're added 1 by 1 later).
    0 | 6 | 0
    0 | 7 | 0
    0 | 4 | 3 (but when sold we can subtract directly from storage)
    Ofcourse i need some horizontal calculations because i need to track as well if there has been bought enough for production. But i wonder what would be Wise to do, base thing on current ID and ID minus 1, or to walk through all items by work flow (recalculate
    whole list), or like with changes; recalculate from current changed till the end  (not sure how to detect end yet.. but well something like that).
    I just wonder what would be wise here, and the best direction for this.
    The table i showed is a  extreme simplified, in fact also some other tables and workflows will be the feeders of the data.
    Its just that the whole thing makes me a bit worry and wonder what would be best, and maybe i oversee something maybe there are other ways for vertical calculations over lists.

    After lots of thinking, and seeing how slow office 365 SharePoint reacted upon my list workflows.
    I've decided to use a "site variables list", in which I store variables as rows and their value in a columns.
    And I refer to them by ID (or one could use another indexed unique value).
    It's maybe not an exact calculation of the whole thing (build around several lists) but everything is a lot faster then stepping trough each item in a huge list. And it also allows for a bit more easy tweaking of these "vertical" calculations.
    If for some reason those calculations would need adjustments (by change of management definitions), I have easy access to those variables to adjust them.
    On a side note, when I use those variables, it turned out it worked a bit better to create in the workflow local variables, then do the calculation, and put it in the right table you want those numbers to appear in. As compared to directly referring to the
    total. It takes just 5 sec or so to update. With this method size of the lists have no almost no impact on the speed of the workflow now.

  • Design advice for setting users default time

    I have an application that in a number of different places requires that records when being updated or created are shown to default to the user's current date. Depending on the location of the user, this could be a different day than where the server is.
    All of the relevant fields in the database tables are using a datatype of "TIMESTAMP WITH TIMEZONE". When a users account is initially created, the timezone that the user is in is saved. When the user logs on, an "alter session set time_zone" command runs on the database to change the time zone of the current session.
    When a user updates or creates a record and one of the field(s) requires to display the current date of the user, I call a ViewObject which runs a query to "select current_timestamp from dual" to return the current date from the database and populate the field with this.
    I've realised that I'm creating a considerable overhead as this view object may be queried dozens of times during a users session and was thinking of running it once when the user logs on and storing the "USER_DATE" as a session variable - then I can simply refer to this each time, instead of many round-trips off to the database. Obviously there is a risk if the user logs on just before midnight and stays on until after that the date will be incorrect but this is extremely unlikely as the application is only used during normal business hours up to 9pm as an exception
    Am I heading down the right track here or doing something daft (and missing something far more simple that I should be doing !)
    Cheers,
    Brent

    Hi Frank,
    Thanks for that - after 8 years of working with Oracle Forms and afterwards the same again with ADF, I still find it hard sometimes when using ADF to understand the best approach to a particular problem - there is so many different ways of doing things/where to put the code/how to call it etc... ! Things seemed so much simplier back in the Forms days !
    Chandra - thanks for the information but this doesn't suit my requirements - I originally went down that path thinking/expecting it to be the holy grail but ran into all sorts of problems as it means that the dates are always being converted into users timezone regardless of whether or not they are creating the transaction or viewing an earlier one. I need the correct "date" to be stored in the database when a user creates/updates a record (for example in California) and this needs to be preserved for other users in different timezones. For example, when a management user in London views that record, the date has got to remain the date that the user entered, and not what the date was in London at the time (eg user entered 14th Feb (23:00) - when London user views it, it must still say 14th Feb even though it was the 15th in London at the time). Global settings like you are using in the adf-config file made this difficult. This is why I went back to stripping all timezone settings back out of the ADF application and relied on database session timezones instead - and when displaying a default date to the user, use the timestamp from the database to ensure the users "date" is displayed.
    Cheers,
    Brent

  • Print Peyment advice for moe than 2 lines only

    Dear all,
    I would like to be able to print a Payment advice only if there are more than 2 items in the list. Should I set some restrictions in the Payment advice for customizing? What shoul dbe set exactly?
    Thank you very much,
    Desimira

    Hi,
    There is no standard solution to it.
    But there is one BTE (Business Transaction Event) available in transaction "FIBF > Settings > Products > of a Customer"
    There do the F4 on the BTE and you will find a BTE for the Automatic Payment Program - Document Selection.
    You can play your logic with the function module to be assigned for this BTE.
    Regards,
    Gaurav

  • Asking for advice for Jabber deployment - multi CUCM cluster\AD domains

    I would like some design advice for deploying Jabber and CUPS in our company. We have 2 locations, west coast (SiteA) and east coast (SiteB). Each site have their own CUCM 7.15 clusters, Unity clusters, AD domains (trusted, but not in the same forest).
    At SiteA I have setup CUPS (8.6.3.10000-20) and jabber and have it working great.
    I would like to setup CUPS\Jabber for SiteB, but they need to be able to IM\call\etc to SiteA (And vice-versa).
    SiteA and SiteB both have CUCM LDAP sync turned on, and LDAP directory synced with both domains (although SiteA cannot authenticate to CUCM at SiteB, and vice-versa due to the fact you can only LDAP sync authentication with one domain, CUCM user database contain users from SiteA and SiteB).
    We have SIP trucks setup to pass internal calls and line status(BLF) between the trunks, and can communicate via internal extensions just fine.
    The problem I’m running into is my jabber-config files uses the EDI directory – which can only look at one domain, so I cannot search the other domain. I believe  changing to UDS fixes this, but I understand it would require me to upgrade both CUCM clusters to 8.6.2 - unless I’m mistaken.
    I’m aware the desktop sharing will not work until CUCM is upgraded to 8.6.1 or 8.6.2.
    I’m wondering if anyone has any advice, or can confirm I’m on the right track. Thanks in advance!

    The thing that's important to understand is how CUP and Jabber build the XMPP URI. The URI has a left- and right-hand side; the left is the username while the right is the XMPP domain. CUP uses the LDAP attribute specified in CUCM's LDAP System page, sAMAccountName by default, for the left-hand-side. The right-hand side is the FQDN of the CUP cluster. Jabber must use the same values as CUP when displaying search results. Take note that nowhere in this process does the entire XMPP URI originate from the directory source.
    In your case you have two separate CUP clusters in two separate domains. This won't work because when a user searches for a contact in the directory using Jabber, the client will build the XMPP URI as [email protected]. Even if you got the other domain's user objects into the search results the right-hand-side of the URI would be wrong and the presence subscription would never succeed since the other cluster is in another domain. As such your first task must be to move the CUP clusters into the exact same fully-qualified DNS domain. Once this is done you can use Inter-Cluster Peering to build a larger XMPP network in which all users have the same presence domain. If you intend to do Inter-Domain Federation in the future this must be your public DNS domain, not your internal active directory domain. If you use a non-public DNS domain TLS handshake will never succeed for inter-domain federation requests.
    Once you have Inter-Cluster Peering in place you can use Active Directory Lightweight Directory Services (the new name for ADAM) to front-end both forests. Both CUCM clusters would need to import the full list of users representing both domains and the sAMAccountNames must be unique across both domains.
    Finally, you can instruct Jabber to use UDS and query it's local CUCM cluster which will be able to return a search result from both domains. Since the CUP clusters are peered in the same domain the XMPP URI can be built properly, the presence subscription can be routed to the correct cluster, and life will be good.
    By this point hopefully it's clear that EDI won't cut it since it would be limited to only returning search results from the local forest.
    Please remember to rate helpful responses and identify helpful or correct answers.

Maybe you are looking for

  • I keep getting and error message when i try to set up a new email in facetime. Has this happened to anyone else?

    My ipod touch and my iphone are both getting imessages and facetime to both devices. I don't want them to get the same messages so I tried to change the email address associated in the ipod, but I keep getting an error message when it tries to verify

  • Report to MS Power Point

    Hi Experts! We have a requirement where we need to generate a report output in MS Power Point. Can somebody please provide your inputs and suggestions on this? Are there any test programs to check on the same? Your help is highly appreciable. Thanks

  • View Access Denied

    Hi all, I created a custom workflow, with form and logic. I link to this custom workflow from the home page in the admin interface. I want to create my own capability for accessing this workflow. I added the capability using the admin UI, then set th

  • BINARY_RELATION_CREATE Relation Type

    Hi.. I am using FM BINARY_RELATION_CREATE in which I want to Store Business Document in MIGO. I saw some relationship type which are VONA and ATTA but it is used for Quotation and Attachment respectively. Please help where can I find or if you know t

  • DB2 stored proedure CF and DB GROUP

    i am new to cf and in a previous post i explained ny current problem which is that CFMX7 is not finding my stored procedure. I am using Dreamweaver 8. i am now looking at the database group and under stored procedures i have "NONE". under the tables