Openlaszlo 5.0.x getattribute, rotation - openlaszlo

I am working on an animation. I am using .swf pictures which I rotate with code like below.
My problem is: I want to read the actual rotation angel or position of the view "MoAuxid" when I klick on button "Abfrage". How can I get this result?
Best regards
Main Program:
<Mond width="400" height="400">
<view name="Bedienung_rot" x="800" y="10">
<simplelayout axis="y" inset="8"/>
<text text="Output:"/>
<edittext id="outputID" text = "0"/>
<text text="Arc:"/>
<edittext id="WinkelID" text = "51"/>
<button x="000" y="160">
Rotation
<!-- Handler to execute the Method -->
<handler name="onclick">
var x = WinkelID.getText();
MoAuxid.rotate(x);
outputID.setAttribute('text',x);
</handler>
</button>
<text text="Output2:"/>
<edittext id="output2ID" text = "x"/>
<button x="000" y="160">
Abfrage
<!-- Handler to execute the Method -->
<handler name="onclick">
var x = MoAuxid.getAttribute('y');
output2ID.setAttribute('text',x);
</handler>
</button>
</view>
</Mond>
The Mond4.lzx includes the following code:
<!-- IMAGE RESOURCES -->
<resource name="Mo_Bkgnd" src="images/Kalender.jpg" />
<resource name="Mo_Aux" src="images/Mo_Zeiger_Aux.swf" />
<!-- CLASS: Mond -->
<class name="Mond" resource="Mo_Bkgnd">
<attribute name="stretches" value="both"/>
<attribute name="width" value="${this.unstretchedwidth *.5}"/>
<attribute name="height" value="${this.width}"/>
<attribute name="act_height" value="${this.unstretchedheight}"/>
<attribute name="act_width" value="${this.unstretchedwidth}" />
<attribute name="lasthour" value="00" />
<attribute name="lastminute" value="00" />
<attribute name="timezoneoffset" value="00" />
<attribute name="StdZeigWinkel" value="00" />
<attribute name="TagNachtWinkel" value="00" />
<attribute name="kalZeigWinkel" value="20" />
<attribute name="JahresWinkel" value="00" />
<attribute name="FeiertWinkel" value="00" />
<!-- Aux Zeiger -->
<view name="MoAux" resource="Mo_Aux" x="200" y="201" opacity="1" id="MoAuxid">
<method name="rotate" args="Arc">
var rotincrement = 0 + Arc;
var dur = 0;
this.animate('rotation',rotincrement,dur);
</method>
</view>
</class>

Related

Maximo Anywhere Tasks for new work order

