problem issue in using checkbox in datatable - icefaces

I want to use as a column in datateble and
I my code is
</ice:checkbox>
</ice:column>
but I got this error:
"java.lang.IllegalStateException: Could not find UISelectMany component for checkbox."
can any body help me and tell me what is the right way to use checkbox in dataTable

have you tried using something like
<ice:column>
</ice:checkbox value="#{BEAN.ATTRIBUTE}"></ice:checkbox>
</ice:column>
Make sure to define BEAN in Faces-config.xml as managed bean and Attribute should be a member of that bean of type boolean.

Related

CheckBox in table

This question is regarding aem 6.3
I have an assignment that requires me to use a checkbox in the table. But I notice that when I do that, I am unable to create a new row through the workflow. May I know is there a workaround over it?
In my console logs, I am getting this error
TypeError: Cannot read property 'id' of undefined at child.handleAccessibility...
Am I suppose to create an id first? If so how do I do that?
Thanks
Norman
It appears to be that aem currently has a bug where the title of the checkbox cannot be hidden if not it will face the aforementioned error. So the solution is not hide the title but let it be blank.
This is more of an issue of that the id cannot be recognised, instead of unable to create a new row through the workflow, that resulted in the latter issue.

Unable To Get Implicit Objects In WCMPojo

I am using a component where there is need of dynamic dropdown. The options are configured in the page properties. But I am unable to get currentPage Object in datasource.html file. Below is the structure of my component.
And datasource calling the wcmpojo class. Below in the flow.
datasource.html
<sly data-sly-use.data="${'apps.myprj.components.content.tabcontent.HtlDatasourceExample' # text=currentPage.path}">
</sly>
HtlDatasourceExample is getting call and resulting correct response if values are hardcoded.
Issue is unable to get sling objects in HtlDatasourceExample such as currentPage.
Thanks

Can the ScalaTest checkbox function accept a CSS selector?

I’m using ScalaTest to write Selenium acceptance tests for a Play web app. I have a checkbox I want to check, using the checkbox function:
checkbox("cbx1").select()
As far as I can tell, it takes the name attribute of the <input> element to identify which checkbox I’m referring to. However, this checkbox is one of eight, and its name attribute is in the form fieldname[7]. I don’t have access to its index in my test, so I can’t generate the right name attribute value.
Is there a way to use the checkbox function with a CSS selector to identify which checkbox should be selected? I’ve tried passing a CSS selector straight to the function:
checkbox("""[name=^"fieldname"][value="TheCheckboxValue"]""").select()
But unsurprisingly, I get an error:
WebElement '[name^="fieldname"][value="TheCheckboxValue"]' not found.
Aha — this seems to work:
checkbox(cssSelector("""[name=^"fieldname"][value="TheCheckboxValue"]""")).select()

Preselected value in the PrimeFaces autoComplete

Is there a way to "combine" the SelectOneManu and autoComplete feature?
When the form is loaded I'd like that input field to display the current value of the bean property, plus ability to select a new value with autoComplete.
Primefaces already provides this already in the autocomplete component. Just look on the demo site. By adding the dropdown="true" on the autocomplete menu, you enable support for a dropdown. Concretely, follow the following steps to get your results
Set dropdown="true" on your autocomplete menu. Then set the completeMethod to correspond to a method on your backing bean that returns a list of the items you want to show up in the dropdown menu.
To preset the value on the autocomplete component, simply initialise the value in the backing bean to whatever you want. Take the following as an example. If you have
<p:autoComplete id="dd" dropdown="true" value="#{yourBackingBean.myVariable}" completeMethod="#{yourBackingBean.loadOptions}" />
In your backing bean, you initialise the myVariable type during it's declaration
String myVariable = "Desired Value";
If you're going to be populating the dropdown list with a list of complex/POJO types (and as a result, bind the value attribute to a complex type in the backing bean), you'll need to use the converter based autocomplete component implementation

How do I display HashMap and List property in Jasper

Hello All
I have a POJO class which have some property out of them two are of type
List someName;
TreeMap> myMap;
here I am getting this data from the above property and I would Like to show them on jasper report. I want to know what to write on jrxml file, I am using jasper version 1.0.2
Thanks in advance.
I don't believe you can easily display the values on a list or map using JasperReports directly from a POJO.
I believe you would have to wrap the POJO in a bean data source. See also:
http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/data/JRAbstractBeanDataSource.html
http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/data/JRBeanCollectionDataSource.html
Then, you "connect" to the bean data source and return the results as required.
This probably requires JasperReports version 3.0 or greater.