[ADF, JDev12.1.3] Model engine SelectOnChoiche should auto filling when it contains only 1 item
Hallo,
I have a model piloted by selecting a Choiche UIC LOV (in VO) is set up with enter any selection point = Point Blank (the first list).
Well, I'd like that when the SOC contains 1 single element element is automatically selected.
It is possible to achieve and, if so, how?
Thank you
Federico
Well, maybe you can create the ViewRowImpl class and override the getter for this attribute...
Something like this pseudocode:
public SomeType getSomeAttribute(){ Object value = getAttributeInternal(ATTRIBUTE_ID); if(value == null){ if(getLOVAccessor().getEstimatedRowCount() == 1){ value = getLOVAccessor().first().getAttribute("LovAttrib"); setSomeAttribute(value); } } return value; }
Dario
Tags: Java
Similar Questions
-
Hallo,
I have a VO with an attribute based on the field of database of MONEY.
In the configuration of the VO for the attribute I put:
- In the "Details" tab: Type = BigDecimal
- In the "Indications of the UI" tab: Format type and Type like the image below
These settings allow the value of the attribute (in the table, inputText) appears with thousands and decimal separator that according to my language - Italian - are. (point) and, (comma).
For example. Silver number displayed correctly:
10.123.000,37
When I write the value of the attribute in an Excel cell using apache.poi...
cell.setCellValue (attr.toString ());
... I see in the cell...
10123000.3700
... Although I'd like to see what...
10123000,37 (not thousands separator, the comma as separator decimal and only 2 decimal places)
You could you kindly help me to get there?
Thank you
Federico
Federico, this isn't really a question JDev or ADF. This can be solved by setting the cell format to the cell, you write the number. Like oyu would in excel
style.setDataFormat(HSSFDataFormat.getBuiltinFormat("#,##0.00"));
more info on HSSFDataFormat (javadocexamples.COM JAVA DOC BY EXAMPLES) - API, usage, demonstrations and code examples
Timo
-
Hallo,
I would like to export an af:table in Excel and I tried to apply the method described here http://www.techartifact.com/blogs/2013/08/generate-excel-file-in-oracle-adf-using-apache-poi.html#sthash.VSEYBrdd.UPOaYZ... by vinaykumar2.
I noticed that the return Excel file contains max 25 rows.
The VO behind af: table has the default configuration.
The RangeSize of the iterator property is 25.
oracle.jbo.Row[] rows = dcIteratorBindings.getAllRowsInRange();
If I put it at 100, the return Excel file contains 100 rows max.
I would always that all af:table are exported, so I guess I have to settle RangeSize on a very high value (e.g. 100000).
Is RangeSize property to play with to solve the problem? Or there is a setting/alternative code to use? It affecting a high value will have an impact on performance?
Thank you
Federico
Hi Federico,.
The RangeSize - 1 value property. You will get all the lines.
-
Hallo,
Dario and Timo advised me (in this thread
) I make a request using the functions create/restoreSavpoint to this fragment in my application.The tables are read-only, and the user can insert and modify records by a form of popup.
Each table has its own pop-up that I created using a btf executed as diaolog (*).
Before I open the popup, I create the backup point.
BindingContext bctx = BindingContext.getCurrent(); DCDataControl dcDataControl = bctx.getDefaultDataControl(); String sph = (String) dcDataControl.createSavepoint(); AdfFacesContext.getCurrentInstance().getPageFlowScope().put("AdfmSavePoint", sph);
When the popup is closed, I restore the backup point if the Cancel button was clicked...
Object confirmOrCancel = returnEvent.getReturnValue(); if (((String) confirmOrCancel).equals("cancel")) { String sph = (String) AdfFacesContext.getCurrentInstance().getPageFlowScope().get("AdfmSavePoint"); BindingContext bctx = BindingContext.getCurrent(); DCDataControl dcDataControl = bctx.getDefaultDataControl(); dcDataControl.restoreSavepoint(sph); }
I have these doubts:
- the button "CANCEL ALL" (so far) AM restore operation is still meaningful (is always useful) when you use the check points? Or can I avoid using the restore of the AM operation, creating a backup point before you enter the fragment and restore it if the user clicks on "RESTORE ALL"?
- for all tables: before opening the popup insert/change the backup point is implemented pageFlowScope under the same key 'AdfmSavePoint '. Is it OK or would it be better to use a different key for each table (for example 'AdfmSavePointTable1', 'AdfmSavePointTable2',...)?
- If the pageFlowScope already contains a checkpoint under the "AdfmSavePoint" key... What does if I give the floor to new .put ("AdfmSavePoint", sph)? Can I be sure that the old value is overwritten?
- is this safe with nested savepoint? For example in my case I want to create a backup before the fragment in the image point is displayed (and restore if the user leaves the fragment by clicking "RESTORE ALL"), then within the fragment, as I said above, I would manage other points of record when inserting/editing tables.
- I noticed that clicking on the button "RESTORE ALL" when it relates to the AM-restore operation causes this strange thing: when before displaying the fragment I call SetCurrentRowWithKey on the master istance VO... If I click on "ROLLBACK ALL" posted master VO Records changes and 1 minutes of the main of the VO table is displayed. Why the master istance VO is not reimain in the folder I've previously selected by SetCurrentRowWithKey?
- With reference to the expression (*) above. The BTF 'dialogue' I created contains only the page jspx with shape and a return to activity. I also tried a) create (and restore) the backup point, b) to call createInsert inside the "dialog box" operation BTF (see images below), but the createInsert on retail VO istance called inside the 'dialogue' BTF seems not to reflect on the table as when I call createInsert by calling btf. I have to make some adjustments in the 'dialogue' of BTF?
Thank you
Federico
Federico,
(1) Yes, what should happen if a user add or edit vo1 and click ok in the dialog box but decided that ask to work must be restored?
(2) as long as you don't have that a dialog box is open, it should work.
(3) the flowrate range of page is a map. You can put the same key more than once. If the key already exists, the value is replaced.
(4) in fact, I don't know, but the sounds of complicated design. I guess you can record more points, but only in the order of creation. It's as if you try to rebuild the framework. BTF yo it even for you, when worn right. Please go to ADF Architecture Square and read and watch it task flow of related things.
(5) this behavior is as expected. A restore resets all the iterators so thagetto point at the top of he. http://www.Oracle.com/technetwork/Developer-Tools/ADF/learnmore/OCT2010-OTN-Harvest-183714.pdf 'keep the line after cancellation' shows how to handle this situation.
(6) I suppose have you refresh the table iterator, once you close the dialog box for the new data. But that's only a guess because it depends on how the btf share control of data and the your involved.
Timo
-
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
-
I have a macbook pro 15 "model 9.1 4 GB of memory and want to extend to 8 which is the model of memory should I buy for my fastest machine, I have for several years.
See:
http://eShop.MacSales.com/shop/memory/Apple_MacBook_MacBook_Pro/upgrade/DDR3_160 0MHz_SDRAM
Get only the memory of a place as above, since Macs are picky about the memory. Another place is crucial.
If you can't swing for 16 GB (2 X 8 GB) replace a strip of 2 GB with a key of 8 GB.
This is the Office Mac Pro forum. I asked that your post be moved to the MacBook Pro laptop forum.
-
Hallo,
I want to create a method that takes as a parameter the id of an af:table (used to display the search results) and returns:
- the column headings of the af: table
- Visible property (true/false) of the columns af:table
- the actual query of the VO instance used to create the af: table
- the values of real bind variables passed to the query of the instance of VO
I would like to create a servlet which takes the parameters reruns the query and returns a report Excel/PDF file that contains exactly the same columns and same of the af records: table.
I'm a little confused on who use the code to achieve this... you kindly help me?
I did a similar qustion here
but then I guessed that it was preferable to create a new thread.Thank you
Federico
For this, you can use this type of code
Context LocaleContext = _adfTableBinding.getLocaleContext ();
for (attr AttributeDef: attributeDef) {}
Label As String = attr.getUIHelper () .getLabel (context);
_logger.info ("Attritbute name:" + attr.getName () + "column name:" + attr.getColumnName () + "Col4Query name:" + attr.getColumnNameForQuery () +)
"Name:"+ label);
}
which produces this output
Timo
-
Hello world
LM l and map creation using table list as the data collection for the leaf theme of points to specify a given location. The problem l get here is that, after setting up the collection of data on the theme tab, the choice address and longtude & latitudes remain disabled. LM using JDeveloper 12 c last version & weblogic 12 c. When l run my lm project this error: java.lang.ClassCastException: java.util.ArrayList cannot be cast to oracle.adf.view.faces.bi.model.GeoMapDataModel. Here is the source code of my page and the Bean managed that define the ArrayList
kdario Thanks for your comment, no. l didn't download the demo of component, but l did it right now. l use developer J 12 c to see how GeoMapDataModel is created .it will come back to you if any problem arises.
-
What should I do when I receive the message 'unable to load the flash shockwave.
What should I do when I receive the message 'unable to load the flash shockwave.
Hello
1. how many times you get this error message? This problem is limited to specific Web pages?2. Once you get this error message? What is your default browser?
Find out what version of Internet Explorer you are using
3. have you installed new hardware or software before the show?4. What is the operating system installed on the computer?
5. are you logged in as administrator?
Method 1:If you are facing problems with Internet Explorer 9, I suggest you read the article and try to run theFix it:Troubleshoot Internet Explorer to IE quick, safe and stableNote: Note that the reset Internet Explorer (IE) resets all settings defined by the user, including those established by the installed extensions, toolbars and other add-ons for IE by default. This includes all the security, privacy and settings area. Also this will erase browsing history, delete all temporary Internet, cookies, form data files and especially all the passwords.Method 2:a. search for Internet Explorer in the start menu.
b. right click and select "Run as Administrator".Check if the problem occurs.Method 3: Uninstall and reinstall Adobe ShockwaveTo uninstall a program
I also suggest you to download and install the latest version of Adobe Shockwave player and check if that helps:Provide more information about the issue so that we can better help you.I hope this helps. -
What should I do when my labtop detect two users on my ip addresses?
What should I do when my labtop detect two users on my ip addresses?
Look for the reason why. This is probably a failure in the DHCP settings on a PC.
-
The battery on my Toshiba NB500 has not been charged since one should use it when you are connected to the power. The battery in the tool bar icon indicates charge but is always 0% available. What could be the problem and how can I solve it?
A problem better put to the support of Tosh or their forums, with regard to their equipment, not MS or Win
-
What type of layer should be used when using the effects lighitng filters "I can't using the way I expect to work -
I want to add lights to he image - and to inform the parties of the image - I duplicated the layer add the lights in the filters, but it does not act as a process additive-
Check out this tutorial from Phlearn on YouTube. It is a bit more flexible, but, of course, requires a bit of elbow grease more Photoshop-wise.
Create beams of light in Photoshop - YouTube
Using this technique, you can adjust the 'lights' as you want by manipulating setting masks. See screenshot below. (Still once again, excuse the butchering.)
-
during installation it asks proxy username and password for authentication. What should I fill in here?
Hello
Please see Support of Proxy in creative cloud products
Kind regards
Sheena
-
What should I do when it says "Adobe Reader cannot open protected mode due to incompatibility with your system configuration"?
Hi sharronw31229175,
Please visit the below links for the same thing that it would be useful:
Protected Mode Troubleshooting | Adobe Reader
Adobe Reader cannot open Protected Mode due to a problem with the configuration of your system.
Let me know how it goes.
Kind regards
Ana Maria
-
What should I do when the installation program stops at 39% and said "webget failed"?
What should I do when the installation program stops at 39% and says "web get failed? I have a MacBook Pro.
If you don't see that when downloading, either use another browser or use another (wired) connection and/or use a download manager.
Maybe you are looking for
-
What is the best video app?
Whenever I restart my iMac, a screen asking if I want to refuse or allow the EnhancedVideo.app accept incoming network connections. What is it and should I change the firewall to allow it. Thank you!
-
Toshiba Canvio Alu unrecognized hdth305ek3aa
I used the usb drive mentioned above on Vista and Windows8.1 without problems. To save storage, I deleted some of the files it contains.Now that the drive is still recognized in Vista without problem.But when using Windows 8.1 the usb in the toolbar
-
suddenly more elements network named WCIVANT04 now gone
Never had this in the column before network. Clicking on it opens a box that included "scan with Norton" (Norton failed to find all the files inside) and "connect to remote computer." Anyway another box opens with a subject top left appearing as "W
-
Reset password BIOS HP Mini 1000
Hi, I need help with my HP Mini 1000. I forgot the BIOS password and I want to reset it. Can someone help me with master password. Thank you Stop the Code - CNU910071H
-
Captivate 8 distort bmp feedback
HelloI add graphics to feedback in a drag and drop, but when I add the .bmp, deforms the text on this subject. Any help would be useful.