Change ADF Query Panel's Default Component - oracle-adf

In my JSPX page, I created a search page by drag-n-dropping the View Criteria (VC) to the page. By default the component's are text box. What I want to do is change some of them to use other components, such as the selectOneChoice component, with binding from another Entity Object (EO), or maybe add a date picker to it.
Is this possible? Or do I have to stick with the defaults?

This is all stuff that can be done in your view object under Attributes. For date attributes, make sure that the type is set to date. I've'nt done this one but for the selectOneChoice component, I'm assuming you can define a list of values on the desired attribute that is based on another view object. Also look in the Control Type field of the Control Hints when you edit an attribute. If you are using bind variable with your search I believe you can define these properties there also.

Related

Changing the properties of a field dynamically

In my application's viewport i'm showing the form panel with a list of fields in center region and property-grid in east region.
I need to show the list of properties of the field in the property-grid on selection of the field.
The user is able to change the properties.
Now my requirement is to apply the properties dynamically to the field.
Is there any generic way to achieve this?
Can someone help me?
Some properties have getter and setter functions, but not all of them and I doubt they are consistent enough for what you are trying to do.
My suggestion would be to store the config object for each field, the config object would have each property that you want to be able to change using your property grid. When a property changes, remove the field from the form. Re-create it using Ext.create and passing your config object as the second parameter. Then just insert the object back into the form.
EDIT: You can probably skip using Ext.create by using the insert function on your form panel, it seems to be able to accept a config object directly.

How to make an extjs grid a form field?

I have a requirement to create a custom form field that is basically an extjs grid. The user should be able to click a result in the grid. This clicked result should then become the fields value. Also, this field needs to extend Ext.form.field. Here's what I got:
Ext.define('MyApp.field.Grid', {
alias: 'widget.GriedField',
extend: 'Ext.form.field.Base',
I'm a lot of confused on how to add a grid to form field base. Looks like form field base's template expects HTML. How do I get it accept a component?
If you just need to select a value from a list of items. Why not use a combobox?
If you need to select multiple items. There is an example of how to use the MultiSelect ux component in the documentation examples.
http://docs.sencha.com/ext-js/4-1/#!/example/multiselect/multiselect-demo.html
If you really must use a grid. Then I wouldn't bother with trying to create a field type and cause yourself grief.
Add a listener to your grids selectionchange event and update a hidden field in your form with the value you want from the grid. Job done.
I ended up putting the grid on a form indirectly through creation of dependencies on my model.
My model has master-detail, which the detail is just a store reference. I found that using associations did not work for me.
So, in adding a field to a form, I have something that manages changed events for the model (master record) and the detail stores.

how do i determine the label for a checkboxrow in bootstrap for yii?

hello i'm having problems with the labels of checkboxes. when i use more than one model of the same class in a single view the checkboxes seem not to use the names from attributeLabels of that model.
i.e. if i have this in my view:
$form->checkBoxRow($colorArray['left'],'[left]special_request');
the checkbox get rendered with a label "[left]special request" instead of "Special Request" as stated in the attributeLabels of the Color model.
on the other hand dropdown lists, text field, etc are rendered correctly.
i have noticed this bug/feature after updating bootstrap from version 0.9.12.r211 to 1.0.0.r296.
The checkBoxRow and all methods ended with Row get the label from the array returned by Model->attributeLabels().
You can either change the autogenerated labels or use the TbLabel widget.
Choose the best for your issue.

Extjs checkboxes inside basic form

I have a basic form inside a window. This form has several check boxes and I need to some how be able to select all with another checkbox. How am I supposed to access these checkbox types. I am trying to get reference to "this" and then this.getForm().getFieldValues() but is there a better way to do it, as I only need to get the checkboxes and not other fields.
Thanks,
SS
By default ExtJs fields don't have a getForm() method to get access to their parent. However, you can use this override to add this method. Once you've got the form, you can get access to any field you like, which should let you do what you describe.

views not displayed using viewsphp module

hai
i created a view using custom fields only (using views php module). the problem is that the view is not displayed. but if i add node id as an extra field the view is displayed.
It sounds like the view still needs to know what data to show, and depending on how you set up your view, you may have set it to use exposed filters. Turn off exposed filters. This should disable the required input field.

Resources