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
Related
In a SinglePageApp, I need to use a <button> tag rather than an <a> tag 5 I am using UKit
the <a> tag would be :
<a type="button" class="uk-button uk-button-link" href="#events"><events</a>
But writing the tag this way , does not work
<button #click="location.href='{{ url('events') }}'" class="uk-button uk-button-link">EVENTS</button>
note : I see an ESLint error .. [js] ';' expected
#webnoob answer is correct , however it seems that it's not working in a single page application : I get a scopelocation undefined error..
SO I am using a method :
<button #click="goToEvents()" class="uk-button uk-button-link">EVENTS</button>
and
methods: {
goToEvents: function () {
location.href='#events'
}
},
To do an onclick with Vue, you would do it like this:
<button v-on:click="location.href=url('events')" class="uk-button uk-button-link">EVENTS</button>
You can also use #click="location.href=url('events')"
Take a look at Vue Event Binding for more information.
If you're within a form and don't want the form to be posted as well, you would need to also add in .prevent so it would become v-on:click.prevent="url('events')"
You only use {{ }} (mustache's) when you're rendering content i.e text. When you're within an attribute which you want to use dynamic values in, you would prefix the attribute with : so, for instance, if you wanted to add some dynamic text in a data attribute, it would become :data-something="myDataProp"
Using Magnolia CMS, I am trying to make a property inherit through all child pages.
The property gets set from a base page dialog.
Essentially its just a checkbox that toggles a show/hide Boolean that gets tested in the main page template (which child pages also use).
The dialog control component 'hideHeader' has this structure:
::hideHeader
.buttonLabel: Hide
.class: info.magnolia.ui.form.field.definition.CheckboxFieldDefinition;
.defaultValue: true;
.i18n: true;
.inheritable: true;
.label: hide;
.type: Boolean;
Which is added to the base page dialog.
I access the property in the template like:
[#assign hideHeader = false /]
[#if content.hideHeader?? && content.hideHeader?has_content ]
[#assign hideHeader = content.hideHeader /]
[/#if]
I cant get it to work in the child pages. It doesn't pick up on the set value from the dialog, just the default 'false' value.
What am I missing?
In order to inherit property from anywhere up in the hierarchy of pages, you need to use cmsfn.inheritProperty(content, "your-prop-name").
Using only stkfn.siteRoot(content) as suggested above, will return you root node of the site, so if value was overridden anywhere in the hierarchy you would not see that.
HTH,
Jan
so after suffering from 'code' blindness, I realised to implement the behaviour I wanted I needed to get the property using:
stkfn.siteRoot(content)
this now enables all sub pages to receive the parent pages properties.
Instead of all code above you can just use:
[#assign hideHeader = content.hideHeader!false]
To inherit property you have function in TemplatingFunctions
public Property inheritProperty(Node content, String relPath)
in freemarker you should do something like:
cmsfn.inheritProperty(content, "hideHeader ");
I have a custom element that I'd like to be themeable. The link element that I put in my template, though, appears to be replaced by Polymer with a style element containing the contents of the URL (even in Dartium), which means I can neither bind the href attribute (which I hear doesn't work anyway) nor change it programatically on an event.
Actually, even without being able to switch it, I'd like to be able to set it once when the element is created, so I can create different instances of the element with different themes.
Is there a way to do this?
It turns out that you can programatically specify a stylesheet if you add a style element with a CSS import:
factory MyView(String themeUrl) {
MyView view = new Element.tag('my-view');
view.shadowRoot.append(new StyleElement()
..id = 'theme'
..appendText("#import url('$themeUrl');"));
return view;
}
I was able to switch it like this:
void switchTheme(String themeUrl) {
StyleElement theme = shadowRoot.getElementById('theme');
theme.replaceWith(new StyleElement()
..id = 'theme'
..appendText("#import url('$themeUrl');"));
}
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
I have sort of a table with a radio-button column. I managed to make radio-button column work dynamically inserting into a cell (div if matter). But, on postback innerHtml hasn't been updated with "checked" attribute.
Could you give me an idea how can I find out (on the server) if radio-button has been checked?
More info: This is on user control inside update panel.
This would be good post on my topic, still doesn't help
Any reason you cannot use a standard asp:RadioButton and use javascript to ensure it is mutually exclusive. I have done this before by adding a custom attribute to the radiobutton and then using a js function to uncheck all items with that attribute and then check the selected one. This works around the IE issue which prevents the groupname attribute from working on radioboxes that are in different containers.
radioButton.InputAttributes.Add("ClientGroupName", "grpRadioList");
radioButton.InputAttributes.Add("onclick",
string.Format(
"javascript:radiobuttonToggle('{0}','ClientGroupName','grpRadioList');"
,radioButton.ClientID));
and use the following JS to uncheck all radios and then check the one you want.
Note i used InputAttributes instead of Attributes as the radiobutton is wrapped inside a span tag so InputAttributes is for items added to the actual input control rather than the span.
function radiobuttonToggle(selectedRB, attribName, attribValue)
{
var objRadio = document.getElementById(selectedRB);
for(i = 0; i < document.forms[0].elements.length; i++)
{
elm = document.forms[0].elements[i];
if (elm.type == 'radio')
{
if(elm.getAttribute(attribName) == attribValue)
elm.checked = false;
}
}
objRadio.checked = true;
}
You can then expose radioButton.Checked as a property in your CS file and reuse this as a control.
Check Form.Request("radio-name") != null
You only get a non-null value when it's been checked.
Make sure your page elements are being rebuilt correctly on postback. Any binding process that inserted the radio buttons the first time around will have to be re-run before you can access them the second time.
Here is a working example, first I add radios to my webform by the method you linked :
function addRadio()
{
try{
rdo = document.createElement('<input type="radio" name="fldID" />');
}catch(err){
rdo = document.createElement('input');
}
rdo.setAttribute('type','radio');
rdo.setAttribute('name','fldID');
document.getElementById('container').appendChild(rdo);
}
Then at code behind I used only the code below to get the radio's value :
string value = Request["fldID"];
So, be sure you're trying to get the name of the radio buttons at server side. You should use name attribute at server side, not id.