Synchronize two VO attributes. Best practices.

Hello, everyone.
I wonder what is the best solution for the following problem.
I my VO I have an attribute with name "Attr1" of type VARCHAR2. Also I have a field of type DATE on a page. I need bind the filed and Attr1. By this I mean that the value a user entered in that field must be stored in the attribute and the value of the attribute must be displayed in the field. The problem is obviously type mismatch. To enable correct conversion between UI and VO I must map some attribute of type DATE to that field. So I need to create an additional transient attribute Attr1tmp of type DATE and map it to the filed. The problem is how to synchronize Attr1 and Attr1tmp. My current solution is to copy value of Attr1 to Attr1tmp in processRequest method of my CO and Attr1tmp to Attr1 in processFormRequest which is not the best I guess.
Could you suggest me other approaches that you used in practice for such problem? I think of overriding methods getAnAttrTmp and setAnAttrTmp of *RowImpl. What is the safe way to do it?
Thanks in advance.
--wheleph                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

I've overridden VORowImpl like this:
public Date getAttribute1tmp()
String str = (String) getAttributeInternal(ATTRIBUTE1);
return XxUtils.stringToDate(str);
// return (Date)getAttributeInternal(ATTRIBUTE1TMP);
public void setAttribute1tmp(Date value)
setAttributeInternal(ATTRIBUTE1, XxUtils.dateToString(value));
// setAttributeInternal(ATTRIBUTE1TMP, value);
Methods of XxUtils perform type conversions.
Any objections?
--wheleph                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Select One Choice attribute' LoV based on two bind variables, best practice

    Hello there,
    I am in the process of learning the ADF 11g, I have following requirement,
    A page must contain a list of school names which is needed to be fetched based on two parameters, the parameters are student information been inserted in the previous page.
    I have defined a read only view "SchoolNamesViewRO", it's query depends on two bind variables :stdDegree and stdCateg.
    added that RO View as a view accessor to the entity to which the name attribute belongs, and then add LoV for the name attribute using the ReadOnly view,
    added the name attribute as Select One Choice to page2,
    and now I need to pass the values of the bind variables of the ReadOnly view,
    the information needed to be passed as the bind variables is inserted in the previous page, I could have the data as bindings attribute values in the page2 definition
    I have implemented the next two appraoches but both resulted in an empty list :
    * added ExecuteWithParams Action to the bindings of the page and then defined an Invoke Action (set refresh condition) in the executable s, set the default values of the parameters to be the attributes values' input value,
    in the trace I code see that the binding fetches correct values as supposed , but the select list appears empty, does the this execution for the query considered to be connected to the list ?
    * added a method to the ReadOnly view Imp java class to set the bind variables, then I define it as a MethodAction in the bindings , and then create an Invoke action for it , also the select is empty,
    if the query been executed with the passed variables, then why the list is empty? is it reading data from another place than the page!
    and what is the best practice to implement that requirement?
    would the solution be : by setting the default value of the bind variables to be some kind of Expression!
    please notice that query execution had the bound variables ( I see in the trace) are set to the correct values.
    would you give some hints or redirect me to a useful link,
    Thanks in advance
    Regards,

    please give me any example using backing bean .for example
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:form id="f1">
    <af:selectOneChoice label="Label 1" id="soc1" binding="#{Af.l1}"
    autoSubmit="true">
    <af:selectItem label="A" value="1" id="si1"/>
    <af:selectItem label="B" value="2" id="si2"/>
    </af:selectOneChoice>
    <af:selectOneChoice label="Label 2" id="soc2" disabled="#{Af.l1=='2'}"
    partialTriggers="soc1">
    <af:selectItem label="C" value="3" id="si3"/>
    <af:selectItem label="D" value="4" id="si4"/>
    </af:selectOneChoice>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    package a;
    import oracle.adf.view.rich.component.rich.input.RichSelectOneChoice;
    public class A {
    private RichSelectOneChoice l1;
    public A() {
    public void setL1(RichSelectOneChoice l1) {
    this.l1 = l1;
    public RichSelectOneChoice getL1() {
    return l1;
    is there any mistake

  • EJB + "transaction attributes" + "best practice"

    hi
    For EJBs, when you specify multiple transaction attributes for a single
    method, is the latest attribute taken or the first?
    for e.g. In Jbuilder8 in the container transaction section for an EJB,
    if i were to put
    Method Transaction attribute
    * Required
    getSomeThing() Supported
    As you can see all the methods were initially given the required attribute,
    and then the method getSomeThing() was given Supported. will the
    getSomething() method use Required or else Supported. Secondly, will this
    cause an extra overload (Transaction attributes are set and the again
    reset), is it a recommended best practice?
    suren

    getSomeThing() Supported
    As you can see all the methods were initially given
    the required attribute,
    and then the method getSomeThing() was given
    Supported. will the
    getSomething() method use Required or else Supported.It will use supported.
    Secondly, will this
    cause an extra overload (Transaction attributes are
    set and the againIt won't cause extra overload.
    reset), is it a recommended best practice?It really depends on your needs - what you're trying to achieve. There is no best practice for that it depends on the application you're building.
    Regards,
    Dimitar

  • Standby best practices

    Hi,
    1. Primary and Standby databases should be on different servers.
    2. The version of the OS of the primary and standby database should be the same.
    I know these two points are logical and best practices. Now my management wants to implement the setup on different flavours of AIX (5.3 and 6.1). I have already tried to convince that above two points are best practices, but they require some oracle documentation where it is mentioned.
    I tried searching some authentic documents, but couldn't locate. Has anybody some document to support the above two points?
    Thanks in advance.

    let me know your email id, i can send you my pdf's which i have.
    Here are AlejandroVargas notes
    blogs.oracle.com/.../gems/DataGuardPhysicalStandbystep.pdf
    blogs.oracle.com/.../How-to-open-the-standby-when-the-primary-is-lost.pdf
    blogs.oracle.com/.../How-To-Synchronize-Standby-When-Logs-Lost.pdf
    blogs.oracle.com/AlejandroVargas/gems/PhysicalStandbyActivatedRead.pdf
    blogs.oracle.com/.../how_to_synchronize_the_standby.html
    blogs.oracle.com/.../how_to_manually_open_the_stand.html
    http://www.google.com/search?q=standby&sitesearch=http%3A%2F%2Fblogs.oracle.com%2FAlejandroVargas%2F
    www.dba-oracle.com/t_standby_redo_log_recovery.htm
    blogs.oracle.com/.../gems/DataGuardBrokerandobserverst.pdf
    Creating a Standby Database on a new host [ID 374069.1]
    do Log Corruption While Using Netapps Filesystem With Default Setting of Filesystemio_options Parameter [ID 437005.1]
    Edited by: 3Amigos on Dec 13, 2010 2:43 AM

  • Best Practices for FSCM Multiple systems scenario

    Hi guys,
    We have a scenario to implement FSCM credit, collections and dispute management solution for our landscape comprising the following:
    a 4.6c system
    a 4.7 system
    an ECC 5 system
    2 ECC6 systems
    I have documented my design, but would like to double check and rob minds with colleagues regarding the following areas/questions.
    Business partner replication and synchronization: what is the best practice for the initial replication of customers in each of the different systems to business partners in the FSCM system? (a) for the initial creation, and (b) for on-going synchronization of new customers and changes to existing customers?
    Credit Management: what is the best practice for update of exposures from SD and FI-AR from each of the different systems? Should this be real-time for each transaction from SD and AR  (synchronous) or periodic, say once a day? (assuming we can control this in the BADI)
    Is there any particular point to note in dispute management?
    Any other general note regarding this scenario?
    Thanks in advance. Comments appreciated.

    Hi,
    I guess when you've the informations that the SAP can read and take some action, has to be asynchronous (from non-SAP to FSCM);
    But when the credit analysis is done by non-SAP and like an 'Experian', SAP send the informations with invoices paid and not paid and this non-SAP group give a rate for this customer. All banks and big companies in the world does the same. And for this, you've the synchronous interface. This interface will updated the FSCM-CR (Credit), blocking or not the vendor, decreasing or increasing them limit amount to buy.
    So, for these 1.000 sales orders, you'll have to think with PI in how to create an interface for this volume? What parameters SAP does has to check? There's an time interval to receive and send back? Will be a synchronous or asynchronous?
    Contact your PI to help think in this information exchange.
    Am I clear in your question?
    JPA

  • ColdFusion AIR Synchronization - Best practices

    I'm a long time ColdFusion developer who has put off learning Flex because I never had a need (not to mention the bad taste Flash left in my mouth in its early stages).  Now I'm jumping in because of its integration with Air+SQLite and Coldfusion9 that allows online/offline support.
    Really cool stuff, but to my knowledge there are only two blogs that have a post about how to do this synchronization (Jayesh's blog and Terrance's blog), both of which use the same sample application.  So I'm hoping there are experts on this subject (which is not entirely CF+Air sync related), can shed some light for me.
    My questions are from a best practice standpoint, primarily: where should all of this code go?  Let me be a little more specific (and I appologize in advance for my misuse of termonology, and my overall ignorance of OO ):
    In the example code there are two tables (AS classes): Address.as and Customer.as.  The contents of these files and the ORM concepts in general I understand.  However, the files are lodged in a folder called "onetoone" in the main "src" directory.  In a best practice scenario, should these be in a "model.vo" directory (assuming no other frameworks are being used)
    Also in the example code, all of the AS code that handles connecting to the back end, fetching, saving to SQLite and back to the server is in the main application mxml file "CFAIROfflineCustomerManagerApp.mxml".  I'm not a Flex developer yet, but I don't think this is good.  I guess it's fine for a simple 2 table scenario, but in real life this will become a huge beast.  How would this best be broken up into separate files?  I'm relatively new to OO, I get the concepts but haven't used it in a pure form in any production applications.  My initial inclination is to separate the code that deals with the CF back-end and the SQLite database into a "services" directory and all the code that pulls that data into the UI (and stuffs it back) into a "controllers" directory.
    Perhaps one of the many frameworks out there may clear things up for me?  I have been reluctant to use a framework at this point because I would like to understand better what they solve before choosing a framework.  Are there any examples of this new sync feature via cfair.swc in any of the popular frameworks?  I've searched, but turned up nothing.
    I think this is enough for now.  I like to keep my code really organized, and before I get too far into writing bad code in an unorganized way - I thought I'd ask for some guidance.  At least this way I can write bad code in an organized way!
    Thanks in advance for any advice, resources, etc...
    --Abram

    I'm a long time ColdFusion developer who has put off learning Flex because I never had a need (not to mention the bad taste Flash left in my mouth in its early stages).  Now I'm jumping in because of its integration with Air+SQLite and Coldfusion9 that allows online/offline support.
    Really cool stuff, but to my knowledge there are only two blogs that have a post about how to do this synchronization (Jayesh's blog and Terrance's blog), both of which use the same sample application.  So I'm hoping there are experts on this subject (which is not entirely CF+Air sync related), can shed some light for me.
    My questions are from a best practice standpoint, primarily: where should all of this code go?  Let me be a little more specific (and I appologize in advance for my misuse of termonology, and my overall ignorance of OO ):
    In the example code there are two tables (AS classes): Address.as and Customer.as.  The contents of these files and the ORM concepts in general I understand.  However, the files are lodged in a folder called "onetoone" in the main "src" directory.  In a best practice scenario, should these be in a "model.vo" directory (assuming no other frameworks are being used)
    Also in the example code, all of the AS code that handles connecting to the back end, fetching, saving to SQLite and back to the server is in the main application mxml file "CFAIROfflineCustomerManagerApp.mxml".  I'm not a Flex developer yet, but I don't think this is good.  I guess it's fine for a simple 2 table scenario, but in real life this will become a huge beast.  How would this best be broken up into separate files?  I'm relatively new to OO, I get the concepts but haven't used it in a pure form in any production applications.  My initial inclination is to separate the code that deals with the CF back-end and the SQLite database into a "services" directory and all the code that pulls that data into the UI (and stuffs it back) into a "controllers" directory.
    Perhaps one of the many frameworks out there may clear things up for me?  I have been reluctant to use a framework at this point because I would like to understand better what they solve before choosing a framework.  Are there any examples of this new sync feature via cfair.swc in any of the popular frameworks?  I've searched, but turned up nothing.
    I think this is enough for now.  I like to keep my code really organized, and before I get too far into writing bad code in an unorganized way - I thought I'd ask for some guidance.  At least this way I can write bad code in an organized way!
    Thanks in advance for any advice, resources, etc...
    --Abram

  • Best practice RAC installation in two datacenter zones?

    Datacenter has two separate zones.
    In each zone we have one storage system and one rac node.
    We will install RAC 11gR2 with ASM.
    For data we want to use diskgroup +DATA, normal redundancy mirrored to both storage systems.
    For CRS+Voting we want to use diskgroup +CRS, normal redundancy.
    But for CRS+Voting diskgroup with normal redundancy we need 3 luns and we have only 2 storage systems.
    I believe the third lun is needed to avoid split brain situations.
    If we put two luns to storage #1 and one lun to storage #2, what will happen when storage #1 faills - this means that two of three disks for diskgroup +CRS are unaccessible?
    What will happen, when all equipment in zone #1 fails?
    Is human intervention required: at failure time, when zone#1 is coming up again?
    Is there a best practice for a 2-zone 2-storage rac configuration?
    Joachim

    Hi,
    As far as voting files are concerned, a node must be able to access more than the half of the voting files at any time (simple majority). In order to be able to tolerate a failure of n voting files, one must have at least 2n+1 configured. (n= number of voting files) for the cluster.
    The problem in a stretched cluster configuration is that most installations only use two storage systems (one at each site), which means that the site that hosts the majority of the voting files is a potential single point of failure for the entire cluster. If the storage or the site where n+1 voting files are configured fails, the whole cluster will go down, because Oracle Clusterware will loose the majority of voting files.
    To prevent a full cluster outage, Oracle will support a third voting file on an inexpensive, lowend standard NFS mounted device somewhere in the network. Oracle recommends putting the NFS voting file on a dedicated server, which belongs to a production environment.
    Use the White Paper below to accomplish it:
    http://www.oracle.com/technetwork/database/clusterware/overview/grid-infra-thirdvoteonnfs-131158.pdf
    Also Regarding the Voting File and OCR configuration (11.2), when using ASM. How they should be stored?
    I recommend you read it:
    {message:id=10028550}
    Regards,
    Levi Pereira

  • UI Design - Best Practice when Two UIs Trigger Same Event

    I have an application that allows users to take actions using several methods - right-click context menu selection, menu bar selected, key strokes, etc. I was wondering if anyone had any suggestions as to teh best practices for handling this in Cairngorm...
    Is it best to dispatch the same Cairngorm event in several places? I know this is one of the major reasons to use MVC, but, I hate to create duplicate code - maintenance is pain.
    Would is be considered good practice to have the container that serves as a parent for the context menu, menu bar, etc. to listen for events from these components, and then dispatch the Cairngorm Event?
    Thanks.

    Would it be considered good practice to have the container that serves as a parent for the context menu, menu bar, etc. to listen for events from these components, and then dispatch the Cairngorm Event?
    Yes, this is described by Steven Webster in his series of articles on Cairngorm.
    Dispatching the same Cairngorm event from different locations is a perfectly regular practice. This is even an advantage. The same code (the command, the delegate) can be triggered from different places.

  • Best Practices on managing two icloud accounts

    Due to living in different countries, I require multiple icloud accounts. This is because some apps are available in the appstore of one country, but not the other. However, I find this also makes managing multiple devices more cumbersome. I was wondering if there are any other in a similar situation, who could share some best practices they've developed.
    For example:
    backing up to icloud
    iphoto streaming
    itunes
    purchases in appstore
    Thanks

    You're welcome.
    Can I import the same music into both iTunes instances.
    Yes, as long as your authorize the computer for each account that the music was purchased under, e.g- if the music was purchased under your account & you want the music in your wife's library, you would use her computer login, launch itunes, sign her out of itunes, sign in using your itunes account details, Store>Authorize this Computer, sign out, then sign her back in.
    Do I need to just add one new user
    Yes, and I assume you want full administrative powers, so you should set up your account as an administrator.
    Once you've set things up this way, transferring purchased content(Apps & music) is real easy. Simply launch itunes, sign out of whatever account you want to transfer the content to, sign in using the account that has the content on the phone, File>Transfer Purchases, sign out after doing so & then sign the other party back in.
    You also want to make sure that you disable auto sync when an iphone is connected under preferences in the edit menu. Do this for each login. You DO NOT WANT TO SYNC to each others account, just File>Transfer Purchases. That way you can share apps & music, which is permitted under the EUSLA for family members in the same household.

  • Two localizations of the same Best Practice on one instance on the same client

    Hi Gurus -
    I have a situation where I need to install the Food & Beverage Best Practice for more than one localization on the same instance.  This company has locations in more than one country and needs Best Practices for those countries.  Is it possible, for example, to install Best Practice F&B for US and Best Practice F&B for Germany on the same client on the same instance?  If so, how?  Also is there any documentation on this?
    Regards,
    Jim McCollum

    No one knows anything about this?

  • IPhone Best Practices - A Work In Progress

    Hello all. I've been tasked with introducing my coworkers into the inner workings of the iPhone, and there are a good number of pointers that I find myself saying over and over again. I'd like to share my best practices with everyone, as well as collect more pointers and opinions from the community at large.
    Care and Handling:
    First - wash your hands, often. Now I know we all do this often anyway, but I'd like to point out that a healthy amount of hand washing will really go a long way to keep your iPhone screen smudge free. The worst offender, unfortunately, is doughnuts. A small layer of sugar will render that area un-tappable, without any real indication that it has done so. If you are frantically tapping the screen on the iPod button and nothing is happening, clean your phone before you do a hard reset.
    Second - Pockets. Keeping your phone in your front pocket is natural and what most of us do. In these summer months, however, keeping your phone in a sweaty front pocket can do a good deal to the dirt level of the screen. If you find yourself cleaning your phone constantly, try a belt clip.
    Lastly - Battery Life. Your iPhone's battery life is in your hands, literally. Being aware of your power consumption and planning accordingly is going to be infinitely more important that the battery's native charge-holding ability. This goes especially for the day of purchase - as tempting as it may be to open the box and activate, immediately running around the house watching YouTube, it is best to let the phone charge for 12 hours before use. Charging the phone every night is an absolute must, skipping a day will kill the battery life as your ride the bottom edge the following day. Most of us have access to a USB port while we're at work, best idea will be to plug in your phone when you sit down at your desk.
    iPod:
    Large Libraries: In the opening weekend, I got many complaints that you cannot manually manage your music. There is a workaround that has made me change the way I work with all of my iPods: the iPhone specific playlist. Simply create a playlist with all of the music you wish to put on your phone and sync that one playlist. This also helps with sync time - you have a start sync and an end sync, not a constant sync all throughout your music management, slowing your computer down in the process.
    TV Shows: I watch a lot of MST3K, which I have organized into iTunes as TV shows, split into seasons, the works. The problem that has arisen, therefore, is the one of selective synchronization - you cannot specifically select the TV show you want to sync to the device, instead getting the choices to sync all, unwatched, or latest shows. This is problematic when each show is 700MB large. Here's the work around - select all of the episodes of a specific show and right click, selecting "Mark as Not New", removing all of the little blue dots from the episodes. Select the one, three, or five episodes, and right click them, selecting "Mark as New", then sync the last one, three, or five unwatched episodes. The shows you selected will sync.
    iPhoto:
    Many users are complaining that iPhoto opens whenever the phone is connected. This is not a preference of the phone, but rather iPhoto. Remember when you first launched iPhoto and it asked you if you wanted to use iPhoto whenever your camera was attached? iPhoto is detecting that your phone is a camera and launching, just as you told it to do.
    Mail:
    POP accounts - too many unread messages: When first adding a POP account, all of the messages downloaded to the phone arrive as unread. Tapping a message, tapping back, and then tapping the next message can get tedious. Here's the workaround - tap the small down arrow to the upper right hand side of the screen, watching closely to the number next to Inbox. When that number goes down by one, tap the arrow again. If that number hasn't gone down yet, wait a sec, and do not try to tap tap tap tap tap, you'll flood the input queue and crash Mail.
    Syncing Mail accounts - All too often people blame the iPhone when their mail does not work. A perfect test is sync you accounts from Mail. If they work in mail, they'll work on the phone, if they are unreliable in Mail, they will also be unreliable on the phone. The Mail client on the iPhone is just as powerful as any other mail client in terms of how it connects to mail servers, if you are having problems you need to check your settings before blaming the hardware. If you prefer to leave your install of Mail.app alone, create a new user account on your Mac, set up all of the accounts you want there, and use iTunes to sync that data to the phone. Make sure to remove that portion of sync from your actual user account's instance of iTunes, however, or it will all sync back.
    This message has not been downloaded from the server: This message has snagged a couple users, but upon investigation, these users have filled their iPhones to the absolute brim with music and video. It hasn't been downloaded from the server because there is no space to download to - this also applies to the Camera application dumping to the Home screen. Because there is no space, it can't add any new data. Make some room, then be patient as the mail client gets to that message in cleanup (often a sync or reboot will clear it up).
    Safari:
    Safari and iPod: Many users have reported iPod stopping in the middle of browsing, often pouting and pursing their lips crying, "This is terrible, I can't even browse the web and listen to music at the same time?". I then check their phone, and lo and behold they have upwards of eight separate pages open at the same time. This device (like every other computer out there) has a finite amount of memory, each page taking up a significant portion depending on how busy the page is. I've routinely gotten through entire albums while browsing through Safari, but I've got one page open in total, and it's usually mostly text. Keep it to one or two pages open and iPod will run forever if you let it.
    Web Apps: "This web app is terrible, it keeps booting me to Home!" When was your last reboot? How many other pages are open? In the same vein as Safari and iPod, Web Apps need a good deal of breathing room - give it to them. Close down other pages, stop iPod, or even reboot. Give the app a clean slate and it will perform, every time. iPhoneRemote users will attest to this.
    iCal:
    Multiple Calendars - Default Calendar: When adding a new appointment, it adds to the default calendar. Appointments can't be shunted to the correct calendar until after sync anyway, so create an "iPhone" calendar and make that the default. Because it's in that calendar, you'll know enough to move it to the appropriate calendar after sync.
    Please feel free to add your own best practices, and ask questions, too.

    is there any application you can get for the iphone to enlarge text and phone numbers ?
    If included with an email or on a website, yes with no application needed.
    If you are referring to the text size for your iPhone's contact list, no.
    can you insert a phone number from your contact list into a text message ?
    No.
    i cant seem to figure it out, does the alarm clock work if you turn off the phone at night,
    No - powered off with the iPhone means powered off. Any phone that provides for this is not powered off - it is in deep sleep or deep standby mode, which the iPhone does not support. If you don't want your phone ringing or don't want to receive SMS at night but you want to use the iPhone's alarm feature as a wake-up alarm, you can turn on Airplane Mode before going to bed, which will also conserve the battery if your iPhone is not plugged in at night.
    can you send a multi media text message ?
    No.

  • Best practice for dealing with Recordsets, JDBC and JSP?

    I've spent the last three years developing web apps using JSP, Struts and Kodo JDO for persistence. All of the content for the apps was created as Java objects using model classes and saved to an Oracle db. Thus, data retrieved from the db was as instances of the model classes and then put into Struts form beans, etc.
    I changed jobs last month and am now having to use Servlets with JDBC to retrieve records from db tables and returning it into Recordsets. Oh, and I can't use Struts in my JSPs either. I'm beginning to think that I had it easy at my previous job but maybe that's just because I was used to it.
    So here are my problems/questions:
    I have two tables with a one to many relationship that I need to retrieve data from, show in a jsp and be able to update eventually.
    So here's what I am doing:
    a) In a servlet, I use a SQL statement to join the tables and retrieve the results into a Recordset.
    b) I created a class with a bunch of String attributes to copy the Recordset data into, one Recordset row per each instance of the bean and then close the Recordset
    c) I then add the beans to an ArrayList and save the ArrayList into the session.
    d) Then, in the JSP, I retrieve the ArrayList from the session and iterate over each bean instance, printing the data out to the jsp. There are some logic statements to determine when not to print redundant data caused by the one to many join.
    e) I have not written the code to update the data yet but was planning on having separate jsps for updating the (one) table and the (many) table.
    Would most of you do something similar? Would you use one SQL statement to retrieve all of the data for display and use logic to avoid printing the redundant part of the data? Or would you have used separate SQL queries, one for each table? Would you have saved the results into something other than an instance of a bean class that represents one record in the RecordSet? Would you have had a bean class with attributes other than Strings - like had a collection attribute to hold the results from the "many" table? The way that I am doing everything just seems so cumbersome and difficult compared to using Struts and JDO before.
    Your help/opinion will be greatly appreciated!

    Would you use one SQL statement to retrieve all of the data for display Yes.
    and use logic to avoid printing the redundant part of the dataNo.
    I believe in minimising the number of queries. If it is a simple one-many join on a db table, then one query is better than one + n queries.
    However I prefer to store the objects in a bean class with attributes other than strings - ie one object, with a collection attribute to hold the related "many" records.
    Does the fact you are not using Struts mean that you have to use scriptlet code? (shudder)
    Or are you using JSTL, or other custom tags?
    How about tools like Ant? Junit testing?
    The way that I am doing everything just seems so cumbersome and difficult
    compared to using Struts and JDO before.Anything different takes adjusting to. Sounds like you know what you're doing for the most part. I agree, in terms of best practices what you have described so far sounds like a step backwards from what you were previously doing.
    However I wouldn't go complaining about it too loudly, too quickly. If you're new on the block theres nothing like making a pain of yourself, and complaining how backwards the work they have done is to put your new workmates' backs up
    Look on it as a challenge. Maybe discuss it quietly with a team leader, to see if they understand how much easier/better/less error prone such approaches can be?
    Struts, cumbersome as it can be, definitely has the advantage of pushing you to follow good MVC practice.
    Good luck,
    evnafets

  • Best practice for Tags

    Hello,
    In packaged applications Tags are used in most of the Apps. Eg. in Customer Tracker App, we can add tags to a customer where these tags are stored in a varchr2 column in the Customers Table.
    In my case, I have predefined tags for Properties (Real Estate) in a lookup table called TAGS . Eg, Full floor, Furnished, Fitted, Duplex, Attached... What is the best Practice to tag the properties:
    1- To store these tags in a varchar column in PROPERTIES table using Shuttle box.
    OR
    2- To store them in a third table Eg, PROPERTIES_TAGS (ID PK, PROPERTY_ID FK , TAG_ID FK ), Then use LISTAGG function to show the tags in one line in the Properties Report.
    OR
    Do you have a better option ??
    Regards,
    Fateh

    Fateh wrote:
    Hello,
    In packaged applications Tags are used in most of the Apps. Eg. in Customer Tracker App, we can add tags to a customer where these tags are stored in a varchr2 column in the Customers Table.
    In my case, I have predefined tags for Properties (Real Estate) in a lookup table called TAGS . Eg, Full floor, Furnished, Fitted, Duplex, Attached...These appear to me to be two different use cases. In the packaged applications the tags allow end users to attach free-form metadata to data for their own purposes (these are sometimes called "folk taxonomies"). Users may use tags for different purposes, or different tags for the same purpose. For example, I might add "Monday", "Thursday" or "Friday" tags to customers because those are the days they receive their deliveries. For the same purpose you might tag the same customers "1", "8", and "15" using the route numbers of the trucks making the deliveries. You might use "Monday" to indicate that the customer is closed on Mondays...
    In your application you are assigning known, predefined attributes to the properties. This is a standard 1:M attribute model. Displaying them using the tag metaphor does not make them equivalent to free-form user tags.
    What is the best Practice to tag the properties:
    1- To store these tags in a varchar column in PROPERTIES table using Shuttle box.If you do this, how do you:
    <li>Efficiently search for furnished duplex properties?
    <li>Globally change "fitted" to "built-in"?
    <li>Report the number of properties, broken down by full floor, duplex, fitted...
    OR
    2- To store them in a third table Eg, PROPERTIES_TAGS (ID PK, PROPERTY_ID FK , TAG_ID FK ), Then use LISTAGG function to show the tags in one line in the Properties Report.As Why to use Look up Table, this the correct way to do this. It enables the data to be indexed for efficient retrieval, and questions like those above should be handled simply using joins and grouping.
    You might want to investigate the possibility of eliminating the ID PK and using an index organised table for this.
    OR
    Do you have a better option ??I'd also look carefully at your data model. Ensure you're not flirting with the EAV anti-pattern. Should some/all of these values not simply be attributes on the property?

  • Best practice for having separate clone data for development purposes?

    Hi
    I am on a hosted Apex environment
    I have a workspace containing two instances/ copies of the application: DEV and PROD
    I would like to be able to develop functionality and data in/ with the DEV instance and then insert it into DEV.
    I gather that I can insert pages from DEV to PROD via Create -> New page as copy -> Page in another application
    But I don't know how I can mimic this process with database objects, eg. if I want to create a new table or manipulate the data in an existing table in a DEV environment before implementing in a PROD environment.
    Ideally this would be done in such a way that minimises changing table names etc when elevating pages from DEV to PROD.
    Would it be possible to create a clone schema that could contain the same tables (with the same names) as PROD?
    Any tips, best practices appreciated :)
    Thanks

    Hi,
    ideally you should have a little more separation between your dev and prod environments. At the minimum you should have separate workspaces each addressing separate schemas. Apex can be a little difficult if you want to move individual Apex application objects, such as pages, between applications (a much requested improvement), but this can be overcome by exporting and importing the whole application. You should also have some form of version control/backup of export files.
    As far as database objects go, tables etc, if you have tns access to your hosted environment, then you can use SQL Developer to develop, maintain and synchronize between your development and production schemas and objects in the different environments should have identical names. If you don't have that access, then you can use the Apex SQL Workshop features, but these are a little more cumbersome than a tool like SQL Developer. Once again, scripts for creating and upgrading your database schemas should be kept under some sort of version control.
    All of this is supposing your hosting solution allows more than one workspace and schema, if not you may have to incur the cost of a second environment. One other option would be to do your development locally in an instance of Oracle XE, ensuring you don't have any version conflicts between the different database object features and the Apex version.
    I hope this helps.
    Regards
    Andre

  • [CS5.5/6] - XML / Data Merge questions & Best practice.

    Fellow Countrymen (and women),
    I work as a graphic designer for a large outlet chain retailer which is constantly growing our base of centers.  This growth has brought a workload that used to be manageable with but two people to a never ending sprint with five.  Much of what we do is print, which is not my forte, but is also generally a disorganized, ad-hoc affair into which I am wading to try to help reduce overall strain.
    Upon picking up InDesign I noted the power of the simple Data Merge function and have added it to our repetoire in mass merging data sources.  There are some critical failures I see in this as a tool going forward for our purposes, however:
    1) Data Merge cannot handle information stored and categorized in a singular column well.  As an example we have centers in many cities, and each center has its own list of specific stores.  Data merge cannot handle a single column, or even multiple column list of these stores very easily and has forced us into some manual operations to concatenate the data into one cell and then, using delimiter characters, find and replace hard returns to seperate them.
    2) Data Merge offers no method of alternate alignment of data, or selection by ranges.  That is to say:  I cannot tell Data merge to start at Cell1 in one column, and in another column select say... Cell 42 as the starting point.
    3) Data merge only accepts data organized in a very specific, and generally inflexible pattern.
    These are just a few limitations.
    ON TO MY ACTUAL DILEMMA aka Convert to XML or not?
    Recently my coworker has suggested we move toward using XML as a repository / delivery system that helps us quickly get data from our SQL database into a usable form in InDesign. 
    I've watched some tutorials on Lynda.com and havent yet seen a clear answer to a very simple question:
    "Can XML help to 'merge' large, dynamic, data sets like a list of 200 stores per center over 40 centers based off of a single template file?"
    What I've seen is that I would need to manually duplicate pages, linking the correct XML entry as I go rather than the program generating a set of merged pages like that from Data Merge with very little effort on my part.  Perhaps setting up a master page would allow for easy drag and drop fields for my XML data?
    I'm not an idiot, I'm simply green with this -- and it's kind of scary because I genuinely want us to proceed forward with the most flexible, reliable, trainable and sustainable solution.  A tall order, I know.  Correct me if I'm wrong, but XML is that beast, no?
    Formatting the XML
    Currently I'm afraid our XML feed for our centers isnt formatted correctly with the current format looking as such:
    <BRANDS>
         <BRAND>
              • BrandID = xxxx
              [Brand Name]
              [Description]
              [WebMoniker]
              <CATEGORIES>
                   <CATEGORY>
                        • xmlns = URL
                        • WebMoniker = category_type
              <STORES>
                   <STORE>
                        • StoreID = ID#
                        • CenterID = ID#
    I dont think this is currently usable because if I wanted to create a list of stores from a particular center, that information is stored as an attribute of the <Store> tag, buried deep within the data, making it impossible to 'drag-n-drop'. 
    Not to mention much of the important data is held in attributes rather than text fields which are children of the tag.
    Im thinking of proposing the following organizational layout:
    <CENTERS>
         <CENTER>
         [Center_name]
         [Center_location]
              <CATEGORIES>
                   <CATEGORY>
                        [Category_Type]
                        <BRANDS>
                             <BRAND>
                                  [Brand_name]
    My thought is that if I have the <CENTER> tag then I can simply drag that into a frame and it will auto populate all of the brands by Category (as organized in the XML) for that center into the frame.
    Why is this important?
    This is used on multiple documents in different layout styles, and since our store list is ever changes as leases end or begin, over 40 centers this becomes a big hairy monster.  We want this to be as automated as possible, but I'd settle for a significant amount of dragging and dropping as long as it is simple and straightforward.  I have a high tollerance for druding through code and creating work arounds but my co-workers do not.  This needs to be a system that is repeatable and understandable and needs to be able to function whether I'm here or not -- Mainly because I would like to step away from the responsibility of setting it up every time
    I'd love to hear your raw, unadulterated thoughts on the subject of Data merge and XML usage to accomplish these sorts of tasks.  What are your best practices and how would you / do you accomplish these operations?
    Regards-
    Robert

    From what I've gleaned through watching Lynda tutorials on the subject is that what I'm hoping to do is indeed possible.
    Peter, I dont disagree with you that there is a steep learning curve for me as the instigator / designer of this method for our team, but in terms of my teammates and end-users that will be softened considerably.  Even so I'm used to steep learning curves and the associated frustrations -- but I cope well with new learning and am self taught in many tools and programs.
    Flow based XML structures:
    It seems as though as long as the initial page is set up correctly using imported XML, individual data records that cascade in a logical fashion can be flowed automatically into new pages.  Basically what you do is to create an XML based layout with the dynamic portion you wish to flow in a single frame, apply paragraph styles to the different tags appropriately and then after deleting unused records, reimport the XML with some specific boxes checked (depending on how you wish to proceed).
    From there simply dragging the data root into the frame will cause overset text as it imports all the XML information into the frame.  Assuming that everything is cascaded correctly using auto-flow will cause new pages to be automatically generated with the tags correctly placed in a similar fashion to datamerge -- but far more powerful and flexible. 
    The issue then again comes down to data organization in the XML file.  In order to use this method the data must be organized in the same order in which it will be displayed.  For example if I had a Lastname field, and a Firstname field in that order, I could not call the Firstname first without faulting the document using the flow method.  I could, however, still drag and drop content from each tag into the frame and it would populate correctly regardless of the order of appearance in the XML.
    Honestly either method would be fantastic for our current set of projects, however the flow method may be particularly useful in jobs that would require more than 40 spreads or simple layouts with huge amounts of data to be merged.

