Row Details for Datatable by Bootsfaces - jsf

Is there a way to expand Rows in Datatable by Bootsfaces? I'm sure I already saw this example in the show-cases, but I can't find it now anymore:
https://datatables.net/examples/api/row_details.html

Add the responsive="true" attribute to your b:dataTable:
If there's not enough screen estate to display the table, the last couple of columns are hidden
Those hidden columns are "moved" to row details.
See:
https://showcase.bootsfaces.net/forms/DataTable.jsf (scroll to "Responsiveness")

We didn't implement this feature yet (apart from the special case of responsive="true"). However, you can use the JavaScript code shown on the datatables.net page to implement the feature yourself. The only tricky part is how to get the additional data. I guess the best way to achieve this is adding invisible columns to make sure the data is available in the HTML page.

Related

How to enable grid footer SummaryType?

So I just discovered you can enable the grid footer. And in theory you can show whatever you want in there e.g. display text or sum etc.
The Text property seems to work. The SummaryType doesn't. I feel like there's a missing step or something.
Has anyone managed to make the Footer work ? Just so you know, StatusField is not going to cut it here as it won't fit.
TIA
If you look in the source code for the Sales Order Screen functionality, there is a constant called 'Availability_AllocatedInfo' which is used to construct the 'On-hand...' message in the summary above. If you search for that, you'll see that there is a 'Availability_FieldSelecting' function that sets that information. The field called 'Availability' that is updated is what is used to show the status. Look in the aspx for SO301000, to see all the elements you'll need to replicate the behavior.
Hope that helps

Kentico 10 BasicRepeater - implementing custom navigation between items

I have a list of custom items of the same page type being displayed in a basic repeater with a page size of 1. I want to implement my own navigation for the back and forward through the items.
I tried using a Text / XML transformation so I'm not sure if I have to revert to using ASCX.
However DataItemCount works fine for the number of items but not the current "item" index. I have tried DataItemIndex and DisplayIndex which are always zero. I have tried accessing the current Pager (although ideally I want to hide this) but am not 100% sure how to reference it.
I also need to be able to navigate to the next and previous item. I'm sure I could make use of the querystring page parameter in a custom method but don't know how to write or how to call this. I am struggling to find examples which don't simply involve evaluating a column value.
It sounds like you need a carousel. I'd go with javascript solution for this: it is more efficient as it does not reload the page when you navigate between items.
You can also use this:
https://devnet.kentico.com/articles/previous-and-next-links-to-listed-pages
It for version 8.2, but with none or a little code adjustment it should work in any version.

Yesod Editable Table

I need to make a table with an editable column. Each row is a separate record. I want to be able to display hundreds of records, perform edits to them and then submit them back to the server for updating. I am not sure this is really supported by the forms infrastructure.
Is there a way to make a repeatable form such that I would get a list of results back? This seems to be the closest solution I can envision without writing my own in javascript. Any ideas on this would be welcome.
Don't reinvent the wheel. Just use one of the full featured js grids like jqgrid or extjs if you want the full pack of UI components.
I use jqgrid with yesod, edit rows both in grid and in outside panel and submit the changes back.
I think the problem with your approach is that you found your hammer (yesod forms library) and now looking for a nail.
You don't have to use every bit of yesod just because its there.

How to go back to the previous page using JSF

I would like to implement a hyperlink leading to the respective previous page which should appear supplied with the same data used for its previous display (similar to the effect of the "history-back" button).
Are there any best practices to do this?
This is one of the features of Seam where they have tried to improve on standard JSF. Here's the relevant part of the reference.

I need to add a choice field to sharepoint that has values depending on the current selection

I need to add a choice field to sharepoint that has values depending on the current selection.
Example:
if the current selection is Open then the options have to be 'open, and In progress
**Current selection | Possible selections**
Open | Open,In progress
In progress | In progress,To be communicates,rework
Rework | Rework,In Progress
...
That way i am forcing the user to follow some specific flow
I think you won't get this field behavior out of the box but you can archive this by implementing your own CustomFieldType.
Just take a look a this:[ www.sharepointsnippets.com/post/2009/01/Cascading-Dropdown---Configuration.aspx ] You need not download any third party software. Otherwise, just google SharePoint Cascaded/cascading lookupthere are lot of such commercial tools.
Hope this snippet works!
You can achieve this sort of behavior by editing your list's EditForm.aspx page and adding some JavaScript to the page.
Although I can't seem to find any examples for making dependant drop downs, there are a couple examples of modifying the EditForm to hide fields or make them readonly:
Making a field read-only
Hiding an entire row on the edit-form
So these are 2 columns out of which one filters the other?
Sounds like a cascading drop down list, there are a few (commercial) solutions out there.
See
http://cascddlistwithfilter.codeplex.com
for a free one.

Resources