Best practices on disabling fields?

Hello

I use jdev11R1. I have a page named (firstpage.jspx) jspx. This page is from unboundedTF.

I want to disable more than 15 fields on just one button. but here, each developer has a different approach to do so.

can any one of the experts said that's the best approach?

Developer 1 approach:

1. tell that we unite all the fields in your bean.

2. the inside button actionlistener bindvar.setDisabled (true).

2. Add the partial target programmatically.

Developer1 saying his advantage on his point of view:

1 ADF approach traditionally (create bindings). Apart from that I don't need any other substance

Developer 2 Approach:

1. I will create 15 variable in your return type of bean must Boolean as well as the get set accessor.

2. I'm having a common method public void endis (Boolean bool) {this.setVar (bool) ;}

3 inside of the actionlistener button, I'll call endis (true);

4. Add the partial target programmatically.

5. last step in all areas, I use el expersion as #{scopetype.beanname, var}

Developer 2 saying his advantage on his point of view:

1 Java approach traditionally (get set accessor).

2. in the future if I there is a change in condition as

-no need to disable all fields. just a few fields.

-Repeat the same thing to the other buttons.

ultimately without having to completely rewrite .little bit effort only.

3 Developer approach:

1. I have a variable pageFlowScope inside the actionlistener AdfFacesContext.getCurrentInstace.getPageflowScope.put('disable','y');

2. go in all fields have expression el as #{pageFlowScope.disable eq 'y'? true: false}

Developer3 saying his advantage on his point of view:

1. no need to link and no need for variable declaration, getter and setter in the bean. any piece of code

Developer1 perspective saying that following:
   --Developer2 doing having lot of code for disabling the fields.
   --Developer3 not best approach. because oracle docs saying that pageflowscope only for BTF. But pageflowscope works in unboundedTF also.





Developer2 perspective saying that following
  --Developer1 binding the each and every variable into the bean for disabling the fields. default binding take care of framework why should i do?
  --Developer3 anyhow it will create getter and setter for that by the framework. if scope value lost all will fails.



Developer3 perspective saying that following
  --Developer1 binding the each and every variable into the bean for disabling the fields. default binding take care of framework why should i do?
  --Developer2 having lot of code for disabling the fields.





"the bottom line of the developer discussion, I conclude.

each of them: I am the best. but each approach has own strength and weakness. »

My question will be

1. is there another approach outside these three?


before answering the second question. have these things in mind.

Point1. simple and reusable any developer.

Point2. use of resources (memory allocation).

Point3. less time to do the job. here after.

2. Please suggest how best approach in all of the perspective?

-edited lately, please pass once again,

Thank you

Developer 1 approach:

...

Developer1 saying his advantage on his point of view:

1 ADF approach traditionally (create bindings).

Since when does the traditional approach? Never bind the components to a bean if it is not really necessary! Do you have other solutions, this one is out of the race.

Developer 2 Approach:

...

Developer 2 saying his advantage on his point of view:

1 Java approach traditionally (get set accessor).

2. in the future if I there is a change in condition as

-no need to disable all fields. just a few fields.

-Repeat the same thing to the other buttons.

ultimately without having to completely rewrite .little bit effort only.

Yes, but what the likelihood you must change the fields to turn?

From my point of view, you put a lot of effort for something, you don't know if it will happen at all. Even if you know it comes it would be easier to form groups and use the group to toggle variable fields. You can then change a field to group a to group b without a lot of programming.

3 Developer approach:

...

Developer3 saying his advantage on his point of view:

1. no need to link and no need for variable declaration, getter and setter in the bean. any piece of code

You have even the code in the actionListener can you use a setPropertyListener for this. The question is why put the variable in the flowrate range of page? We do not know the use case to answer this question. Generally you shouldn't put anything in the pageFlowScope if she is not necessary outside the page. That we do not know. PageFlowScope is a broad field, so you should consider using a smaller if possible scope.

