Is it possible with an ADF ComboBox component to type in values not present in the given LOV? - oracle-adf

I am working on an input form using ADF. I have an input field in which I want to show a list from which the user can select the value and also require a type option in case the value user want is not in the list.
I use the JDeveloper 12.2.1.3 for development. I have tried using ADF ComboBox component based on a static list. The component gives a list a expected. But I cannot type in a new value in case the value I wanted is not in the list. I can only type whatever is in the list already.
I am looking for something similar to the HTML input-datalist combination which gives a list and allows type if the intended value is not in the list.

The InputListOfValues and other LOV components only allow you to enter data which is present in the list. That is the way these components are designed. It would not make sense to allow other input as you normally use such components in places where you want to make sure the user can only input reference data defined in other data.
Anyway, it's easy to create some kind of component which allows you exactly what you want. I wrote a blog n this here https://tompeez.wordpress.com/2013/02/03/jdeveloper-11-1-1-6-0-afinputtext-with-self-made-look-up-not-using-lov/

From this page you can download and run the ADF Faces Rich Client Demo, which shows all components and what they do.

Related

Accessing CustomFieldDefinition metadata via tooling api

So, I've been attempting to gather picklist dependencies per Opportunity record type for my lightning components. I have been able to retrieve Standard Field dependencies by RecordType, but it the Tooling API will not return the custom field dependencies. Standard calls and queries will not work either, as they state that the field has no controlling value or dependency.
Given this information I suspected that there was a table that is hidden somewhere that contains the keys for the RecordType and FieldDefinition, hopefully with a nested Metadata object.
I found an Id in one of the parameters in the setup menu for a Record Type and Id.getSObjectType() on it. The table name is CustomFieldDefinition. However, it is not accessible via SOQL or the Tooling API.
Has anyone accessed this table? Or has anyone been able to retrieve the field-record type picklist dependencies on custom fields AND standard fields?Tooling API ResponseDebug Log with SObject Name
I think you're doing it wrong.
"Controlling field" would be another picklist or a checkbox for example, something you change during same edit action. If you have dependency to record type - in that sense it's not a controlling field. Sure, you change record type and picklist changes - but really everything would change, it should be a different page layout (different fields shown, marked readonly/required etc). There's a reason that record type change is not done on normal edit screen, you do it by clicking special link on detail view and then everything "explodes".
Have a look at "User Interface API" - set of tools meant to help your custom app (mobile? desktop?) steal recreate a normal page layout. This one might be especially useful: https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_resources_picklist_values_collection.htm
There's even a Trailhead: https://trailhead.salesforce.com/en/content/learn/modules/user-interface-api (skim through whole set but especially read last module)
And since you mentioned Lightning Components - are you aware of these ready tools:
https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.reference_ui_api
getPicklistValuesByRecordType
https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.reference_generate_record_input_create
or maybe you don't have to code it all and stuff like <lightning-record-edit-form> with recordtypeid passed to it will solve all your problems
Have a look, if I didn't give you a working solution then at least you have some keywords to Google around. If you're still stuck - try to post a code sample as new question?

how to create different UI components every times in runtime and save their contents into database and save the UI which created on the page?

Dears
good day
I need your help for the following case:
The activity nature of the client is very dynamic
Need to have a dynamic form (he wants to create many form every day by himself in runtime). And add some components in the runtime.
He doesn't have a standard form so he need every day to create new form
For example he can make today a form with group of input text and group of check box and table and tomorrow he need to make a new form with input text and radio and table also etc..,.
In addition he needs to achieve and save it into database to use it and retrieve it later , and he wants to save every form with its UI contents which he created in runtime to be able to view it later on the jsf page.
So he want to save created form contains data into database
And also he wants to arrange the component on the page by his own way
And I putted this case in OTN :
https://community.oracle.com/message/14356236#14356236
How could I do it?
Regards
You can find a series of blog posts of Andrejus, right here:
http://andrejusb.blogspot.co.uk/2015/09/adf-12c-dynamic-forms-with-adf-bc-ui.html

Overview page of elements from a Typo3 page tree

