Articles tagged with "model", sorted by ratingX
Displaying 21-26 of 26 result(s).

Generate CTreeview from database table and update a model

Created 2 years ago by Kostas Apazidis (KonApaz)How-tos0 comments – viewed 5,575 times – ( +1 ) – version 1.1
Suppose we want to set a category to product (or an item in general term), Also suppose categories has sub-categories (multi-level)

"safe" and "unsafe" Model validators (massive assignments)

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos4 comments – viewed 18,927 times – ( +4 / -6 ) – version 1.1
Ok, it is a little bit difficult to full understanding the unsafe validator.

Add model validator in Controller

Created 2 years ago by Kostas Apazidis (KonApaz)Tips4 comments – viewed 14,032 times – ( +1 / -1 ) – version 1.1
There are cases that model validators should be depended by controller/action and you couldn't manipulate on the model class or using scenarios in easy way

Save or Update Multiple related model values in one Tabular input form

Created 2 years ago by Kostas Apazidis (KonApaz)Tutorials4 comments – viewed 17,537 times – ( +1 / -7 ) – version 1.1
In this wiki I will show you how to save/update a model with many related model For example: How to set a product to multiple categories only in one post form ?

How To: Custom Client Validation On Checkbox Toggle and Optional Input Field

Created 3 months ago by Wade ShulerHow-tos0 comments – viewed 3,384 times – version 2.0
I just chased my tail around for a bit today. I got lost with setting the status of all inputs, and banging my head on why the "validate" function just wasn't working.

A universal model attribute for its synthetic representation

Created 2 months ago by Alexandre RodichevskiTips2 comments – viewed 2,499 times – version 2.0
It is convenient to use the same identification attribute, say info, in all of the active records of your application. It should be a virtual read-only attribute defined by a getter method, its label being the model name.