4. solution: put all the fields in a container. Write a method in bean method that activates / deactivates all the fields of a given container of seizure something like that

disable the rocker of all child uicomponents inside the given uiComponent

Private Sub (AdfFacesContext adfFacesContext, UIComponent component) {} toggleDisableInputItems

The list of items = component.getChildren ();

for (point UIComponent: items) {}

toggleDisableInputItems (adfFacesContext, item);

If (item instanceof RichInputText) {}

Entry RichInputText = point (RichInputText);

input.setDisabled (! input.isAutoSubmit ());

adfFacesContext.addPartialTarget (input);

} ElseIf (point instanceof RichInputDate) {}

Entry RichInputDate = point (RichInputDate);

input.setDisabled (! input.isAutoSubmit ());

adfFacesContext.addPartialTarget (input);

}

}

}

There are probably more solutions. I would stick with 3 or 4 depending on the use case.

Timo

Tags: Java

Similar Questions

  • Custom object of the quantities Record Field (best practices)

    Hello

    I've been searching but can't seem to find the best practices or recommendations on how many fields to the max may or must be in a single record from custom object. Is there someone out there who could give some information on this? or perhaps point me to some documents or articles on the subject?

    Thank you!

    You can take the class effective Marketing with the custom object class to better understand.  An excerpt from the guide of the student with the limitations thereon:

  • How to disable snapshots for domain controllers in ESXi 5? Or other best practices?

    Dear all,

    I need some aspects of assistance to the deactivation of snapshots for 2 VMS in my HA cluster running Active Directory to Windows 2008 R2.

    I read that best practices for virtual machines running that active Directory is never for them to snapshot.

    I'm worried about auto created by the systems periodically snapshots and the problem arises if a snapshot is to be reinstated by mistake.

    So, what are the best practices for virtual machines running as domain controllers? To deactivate the snapshot function or other recommended methods?

    Please kindly share. Thank you.

    Rgds

    Leslie

    leschua75 wrote:

    .

    I'm worried about auto created by the systems periodically snapshots and the problem arises if a snapshot is to be reinstated by mistake.

    VMware has no system automatically taking portraits.

    Snapshots exist either because you made them manually, an application backup created. In this case, talk with your backup vendor.

  • Best practices deployment CD to the internet non-connected PC

    Hello

    Are there things or best practices to be careful during the deployment of CD player on the internet non-connected PC? We currently use drive X, which we are patching regularly via a field startup script. Specifically, I want to know:

    (1) CD player can be deployed in the same way that we currently do for Reader X (i.e. first install the base of the file through msiexec.exe /i package in a startup script, and then install the latest hotfix files using msiexec /p also using a startup script)

    (2) CD player does require authentication via internet, or can that be disabled via Adobe Customization Wizard or group policy?

    (3) can I disable all related and all features which requires an internet connection via Adobe Customization Wizard or group policy for clouds?

    (4) at - it nothing another important to know?

    Thank you.

    Here are answers to your questions:

    (1) CD player can be deployed the same way we do it currently for Reader X (i.e. first install the basic package of the file through msiexec.exe /i in a startup script, and then install the latest hotfix using msiexec /p also using a startup script) - Yes, CD player can be deployed in the same way as the X drive. There is no difference.

    (2) CD player does require authentication via internet, or can that be disabled via Adobe Customization Wizard or group policy?  -No, only DC Acrobat requires it. However, CD player, is free and requires no all identifications.

    (3) can I disable all related and all features which requires an internet connection via Adobe Customization Wizard or group policy for clouds? -Yes, you can disable all cloud related features through the Customization Wizard or group policy

    Ben above mentioned, you must always keep your reader to update to the latest version which has the latest security related bugs.

    I hope that I have answered all your questions, and it helps. If you have any question, please report.

    Thank you

    Vinod

  • Just improved m tips on best practices for sharing files on a Server 2008 std.

    The field contains about 15 machines with two domain controllers, one's data is the app files / print etc...  I just upgraded from 2003 to 2008 and want to get advice on best practices for the establishment of a group of file sharing. Basically I want each user to have their their own records, but also a staff; folder. Since I am usually accustomed to using windows Explorer, I would like to know if these actions can be done in the best conditions. Also I noticed on 2008 there is a feature of contacts. How can it be used? I would like to message or send an email to users their file locations. Also, I want to implement an admin at a lower level to handle the actions without making them far in on the server, not sure.

    I read a certain bbut I don't like test direct more because it can cause problems. So basically a way short and neat to manage shares using the MMC, as well as the way that I approach their mail from the server of their actions. Maybe what kind of access cintrol or permissions are suitable also for documents. Also how can I have them use office templates without changing the format of the model.

    THX

    g

    Hello 996vtwin,

    Thank you for visiting the Microsoft Answers site. The question you have posted is related to Windows Server and would be better suited to the Windows Server TechNet community. Please visit the link below to find a community that will support what ask you:

    http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer

    Hope this helps J

    Adam
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • Best Practice Guide for stacked N3024 switches

    Is there a guide to BP for the configuration of the 2 N3024s stacked for the connections to the server, or is the same eql iscsi configuration guide.

    I'm trying to:

    1) reduce to a single point of failure for rack.

    (2) make good use of LACP for 2 and 4 nic server connections

    (3) use a 5224 with it's 1 lacp-> n3024s for devices of unique connection point (ie: internet router)

    TIA

    Jim...

    Barrett pointed out many of the common practices suggested for stacking. The best practice is to use a loop for stacking and distributing your LAG on multiple switches in the stack, are not specific to any brand or model of the switch. The steps described in the guides of the user or the white papers generally what is the recommended configuration.
    http://Dell.to/20sLnnc

    Many of the best practices scenarios will change of network-to-network based around what is currently plugged into the switch, and the independent networks needs / requirements of business. This has created a scenario where the default settings on a switch are pre-programmed for what is optimal for a fresh switch. Then recommended are described in detail in white papers for specific and not centralized scenarios in a single document of best practices that attempts to cover all scenarios.

    Express.ypH N-series switches are:
    -RSTP is enabled by default.
    -Green eee-mode is disabled by default.
    -Frother is enabled by default.
    -Storm control is disabled by default.

    Then these things can change based on the towed gear and needs/desires of the whole of society.

    For example, Equallogic has several guides that recommendations of configuration detail to different switches.
    http://Dell.to/1ICQhFX

    Then on the side server, you would like to look more like the OS/server role. For example a whitepaper VMware that has some network settings proposed when running VMware in an iSCSI environment.
    http://bit.LY/2ach2I7

    I suggest making a list of the technology/hardware/software, which is used on the network. Then use this list to acquire white papers for specific areas. Then use these white papers best practices in order to ensure the switch configuration is optimal for the task required by the network.

  • Connecting two 6224 separate batteries best practices LAG?

    Hello

    I wonder how I should configure LAG between two powerconnect 6224 batteries (2 x powerconnect 6224 by battery) for iSCSI against 4 members EQL traffic, I intend to use the 4 ports of each stack (stack cross-possible LAG on 6224?) and equallogic documentation leaves me in two minds when it wants to run LACP or not?

    I wonder what reviewed best practices in this scenario?

    Cross-stack, LACP and no PLEASE or am I better of without LACP?

    Thanks in advance

    Cree

    The ports connecting the two piles together will be configured differently than the ports of connection of the battery to the EQL appliance. During the connection of the control unit switch EQL is when you might want to disable STP on that specific port.

    «Do not use of Spanning Tree (STP) on switch ports that connect to the terminal nodes (iSCSI initiators or storage array network interfaces).» However, if you want to use STP or Rapid STP (preferable to STP), you must enable port settings available on some switches that allow the port immediately transition to PLEASE State reference to link up. This feature can reduce network interruptions that occur when devices to restart, and should only be enabled on switch ports that connect the nodes. "

    With the network cards on the EQL devices according to me, there is only one active port, and the other is pending. So on the switch ports that are plug on the EQL will be in access mode for your iSCSI VLANS. Maybe someone more about EQL can chime to confirm.

    Here are some good white pages.

    www.dell.com/.../Dell_EqualLogic_%20iSCSI_Optimization_for_Dell_Power_onnect_%20Switches.pdf

    docs.danielkassner.com/.../ISCSI_optimization_EQL.pdf

    www.Dell.com/.../EQL-8024f-4-Switch.pdf

  • Request for advice: generally speaking, what is the best practice for managing a paid and a free application?

    Hi all

    I recently finished my first app of cascades, and now I want to inspire of having a more feature rich application that I can then sell for a reasonable price. However, my question is how to manage the code base for both applications. Any have any "best practices", I would like to know your opinion.

    You use a revision control system? This should be a prerequisite...

    How the different versions of the application will be?

    Generally if you have two versions that differ only in terms of having a handful of features disabled in the free version, you must use exactly the same code base. You could even just it for packaging (build command) was the only difference, for example by adding an environment variable in one of them that would be checked at startup to turn paid options.

  • ATA187 Port unused 2 - best practices?

    Hello

    I am deploying some ATA187s connection to CUCM 9.1.

    I only need to use a port so the second port is not used, but I noticed from the ATA web page that it is trying to register with CUCM.

    What is the best practice for port 2? -is it ok to leave set to CUCM or is it recommended to create a phone ATA187 in CUCM with DN is fake?

    Or is it possible to disable the port 2?

    Thank you

    Hi James,

    Life expectancy is to treat you well buddy!

    For my 2 cents$ I prefer just to add a dummy DN to port 2 to keep

    sending of the zillions of record attempts. There is a way to disable the port

    (I'm sure) but I like just the path of least resistance especially when

    You can use the port next week

    See you soon!

    Rob

    "Why don't the best things always go away."

    -The band

  • Display the format US phone number - best practices

    JDeveloper 12.1.3

    -Telephone table has field VARCHAR2 with phone numbers. All records have exactly 10 numbers (characters) length

    -In the user interface, I want to show number xxx-xxx-xxxx, that is to say with af:outputText or similar device

    -observe that I am looking for display, and no to entry/edit phone number

    -in search of best practices

    What I did but am not satisfied:

    -In the t 3 has created a transitional attributes with the default SQL string. For example:

    Phone1To3: substr (Phones.Phone, 1, 3)

    Phone4To6: substr (Phones.Phone, 4, 3)

    Phone7To10: substr (Phones.Phone, 7, 4)

    Then in file jsff (the table component):

    <af:outputText value="#{row.Phone1To3}-#{row.Phone4To6}-#{row.Phone7To10}" shortDesc="#{bindings.Phones.hints.Phone.tooltip}" id="ot2222"/>
    

    Another way (better, easier)?

    In my view, that the best practice is to do your own converter in this case you will not need transitional attributes as you did. After doing a converter, you can add this converter inside outputText inputText. .. to display the required format

    To find out how a converter, you can check this url

    Sameh Nassar: Create custom converter

  • [ADF, JDev12.1.3] Best practices for maintaining a form validation

    Hallo,

    in my application, I need to create a registration form which contains fields that must be validated (for example they should follow a format like e-mail, phone number, tax code,...).

    If the data inserted by the user are ok, a new record in my custom db table Users will be created.

    I would like to know which are the best practices for maintaining the validation, which means the place where the controls must be made and a message to the user who fills out the form when something goes wrong.

    The best vo or EO or managed bean? Or some controls should be put in the OS, others in the VO and other in the managed bean?

    I would be happy if you could give me some examples.

    Thank you

    Federico

    Assuming you want the validation on the value of the field to any screen data can be entered in (and possibly web services that rely on the same BC ADF) then put the validation on the definition of the attribute in the EO.

    If you want to add a little more friendliness and eliminate some of the network traffic to the server, you can also implement the validation client in your page - for example by using the regular expression validator.

    https://blogs.Oracle.com/Shay/entry/regular_expression_validation

  • Best practices for the integration of the Master Data Management (MDM)

    I work on the integration of MDM with Eloqua and are looking for the best approach to sync data lead/Contact changes of Eloqua in our internal MDM Hub (output only). Ideally, we would like that integration practically in real time but my findings to date suggest that there is no option. Any integration will result in a kind of calendar.

    Here are the options that we had:

    1. "Exotic" CRM integration: using internal events to capture and queue in the queue changes internal (QIP) and allows access to the queue from outside Eloqua SOAP/REST API
    2. Data export: set up a Data Export that is "expected" to run on request and exteernally annex survey via the API SOAP/REST/in bulk
    3. API in bulk: changes in voting that has happened since the previous survey through the API in bulk from Eloqua outside (not sure how this is different from the previous option)

    Two other options which may not work at all and who are potentially antimodel:

    • Cloud connector: create a campaign questioning changes to schedule and configure a connector of cloud (if possible at all) to notify MDM endpoint to query contact/lead "record" of Eloqua.
    • "Native" integration CRM (crazy): fake of a native CRM endpoint (for example, Salesforce) and use internal events and external calls to Eloqua push data into our MDM

    Issues related to the:

    1. What is the best practice for this integration?
    2. Give us an option that would give us the close integration in real-time (technically asynchronous but always / event-based reminder)? (something like the outgoing in Salesforce e-mail)
    3. What limits should consider these options? (for example API daily call, size response SOAP/REST)

    If you can, I would try to talk to Informatica...

    To imitate the integrations of native type, you use the QIP and control what activities it validated by internal events as you would with a native integration.

    You will also use the cloud api connector to allow you to set up an integration CRM (or MDM) program.

    You have fields of identification is added objects contact and account in Eloqua for their respective IDs in the MDM system and keep track of the last update of MDM with a date field.

    A task scheduled outside of Eloqua would go to a certain interval and extract the QAP changes send to MDM and pull the contacts waiting to be sent in place of the cloud connector.

    It isn't really much of anything as outgoing unfortunately use Messaging.  You can send form data shall immediately submit data to Server (it would be a bit like from collections of rule of integration running of the steps in processing of forms).

    See you soon,.

    Ben

  • Unable to activate if disabled field once

    Hi all

    I developed a custom form in 10g for R12.1.3 applications.

    Registered and everything is ok with the applications.

    The form has 31 fields to enter hours OT, if the employee is on leave, then the respective fields get deactivees, while selecting the month (list).

    1. to disable fields from the days of leave. (trigger when-list-changed)

    -YES, TO DISABLE FIELDS ON DAYS OFF, THE CODE STARTS HERE
    DECLARE

    CURSOR C1 IS

    Select TO_CHAR (LEVEL - 1, "GFMD" + Start_date) AS DAYS

    de)

    SELECT employee_number, start_date, end_date

    OF v_leave_details

    where employee_number =: XXFUJOTHRS. EMPLOYEE_NUMBER-'5527 "

    )

    WHERE the arguments start_date + level 1 - > = TO_DATE ('01' |: XXFUJOTHRS.) OT_MONTH | : XXFUJOTHRS. OT_YEAR, "dd-mm-yyyy")

    AND start_date + LEVEL - 1 < LAST_DAY (TO_DATE ('01' |: XXFUJOTHRS.)) OT_MONTH | : XXFUJOTHRS. OT_YEAR, "dd-mm-yyyy")) + 1

    CONNECTION OF LEVEL < = 1 + end_date - start_date

    AND PRIOR employee_number = employee_number - or anything that is unique

    AND PRIOR start_date = start_date

    AND PRIOR SYS_GUID () IS NOT NULL;

    BEGIN

    FOR J IN C1 LOOP

    -DBMS_OUTPUT. PUT_LINE (J.DAYS);

    set_item_property ('OT_DAY' |) J.DAYS,, property_false);

    END LOOP;

    END;

    But I am faced with two questions.

    1. when I ask any employee, and if the employee has in months (Jan-14 for 1 to 10 days), days off (by pressing down) then other months also showing from 1 to 10 day off along with the disabled is days all the leaves in their respective months.

    2. If any employee back early before the end date, I say leave her is from 1st January 14 to January 10, 14, and he returned on 8 January 14, it has OT January 9, 14.

    So I kept a button as indicated in the form and the code is as below.

    Shutter button (When-button)-

    -TO MAKE THE FIELD ACTIVATE AGAIN IF THEY R DISABLED BY LEAVES

    DECLARE

    CURSOR C1 IS

    SELECT 1 + LEVEL - 1 DAYS

    OF THE DOUBLE

    CONNECTION OF LEVEL < = to_char (last_day (to_date ('01' |: XXFUJOTHRS.))) OT_MONTH | : XXFUJOTHRS. OT_YEAR, 'dd-mm-rrrr')), 'jj');

    BEGIN

    I'm in c1 LOOP

    -dbms_output.put_line (i.days);

    set_item_property ('OT_DAY' | i.DAYS,, property_true);

    END LOOP;

    END;

    This code works great, if you enter new record and press the button, but if you ask the same employee and you click on the button DISPLAY, the code above does not work.

    Please suggest this two questions.

    I tried keeping the codes in post-query-trigger also, same problem.

    Thank you and best regards,

    Afzal.

    Sorry

    Use set_item_property and pass the parameters of another and try as insert_allowed...

    Hope this will help you

  • Best-practice for hardware virtualization?

    Hardware virtualization is disabled by default when I create new virtual machines in my VMware clusters. But what are the best practices for this what settings are recommended? Are there reasons NOT to activate the hardware virtualization?

    IMO there is no advantage in allowing virtualization of hardware if you have no need for the virtual machine (for example, a virtual host of the ESXi).

    André

  • Best practices for HP DL385p G8

    Trying to find documentation for the implementation of a HP DL385p G8 for VMware Server. I would like to find a guide to best practices for this server? Been looking for but not found anything. I would like to find things are should hyperthreading turned on and so on. I use the ESXI from HP image for pilots, that all work but just want to find the settings.

    Thank you

    Hello

    you will find on this blog: BIOS settings in a VMware ESX (i) / vSphere environment. VirtualKenneth & #039; s Blog - hqVirtual | Quality rental a detailed explanation on all the BIOS settings and why you should enable or disable it.

    hope that helps.

Maybe you are looking for

  • What does the acronym FROSTED for?

    Hello I see the acronym FROSTED or OP so everywhere used instead during the sale to load of the cables for the devices, but I can not find any of the terms online dictionary which defines it.  Someone can tell me what he means and means? Thank you Wo

  • Make sure you have the latest firmware for cd or dvd burner

    I can't burn videos on my cd or dvd burner. He say make sure you have the latest firmware for cd or dvd burner. What can I do?

  • Cannot open files (desktop programs) *.exe

    When I try to open .exe files I get a message error that says "this file doesn't have a program associated with it for performing this action. Create an association in the Folder Options Control Panel. " I went to control panel > tools > folder optio

  • How can I get my computer back to factory settings?

    my computer is slow and I want to restore it back to factory settings, so this has nothing about it except the important things, like when you get everything first... does anyone know how to do this?

  • MPLS transport

    I'm really confused where MPLS is located in the network stack We have Frame Relay on T1s and migrate to MPLS and MPLS service will be delivered over Frame Relay. I do not understand this because I keep reading about how MPLS has all but usurped Fram