Not able to create tasks for new work order from Anywhere. Please suggest
Able to create a new work order without task
Added a new view for tasks, and trying to add taskId, status, Asset with lookup and Location with lookup.
lookup are not visible in UI. Here is my code
<view id="WorkExecution.NewAdhocWorkOrderInspTaskView" label="Create Inspection Tasks" >
<requiredResources id="WorkExecution.NewAdhocWorkOrderInspTaskView_requiredResources">
<requiredResource id="WorkExecutionAdhocINspTaskView.NewAdhocWorkOrderView_additionalasset" name="additionalasset"/>
</requiredResources>
<container id="WorkExecution.NewAdhocWorkOrderInspTaskView_workOrder_container_0" resource="AdhocWOInspTaskResource" >
<group id="WorkExecution.NewAdhocWorkOrderInspTaskView_group_0">
<groupitem id="WorkExecution.NewAdhocWorkOrderInspTaskView_workOrder_groupitem_4" >
<text editable="true" id="WorkExecution.NewAdhocWorkOrderView_groupitem_WorkExecution0.Asset" label="Asset2" layoutInsertAt="item1"
lookup="WorkExecutionAdhocWOInsptask" lookupAttribute="assetnum" placeHolder="Tap to enter1" resourceAttribute="InspTaskAssetNum" />
</groupitem>
</group>
</container>
</view>
<resource additionalData="true" id="AdhocWO_InsptaskResource" name="AdhocWOInspTaskResource" describedBy="http://jazz.net/ns/ism/asset/smarter_physical_infrastructure#WoActivity" providedBy="/oslc/sp/SmarterPhysicalInfrastructure" >
<attributes id="AdhocWO_InsptaskResource_attributes">
<attribute describedByProperty="spi:taskid" id="AdhocWO_InsptaskResource_spi_taskid" name="InspTaskId"/>
<attribute describedByProperty="spi:assetnum" id="AdhocWO_InsptaskResource_spi_AssetNum" name="InspTaskAssetNum"/>
<attribute describedByProperty="spi:location" id="AdhocWO_InsptaskResource_spi_Location" name="InspTaskLocation"/>
<attribute describedByProperty="spi:status" id="AdhocWO_InsptaskResource_spi_Status" name="InspTaskStatus"/>
</attributes>
</resource>
<resource additionalData="true" describedBy="http://open-services.net/ns/asset#Asset" id="additionalasset" name="additionalasset" pageSize="1000" providedBy="/oslc/sp/AssetManagement">
<attributes id="additionalasset_attributes">
<attribute describedByProperty="dcterms:identifier" id="additionalasset_assetuid_dctermsidentifier" name="assetuid"/>
<attribute describedByProperty="spi:assetid" id="additionalasset_assetid_spiassetid" name="assetid"/>
<attribute describedByProperty="spi:orgid" id="additionalasset_orgid_spiorgid" index="true" name="orgid"/>
<attribute describedByProperty="spi:siteid" id="additionalasset_siteid_spisiteid" index="true" isExactMatchIndex="true" name="siteid"/>
<attribute describedByProperty="oslc:shortTitle" id="additionalasset_assetnum_oslcshortTitle" index="true" name="assetnum"/>
</attributes>
<queryBases id="additionalasset_queryBases">
<queryBase id="additionalasset_queryBase_getadditionalasset" name="getadditionalasset" queryUri="/oslc/os/oslcasset"/>
</queryBases>
<whereClause id="additionalasset_whereClause"/>
</resource>
<lookup id="WorkExecutionAdhocWOInsptask" label="Select Asset" resource="additionalasset">
<requiredResources id="WorkExecutionAdhocWO_Insptask.AssetLookup_requiredResources">
<requiredResource id="WorkExecutionAdhocWO_Insptask.AssetLookup_additionalasset" name="additionalasset"/>
<requiredResource id="WorkExecutionAdhocWO_Insptask.AssetLookup_workOrder" name="AdhocWOInspTaskResource"/>
</requiredResources>
<list id="WorkExecutionAdhocWO_Insptask.AssetLookup_additionalasset_list" resource="additionalasset">
<listItemTemplate id="WorkExecutionAdhocWO_Insptask.AssetLookup_additionalasset_listItemTemplate_Item2Desc2" layout="Item2Desc2">
<listtext cssClass="bold textappearance-medium" id="WorkExecutionAdhocWO_Insptask.AssetLookup_additionalasset_Item2Desc2_assetnum" layoutInsertAt="item1" resourceAttribute="assetnum"/>
<listtext cssClass="bold textappearance-medium" id="WorkExecutionAdhocWO_Insptask.AssetLookup_additionalasset_Item2Desc2_description" layoutInsertAt="desc1" resourceAttribute="description"/>
<listtext id="WorkExecutionAdhocWO_Insptask.AssetLookup_additionalasset_Item2Desc2_location" layoutInsertAt="item2" resourceAttribute="location"/>
<listtext id="WorkExecutionAdhocWO_Insptask.AssetLookup_additionalasset_Item2Desc2_locationdesc" layoutInsertAt="desc2" resourceAttribute="locationdesc"/>
</listItemTemplate>
</list>
<returnAttributes id="WorkExecutionAdhocWO_Insptask.AssetLookup_returnAttributes">
<returnAttribute id="WorkExecutionAdhocWO_Insptask.AssetLookup_assetnum_asset" sourceAttribute="assetnum" targetAttribute="InspTaskAssetNum" />
</returnAttributes>
</lookup>

TFS 2012 Process Template - Column Updates not Displaying for Product and Iteration Backlogs -

