How to remove an inherited field from a new content type - content-type

I'm working with ArgoUML/AGX/Plone 4.1 to generate a subclass using "atevent" as the stereotype. How do I remove the inherited "Event body text" field?

you can set the widget invisible for editing and for viewing.
YourSchema['FieldName'].widget.visible = {'view': 'hidden', 'edit':'hidden' }

If the field is required in the original schema, you'll also need
YourSchema['FieldName'].required = False

Related

ngx treeview dropdown

Can't bind to 'disabled' since it isn't a known property of 'ngx-dropdown-treeview?
ngxDisabledOnSelector property has not working in my case
my code here :
<ngx-dropdown-treeview [config]="config" [items]="items" [buttonClass]="buttonClass"
(selectedChange)="values = $event" [disabled]="!dropdownEnabled"
[ngxDisabledOnSelector]="'button.dropdown-toggle'" (filterChange)="onFilterChange($event)">
"disabled", is basically a HTML attribute, but not necessary an Input param for you ngx treeview, so, in this case you have 2 options.
1.- Use disable as angular html attribute
[attr.disabled]="!dropdownEnabled"
2.- Use direct attribute
disabled="{{!dropdownEnabled}}"
lets try

DevExpress XAF, Application Model, Combo box Just Show "OId"

When I add a member to my BOModel and write a simple expression like:
[Name] +' ' + [Age]
But in runtime I see something like this:
ROP.Module.BusinessObjects.ROP.Product(4)
That field just show me "OId" but not show related value!
Note: that fields are simple textbox is OK, but that fields came from relation to other table are missing.
Please guide me how to solve this issue.
Some screen shot :
[![http://i.stack.imgur.com/JAQXn.png][1]][1]
[![http://i.stack.imgur.com/j5I2Q.png][2]][2]
in your class, add this line :
namespace YourApp.Module.BusinessObjects
{
[Default Property ("Field401")] // add this line
[DefaultClassOptions]
Field401 is the field you want to display during the runtime.
You should use the XafDefaultProperty attribute.
namespace Rop.Module.BusinessObjects
{
[XafDefaultProperty("DescRegistation")]
[DefaultClassOptions]
public partial class Product
{
...
}
}
If the property that you want to display in another object's view is not the one you wish to set as default, then you can set it in the Model Editor as shown in the above link.

Getting value of checkbox from dialog

I am fairly new to Day Cq5.I am having a checkbox in my dialog and i want to retrieve its boolean value in my jsp when user selects or deselects it .Kindly help
This works for me
Properties for dialog field:
name: ./checkbox1
type: checkbox
xtype: selection
code:
boolean isChecked1 = properties.get("checkbox1", false);
If you want to retrieve the value from your component's JSP, then do this:
boolean foobar = properties.get("nameOfYourCheckbox", true);
You can specify the default value by using true/false as the second argument.
Hope that helps.
Every widget you add to your components dialog is stored in CRX as a property to the cq:Component node. All this properties can be accessed in the jsp by typing properties. in EL brackets (like this: ${properties.<name_of_property>}). Don't forget to include the /libs/foundation/global.jsp file to your jsp.

asp.net mvc c# tooltip

what is the best and most simplest way to create tooltip text for textboxes
With JavaScript and probably with a framework like jQuery that fits very well with ASP.NET MVC. Using the framework means that someone's alread done the hard work and written a plugin for it!
qtip
tooltip
List of some tooltip plugins
There is of course the title attribute on text inputs that shows as a popup tip in some browsers.
I found this to be the simplest and easy to maintain approach:
Create description using data annotation for the property of your model
Example:
[Display(Name="MyTextBox", Description = "Title for your entry")]
public string MyTextBox{ get; set; }
Then in your view access the description above using:
#Html.TextBoxFor(model => model.MyTextBox, new { title = ModelMetadata.FromLambdaExpression(model => model.MyTextBox, ViewData ).Description })
Just use the title tag :
<input type="text" title="Hello I'm the tool-tip"/>
Mvc way :
#Html.TextBoxFor(t => t.NameOfCustomer, new{ title= "Hello I'm the tool-tip" })
It's not fully customizable as is, but it does not require extra javascript nor a framework.
Use the data annotations on your model to put the tooltip in the Description property of the DisplayAttribute.
Then write your own Html Helper function that puts the Description property into the title attribute of the TextBox input field. You can call the helper TextBoxWithTooltipFor
In your view definition you can then replace the call to #(Html.TextBoxFor(...)) with the call to #(Html.TextBoxWithTooltipFor(...))
Here is the code that is tested and works.

Add support for fields to databound controls

For example when using a gridview. When you specify the columns
BoundField for example won't work if you are binding it to a field instead of a property.
I guess this is so because when the gridview is looking for the DataField property it looks for a property and not a field. Now the question is how can i change this behavior to make it possible to use fields. I know i have to inherit from the gridview, but i don't know where to go from there.
This functionality is so wrapped into the framework and wasn't designed for extensibility so no you can't change this behavior; the only thing you can do is to create wrapper objects or wrap fields with properties.
Or render the UI in your own way, which then you lose the GridView in-built functionality.
Wrap the fields with Properties
private string fieldA;
public string FieldA
{
get { return fieldA; }
set { fieldA = value; }
}

Resources