Programmatic table navigation - sapui5

I have a sap.m.Table with quite a huge amount of ListItems (rows). When a defined event occurs I would like to navigate to a dedicated ListItem (row). The eventhandler is called and I know the Item I want to navigate to but how can I trigger the navigation?
Had a look at documentation and debugged the source code but haven't found something useful. Did I oversee it?
Any suggestions are welcome

Try Selecting the Item by id or Item itself
Get all the Items using getItems() and take the item based on index and then select the item using setSelectedItem(item,true)
i have not tried by writing code. try this.

Related

is there a possibility to create an editable checkbox column?

I'm looking for a way to show a boolean value as a clickable checkbox in the table.
In my current example, I have a value called "charged". Currently this is shown as a check. It would be great to have it as a checkbox in order to update the value really quick, instead of clicking on edit on the specific row and update it there.
Example screenshot
Would appreciate any recommendations.
Thanks
The Backpack team has something in the works for this - a package they call "editable columns". But it will probably be launched in Feb-March 2022.
Until then, you can
(A) create a custom column type that will make an AJAX call. For the javascript, take a look at the delete button for inspiration.
(B) Send an email to hello#backpackforlaravel.com for beta access to that package (includes editable_checkbox, editable_switch and editable_text column types right now.

Updating a view from a command handler

I have a file dialogue opening from the menu where a user can select a file. The FileDialog is called from the menu command's handler class in execute().
Based on the file the user selected, I would like to update a view, for which (I believe) I'd need the same Composite element that's passed to the view in createPartControl().
Is it possible to get access to it from the command handler, or would it be better to trigger the view updating via something like ISourceProviderListener or PropertyChangeListener?
Thank you.
Yes, it's possible:
IViewPart part = HandlerUtil.getActiveWorkbenchWindow(executionEvent).getActivePage()
.findView(viewId);
It would be better to first update the data that your view is displaying (the model in MVC) and the change in data should trigger view refresh. It's hard to say which listener is better without knowing all the details.

zend framework routing and layout

I have a CMS base controller that most of my other controllers extend. It has a default action for list, create, read, update and delete actions, all of them set the title based on the name of the resource(s) the user is working with.
The index action defaults to contain only one row:
$this->_forward('list');
Now my problem is that my previously set title is gone when I open the index of a CMS controller. I'd like to know what could be happening and what is the best solution of this.
Note that the problem does not appear if I rename my list action to index. It may also be relevant that changing the view title in the index action does not work.
Hmm, where do you set your title and in what way do you do it? Personally my titles are only two parts like "Application: current action". To achieve this i do the following:
//layout.phtml
<?=$this->headTitle()->setPrefix('APP: ')?>
//indexAction()
$this->_forward('list');
//listAction()
$this->view->headTitle()->append('List Data');
I do this for every action separately and since i do not assign a title within indexAction() i get the full wanted title "APP: List Data" inside listAction(). This remains true if i have my edit action like the following
//editAction()
if (!is_numeric($this->_getParam('id'))) {
return $this->_forward('list');
}
If this doesn't do it for you, your scripts will be needed to look for an error elsewhere :)
Actually, my initial idea of this issue having to do something with routing was right. I'm loading the layout in a preDispatch action of an action controller. So what actually happend was that I re-created my layout view after setting the title attribute in the index action.

Using GWT Cell Browser to create a product Taxonomy

I am in a very big issue. I need to be able to create a product taxonomy view together with ADD,DELETE,MODIFY functionality. On the first level the products will be general and as we go deep, it will become more specific.
for e.g. on the first level,
->Computer
-->Keyboard
-->Qwerty Keyboard
-->... Keyboard
-->Mouse
-->Wireless Mouse
-->2 Key Mouse
-->3 Key Mouse
-->MagicMouse
->Other
....
->Furniture
Can someone give me an idea about this??
Ok, I have been able to do it, the main idea is the listdataprovider

Dispalying a list in combobox using visual studio(2008, express) for c sharp

I've got a class with a list(4 item) of data and I want to show all in a combo box. how do i do that maintaining Model-View-Controller?
I am a simple ComboBox and my job is to display things in a list, but not so much as to have the entire thing drop off the bottom of the screen causing the user to physically tilt his monitor to select items. Because of this, I implement a scroll-bar. Anyhoo, I'm empty right now and I need some data, can you help out?
Regards,
ComboBox (_idCounty)
Dear ComboBox,
Thankyou for your recent enquiry. As it turns out I DO have some data for you that you can display. Here it is.
Regards,
Model
PS: Make sure you listen to Controller!!!
In short, simply query the model for the data you require