I've update the AgileConfiguration.xml process template to include specific columns, column order and widths to match how our teams work. After importing the process configuration, I was expecting the changes to be reflected in Web Access product and iteration backlog pages. The changes do not appear, rather I see my personal column changes I may have made over time. I've tested in a new Team Project, the changes appear.
How can I remove my personal modifications and test to ensure the changes are applied? Further, how can I ensure all users receive the updates if they have made their own changes?
Example of the template:
<?xml version="1.0" encoding="utf-16"?>
<AgileProjectConfiguration>
<IterationBacklog>
<Columns>
<Column width="65" refname="System.WorkItemType" />
<Column width="400" refname="System.Title" />
<Column width="60" refname="System.State" />
<Column width="45" refname="Microsoft.VSTS.Scheduling.RemainingWork" />
<Column width="90" refname="System.AssignedTo" />
<Column width="40" refname="Microsoft.VSTS.Common.Priority" />
<Column width="100" refname="Microsoft.VSTS.Common.Triage" />
<Column width="50" refname="Custom.SCRID" />
<Column width="250" refname="System.AreaPath" />
</Columns>
</IterationBacklog>
<ProductBacklog>
<AddPanel>
<Fields>
<Field refname="System.Title" />
</Fields>
</AddPanel>
<Columns>
<Column width="65" refname="System.WorkItemType" />
<Column width="400" refname="System.Title" />
<Column width="60" refname="System.State" />
<Column width="45" refname="Microsoft.VSTS.Scheduling.Effort" />
<Column width="90" refname="System.AssignedTo" />
<Column width="100" refname="Microsoft.VSTS.Common.Triage" />
<Column width="150" refname="System.IterationPath" />
<Column width="50" refname="Custom.SCRID" />
<Column width="50" refname="Microsoft.VSTS.Common.BacklogPriority" />
<Column width="250" refname="System.AreaPath" />
</Columns>
</ProductBacklog>
</AgileProjectConfiguration>

Ext Net TimeField in an editable grid

I have a grid panel which display two TimeSpans in two columns and all is well when I load the page but when I go server side the validation on my editors always fail. I don't understand why the store can display the TimeSpans but cannot return it after...
Here my code :
<ext:GridPanel ID="WeekParams" runat="server" >
<Store>
<ext:Store runat="server">
<Reader>
<ext:JsonReader IDProperty="GUID">
<Fields>
<ext:RecordField Name="Day" Type="String" />
<ext:RecordField Name="UATNumber" Type="int" />
<ext:RecordField Name="From" Type="Date" />
<ext:RecordField Name="To" Type="Date" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column ColumnID="Day" DataIndex="Day" />
<ext:NumberColumn ColumnID="UATNumber" DataIndex="UATNumber" Format="0" />
<ext:DateColumn ColumnID="From" DataIndex="From" Format="dd/MM/yyyy" >
<Renderer Format="Date" FormatArgs="'HH:mm'" />
<Editor>
<ext:TimeField runat="server" />
</Editor>
</ext:DateColumn>
<ext:DateColumn ColumnID="To" DataIndex="To" Format="dd/MM/yyyy" >
<Renderer Format="Date" FormatArgs="'HH:mm'" />
<Editor>
<ext:TimeField runat="server" />
</Editor>
</ext:DateColumn>
</Columns>
</ColumnModel>
<Plugins>
<ext:EditableGrid runat="server" />
</Plugins>
</ext:GridPanel>
And here the result when I'm going to the server side :

GridPane: RowConstraints percentHeight not working as expected

Having a GridPane with 2 rows and 2 columns, setting the row constraints to 50 percent height results in unwanted behaviour.
Code:
<BorderPane xmlns:fx="http://javafx.com/fxml" fx:controller="..." stylesheets="#general.css" prefWidth="800" prefHeight="600">
<top>
<VBox>
<!-- ... -->
</VBox>
</top>
<bottom>
<HBox>
<!-- ... -->
</HBox>
</bottom>
<center>
<GridPane >
<children>
<ScrollPane fx:id="tilePane" GridPane.columnIndex="0" GridPane.rowIndex="0">
<content>
</content>
<GridPane.margin>
<Insets bottom="2" left="2" right="2" top="2" />
</GridPane.margin>
</ScrollPane>
<TreeView fx:id="listPane" GridPane.columnIndex="0" GridPane.rowIndex="1">
<root>
<TreeItem value="Stages" />
</root>
<GridPane.margin>
<Insets bottom="2" left="2" right="2" top="2" />
</GridPane.margin>
</TreeView>
<ScrollPane fx:id="mapPane" GridPane.columnIndex="1" GridPane.rowIndex="0" GridPane.rowSpan="2">
<content>
</content>
<GridPane.margin>
<Insets bottom="2" left="2" right="2" top="2" />
</GridPane.margin>
</ScrollPane>
</children>
<columnConstraints>
<ColumnConstraints hgrow="ALWAYS" percentWidth="25"/>
<ColumnConstraints hgrow="ALWAYS" />
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="ALWAYS" percentHeight="50" />
<RowConstraints vgrow="ALWAYS" percentHeight="50" />
</rowConstraints>
</GridPane>
</center>
</BorderPane>
(mentioned attribute at the bottom)
I expected that the two rows would share their available height at a 50% rate. They do this, but they also consume a lot more space than needed.
Picture of the result with, and without percentHeight specified:
Do I understand percentHeight wrong, or is there another approach?

