Customizing a CompositeC1 global datatype form - c1-cms

I am building a console application and am currently using the standard form markup that is produced when you create your global datatype. I know you can edit this form markup to change what is displayed, but is there a way to change the layout so you can have more than 1 column for a large datatype or have the ability to design the form as you would like. For example, right now you get one field per table row. What if you would like to have 2 fields per table row, or insert a paragraph between two table rows?
I was wanting to stick with using the standard datatype forms to take advantage of the stock workflows, buttons, etc. If that isn't a possibility, how else would you proceed, a custom form?

it's not exact solution you are looking for, but have a look into tabs: http://c1packages.codeplex.com/SourceControl/latest#Composite.Community.Blog/Composite.Community.Blog.Package/Package/App_Data/Composite/DynamicTypeForms/Composite/Community/Blog/Entries.xml
<TabPanels>
<FieldGroup Label="Settings">
<TextBox Label="Title" Help="The title of the blog entry. Consider a short title for quick reference in lists and feeds.">
<TextBox.Text>
<cms:bind source="Title" />
</TextBox.Text>
</TextBox>
</FieldGroup>
<FieldGroup Label="Tags">
.....
</FieldGroup>
<XhtmlEditor Label="Content" Help="The content of the blog entry." ClassConfigurationName="common">
<XhtmlEditor.Xhtml>
<cms:bind source="Content" />
</XhtmlEditor.Xhtml>
</XhtmlEditor>
</TabPanels>

Related

sap.m.CheckBox binding

I tried to bind a checkBox to an OData field, its type is Edm.Boolean. I can done the binding but it behaves like one-way binding, the chekbox shows the right statement when I ask for the value, but when I change the checkbox from checked to unchecked or vica verse, and save it, it will not update the value of the field.
xml view:
<CheckBox id="Seen"
selected="{= ${Seen} === 'true'}"
text="Seen"
enabled="true" />
However, if I change the value in an input box next to the checkbox it takes effect on the checkbox, but the checkbox can not take effect on the input field...
Input xml:
<Input value="{Seen}" valueLiveUpdate="true" />
Am I missing something?
Thank for any help in advance!
That happens because you are using an expression binding, which works quite similar a
formatter function. On these scenarios, even if your model is set to use 2 way data binding, this particular binding work only one way.
You should apply the binding on the checkbox on the same way you did for the Input.
<CheckBox selected=“{Seen}” />

Is it possible to disable sorting for particular column with customfields in React Admin

I have a custom field for user status but I want to disable the default sorting on that column.
like when we use predefined fields like
It is possible to disable sorting for a specific field by passing a sortable property set to false: https://marmelab.com/react-admin/List.html#disabling-sorting
<TextField source="id" sortable={false} />

Add a custom filter drop down for react-admin List view

Question 1: I have a list view with a column for "Active":
I want to allow the user to select Active/Inactive from a radio button group as a filter (or dropdown). I know react-admin provides filters for reference fields out of the box. What about a non-reference field, like "Active"?
Question 2: Any way to add a clear button or "X" by the search field to quickly clear all filters? Currently, you have to select what's in Search and clear the text. Annoying having to use the mouse AND keyboard to clear filters. But, I'm guessing there's a way around it.
Thanks.
I want to allow the user to select Active/Inactive from a radio button
group as a filter (or dropdown). I know react-admin provides filters
for reference fields out of the box. What about a non-reference field,
like "Active"?
There is BooleanInput and NullableBooleanInput. Documentation is quite well written and there are lots of Input components to use.
Question 2: Any way to add a clear button or "X" by the search field
to quickly clear all filters? Currently, you have to select what's in
Search and clear the text. Annoying having to use the mouse AND
keyboard to clear filters. But, I'm guessing there's a way around it.
if you are using TextInput for search field there is prop resettable
With those two things combined you should have more or less similar code in filter component:
<Filter {...props}>
<TextInput label="Search" source="q" alwaysOn resettable />
<NullableBooleanInput label="Is Active" source="active" alwaysOn/>
</Filter>

How can I implement search functionality with a prefix highlighting in a non-editable ComboBox?

I want to create combo which is only allows selection from a fixed list but has search functionality like an editable combo i.e. when you type the combo searches for items which match the prefix you typed and the text after the prefix is highlighted in the selection box.
I think I can implement the necessary logic to do the searching but I don't know how to get the highlighting to work. I guess I could compose combo items out of text blocks and use and back colour to implement highlighting but the item would somehow need to know it is being rendered in the selection box, not the drop down area.
With IsEditable=false there is some prefix search functionality but it's transient - if you don't type anything for a second or two the prefix is reset. For this to be usable the user needs to see what he has typed and edit the prefix using backspace if needed so highlighting of the prefix is important.
The combo may have many long items and I want the user to have to time find the items he wants. Setting IsEditable to true gives more or less the search behavior I want but I don't want the user to be able type text in the box which doesn't match any item.
I have looked into customizing an editable combo to only accept key presses which match items in the list and had a degree of success but I don't want the selection behaviour of an editable combo - see this question https://stackoverflow.com/questions/10442021/how-can-i-customize-an-editable-wpf-combo-to-prevent-changing-the-selected-value
ComboBox will show the first matching entry even if IsEditable="False".
The problem you have might be a fixed list with multiple entries starting with the same. For example:
AAAA
AACC
BBBB
In this case you could give each entry a unique key:
<ComboBox IsEditable="False">
<ComboBoxItem Content="AAAA" TextSearch.Text="A" />
<ComboBoxItem Content="BBBB" TextSearch.Text="B" />
<ComboBoxItem Content="AACC" TextSearch.Text="C" />
</ComboBox>
Then if you type C key AACC entry will be selected.

No combo filter to show all

This is my first time here.
I have almost no experience in ASP bu tI need to develop a small site linked to an access database in order to load data.
So, in my site I've got two combobox or if you prefer List/Menu controls.
It's working ok, I mean, if I choose an option in each combox it filter.
What I need to to have an option in each combobox to not filter, such like an option saying ALL, so if I choose the option ALL in one combobox it would show all records.
I hope I was clear.
Please help.
Thanks.
Marco
If you are using ASP 3.0, you simply add a new item:
<select name="mycombo">
<option value="0">All</option>
...
</select>
Check for the item 0 and dont act on it.
If you are usng .NET
<asp:DropDownList id="mycombo" runat="server">
<asp:ListItem value="0" Text="All" />
...
</asp:DropDownlist>
When you choose All then remove the filter criteria and show all records.
First of all add the option All to your combo box at a specified index. When the combo values is changed check for that index and if it is the index of 'All' then remove the filter criteria applied and show full records.

Resources