In extjs4 how to set focus to newly added treeNode - extjs4

i am working in extjs4. Ihave treeview with treeStore. i have functionality to add new nodes to tree. Its working correctly.newly added noded are getting appended correctly. But after adding this new node,i want to set focus to this newly created treeNode. So how to set focus to newly added node in extjs4?

Ext.tree.Panel supports the itemappend and iteminsert events. You can listen for these events and use the selection model to focus on the node.
myTreeGrid.on('itemappend', function (parent, node) {
this.getSelectionModel().select([node]);
}, myTreeGrid);

Related

How can I add a property set value "intern" automatically to each new repository on artifactory 7.x?

I created the property set confidentiality level in Actifactory 7 instance. My property ser contains all values (""öffentlich,"intern" and "vertraulich") described as a selection list.
I assigned the value level "intern" as default manually to my old repositories.But now I want to automate this property set with "intern" so that the "intern" property set is automatically added to each new repository.I readed the Jfrog documentation about property set and found nothing there.
But I'd rather add the "intern" property for the new repositories automatically in the future.
I added some pictures to show you ,what I already did.
Open Tree view of Artifacts > navigate to your repository > Open Properties Tab > Select/add properties > Check mark Recursive. (When checked, the property will be added to the selected folder and to all of the artifacts, folders and sub-folders under the current selection). Attached the image.
You can use the REST API to create a repository and while creating the repository, you can pass the property sets data as mentioned here.

How to get reference to new row being added in an Infragistics UltraGrid in VB.net win form

I have a property declared as follows:
public property FinalList as new BindingList(of Entity)
Entity is a specific entity created via entity framework. I also have an UltraGrid whose DataSource property that is bound to FinalList.
When the program loads, it adds a bunch of items from an EF DbSet into FinalList based on some rules. Because the UltraGrid DataSource is bound to FinalList, the grid automatically updates with those initial items.
The UltraGrid is set to allow new rows to be added via the TemplateAddNewRow feature. And here is where my problem occurs. Adding the rows to the grid properly adds the same new rows to FinalList...but since FinalList originates from a subset of an EF DbSet, I need to make those new rows also get added to the DbSet so that the changes will be sent to the database when the user saves.
Originally, the Datasource was not databound to a BindingList...it was just set equal to...but the size of lists got to the point where having to re-create the lists when certain things happened was causing the screen to be too slow...So I changed things to data binding. Anyways, I had a bit of code that used to work pre-binding.
Private Sub grid_InitializeTemplateAddRow(sender As Object, e As InitializeTemplateAddRowEventArgs) Handles grid.InitializeTemplateAddRow
If e.TemplateAddRow.ListObject IsNot Nothing then
'do something to add the row to EF DbSet
End If
End Sub
This code worked fine before binding. Now, ListObject is always nothing...so this doesn't work. There also is a property
e.TemplateAddRow.IsAddNew
This is always false as well...so I can't use that either.
I suspect the issue lies in the fact that since everything is bound, UltraGrid can't tell if something is new or not...so I think I need to intercept the row immediately before/after it gets added to FinalList, rather than added to the grid. According to IntelliSense, FinalList doesn't have any events that I can tie into. Any thoughts?

setting the startup position of child form in vb.net

I have a Mdi parent container and i am using menu item to open child forms in MDI Parent Form.
Here is the code for opening the child form
Dim childform1 as new Form3
childform1.MDIParent = me
childform1.show()
The above code is working fine. The problem is with the startup position of the child form. i.e. child form doesn't open at required position(just right below the menubar) instead it opens at position randomly. like sometimes near the required position and other times where it wishes.. lol is there any standard way to position it. I tried MDI Child Form Start Position Problem answer by calculating and its positioned near by where i want. But I want to look for a standard way for doing this.
This should do it:
childform1.location = new point(x, y)
Inside the childform, you can add this:
Me.StartPosition = FormStartPosition.Manual
Then you can set location before saying childform1.show()

xpages required property for a combobox

There is a djContainer having multiple djtabPane(s).
A combobox is situated on the first djtabPane, having the property: required="true".
but, when I move to next djtabPane in order to complete some other fields, I get the notification that the combobox value is required.
Can I achieve this property of the combobox but only if I want to submit / save the doc.?
<xe:djTabContainer id="djContentPane1" tabPosition="top" doLayout="false">
and the djTabPane ( all are the same, only the title is different ) :
<xe:djTabPane id="djTabPane1" title="Title1">
You'll need to move the validation to your save/submit method. A validator runs whenever a partial refresh happens unless you set immediate="true" or processValidators="false". But I don't think there's a way to set that on any of the in-built tabbed containers.
The advantage of Greg's approach when moving towards an MVC pattern is that the same validation can be run whenever saving the data object, not just from a specific XPage / Custom Control. The down-side is more work coding what's effectively in-built, e.g. tying the validation message back to the relevant component, setting the component's valid property to false etc.

Change single itemtpl record on Sencha Touch List

how can I change single itemtpl at itemtap event in Sencha Touch 2?
I would like to change HTML record's code when I click on item.
If I try to do this with setItemTpl() method on dataview it changes all list's records.
Thanks
On "itemtap" event, you can find the target from params. And then get the target element
var target = Ext.get(target);
then apply, setHtml() function there and do what you want.