Openlaszlo scaling issue in resizestate

I am actually trying to create a highlighter when dragging i was able to achieve this using the resize state and drawview class. But this is not working when the view is scaled.
When i am trying to drag the mouse sometimes its working and sometimes the selected region is either getting diminished or getting enlarged. I have attached the sample code
<canvas width="1024" height="768" debug="true">
<class name="boxdraw">
<handler name="onmousedown"><![CDATA[
Debug.write("onmousedown");
this.boxview.setAttribute ('x', this.getMouse ('x'));
this.boxview.setAttribute ('y', this.getMouse ('y'));
this.boxview.setAttribute ('width', 0);
this.boxview.setAttribute ('height', 0);
this.boxview.setAttribute ('visible', true);
this.boxview.resizer.apply ();
]]></handler>
<handler name="onmouseup"><![CDATA[
Debug.write("onmouseip");
this.boxview.setAttribute ('visible', false);
this.boxview.resizer.remove ();
]]></handler>
<handler name="oninit" >
this.setAttribute ('clickable', true);
</handler>
<drawview name="boxview" visible="false">
<attribute name="isready" value="false" type="boolean" />
<handler name="oncontext">
this.setAttribute("isready", true);
this.strokeStyle = 0x999999;
this.lineWidth = 2;
</handler>
<handler name="oninit">
this.strokeStyle = 0x999999;
this.lineWidth = 2;
</handler>
<resizestate name="resizer">
<attribute name="minheight" value="${-this.y + 1}"/>
<attribute name="minwidth" value="${-this.x + 1}"/>
<attribute name="maxheight" value="${classroot.height - this.y - 1}"/>
<attribute name="maxwidth" value="${classroot.width - this.x - 1}"/>
<attribute name="xroffset" value="${this.x - this.width + this.getMouse( 'x' )}" />
<attribute name="yroffset" value="${this.y - this.height + this.getMouse( 'y' )}" />
<attribute name="width"
value="${(this.immediateparent.getMouse ( 'x' ) - this.xroffset) > this.maxwidth ?
this.maxwidth :
Math.max((this.immediateparent.getMouse( 'x' )- this.xroffset), this.minwidth)}" />
<attribute name="height"
value="${(this.immediateparent.getMouse ( 'y' ) - this.yroffset) > this.maxheight ?
this.maxheight :
Math.max((this.immediateparent.getMouse( 'y' )- this.yroffset), this.minheight)}" />
<handler name="onwidth">
this._draw ();
</handler>
<handler name="onheight">
this._draw ();
</handler>
<method name="_draw"><![CDATA[
Debug.write("__draw", this.minheight, this.maxheight,this.minwidth,this.maxwidth);
Debug.write("this.xroffset,this.yroffset", this.xroffset,this.yroffset);
Debug.write("this.immediateparent.getMouse ( 'x' )",this.immediateparent.getMouse ( 'x' ),this.immediateparent.getMouse ( 'y' ));
this.clear ();
this.beginPath();
this.lineTo (this.width, 0);
this.lineTo (this.width, this.height);
this.lineTo (0, this.height);
this.lineTo (0, 0);
this.closePath();
this.stroke ();
]]></method>
</resizestate>
</drawview>
</class>
<view name="sample" width="1024" height="600" bgcolor="green" xscale="1.63" yscale="1.53">
<boxdraw name="resizebox"
width="100%" height="100%"
options="ignorelayout"
visible="true"/>
</view>
</canvas>

Resources