I'm primarily a UI and graphic designer and, eventhough I have some experience with Typo3, I'm completely stuck at the following problem:
I have a large page tree with single pages for items from a catalogue (one item per page), the layouts for these items are built with Armin Vieweg's beautiful "Dynamic Content Elements" extension (DCE).
Now I want to create an overview page where I reference some of those items automatically - ideally I want to check a box in each element I want to display there (I would add a field catalogueItemPreview to the item DCE which authors can check or uncheck).
Unfortunately, I have no concrete idea of how the database is structured and how I could build a query (where would I even do that? in a custom-made plugin?).
This is how I imagine it could work: On the overview page I use a plugin/an extension in a Content Element that does the following:
search Typo3 DB for content elements with a field called "catalogueItemPreview"
return fields "catalogueItemTitle", "catalogueItemShortDescription", "cataloguePreviewImage"
use a template to render previews of all those elements on the overview page
I'm happy for ANY pointers towards a solution as currently I'm completely in the dark about where even to begin ...
Schematic screenshot from the Typo3 backend
thanks for using my DCE extension :)
Well the fields you have defined and their values in content elements are stored as XML, because the current version of DCE is based on Flexforms.
This makes it very very difficult to do MySQL queries using one of the field properties in WHERE clause. You could check for a xml string in the field pi_flexform but this is not recommended.
Instead I would use another property of content elements (tt_content) to mark the items as "Show on frontpage". For example you could create a new layout or section_frame value for that. Then it is very easy to just output the elements you want, using TypoScript.

how retrieve only selected checkbox values in action class in struts 1.3

i am new struts i am developing web application in which i have a requirement that i have to show records in tabular format i have made use of display tag in struts with every record i have a checkbox now i need to retrieve the values of those checkboxes in my Action which are checked . but what i am receiving in Action array of all the checkboxes. actually while displaying checkboxes by making use of display tag all checkbobes have got same name therefore i am not understanding how handle this care i have searched on google but did not find suitable situation
<display:column title="Service">
<input type="checkbox" name="sercive" />
</display:column>
how to handle this situation not understanding .could anyone give some sample code
or hint to handle this situation
I am not sure about display tag.
But in struts you have to define a property in Form bean (i.e. ActionForm) of type String[] or List with the name same as defined for your check boxes.
Then in Action class you will get the array of selected checkboxes only.
If this is not working. Then you can try of getting the values using request.getParameter("service"). This will return comma separated list of selected checkboxes which you can convert to array using split() method and then you can continue with your logic.
I hope this helps you.
Plain HTML checkboxes are only submitted if they're checked, that's just how clients work.
You must provide a differentiating factor, generally a value (e.g., a service ID in your case), to determine which has been selected. Your action form would contain a collection of those IDs.

Making Related Models Optional

I have a form where a user can enter a location address as well as the utility companies that provide service to that address. The Utility data is associated to the building:
Location hasMany Utility
Solely within the context of the utility, the name field is required so there's validation indicating as much. Within the context of a location, though, any utility information is optional. The user can choose not to enter that data when entering a location which would simply indicate that they don't want to associate the location with any or all of the utility companies we track.
Using the FormHelper, though, the validation is detected and the field gets marked as required. I want to retain that validation for the instances where utility data is being entered independently, but remove the required indicator on the location form.
I know I can hack this in any number of ways (e.g. removing the required class via javascript, etc.), but I'm wondering if there's a clean way to do this using the Cake API. I haven't seen anything obvious, so I'm hoping someone else has been here and found a clean, simple solution.
Thanks.
You can either ask the user how many utilities they want to add before creating the form, or you can add the Utility record inputs dynamically using js (the later is more work to do, and not as error-proof as the former).
An example of the view (if you want to do it in 1 view):
if (empty($this->data){
// a form to ask how many utility records the users want to create.
}else{
// generate the form based on user input.
}
I assume you know what to do in the controller.
I would add a class to the form element that are optionnal, and use that class to override the "required" indicator.
In fact there is a Cake solution, use the error param
$this->Form->input('Model.field', array('error' => false));
To disable error message output set the error key to false.

Resources