I have a mini work in ADF in which I am required to create a form. One input in the form is continent which is a drop down list of various continent.
There is another input(shuttle) with country names. Suppose the user chooses ASIA from drop down list of continent, then the below shuttle should get populated with countries from ASIA.
How can I achieve that in ADF?
You have to add a view criteria on your shuttle VO filtering by ContinentId:
Make sure you include your bind variable accessors on your VOImpl:
And also make sure that you apply your view criteria on your application module:
Then follow this steps:
That way you will finally your shuttle filtered:
Basically you want to filter out your countries based on Continent so for that apply a view criteria(based on Continent) on your VO (which is used by your shuttle input).
Related
I have seen the link below which explains that it is possible to create a filter on one field between sources by generating a calculated field and then assigning the same field ID to both fields for filtering purposes:
Using the same filter control for two different data sources
But my question is whether or not it is possible to make that particular field (that is now shared between 2 data sources) dependent on other filters that are tied to 1 of the data sources?
Example would be:
One dataset with country name and city name
One dataset with city name and population
I've generated a calculated field to be able to filter on city name since they now share the same field_id.
What I'd like to do is use a control that selects country from dataset 1 and then automatically filters city_name in both datasets.
I realize I could just pull country name into my dataset in the example above, but in my real dataset there are a significant number of fields I'd be looking to be able to use for filters.
If a filter is set, all charts and filters are updated with that setting. However, it would be a huge mess, if any of these objects would automatically changes the filters again. Then all object would be updated again and the filter setting could be changed once more, thus ending up in an infinity loop.
Therefore, a filter can only apply to a field. If this should cause further filtering an user action is needed. It would be possible to write a customer vizualisation, which would mimic an user action, but again it could end in an infinity loop.
Challenge: I've created a simple repository in MSACCESS (#1) that displays one or more owners of a corporate server.
The sub-form "asset-owners" is linked to the corp-assets main-form (#2). I've added a pulldown whereby the user can select a name (#3) from the address_book (#4) table and prepopulate the owners sub-form.
Objective: I would like to auto populate the associated "Occupation", "Favorite Food", and "Favorite Movie" fields when the user selects a name from the pulldown (#5).
I am not exactly sure how I should configure the occupation food and movie fields to auto-populate with such data AFTER the user has selected the name. I was thinking an inline query for each field, but I suspect it may be simpler than that.
Note: occupation, food, and movie data comes from the address_book (#4).
Many thanks!
I hope you don't want to repeat data in another table. If you just want to display the related data, options:
create multi-column combobox then expression in textbox references combobox column by index - index begins with 0 =[comboboxname].Column(1)
include lookup table in form RecordSource and bind textboxes to fields - set them Locked Yes and TabStop No
DLookup() expression in textbox.
I am working on a fairly basic database for my work of various companies in the region and I'm not really experienced in Microsoft Access. I'm trying to make a form where the user can add additional fields such as a combo box to the form.
Example: They enter the company name and then select the province and then the city, but that company also operates in other cities in a different province.
How would I create something like this? Or am I going all wrong about this?
Currently I have a dual multi-select combo box, in which the user can select multiple provinces and cities.
Current Form
Companies Table
Cities Table
Provinces Table
Relationships
I am new working with ADF and Business component
I have a table with a columm with the department ID. This table is filled from another JSF page
I want to show the department name instead of the department Id
I have Business component with the view from my department table.
But I dont know how to show the department name instead de id in the adf table
My adf table is read only
you can create an LOV.Here you can select the type of attribute you need to display for the user externally(DNAME in your case) and type of value you need to store internally(DNO in your case) depending on the selected display value by the user.
Refer this link for LOV creation
http://techblogoracle.wordpress.com/2013/10/14/how-to-create-list-of-values-lov-in-oracle-adf/
Create a LOV in your VO for that property! Then you have two possibilities: 1- Reinsert your table in your page 2- Insert (re-insert) only the attribute that you need as a read-only column in that table!
To display the name of a department instead of the departmentId, create an LOV on the departmentId attribute in the view object that the ADF table is based on, pointing to the department view object.
To update your existing read-only table, remove the departmentId attribute from the JSF, and re-add it. Make sure that the new attribute is an "ADF select one choice." After the column has been added, select the select one choice drop down, and change the read-only attribute to true.
<af:selectOneChoice value="#{row.bindings.DepartmentId.inputValue}"
label="#{row.bindings.DepartmentId.label}"
required="#{bindings.Employees_VO1.hints.DepartmentId.mandatory}"
shortDesc="#{bindings.Employees_VO1.hints.DepartmentId.tooltip}"
id="soc1" readOnly="true">
If you run this page now, it should display the name of the department, instead of the id, while still being read-only.
How to show departmentName instead of departmentId using an LOV - ADF
If you're in the same taskflow or you share Data Controls and you don't want to change your VO to be based on two EOs, you can add a Transient attribute with the name, you will populate the value in the page that fills the data. Using LOVs it's too much of a headache. If the LOV list is big you will have performance issues that you introduce trying to solve a problem in a wrong way.
You can add referenced attributes to your VO.
So create a VO that is based on Emp and Dept together.
For example see the video here: https://blogs.oracle.com/shay/entry/whenvalidateitem_trigger_in_ad
use lov or use groovy Expression if number of values is not more than 2 or 3 values
usage : #{row.code eq 'A' ? 'Approved' : 'Rejected' }
I followed this great guide to help me add a search feature to my Access database:
http://www.techrepublic.com/blog/howdoi/how-do-i-populate-an-access-list-control-with-the-results-of-a-dynamic-search/108
At the end it says:
"If you’re building a quote or order, use the list control’s Click or Double Click event to copy record(s) to a temporary table. It’s easy to implement using a fixed query for each search task."
I have managed to display all search results in a list box and I would like to be able to click on a customer to highlight them, and then press a button to add an order to the selected customer. I've been thinking how I could do it and I really can't get my head around it.
Any help would be appreciated.
It depends on how you build your database. My guess is that one easy way would be:
Create a table with customers;
Create an "Order" table with orders where you link the customers through a foreign key
You load the customers in a listbox. While making the name visible, it is actually the ID that you retrieve when clicking the listbox. You can configure this via the wizard in the design view of a table. You can make other forms appear by events on the listbox (eg. on click).
If you managed to retrieve the ID of the customer, and you have the data related to the order (data that can easily be extracted from form objects and loaded into variables ) what you need is an insert statement and insert the values in the "Order" tabel (including the customer ID, which is linked through the foreign key).
This way all order records are linked to the customer and can be queried later.
Due to my limited knowledge on your other requests, I cannot help you any further on the rest of your database design.
I hope that my reply could help you and that I understood your question correctly.
You can access info from a listbox via:
List.Value
Or if it is not the first column then:
List.Column(0,0)
0 being the column and row references.
You may also consider using a listview over a listbox and then you can access the relevant parts of a listview control with the following code:
ListView.SelectedItem
Or if it is not the first column then:
ListView.SelectedItem.SubItems(3)
3 being the column reference