[ADF, JDev12.1.3] What is the right approach to manage the Value property of a Date of entry through a bean?

Hallo,

I created a custom search form by dragging on the CIU af:inputText and af:inputDate.

I have some difficulties in the treatment of af: inputDate CIU.

I've linked the Value of each af:inputDate property to a Date variable in a range backingBean bean.

It is the correct type of Date or can I use the String type?

When the user clicks the button to search for the form of the search_action in the bean creates the query with parameters (identified by (?) because I am using SQL Server as DBMS).

Then, I need programmatically check the values of af: inputDate CIU and then use them to define the query parameters.

Are there property should I settle for FA: inputDate CIU to "do a good job? For example Valdiator, converter...?

I see that when I use the calendar of af: inputDate, the field is entered in the format dd/mm/yyyy is good for me but I'm not able to uderstand how to treat the value to check by program and then use it to set a parameter to the query of VO.

I also want to set the initial value of some CIU af:inputDate in the bean. It takes for example the 1st of the month 6 months ago. What code would I use to do this?

You could you kindly help me (better if give me a simple example)?

Thank you

Federico

I've linked the Value of each af:inputDate property to a Date variable in a range backingBean bean.

It is the correct type of Date or can I use the String type?

Date type is correct.

Are there property should I settle for FA: inputDate CIU to "do a good job? For example Valdiator, converter...?

Well, if you need validate the date, then you will need validator (or check the value in managed bean)

It goes the same for the converter.

I see that when I use the calendar of af: inputDate, the field is entered in the format dd/mm/yyyy is good for me but I'm not able to uderstand how to treat the value to check by program and then use it to set a parameter to the query of VO.

In your beans, you will get the Date value, so no matter how it is displayed on the user interface.

To date handling, you can use standard java api as java.util.Calendar

I also want to set the initial value of some CIU af:inputDate in the bean. It takes for example the 1st of the month 6 months ago. What code would I use to do this?

Use standard java api to calculate the new date, then assign accessor value in your bean (for example, in the constructor of the bean)

Dario

Tags: Java

