Noticed StateChanged field is missing within XML definitions of some work items in scrum template of tfs 2017 RTM : pbi, testplan, testsuite, feebackrequest, codereviewrequest, and some more.
I assume i should add it manually to them. Right ?
If you mean the State Change Date field, yes, by default it's not added in some work items in scrum template.
Actually the control is not added to layout eventhough in the existing work items such as Bug, Feature. That means, you cannot see the field in work item layout. However you can add the control to display the field based on your requirements.
Yes, you can also add the State Change Date field manually to the work items which not exsiting in them. See Add a field, or apply a rule, or change an attribute for details.
You can also use the TFS Process Template Editor to edit the WITs definitions.
Field:
<FieldDefinition name="State Change Date" refname="Microsoft.VSTS.Common.StateChangeDate" type="DateTime">
<WHENCHANGED field="System.State">
<SERVERDEFAULT from="clock" />
</WHENCHANGED>
<WHENNOTCHANGED field="System.State">
<READONLY />
</WHENNOTCHANGED>
</FieldDefinition>
Layout Control:
<Group Label="Status">
<Column PercentWidth="100">
<Control FieldName="Microsoft.VSTS.Common.StateChangeDate" Type="DateTimeControl" Label="State Change Date:" LabelPosition="Left" />
</Column>
</Group>
Page Section:
<Section>
<Group Label="Status">
<Control Label="State Change Date:" Type="DateTimeControl" FieldName="Microsoft.VSTS.Common.StateChangeDate" />
</Group>
</Section>
I have following structure to display in zul file and got List of clinic object from Java controller.
I tried several zk components in zul with no luck. What component should I use with a forEach?
ListBox
ListItem
Grid
Here is structure need to display :
For each clinic
{
For each clinic.location
{
For each (clinic.location.provider)
{
Output (provider display name)
}
Output (clinic name)
Output (clinic.location address)
Output (clinic.locatoin telephone number)
Output (clinic.web address)
}
}
As explained in the answer given by Darius, here is an example of how to use a <Grid> with a <rows> component
<?page title="Result"?>
<zk>
<window apply="org.zkoss.bind.BindComposer"
viewModel="#id('vm') #init('fully.qualified.viewmodel.classname')"
title="Result Window" border="normal" >
<div>
<grid>
<rows>
<row>
<listbox model="#bind(vm.listname)">
<listhead>
<listheader label="Item Name"
style="text-align:center;">
</listheader>
<listheader label="Attribute Value"
style="text-align:center;">
</listheader>
<listheader label="Qualifier Value"
style="text-align:center;">
</listheader>
</listhead>
<template name="model" var="item">
<listitem value="${item }">
<listcell label="#load(item.name)"
style="text-align:center;">
</listcell>
<listcell
style="text-align:center;">
<textbox
value="#bind(item.attributeValue)"
style="text-align:center;" />
</listcell>
<listcell
label="#load(item.qualifierValue)"
style="text-align:center;">
</listcell>
</listitem>
</template>
</listbox>
</row>
</rows>
</grid>
</div>
</window>
</zk>
You can use a Listbox or a Grid.
If you use a Listbox, it will contain Listitem objects
If you use a Grid, it will contain a Rows object, which will contain Row objects
To the Listitem or the Row, you will add other components: the simplest would be Label objects
I notice you have an inner table of providers. For these, you will probably need a nested Grid or Listbox. You could also use ZK's Detail component. it would allow you to expand in order to see the inner table.
There are multiple ways how to achieve this
including separate zul file to template row, whitch will contain a grid with separate view model - this style you can have shown all nested grid at once ,but it should and it will have performance issiues with larger ammout of data(because count of rows == count of viewmodels of nested grids)
include nested grid with own template ,and data model as parameter of view model,and show this grid on demand(button click,row click etc) - this is bether way in case of no performance issues,but you will be able to show only one nested grid at time
Final words - just donĀ“t
Nesting a grid to grid is a very bad design,because it is incredibly hard to render this,and it is only usable for small data. The best way to do this,in my opinion is to create two separate grids,side by side,and show adition data on in second grid,after a click on row in first grid. This way you can achieve very fast gui with no performance issiues,ever with a lot of data. Another way is to create a popup on grid row,whitch will show additional data,a it is also a lot bether for your performance.
I have a grid which load data on page load.
I also have a form that on submit calls an action correctly, but it doesn't load new data on my grid.
List is correctly geting and also correctly setting in my grid model From my Action class but while on return SUCCESS it simply returns data in this form(see below output)...
{"authFirstname":null,"authLastname":null,"bookDetailsobj":null,"bookTitile":null,"get":{"authFirstname":null,"authLastname":null,"bookTitile":null,"coverId":null,"createdDate":null,"createrId":null,"description":null,"editionId":null,"editionYear":null,"id":null,"img1":null,"img2":null,"isbn":null,"languageId":null,"locationId":null,"price":null,"publisherName":null,"quantity":null,"remarks":null,"subjectId":null,"updateId":null,"updatedDate":null,"videoUrl":null},"gridModel":[{"authFirstname":"234234","authLastname":"2323423","bookTitile":"23324234234","coverId":"soft cover","description":"243234","editionId":"General Edition","editionYear":"234234","id":42,"img1":"","img2":"","isbn":"324234","languageId":"English","locationId":"as","price":2.34234E7,"publisherName":"234234","quantity":234234,"remarks":"","subjectId":"General Fiction","videoUrl":""},{"authFirstname":"2423","authLastname":"23423","bookTitile":"asdfsdaf","coverId":"soft cover","description":"","editionId":"General Edition","editionYear":"2","id":39,"img1":"","img2":"","isbn":"2","languageId":"English","locationId":"as","price":234.0,"publisherName":"2","quantity":2,"remarks":"","subjectId":"General Fiction","videoUrl":""},{"authFirstname":"3","authLastname":"3","bookTitile":"232","coverId":"soft cover","description":"","editionId":"General"}
My jsp code:
<sjg:grid
id="getLogs"
dataType="json"
href="%{getCurrentDateLogs}"
gridModel="listOfLogs"
onSelectRowTopics="rowselect"
loadonce="true"
reloadTopics="reloadGrid"
formIds="form2"
>
<sjg:gridColumn name="userid" index="userid" title="User ID" sortable="true" align="center"/>
<sjg:gridColumn name="username" index="username" title="Username" sortable="true"/>
<sjg:gridColumn name="logaction" index="logaction" width="600" title="Action" sortable="true"/>
<sjg:gridColumn name="date" index="date" title="Date" sortable="true" sorttype="date" align="center"/>
<sjg:gridColumn name="time" index="time" title="Time" sortable="true" sorttype="time" align="center"/>
</sjg:grid>
<s:form action="getLogsByDates" id="form2" theme="simple" cssClass="yform">
<table class="">
<tr><td>from:</td>
<td><sj:datepicker value="yesterday" id="from" name="startDate" displayFormat="dd/mm/yy" label="from" /></td>
</tr>
<tr><td>to:</td>
<td><sj:datepicker value="today" id="to" name="endDate" displayFormat="dd/mm/yy" label="to" /></td>
</tr>
<tr><td colspan="2">
<sj:submit
value="Search"
button="true"
onClickTopics="reloadGrid"
indicator="indicator"
/>
</td></tr>
</table>
</s:form>
struts.xml
<action name="getLogsByDates" class="v.esoft.actions.bookdetails.BookdetailsAction" >
<result name="success" type="json"/>
<result name="login" type="redirect"> /index.jsp </result>
</action>
**
I don't know why my output is not showing in my jquery grid. Please help me**
I guess this is what you require :
Instead of using a sj:submit tag, use a sj:a tag with onClickTopics pointing to GridReloadTopics.
Then when sj:a is clicked, the grid get's reloaded, submitting the form to action defined in href attribute of grid.
This action must result a JSON which will populate the grid.
You haven't shown the action "getCurrentDateLogs" in the question. So this is the action that must return the json result populating the grid.
Also you must be thinking that how the grid-data gets affected by the form fields, so it's easy
The grid submits all the form fields to the action mentioned in href, so you must be having a getter & setter for every form field on that action.
Along with other normal grid attributes, now you'll receive the additional form attributes, based on the value of which you'll fill up the gridModel.
Please let me know if you still didnt' understood.
It doesn't work this way. try do the following things:
make an action retuen a page, not json
<result name="success">page_with_the_grid.jsp</result>
on the page page_with_the_grid.jsp, use s:url tag to map your json result:
<s:url var="jsonUrl" action="jsonAction"/>
in your sj:grid, use href="%{jsonUrl}" to fill your data to the grid.
if you directly call the action, which returns JSON, you will sure get a json result, which is your "Strange" output.
I have find Two grid after submit the form one is old one and second one my search grid it also include whole page
<sj:a href="%{form}" targets="result" indicator="indicator" button="true" buttonIcon="ui-icon-refresh"/>
I started to use advertising control, but I'm going crazy trying to let it work.
I copied PivotPage.xaml from Microsoft Ad Control Sample and made it the starting page in my app, but ad control is not shown (I'm not able to see banner); if I try to run Microsoft app, banner is shown.
So I registered my app on pubCenter and I got an appId and a unitId and tried to use them in my app, but the result is the same: no banner!!
If I try to use my ids in Microsoft app, test banner is shown.
Why using Microsoft example I'm able to see banner and using same page in my app I can't?
Why using my ids, Microsoft app does not show correct banner?
Here is XAML
<!--Pivot Control-->
<controls:Pivot Grid.Row="0" Title="Ad Control Sample">
<!--Pivot item one-->
<controls:PivotItem Header="piv 1">
</controls:PivotItem>
<!--Pivot item two-->
<controls:PivotItem Header="piv 2">
</controls:PivotItem>
<!--Pivot item three-->
<controls:PivotItem Header="piv 3">
</controls:PivotItem>
</controls:Pivot>
<StackPanel Grid.Row="1" VerticalAlignment="Bottom" >
<TextBlock Text="This is the same ad."
TextWrapping="Wrap"
HorizontalAlignment="Stretch"
TextAlignment="Center" />
<my:AdControl Name="adControl1"
ApplicationId="test_client"
AdUnitId="Image480_80"
HorizontalAlignment="Center"
Width="480" Height="80" />
</StackPanel>
I finally managed to solve my problem and I want to share solution.
I add an event handler for ErrorOccurred on ad control and reading Microsoft.Advertising.AdErrorEventArgs e I realized that my manifest (WMAppManifest.xml) was missing
<Capability Name="ID_CAP_IDENTITY_USER" />
<Capability Name="ID_CAP_MEDIALIB" />
<Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
I have 2 tables Main and Maintest. I am using nhibernate to pull data from database and am joining 2 tables to fetch the fields from both.Now my final object has data from both the tables. Now when I debug my app I can see that I have 2 records from Main and 5 records from Maintest. But somehow I am not able to display records from Maintest.
<DataTemplate x:Key="myTaskTemplate">
<StackPanel Orientation="Vertical">
<TextBlock Text="{Binding FirstName}"/>
</StackPanel>
</DataTemplate>
</Window.Resources>
<StackPanel>
<ListBox ItemsSource="{Binding Main}" ItemTemplate="{StaticResource myTaskTemplate}" Height="200" Width="200" />
<toolkit:DataGrid ItemsSource="{Binding Main.Maintest}" Margin="3"
AutoGenerateColumns="False"
CanUserAddRows="False" CanUserDeleteRows="False"
CanUserReorderColumns="False" CanUserResizeRows="False">
<toolkit:DataGrid.Columns>
<toolkit:DataGridTextColumn Header="#"
Binding="{Binding Number}"/>
<toolkit:DataGridTextColumn Header="Airline"
Binding="{Binding Code}"/>
</toolkit:DataGrid.Columns>
</toolkit:DataGrid>
</StackPanel>
NHibernate Mapping:
<class name="Main" lazy="false">
<id name="ID" type="Int32">
<generator class="native"/>
</id>
<set name="Maintest" inverse="true">
<key column="Ticket" on-delete="cascade" />
<one-to-many class="Segment" />
</set>
....
I able to display listbox record but not toolkit records. Although I can see that for each Main record my object does have 3 or more records in Maintest.
Something doesn't add up...
ListBox.ItemsSource takes an IEnumerable of some kind - which means the property Main must be some kind of IEnumerable?
So, if what you're looking for is a Master-Detail kind of view - you need to change the XAML for the two controls like this - everything else should be fine:
<ListBox Name="Main" .../>
<toolkit:DataGrid ItemsSource="{Binding SelectedItem.Maintest,ElementName=Main}" .../>
This will make the DataGrid bind to the MainTest property of whatever obejct is selected in the ListBox.
Look to Bea Costa if you really need to get spiffy with Master-Detail scenarios.
Hope this helps!