#input event not triggered in <q-option-group /> in quasar 2 - vuejs3

here is my code
<q-option-group
dense
:options="deliveryOptions"
type="radio"
color="black"
#input="trigger(addressPreference)"
v-model="addressPreference"
/>

Related

Devexpress Datagrid and Xamarin.Forms component in the same View

Can i have xamarin.forms component and Devexpress DataGrid in same View. I tried but only one shows.
Example:
<Entry Keyboard="Numeric" Placeholder="Enter Here" ></Entry>
<DatePicker FontSize="Large"></DatePicker>
<Button Text="Search"></Button>
<dxg:DataGridView ItemsSource="{Binding Path=Users}" RowHeight="90">
<dxg:DataGridView.Columns>
<dxg:TextColumn FieldName="Name" Caption="Name" IsReadOnly="true">
<dxg:TextColumn.Width>
<OnIdiom x:TypeArguments="GridLength" Tablet="200" Phone="120" />
</dxg:TextColumn.Width>
</dxg:TextColumn>
</dxg:DataGridView.Columns>
</dxg:DataGridView>
</Stack>```

Visual Studio Extension with custom command and subcommands

I'm trying to create a simple Visual Studio Extension using Visual Studio 2017 that adds commands to the project context menu in the Solution Explorer. I'd like to add my commands grouped together in a main option and then from that main option I would like my commands to be accessible, just like how the Add->New item, Add->Existing item, Add->Class etc. works for in the context menu of the project.
After going through the documentation here's what I have come up with so far for my vsct file:
<Commands package="guidMainItemPackage">
<Groups>
<Group guid="guidMainItemPackageCmdSet" id="MyMenuGroup" priority="0x0600" />
<Group guid="guidMainItemPackageCmdSet" id="SubMenuGroup" priority="0x0601" />
</Groups>
<Buttons>
<Button guid="guidMainItemPackageCmdSet" id="MainItemId" priority="0x0100" type="Button">
<Parent guid="guidMainItemPackageCmdSet" id="MyMenuGroup" />
<Icon guid="guidImages" id="bmpPic1" />
<Strings>
<ButtonText>Invoke MainItem</ButtonText>
</Strings>
</Button>
<Button guid="guidMainItemPackageCmdSet" id="cmdidSubItem" priority="0x0101" type="Button">
<Parent guid="guidMainItemPackageCmdSet" id="SubMenuGroup" />
<Icon guid="guidImages1" id="bmpPic1" />
<Strings>
<ButtonText>Invoke SubItem</ButtonText>
</Strings>
</Button>
</Buttons>
<Bitmaps>
<Bitmap guid="guidImages" href="Resources\MainItem.png" usedList="bmpPic1, bmpPic2, bmpPicSearch, bmpPicX, bmpPicArrows, bmpPicStrikethrough" />
<Bitmap guid="guidImages1" href="Resources\SubItem.png" usedList="bmpPic1, bmpPic2, bmpPicSearch, bmpPicX, bmpPicArrows, bmpPicStrikethrough" />
</Bitmaps>
</Commands>
<CommandPlacements>
<CommandPlacement guid="guidMainItemPackageCmdSet" id="MyMenuGroup" priority="0xFFFF">
<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_PROJNODE" />
</CommandPlacement>
<CommandPlacement guid="guidMainItemPackageCmdSet" id="SubMenuGroup" priority="0xFFFE">
<Parent guid="guidMainItemPackageCmdSet" id="MyMenuGroup" />
</CommandPlacement>
</CommandPlacements>
<Symbols>
<GuidSymbol name="guidMainItemPackage" value="{30f66380-eeeb-48bf-8554-0d63d87194af}" />
<GuidSymbol name="guidMainItemPackageCmdSet" value="{98ee7e8f-c421-4f0e-a9e9-86eab5141563}">
<IDSymbol name="MyMenuGroup" value="0x1020" />
<IDSymbol name="SubMenuGroup" value="0x1028" />
<IDSymbol name="MainItemId" value="0x0100" />
<IDSymbol value="4129" name="cmdidSubItem" />
</GuidSymbol>
<GuidSymbol name="guidImages" value="{b3c2dfad-df35-4e6b-880e-8018ce6c3d0f}">
<IDSymbol name="bmpPic1" value="1" />
<IDSymbol name="bmpPic2" value="2" />
<IDSymbol name="bmpPicSearch" value="3" />
<IDSymbol name="bmpPicX" value="4" />
<IDSymbol name="bmpPicArrows" value="5" />
<IDSymbol name="bmpPicStrikethrough" value="6" />
</GuidSymbol>
<GuidSymbol value="{93d3ad22-fe33-40da-b85f-a926952e3914}" name="guidImages1">
<IDSymbol name="bmpPic1" value="1" />
<IDSymbol name="bmpPic2" value="2" />
<IDSymbol name="bmpPicSearch" value="3" />
<IDSymbol name="bmpPicX" value="4" />
<IDSymbol name="bmpPicArrows" value="5" />
<IDSymbol name="bmpPicStrikethrough" value="6" />
</GuidSymbol>
</Symbols>
So basically I have created added two Custom commands to my project, a button for each of the commands, a group for each of the buttons and a commandplacement for each of the groups (everything else is just the default generated vsct template).
My problem is that using the code above, on the first command is displayed and it has no subitems. What would be the correct vsct content to achieve the desired layout?
After some more trial and error (mostly error), I decided to go through the command definitions of Visual Studio itself to find a similar group of commands, and I've finally came up with the answer. Here's the steps you need to take to realize this structure:
Create a group and set the parent of this group to the Visual Studio projects context menu.
Create a menu, whose parent is the group created in step 1.
Create a second group, whose parent is the menu created in step 2.
Create buttons for only the subitems.
Create commandplacements for the subitems created in step 4 where you place each button in the group created in step 3.

Spring webflow Value of second parameter is not passed to subflow

Hi, I am using spring webflow2.4.4 with spring4.1.3.
I am trying to pass values between two flows as below.
sending value from flow first xml
<action-state id="submit">
<evaluate expression="someMethod(form)" result="flowScope.saveStatus" />
<set name="flowScope.value1" value="form.value1" />
<set name="flowScope.value2" value="form.value2" />
<transition on="success" to="view" />
</action-state>
<subflow-state id="view" subflow="flow/path/view">
<input name="value1" value="value1" />
<input name="value2" value="value2" />
...
</subflow-state>
reeving data in flow second view xml
<input name="value1" type="string" />
<input name="value2" type="string" />
now in view xml I am able to receive value for "value1" what I passed from first flow but getting value for 'value2' is null.
I tried switching the position in first flow as below
<action-state id="submit">
<evaluate expression="someMethod(form)" result="flowScope.saveStatus" />
<set name="flowScope.value2" value="form.value2" />
<set name="flowScope.value1" value="form.value1" />
<transition on="success" to="view" />
</action-state>
<subflow-state id="view" subflow="flow/path/view">
<input name="value2" value="value2" />
<input name="value1" value="value1" />
...
</subflow-state>
Now I am able to see value of 'value2' but value for 'value1' receiving is null.
What is wrong here? see below debug logs for both example
1st trial
DEBUG SubflowState - Calling subflow 'flow/path/view' with input map['value1' -> 'ABCDF', 'value2' -> [null]]
2nd trial
DEBUG SubflowState - Calling subflow 'flow/path/view' with input map['value2' -> 'ABCDF', 'value1' -> [null]]
I want to pass both thew values to second flow but it second parameter is getting skipped somehow.
this is a very common mistake. the action state is transitioning when it gets a success and stops evaluating the rest of the commands.
you need to use <on-entry> to separate the two:
the commands you want to set or evaluate (value1 & value2)
the command that will be evaluated for the transition, here someMethod(form))
use this instead:
<action-state id="submit">
<on-entry>
<set name="flowScope.value2" value="form.value2" />
<set name="flowScope.value1" value="form.value1" />
</on-entry>
<evaluate expression="someMethod(form)" result="flowScope.saveStatus" />
<transition on="success" to="view" />
</action-state>
Thanks rptmat57, below code worked for me.
<action-state id="submit">
<evaluate expression="someMethod(form)" result="flowScope.saveStatus" />
<transition on="success" to="view" >
<set name="flowScope.value2" value="form.value2" />
<set name="flowScope.value1" value="form.value1" />
</transition>
</action-state>

WPF trigger template on every button

I have created a Button with the following trigger:
<Button Content="Test>
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<cal:ActionMessage MethodName="SetViewModelToOpen">
<cal:Parameter Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadButton}},Path=Content}" />
</cal:ActionMessage>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
Now I have several button like this one and want this trigger to be applied to every button.
How to do this?
You need to use styles, in your case:
<Style x:Key="ButtonWithTriggers" TargetType="Button">
<Style.Triggers>
<Trigger Property="IsPressed" Value="true">
<[Place your actions here]>
</Trigger>
</Style.Triggers>
</Style>
Then your button declaration:
<Button Content="Test" Style="{StaticResource ButtonWithTriggers}" />

Spring Webflow : how do I pass an attribute from one flow to another during a transition?

I have an action-state that evaluates an expression and then transitions to various other states depending on the result. One of the result states is a subflow-state that hands control to another flow, example;
<action-state id="doWork">
<evaluate expression="someAction.doWork(someInput)" />
<transition on="WORKSUCCESS" to="workSuccess" />
<transition on="WORKFAIL" to="fixFail" />
</action-state>
<subflow-state id="fixFail" subflow="someOtherPlace/someOtherWorkToFixFail">
<input name="someNumber" value="1" type="java.lang.Integer" />
<transition on="finish" to="workSuccess" />
</subflow-state>
As you can see I can pass an input into the subflow via the input tag but my question is how can I specify and pass additional inputs that I want present if and only if the subflow-state is being called from the transition WORKFAIL? Assume the subflow-state "fixFail" can be called from other action-states.
I've tried things similar to the following with no effect;
<action-state id="doWork">
<evaluate expression="someAction.doWork(someInput)" />
<transition on="WORKSUCCESS" to="workSuccess" />
<transition on="WORKFAIL" to="fixFail">
<attribute name="newInput" value="3000" type="java.lang.Integer" />
</transition>
</action-state>
<subflow-state id="fixFail" subflow="someOtherPlace/someOtherWorkToFixFail">
<input name="someNumber" value="1" type="java.lang.Integer" />
<input name="someNumber2" value="flowScope.newInput" type="java.lang.Integer" />
<transition on="finish" to="workSuccess" />
</subflow-state>
There are three ways you can do this. You can do it through the conversation, session or as attributes passed in.
ConversationScope: If a field is in the conversationScope the field is visible anywhere in that specific flow as well as that flow's subflows (and their transitions)
SessionScope: (Probably not what you
want) Is visible to all flows and
their subflows
Finally you can pass the field as an attribute into the subflow state for example
<subflow-state id="fixFail" subflow="someOtherPlace/someOtherWorkToFixFail">
<input name="someNumber" value="1" type="java.lang.Integer" />
<input name="someNumber2" value="flowScope.newInput" type="java.lang.Integer" />
<transition on="finish" to="workSuccess" />
</subflow-state>
In your subflow's xml
<?xml version="1.0" encoding="UTF-8"?>
<flow>
<input name="someNumber"/>
<input name="someNumber2"/>
...
</flow>
In this example someNumber and someNumber two are passed in as attributes to your subflow. In which you can evaluate them as ${someNumber}
Edit:
This is to address your comment question. If you wanted to set a variable in the conversation scope on a specific transition you can do:
<transition on="WORKFAIL" to="fixFail" >
<set name="conversationScope.someVariable" value="Hello World"/>
</transition>
Then in your jsp
${someVariable} <!-- This will print out 'Hello World' -->

Resources