How to set the dynamically created items to the Listbox as selected via composer - zk

I'm creating the new record via composer and want to set the same as selected in the existing listbox without afecting the existing selection of the listbox in zul page.

I have kept the params in session and received it in composer and added to newly created list
ListModelList listModel = new ListModelList<>();
and set the above list default selected as
listModel.setSelection(listModel);
added remain items as
listModel.addAll(remainItemsList);
combobox.setModel(listModel);

Related

How to get vscode TreeView instance of workbench.view.debug

I'm trying to get the TreeView instance of a builtin view like "workbench.view.debug". This would allow me to experiment with edit masks on input, maybe cancel onclick events based on TreeViewItem type, and more.
The vscode-extension-samples all use createTreeView() which creates a new TreeView object. I've even tried to override the buitin viewId with
this.dbgvaredtView=window.createTreeView( 'workbench.view.debug',{treeDataProvider: this.dbgvaredt}
..but this only creates a new TreeView.
How can I obtain a TreeView instance of "workbench.view.debug"?
You cannot create "an instance" of the TreeView like the Debug View you're trying to. You need to create a new view with a new name for it to show up. If you are trying to get this new View in the Debug Viewlet, then you will have to set it in the extension package.json.

Tableviewer edit and save

I am working on a eclipse rcp application where I am using TableViewer component on a wizard page. I was able to add editing support to the table columns and was able to save the data on the viewer object. Does this edit get saved to actual data? if yes how can I get this updated data within my application to do further processing?
Assuming you are using org.eclipse.jface.viewers.EditingSupport to provide cell editors for the table.
The EditingSupport.setValue method is responsible for setting the new value in the original object provided by the content provider.
To validate values you will either have to write your own CellEditor or use a class derived from one of the existing call editors such as TextCellEditor and overriding appropriate methods.

Custom Field in CQ5 Page console

When we create a new page in CQ5 'siteadmin' , we get two fields to fill up ("Name" and "Title").
Could there be any way to add more fields here (Say, "Description") which the authors can fill up and it will be saved as a JCR property of the page in CRX ?
Any ideas/solutions will be welcome. I can't think of any.
You want to add custom page properties. From the linked knowledge base article:
(1) Copy /libs/foundation/components/page/dialog node to your template's
component that you want to add dialog properties to.
(2) Add fields to the dialog
Example:
If you had a page component /apps/<myapp>/components/pages/contentpage
that has sling:resourceSuperType=/libs/foundation/components/page then
you would copy /libs/foundation/components/page/dialog to
/apps/<myapp>/components/pages/contentpage/ to make an overlaid dialog

How to referesh one view UI from other view UI

I have two Views called UserView and RoleView.
UserView.xaml contains RadGridView which contain three columns
UserID (Label) | UserName (Label)| Role (Dropdown).
RoleView.xaml contains one TextBox where i can add Roles into database.
Role (Textbox).
Step 1. Now first i open the UserView.xaml and it will display
records from database with appropriate roles.
Step 2. Now i open new page RoleView.xaml (minimize UserView.xaml).
Step 3. I have added one role. (AdminRole)
Step 4. Now i open UserView.xaml (it is already in memory, so just i
navigate to this page)
Step 5. Now i double click to any of the row with Role (Dropdown
column) it will comes into edit mode and populate list of roles.
**but it will not display recently added role (AdminRole) in dropdown. because of the data source will not getting referesh.**
If i am closing the UserView.xaml and reopen this page then it will display recently added role (AdminRole) in dropdown.
Note: my requirement is like, i have to update or notify all opened views once any of the change from anywhere.
I am using
Silverlight 4 (MVVM)
PRISM
telerik RadGridView
Your help/comment/suggestion would be highly appreciated!
Thanks,
Imdadhusen
Prism comes with an Event Aggreator. Where you have publishers and subscribers to these events, which we'll call "messages". Have a look at the MDSN link below:
http://msdn.microsoft.com/en-us/library/ff921122(v=pandp.20).aspx
What this means is you can have each view subscribe to an update message and have them update whenever they receive this message. So you could send an "update" message each time a view changes.

DataFormWebPart accessing previous versions of an item in WSS3.0

I am running WSS3.0 and have a custom list which contains versioning on a couple of fields. When I click on an item and I view the item page I see the history of all the fields which I have made changes to. This works fine as expected.
I have also created a page using Microsoft Office Sharepoint Designer and using a DataFormWebPart I have created a page that shows all the items in the list in a list view, I have also changed the XSL node of the DFWP to display the datain a way that my client wants.
The issue that I have is, it is only showing the latest version of the item record e.g. some of the fields are blank as the client did not update those fields the last time that the item was saved. I can fully understand why it is not showing these previous versions of the item but is there anyway that I can change an option in the webpart that will return that last non blank version of the field?
If this is not possible does anybody know if it is possible to change the edit page for the item so that it defaults certain fields to have the previous value of the field.
Many thanks for you ideas in advance
Jonathan
I eventually was able to add the following jQuery code at the bottom of the page (using Sharepoint Designer). You will also need to add a link at the top of the page to include a link to the jQuery code (or you can install it as a feature).
<script>
jQuery.fn.GetLastUpdate = function () {
$updates = this.parent().next().clone();
$("nobr", $updates).remove();
$("a", $updates).remove();
$("br", $updates).remove();
$lastUpdate = $updates.text().split("(): ")[1]; //.find("a").replaceWith("##++##").text();
this.text($lastUpdate);
return $lastUpdate;
}
$("[title='CONTROL_TITLE']").GetLastUpdate();
</script>
Then you just have to replace the CONTROL_TITLE with the title of the text box that you want to auto fill.