How can I reset an adf page without hardcoding it explicitly? - oracle-adf

I have a form with few input boxes,Select boxes etc.
How can I reset the control values to null/empty without writing the code. I mean is there any property which automatically resets the page or controls?

You can use something like this:
<af:commandLink text="commandLink with resetActionListener"
id="cl1" immediate="true" actionListener="#{demoInput.reset}">
<af:resetActionListener/>
</af:commandButton>
More info here.

Related

how to open an angular xeditable input automatically without editable-form

I'm using a angular xeditable text control. I want to open it in edit mode automatically. How can I do it?
My question is similar to this one however, I am not using editable-form (not using a form element at all). The only solutions I find are using the editable-form's $show() function, but you do not have it if you do not have an editable-form.
While at it, I also would like to use the functionality provided by editable-form's $setError() function, without using an editable-form and not through the onbeforesave or onaftersave attributes (I want to do it upon opening the xeditable text control, not when user submits). Is it possible ?
I do not want to use an editable-form because I have just this one xeditable input, and the use of a form changes things like submit, blur, buttons displayed, etc. in ways that I do not want.

Sitecore MVC Checkbox

In Sitecore MVC, FieldRenderer.Render(Item, "Field Name") automatically checks its field type. In another word, all XSLT extensions (sc:text, sc:image, sc:date, …) is affected by the RenderField pipeline.
But, I couldn't find sc:checkbox information and it doesn't show "CheckBox" in page edit mode. It just shows the value of the check box.
How can I make it show as like input type=checkbox in page editor?
Sorry for the link only answer but the general approach here is to use a Field Editor Button.
This will open a pop up window with the content editor style control for the field.
If using a custom experience button is not an option for you, you can output different markup (i.e. your input button) to the client when the page mode is in 'Edit' mode.
This will allow you to present the author with the controls you wish to display, but still output the normal output values for end users.
If you are able to use controller renderings, you can use the controller to load a different view to make this easier, but otherwise you can use if statements within your View to output different markup.

Form elements are not receiving input

I have a form designed with the GUI designer with input textfields and buttons. I have attached actions to the buttons. When I call up the form with showForm(Form,null), the textfields are not accepting input and the buttons are not triggering the action. This is happening only for this form. Initially, there was the problem solved here Unable to call a specific form from a button in codenameone and then the problem solved here Simulator keeps defaulting to old Main form. What could be the issue now?
As far as I know there may be some issues as you say, but first need to see code
In the form after you added the text fields did you select the text field component and press action event?
Assuming you did that you should get a callback method in the Statemachine class.
This call will be invoked only when the user changes the content of the text field. You can run in the debugger and set breakpoints/step into code to see what is going on.

AngularJS -- How to disable a form when it's being submitted?

How does one disable the complete form (all input elements within it), while it's being submitted via AJAX? I've tried setting a $scope.form_state variable in the controller and binding it to the submit button's ng-disabled attribute, but it seems like a workaround. There should be an easier + straight-forward way of doing this.
You can put all form elements into fieldset and use ng-disabled to disable the whole fieldset.

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.

Resources