How to style h:datatable - jsf-2

I want to display data like this with a JSH h datatable:
1st OBJECT
object.title object.date
object.category object.description
2nd OBJECT
object.title object.date
object.category object.description
....
So I need multiple rows (2 rows) in one column.
But I have no idea how that works.
Normally, a h:dataTable displays data for every object row by row.
For example:
But Id like to display it like above but for every object. So each oh my objects must be displayed like above.
How can I solve this?

Related

Google Sheet Returned values from query into a drop down

so basically if i were to make a simple query, that pulls a few data. it would just paste the value in individual cell. Would it be possible for those return values be automatically made into a drop down?
Right click a cell that you would want the dropdown to exist in, select data validation. Then, use the "List from range" criteria and select the cells that your query result would display in.

How to get ui-grid cellClass function called for all visible rows after reorder?

I wrote a cellClass function, rowSpanCellClass, to implement something like HTML rowspan. When a value is repeated in a column where rowSpanCellClass is used, the cells with repeating values will appear to merge vertically.
This works fine when the grid is initially rendered. However, if I reverse the sort order of a different column (docNum), rowSpanCellClass is not called for every row. Therefore, the class of one the cells in the rowSpanCellClass column is not changed when it should.
Here is simple plunker demonstrating my problem.
If you click on the Doc Num header twice to reverse the initial sort order, the output to the console shows that rowSpanCellClass is called for all rows except the row with rowRenderIndex = 3.
I believe that row is skipped because it doesn't change when the rows are reordered. rowSpanCellClass needs to be called for all rows because the cell class depends not only on current row value, but on adjacent row values.
I tried to force the cellClass function to be called on every row with the following code
$scope.gridOptions.onRegisterApi = function (gridApi) {
gridApi.core.on.sortChanged($scope, function (grid, sortColumns) {
gridApi.core.notifyDataChange(uiGridConstants.dataChange.ALL);
});
};
However, the sortChanged event fires before rows are reordered, so this does not work.
What can I do to have rowSpanCellClass be called on all visible rows AFTER they have been reordered?
I solved this problem by using a custom cell template and ng-class instead of cellClass.
cellTemplate: '<div ng-class="grid.appScope.rowSpanCellClass(grid, row, col)" title="TOOLTIP">{{COL_FIELD CUSTOM_FILTERS}}</div>'}
The change is in this plunkr

Pass table row values to struts action class which uses display: column tag

I have a struts table which displays data using <display:column> tag.It has many rows and checkbox for each row. But for only one column I need to show as text fields which I did using <display:column><input type ="text"..../></display:column>. Now the problem is I need to submit only the value of the text fields for the rows which have been selected by checking the check box. The submit button is outside the display tag. Can anybody please suggest how to achieve this.

Pass uipickerview row title to a function

so i created a weather app.
It has a text field where user types the city and then click the button.
The city name will be passed to a function that will request a data for this city.
I have passed the city name to this function
-(void)getCurrent:(NSString *)query
by this way
[theWeather getCurrent:self.TextField.text];
But now i decided to change text field to uipickerview and i got stuck
How can i pass the selected row in my picker view to this function ?
You can access your selected row by accessing the array:
You can get it in the following manner:
NSInteger row;
row = [self.pickerView selectedRowInComponent:0];
getCurrent:_pickerData[row]
Since you have a UIPickerView you can inspect its selectedRowInComponent: to determine which item the user has selected. Assuming you populated this picker view from an array you can get the item out if this array using the index returned here. Also assuming that you have a PickerView with only a list of cities pass 0 for the component. The component is there for more complex views like a time picker where you have hours, minutes, and AM/PM.

smartgwt problem with relationship between the two listgrids

I have two listgrid. My 1st listgrid is holding Record(List of Field) and my 2nd listGrid is holding record(field). And my issue is i have to assign multiple record(multiple rows) of 2nd list grid to the single record(Single row) of 1st grid on the action on Button.and 1st ListGridRecord is list of 2nd ListGridRecord. Hope i am able to forward my thought to you. Please reply me as soon as possible. Thanks

Resources