Maybe you are looking for

  • "unexpected additional time for review"...Any Ideas what this means?

    I received the following from apple, anyone know what it means, Have not heard from them since... I have 3 apps for sale and have not seen this before... are they just swamped? Or is this something specific to my app? Thoughts? thanks for reply micha

  • [SOLVED] Can't get rid of a wine-polluted text file icon [KDE]

    Hello folks, For some reason, my KDE system likes to use a Wine program based icon for all text files when I'm using a Faenza theme. The problem occurs only for my user (not root) so I think this is an user-specific issue. I've already checked .local

  • Need urgent help - Bex report

    Dear All, I am writing a query where I have a KF history and total history. The chars in rows are Product line and material. I have created a KF strut and put Cal yr/quat and fiscal yr in cols and in the KF strut I have History and Total history. I n

  • Please Fix your "Legacy Desktop" BUG!

    Windows 8 Best Desktop eXPerience Series My Videos have Timeline can jump to issues I don't Join any advertising plan, Click for free. Example: http://youtu.be/PHzMhjpLPwE http://youtu.be/ivX-ccNW7cs Timeline: 3:22, 3:30 (0:00 Microsoft Module only)

  • Workflow between FCP and Color

    I have been working on a 720P DVCPRO project. I am not sure what the work flow should be for adding in your color correcting stage. I have edited my project with speed ramps and different effects within Final Cut 6.02. When I rendered my files from C