Similar Questions

  • [ADF, JDev12.1.3] Scope of session bean: it can contain attributes related to the Value property of user interface components?

    Hallo,

    I have a defined session bean in which I put a string attribute that is bound to the Value property of an InputText in my testPage.

    public class SessionClass {
    
      private String text;
    
      public void setText(String text) {
        this.text = text;
      }
    
      public String getText() {
        return text;
      }
    }
    

    When I run the testPage, it is not displayed.

    Perhaps this kind of linking is not possible?

    Thank you

    Federico

    Never use prefix in scope to the standard servlet scopes (request, session, application)

    So it would be: #{sessionClass.text}

    Dario

  • What is the best strategy to migrate data from Windows to one Mac to another? I use Parallels Desktop to run Windows on my current Mac but want to use Bootcamp on my new.

    What is the best strategy to migrate data from Windows to one Mac to another? I use Parallels Desktop to run Windows on my current Mac but want to use Bootcamp on my new.

    If it is only the data (not apps) I use Dropbox. It turned out to be the best way to move things between the side Mac and the bootcamped Windows of my iMac side. I don't see why it would not work to move data from a virtual machine installation of Win to a BootCamp installation.

  • What is the value of registry key "Default" in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

    What is the value of registry key "Default" in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

    Hello

    (Default)                            REG_SZ (value not set)
    {3D644C9B-1FB8-4f30-9B45-F670235F79C0} REG_EXPAND_SZ %PUBLIC%\Downloads
    Common AppData REG_EXPAND_SZ ProgramData %
    Common REG_EXPAND_SZ Office %PUBLIC%\Desktop
    Common REG_EXPAND_SZ %PUBLIC%\Documents Documents
    Common programs REG_EXPAND_SZ %ProgramData%\Microsoft\Windows\Start start\program
    Common Start Menu REG_EXPAND_SZ %ProgramData%\Microsoft\Windows\Start Menu
    Common Startup REG_EXPAND_SZ %ProgramData%\Microsoft\Windows\Start Menu\Programs\Startup
    Common models REG_EXPAND_SZ %ProgramData%\Microsoft\Windows\Templates
    REG_EXPAND_SZ CommonMusic %PUBLIC%\Music
    REG_EXPAND_SZ CommonPictures %PUBLIC%\Pictures
    REG_EXPAND_SZ CommonVideo %PUBLIC%\Videos

    You can do a Reg file copying between the lines and paste into Notepad and save as a. REG file as
    UserShellFolders.REG

    --------------------------------------------------------------------------------------------

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\User Shell Folders]
    "Common Desktop" = hex (2): 25, 00, 50, 00, 55, 42, 00, 00 4 c 00, 49, 00, 43, 00, 25, 00, 5 c, 00,------.
    44,00,65,00,73,00, 6B, 00, 74, 00, 6f, 00, 70, 00, 00, 00
    "Common document" = hex (2): 25, 00, 00, 50, 00, 55, 00, 42, 00, 4 c, 49, 00, 43, 00, 25, 00, 5 c,
    00,44,00, 6f, 00, 63, 00, 75, 00, 6 d, 00, 65, 00, 6F, 00, 74, 00, 73, 00, 00, 00
    "CommonPictures" = hex (2): 25, 00, 50, 00, 55, 42, 00, 00 4 c 00, 49, 00, 43, 00, 25, 00, 5 c, 00,------.
    50,00,69,00,63,00,74,00,75,00,72,00,65,00,73,00,00,00
    "CommonMusic" = hex (2): 25, 50, 00, 00, 55, 00, 42, 00, 4 c 00, 49, 00, 43, 00, 25, 00, 5 c, 00, 4 d,
    00,75,00,73,00,69,00,63,00,00,00
    "CommonVideo" = hex (2): 25, 00, 50, 00, 55, 42, 00, 00 4 c 00, 49, 00, 43, 00, 25, 00, 5 c, 00, 56,------.
    00,69,00,64,00,65,00, 6f, 00, 73, 00, 00, 00
    "{3D644C9B-1FB8-4f30-9B45-F670235F79C0}" = hex (2): 25, 50, 00, 00, 55, 00, 42, 00, 4 c, 00,------.
    49,00,43,00,25,00 5 c 00, 44, 00, 6f, 77, 00, 00, 6F, 00, 6 c, 00 6f 00 61 00, 64, 00, 73,------.
    00,00,00
    "Common Start Menu" = hex (2): 25, 00, 50, 72, 00, 00 6f 00, 67, 00, 72, 00, 61, 00, 6 d, 00, 44,------.
    00,61,00,74,00,61,00,25,00, 5 c, 00, 4 d, 00, 69, 00, 63, 00, 72, 00, 6f, 00, 73, 00, 6f, 00,------.
    66,00,74,00 5 c 00, 57, 00, 69, 00, 6F, 00, 64, 00, 6f, 77, 00, 00, 73, 00, 5 c, 00, 53, 00, 74,------.
    00,61,00,72,00,74,00,20,00, 4 D, 00, 65, 00, 6F, 00, 75, 00, 00, 00
    "Joint programmes" = hex (2): 25, 50, 00, 00, 6f 72, 00, 00, 67, 00, 72, 00, 61, 00, 6 d, 00, 44, 00,------.
    61,00,74,00,61,00,25,00, 5 c, 00, 4 d, 00, 69, 00, 63, 00, 72, 00, 6f, 00, 73, 00, 6f, 00, 66,------.
    00,74,00 5 c 00, 57, 00, 69, 00, 6F, 00, 64, 00, 6f, 77, 00, 00, 73, 00, 5 c, 00, 53, 00, 74, 00,------.
    61,00,72,00,74,00,20,00, 4 d, 00, 65, 00, 6F, 00, 75, 00, 5 c, 50, 00, 00, 72, 00, 6f, 00, 67,.
    00,72,00,61,00, 6 D, 00, 73, 00, 00, 00
    "Common Startup" = hex (2): 25, 00, 50, 72, 00, 00 6f 00, 67, 00, 72, 00, 61, 00, 6 d, 00, 44, 00,------.
    61,00,74,00,61,00,25,00, 5 c, 00, 4 d, 00, 69, 00, 63, 00, 72, 00, 6f, 00, 73, 00, 6f, 00, 66,------.
    00,74,00 5 c 00, 57, 00, 69, 00, 6F, 00, 64, 00, 6f, 77, 00, 00, 73, 00, 5 c, 00, 53, 00, 74, 00,------.
    61,00,72,00,74,00,20,00, 4 d, 00, 65, 00, 6F, 00, 75, 00, 5 c, 50, 00, 00, 72, 00, 6f, 00, 67,.
    00,72,00,61,00, 6 D, 00, 73, 00, 5 C, 00, 53, 00, 74, 00, 61, 00, 72, 00, 74, 00, 75, 00, 70, 00,------.
    00.00
    "Common AppData" = hex (2): 25, 00, 50, 72, 00, 00 6f 00, 67, 00, 72, 00, 61, 00, 6 d, 00, 44, 00,------.
    61,00,74,00,61,00,25,00,00,00
    "Models of communes" = hex (2): 25, 50, 00, 00, 6f 72, 00, 00, 67, 00, 72, 00, 61, 00, 6 d, 00, 44,------.
    00,61,00,74,00,61,00,25,00, 5 c, 00, 4 d, 00, 69, 00, 63, 00, 72, 00, 6f, 00, 73, 00, 6f, 00,------.
    66,00,74,00 5 c 00, 57, 00, 69, 00, 6F, 00, 64, 00, 6f, 77, 00, 00, 73, 00, 5 c, 00, 54, 00, 65,
    00, 6 D, 00, 70, 00, 6 C 00, 61, 00, 74, 00, 65, 00, 73, 00, 00, 00

    ------------------------------------------------------------------

    Hope these helps.

    Rob - bicycle - Mark Twain said it is good.

  • What is the value of a registry entry "PromptRunasInstalNetPath" Windows for?

    What is the value of a registry entry "PromptRunasInstalNetPath" Windows for?

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies]

    "PromptRunasInstalNetPath" = DWORD: 00000001; Guest ' run as ' install Net way -?

    It is not yet in the "WindowsServer2008R2andWindows7GroupPolicySettings.xlsx" Microsoft Excel spreadsheet Data-Base; so that is it for exactly?

    Ditto for the following RegEntries 3:

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Network]

    "NoWorkgroupContents" = DWORD: 00000000. No content of working group -?

    "NoFileSharing" = DWORD: 00000001; No file - sharing?

    "NoPrintSharing" = DWORD: 00000001; No print sharing -?

    JPD

    Hi JPD.

    Thank you for visiting the Community Forums of Microsoft.

    We don't have enough resources to provide a good explanation for this query. It is better suited for the professionals on the TechNet Forums. So, please post your question on the Forums Pro TechNet Windows 8 IT from this link:

    http://social.technet.Microsoft.com/forums/Windows/en-us/home?category=w8itpro

    Hope this information is useful.

  • What is the value of the PublicKeyToken for managed Oracle Driver 4.121.2.0

    What is the value of the PublicKeyToken for managed Oracle Driver 4.121.2.0?

    For version 1, it was

    type="""Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version = 4.121.1.0, Culture = neutral, PublicKeyToken = 89b483f429c47342"" " / >

    Well the token seems to always work for ODAC 12cR3 worm 4.121.2.0

    Type = "Oracle.ManagedDataAccess.client.OracleClientFactory, Oracle.ManagedDataAccess, Version = 4.121.2.0, Culture = neutral, PublicKeyToken = 89b483f429c47342" / > "

  • Simple question? What is the value proposition of Muse, which makes the special muse? I just want to see what think

    What is the value proposition of Muse, which makes the special muse? I just want to see what people think.

    Please refer to the explanation of Brian on the product:

    https://forums.Adobe.com/message/4580442

    Thank you

    Sanjit

  • What is the value of GLOBAL_DBNAME in the listener.ora?

    SQL> select * from v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    
    SQL> 
    SQL> 
    SQL> show parameter db_name
    
    NAME                         TYPE      VALUE
    ------------------------------------ ----------- ------------------------------
    db_name                      string    Oracle11
    SQL> show parameter service_names
    
    NAME                         TYPE      VALUE
    ------------------------------------ ----------- ------------------------------
    service_names                        string      primary
    SQL> 
    SQL> 
    SQL> ho
    [oracle@primary admin]$ 
    [oracle@primary admin]$ cat listener.ora
    # listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (GLOBAL_DBNAME = primary)                        ================> Note Here , i asked this parameter .
          (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
          (SID_NAME = primary)
        )
      )
    
    LISTENER =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.178)(PORT = 1525))
      )
    
    ADR_BASE_LISTENER = /u01/app/oracle
    
    [oracle@primary admin]$ 
    [oracle@primary admin]$ 
    [oracle@primary admin]$ exit
    exit
    
    SQL> 
    in my option, I think the value of GLOBAL_DBNAME is equal to the value of DB_NAME. But it is a mistake, the remote client cannot connect to the database.
    When its value is equal to the value of noms_service, the remote client can connect to the database.

    What is the value of GLOBAL_DBNAME in the listener.ora?
    GLOBAL_DBNAME     The global database name is a concatentation of a domain and a database name. The GLOBAL_DBNAME is the same as SERVICE_NAMES parameter in the parameter file or a concatentation of the DB_DOMAIN and the DB_NAME parameters in the parameter file. For example, .xyz.com. Do not set the GLOBAL_DBNAME parameter in the listener.ora file when using failover / TAF or when using multiple listeners or Oracle Parallel Server. Setting the GLOBAL_DBNAME parameter under these circumstances will disable failover and TAF.
    

    from: http://oracledba.ezpowell.com/oracle/net8Listener.html

  • What is the dynamic property used to retrieve the IP address of the CV?

    What is the dynamic property used to retrieve the IP address of the CV?

    If we get as below as we get VM kernel Port Group

    HostSystem - & gt; HostListSummary - & gt; managementServerIp

    But how do we get Service Console port group?

    Let me know thanks in advance.

    Hello

    Is your VC a harware installed or is installed in a virtual machine?

    If it is based on a material maybe you can retrieve it with

    ->->-> HostNetworkInfo HostNetworkSystem HostConfigManager HostSystem (or config)

    There is a portgroup HostPortGroup entity, but I'm a noob and never did.

    Maybe it helps.

    Christian

  • What is the value of OPTIMIZER_INDEX_CACHING?

    Hello

    Can you guys please tell me how can I know what is the value of the parameters such as OPTIMIZER_INDEX_CACHING or OPTIMIZER_INDEX_COST_ADJ? I intend to start playing with them to see the results by changing plans, but I want to be able to put them to the previous values?

    Thank you

    A Google search is useful in searching for the terms: see the value of the parameter OPTIMIZER_INDEX_CACHING
    http://www.Google.com/search?q=show+parameter+value+optimizer%5fINDEX%5fCACHING+

    Is is also possible to query V$ PARAMETER.

    Charles Hooper
    IT Manager/Oracle DBA
    K & M-making Machine, Inc.

  • IM new to LabVIEW. Is it possible to send the signal to more than one parcel on a chart by using the value property of the graph node

    I'm new to LabVIEW. IAM trying to display two plots on a graph using the node property value charts. I tried to feed the two signals into a signal of fusion and then in the value property node, but it did not work. Then I tried to build a table of two signals and it powers the value of hardware node. It did not work. What escapes me, should I use the node property value this way?


  • [ADF, JDev12.1.3] What options are there in JDev to avoid write values of constant "in the clear" when writing of the code?

    Hallo (and sorry if this is in part a matter of 'Java');

    I am originally from C++ programming where a directive 'set' can be used to give a name to a constant value: when coding this allows you to use the name instead to write the value in the clear.

    For example

    In C++ , we have:

    file costants.h

    #define TYPE_PERSON 1

    #define TYPE_INDUSTRY 2

    //...

    In Java , I guess I should use a class such as:

    / / file myCostants.java

    Class myCostants {}

    public static final int TYPE_PERSON = 1;

    public static final int TYPE_INDUSTRY = 2;

    //...

    {static()}

    }

    I would like to know if it's the same thing in JDev or if the framework offers more options.

    Thank you

    Federico

    The same thing in ADF also. If you use a text string /, it should be defined as constants as you said (public static final) or it must come from resource group.

    Thank you

  • [ADF, JDev12.1.3] Which is the best way to define the properties of CIU/fragments of pages. Is the approach that I have used a good choice (for a beginner)?

    Hallo,

    in my app, that I have a lot of pages and fragments in which properties (for example rendered text, disabled, Selected,...), lots of user interface components must be set, before/when the page is displayed, depending on the session and pageFlow scope attributes.

    So far I have created for each page/one backingBean brought bean fragment in which I defined an attribute for each property defined (e.g. 2 properties for each UIC: UIC is 10...) "I have 20 attributes to manage in the bean).

    Then, I linked each attribute of the bean to the respective UIC property. You can see in this my thread (unfortunately without answers ) [ADF, JDev12.1.3] backingBean bean: a lot of properties to set for lots of CIU... is better by using the properties of the binding or access code (created by ID) UIC? a small example. I put the attributes the bean Builder (or in a function of 'action' if the APP properties must be set based on the interaction of the user).

    I would like to know:

    • If it is a good approach / recommended / safe or if there is a better way;
    • If the scope backingBean is OK, or if a larger scope would be better.

    As I asked in the thread in the link above, the situation can become difficult to manage if the PPP for which setting, properties are very different.

    So I'd like if there is no alternative that I can use to get the same result with less effort.

    For example, using the class ComponentReference or invokeOnComponentAPI could simplify my life? And their use could I always use backingBean brought beans?

    Thank you

    Federico

    Federico, please understand that this forum has no sla. I have other work to do, who pays my bills. I will do my best to help, but you can not expect the instant replay.

    (1) you must not use the bean to init your beans. You can delay load or init your beans instead.

    (2) as Frank and says you can use a bean to view range and use it to make your calculations as long as you know how their parameters go to the btf

    (3) you should always use the reference of the component if you bind a component to a bean. Make a habit of all scopes.

    As we do not know how you calculate the State and how often it changes while the Working Group is on the page, it is difficult to give further advice.

    Timo

  • [ADF, JDev12.1.3] Page of the input parameters: 1) expression for a value of type enum? (2) can they be used to initialize CIU?

    Hallo,

    I have a backingBean extended myBean bean 'associate' to a page fragment used in a stubborn workflow.

    I want to declare to the fragment in the settings of btf 2 who have a fixed value. Their values should be copied in 2 myBeanattributes.

    An attribute is Boolean, and I guess it does not give any problem, but the other is to an enum type that is defined in the myBean bean itself.

    I have to write in "value *" pass the enum value to var enum in myBean?

    And if the "value *" have been a public static final string of a Java class in the application Module which expression I should use?

    I would like to use parameters of entry Page to initialize (hide, show,...) in myBean some component of the user interface in the page fragment? Is this possible without intervention in any problem? Can kindlu give you some tips to achieve this?

    Thank you

    Federico

    It also works with range backingBean?

    I don't know (I just created a few vars inside managed bean in my application of playground).

    The fragment contains a search with table form and it's always the same, whereas the bean (containing the search called action when the user clicks on the button 'Search') should take the page settings to compose the search query according to them.

    Yes, but that are not exactly 'page settings' because you retrieve the values of the url of the page, right?

    In conclusion, the problem is that I should switch to the different settings depending on the btf bean where the fragment is used.

    You have a better idea to achieve this?

    Then why you are not using the BTF settings (they will be in pageFlowScope)

    Dario

  • What is the best method to add data to a file stored on a usb flash drive to avoid too many write cycles?

    Hello

    I'm trying to store an important data on a cRIO sampled stream in the USB flash drive.

    I believe that there are two ways to add data to a file:

    1. open the file outside of the loop, then write to the file loop, then close the file outside the loop.

    Pros; More quickly and efficiently than the opening and closing of files in a loop is resource heavy equipment.

    Disadvantages; If the program fails partially through, all data is lost.

    2. open the file, write to the file and close the file, all in the loop.

    With the advantages and disadvantages as opposed to option 1.

    As my cRIO is finally deployed in a hostile environment and data are valuable and processing speed is not an issue of concern in this project, I'm leaning towards option 2, but after a few basic calculations that I realize that I'll be writing/opening/closing the file of thousands of times and I wanted to know if this will wear out the flash memory?

    My uncertainty is due to not understanding what happens when a file is opened written to and closed.  He writes the new data to new areas of the flash, or it write all data on top?  The latter would cause me problems not too long term!

    Any help gratefully received.

    A big thank you and best regards,

    Ed

    The 'magic' is not in the File Format (PDM vs vs binary text), but in the "life" of the file.  This solution creates a file of 24 hours and maintains a different file for each day.  If the USB "dies", you lose everything you have not backed up somewhere.  If the program dies (or errors), you lose the data for the current day.  You end up with multiple files (which can be a more or less), but we must still make the trade-off between (duration) of the file and the file number opens (which relates to your concern for the longevity of the USB).  By the way, I suspect that a good quality USB key (it's what you mean, right?  Or do you mean a hard drive USB powered?  Comments probably apply both) can predict today to not die on you, everything just because you make a lot of reads/writes (of course, you could get in-a-thousand...).

    Bob Schor

Maybe you are looking for

  • Virus check?

    How can I check if a virus has been installed on my mac from a .scr file?

  • Satellite L855 - 10 p - USB do not work because the BIOS update

    Hello The other day that I've updated my BIOS on my Toshiba satellite L855 - 10 p and since my key usb stopped recognizing devices! I already tried everything I found on the web, contacted Toshiba support who gave me a link to the drivers usb etc and

  • security software reloading

    the latest info error I got was the software was defective and to reload the security software... because my office is now all black, I can't to the control panel to install the safety program. I have another user I can login, but my page has disappe

  • BlackBerry OS 9650 Smartphone message update on text message fees increased?

    All, I support a group of lawyers with BlackBerrys. One of them came to me this morning and said that his 9650, you are prompted for an OS to date this weekend (she is on the Verizon network). Once completed, she received a text message and she said

  • ESXi - impossible to activate a vmnic card

    Hi all, I have a problem on my server ESXi...I would use two physical network interfaces to connect to my server to two different networks.I tried to set up two separate switches, logically related to two separate network interfaces.Unfortunately, as