Catel and not validate on view loaded - catel

I've a login form that requires the user to enter username/password. when it first loads the 2 fields are empty so a validation error appears on both fields. Is there a way with Catel I can disable validation on viewmodel's load?
Thanks

See the docs. In your vm ctor, set DeferValidationUntilFirstSaveCall to true

Related

Issue related to Kentico on-line form (bizform) validation

I have created a form using Kentico on-line form and applied the built-in "required" validation on it. Whenever a textbox is empty then a required validation is shown. Now, I have entered a value in the textbox and press tab from the keyboard but the required message does not disappear. I want to remove or hide the message from the form when the user enters a value in the text box before the submit button is clicked.
How to resolve this issue?
I don't recall this being something that Kentico handles out-of-the-box. You'll most likely need to add some custom client-side script for this. Typically - where I work, at Ridgeway - we use custom layouts for forms, as the standard layout is fairly table-rich.

How to "grey-out" <h:selectBooleanCheckbox> without disable?

I have a checkbox:
<h:selectBooleanCheckbox value="#{bean.checkboxValue}"/>
Based on a given scenario, I need to grey-out the box and prevent the user from modifying it. I know disable will do this, but the issue is that disable prevents POST and I need to send the value to my bean whether or not the box is greyed-out.
Is there a way to grey-out and prevent user input without disable?
may be you try this:
1 - Put a styleClass="make-disabled" in your booleanCheckBox;
2 - Use a jquery function to disabled only in view context :
jQuery(document).ready(function(){
//disabled all checks with class make-disabled
$('input[type=checkbox].make-disabled').attr('disabled','disabled');
//configure before submit form to enabled all checks with class make-disabled to send do request
jQuery('#yourFormId').submit(function(){
$('input[type=checkbox].make-disabled').attr('disabled',false);
});});
Sorry my english. I'm brazilian. This example help you?

Openerp: How to disable a side menu(More) in form view while using ir.actions.server

I want to disable a menu from "More" options in form view while using action type "ir.actions.server".
How can i make it possible?
In case of action type "ir.actions.act_window" we can do it by multi = True. Is there any equivalent attribute or something exists for this?
Thanx in advance.
As siddharth jambukiya said, we can use a web module to do his. But there is an another method that can be done from python. If you look at the result of the function field_view_get of the model to which the server action belong, you an see that there is a key called "toolbar" in the fields_view_get result. This key contains all the details regarding the action in the "Print" and "More" dropdown in web client. So if you remove the server action from here, that server action wont be listed in the "More" dropdown.
You can remove any Menu from "More" using web client. you need to implement web module to remove option from More menu. i think no other alternative attribute exists in openerp.

jqueryValidation Engine inline ajax validation stopping form submit

I'm trying to validate a multipart form using the jquery validateEngine plug in.
I can validate the form correctly for all fields however I want to take it one step further and use the built in ajax validation.
I want to check whether a name is unique compared to a database. This function works correctly and I get the expected results however I am unable to submit the form and by running validation in firebug console on the form it validates as false even though all fields are correct.
If I remove the ajax validation the form validates correctly so somewhere in this script a false flag is being set but I just don't know where to look or over ride it
The validation is initialised by:
if ($.validationEngine) {
form.validationEngine();
}
and as I say normal validation works.
I've set up the class in my form as:
class="input validate[required, ajax[ajaxNameCallPhp]]"
The script in the validation engine relating to this method has been changed to this:
"ajaxNameCallPhp": {
// remote json service location
"url": "http://localhost/greenFees/includes/lib/greenFee/checkName.php",
// error
"alertText": "* This name is already taken",
"alertTextOk": "* This name is available",
"alertTextLoad": "* Validating, please wait"
},
Any help appreciated with this issue
Ok - managed to get this to work after a few hours logging the script in firebug...
Anyway. The culprit of sorts is partly do do with another script - form wizard which turns a form into a wizard, it adds a next button which on click runs the validation. For some reason the validation when called from there behaves differently to the form submit.
With the ajax validation it displays a flag if the nameis ok, if it's already used or a notice when validating.
Solution 1:
Remove the wizard script but then the form doesnt behave correctly
Solution 2: remove the notice alertTextLoad - it appears the validation is treating the presence of this flag as an error rather than info - removing it meant I can keep the wizard
Ta

People Picker AllowEmpty Property

I am using the people picker user control of SharePoint in my aspx page. I have set the AllowEmpty property of people picker control as false.
But, still the required field validation is not occurring for the control. I don't want to use a required field validation control explicitly for validating this. Any insights?
Regards,
Raghuraman.V
In order to enable/disable validation for Entity Editor based controls (like People Editor) the following properties should be specified in combination:
AllowEmpty - represents whether an empty entity is allowed
ValidatorEnabled - represents whether a Validator is enabled
So, in your case to disable empty values, ValidatorEnabled="true" should be provided also like shown below:
<wssawc:PeopleEditor
AllowEmpty="false"
ValidatorEnabled="true"
id="userPicker"
runat="server"
SelectionSet="User,SecGroup"
/>

Resources