PHP7 xml_parse() changes, truncated arrays? - xml-parsing

The problem I'm having occurs with the xml_parse() function in the
ATutor QTI Parser
I'm hoping someone can point out what I'm missing, or perhaps come up with a work around for PHP 7.1.1.
I've found no documentation, or posts here, that suggest changes to the PHP xml_parse() function from 5.6 to 7.1, though the two versions seem to parse xml differently. The XML being parse appears below.
Specifically, for the question array in the examples, 5.6.30 returns an array of questions, like:
[question] => Array
(
[0] => graphic matching
[1] => LIKERT
[2] => multi choice question
[3] => Mutliple question
[4] => open ended
[5] => ordering
[6] => Simple match
[7] => true
)
While with php 7.1.1, all else being the same, it returns only the first letters from each of the array elements above, as a string.
[question] => gLmMooSt
The XML file is an IMS QTI 1.2.1 manifest, from a QTI test (i.e. quiz) package.
The element where the truncating occurs is the question title (the question itself), found in the following element, which returns as the first element in the array when using PHP5.6 ([0] => graphic matching), and return as the first letter, "g", in the question string when using PHP7.1.1 ([question] => gLmMooSt)
<material>
<mattext texttype="text/html">graphic matching</mattext>
</material>
<?xml version="1.0" encoding="utf-8"?>
<questestinterop
xmlns="http://www.imsglobal.org/xsd/ims_qtiasiv1p2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.imsglobal.org/xsd/ims_qtiasiv1p2 http://www.imsglobal.org/profile/cc/ccv1p0/derived_schema/domainProfile_4/ims_qtiasiv1p2_localised.xsd"
>
<assessment title="Simple test" ident="d41d8cd98f00b204e9800998ecf8427e">
<section ident="ATUTOR-8" title="Simple test">
<!-- matching question with partial marks -->
<item title="Mathcing question" ident="ITEM_2">
<itemmetadata>
<qtimetadata>
<qtimetadatafield>
<fieldlabel>qmd_itemtype</fieldlabel>
<fieldentry>Logical Groups</fieldentry>
</qtimetadatafield>
<qtimetadatafield>
<fieldlabel>qmd_questiontype</fieldlabel>
<fieldentry>Drag-and-drop</fieldentry>
</qtimetadatafield>
<qtimetadatafield>
<fieldlabel>cc_profile</fieldlabel>
<fieldentry>cc.pattern_match.v0p1</fieldentry>
</qtimetadatafield>
<qtimetadatafield>
<fieldlabel>cc_weighting</fieldlabel>
<fieldentry>5</fieldentry>
</qtimetadatafield>
</qtimetadata>
</itemmetadata>
<presentation>
<flow>
<material>
<mattext texttype="text/html">graphic matching</mattext>
</material>
<response_lid ident="RESPONSE-98f13708210194c475687be6106a3b84" rcardinality="Multiple">
<material>
<mattext texttype="text/html">a</mattext>
</material>
<render_choice shuffle="No">
<response_label ident="Option0">
<flow_mat>
<material>
<mattext texttype="text/html">A</mattext>
</material>
</flow_mat>
</response_label>
<response_label ident="Option1">
<flow_mat>
<material>
<mattext texttype="text/html">B</mattext>
</material>
</flow_mat>
</response_label>
</render_choice>
</response_lid>
<response_lid ident="RESPONSE-3c59dc048e8850243be8079a5c74d079" rcardinality="Multiple">
<material>
<mattext texttype="text/html">b</mattext>
</material>
<render_choice shuffle="No">
<response_label ident="Option0">
<flow_mat>
<material>
<mattext texttype="text/html">A</mattext>
</material>
</flow_mat>
</response_label>
<response_label ident="Option1">
<flow_mat>
<material>
<mattext texttype="text/html">B</mattext>
</material>
</flow_mat>
</response_label>
</render_choice>
</response_lid>
</flow>
</presentation>
<resprocessing>
<outcomes>
<decvar varname="SCORE" />
</outcomes>
</resprocessing>
</item>
<!-- likert question (aka multiple choice with no correct answer) -->
<item title="Multiple choice question" ident="ITEM_1">
<itemmetadata>
<qtimetadata>
<qtimetadatafield>
<fieldlabel>qmd_itemtype</fieldlabel>
<fieldentry>Logical Identifier</fieldentry>
</qtimetadatafield>
<qtimetadatafield>
<fieldlabel>qmd_questiontype</fieldlabel>
<fieldentry>Multiple-choice</fieldentry>
</qtimetadatafield>
<qtimetadatafield>
<fieldlabel>cc_profile</fieldlabel>
<fieldentry>cc.mutliple_choice.v0p1</fieldentry>
</qtimetadatafield>
</qtimetadata>
</itemmetadata>
<presentation>
<flow>
<material>
<mattext texttype="text/html">LIKERT</mattext>
</material>
<response_lid ident="RESPONSE1" rcardinality="Single">
<render_choice shuffle="No" minnumber="1" maxnumber="1">
<flow_label>
<response_label ident="Choice0">
<material>
<mattext texttype="text/html">A LITTLE</mattext>
</material>
</response_label>
<response_label ident="Choice1">
<material>
<mattext texttype="text/html">A lot</mattext>
</material>
</response_label>
</flow_label>
</render_choice>
</response_lid>
</flow>
</presentation>
<resprocessing>
<respcondition title="CorrectResponse">
<conditionvar>
<varequal respident="RESPONSE1">Choice0</varequal>
</conditionvar>
<setvar varname="que_score" action="Set">0</setvar>
</respcondition>
<respcondition title="CorrectResponse">
<conditionvar>
<varequal respident="RESPONSE1">Choice1</varequal>
</conditionvar>
<setvar varname="que_score" action="Set">0</setvar>
</respcondition>
</resprocessing>
</item>
<!-- single answer multiple choice question -->
<item title="Multiple choice question" ident="ITEM_5">
<itemmetadata>
<qtimetadata>
<qtimetadatafield>
<fieldlabel>qmd_itemtype</fieldlabel>
<fieldentry>Logical Identifier</fieldentry>
</qtimetadatafield>
<qtimetadatafield>
<fieldlabel>qmd_questiontype</fieldlabel>
<fieldentry>Multiple-choice</fieldentry>
</qtimetadatafield>
<qtimetadatafield>
<fieldlabel>cc_profile</fieldlabel>
<fieldentry>cc.mutliple_choice.v0p1</fieldentry>
</qtimetadatafield>
<qtimetadatafield>
<fieldlabel>cc_weighting</fieldlabel>
<fieldentry>5</fieldentry>
</qtimetadatafield>
</qtimetadata>
</itemmetadata>
<presentation>
<flow>
<material>
<mattext texttype="text/html">multi choice question</mattext>
</material>
<response_lid ident="RESPONSE5" rcardinality="Single">
<render_choice shuffle="No" minnumber="1" maxnumber="1">
<response_label ident="Choice0">
<flow_mat>
<material>
<mattext texttype="text/html">this is correct</mattext>
</material>
</flow_mat>
</response_label>
<response_label ident="Choice1">
<flow_mat>
<material>
<mattext texttype="text/html">this is wrong</mattext>
</material>
</flow_mat>
</response_label>
<response_label ident="Choice2">
<flow_mat>
<material>
<mattext texttype="text/html">this is wrong</mattext>
</material>
</flow_mat>
</response_label>
</render_choice>
</response_lid>
</flow>
</presentation>
<resprocessing>
<outcomes>
<decvar varname="SCORE" />
</outcomes>
<respcondition title="CorrectResponse">
<conditionvar>
<varequal respident="RESPONSE5">Choice0</varequal>
</conditionvar>
<setvar varname="que_score" action="Set">5</setvar>
</respcondition>
</resprocessing>
</item>
<!-- multi answer multiple choice question with partial marks -->
<item title="Multiple answer question" ident="ITEM_4">
<itemmetadata>
<qtimetadata>
<qtimetadatafield>
<fieldlabel>qmd_itemtype</fieldlabel>
<fieldentry>Logical Identifier</fieldentry>
</qtimetadatafield>
<qtimetadatafield>
<fieldlabel>qmd_questiontype</fieldlabel>
<fieldentry>Multiple-response</fieldentry>
</qtimetadatafield>
<qtimetadatafield>
<fieldlabel>cc_profile</fieldlabel>
<fieldentry>cc.mutliple_response.v0p1</fieldentry>
</qtimetadatafield>
<qtimetadatafield>
<fieldlabel>cc_weighting</fieldlabel>
<fieldentry>5</fieldentry>
</qtimetadatafield>
</qtimetadata>
</itemmetadata>
<presentation>
<flow>
<material>
<mattext texttype="text/html">Mutliple question</mattext>
</material>
<response_lid ident="RESPONSE4" rcardinality="Multiple">
<render_choice shuffle="No">
<response_label ident="Choice0">
<flow_mat>
<material>
<mattext texttype="text/html">coorect</mattext>
</material>
</flow_mat>
</response_label>
<response_label ident="Choice1">
<flow_mat>
<material>
<mattext texttype="text/html">coorect</mattext>
</material>
</flow_mat>
</response_label>
<response_label ident="Choice2">
<flow_mat>
<material>
<mattext texttype="text/html">icorrect</mattext>
</material>
</flow_mat>
</response_label>
<response_label ident="Choice3">
<flow_mat>
<material>
<mattext texttype="text/html">icorrect</mattext>
</material>
</flow_mat>
</response_label>
</render_choice>
</response_lid>
</flow>
</presentation>
<resprocessing>
<outcomes>
<decvar varname="SCORE" />
</outcomes>
<respcondition title="CorrectResponse">
<conditionvar>
<varequal respident="RESPONSE4">Choice0</varequal>
</conditionvar>
<setvar varname="Respondus_Correct">5</setvar>
</respcondition>
<respcondition title="CorrectResponse">
<conditionvar>
<varequal respident="RESPONSE4">Choice1</varequal>
</conditionvar>
<setvar varname="Respondus_Correct">5</setvar>
</respcondition>
</resprocessing>
</item>
<!-- open ended (free text) question -->
<item title="Open ended question" ident="ITEM_6">
<itemmetadata>
<qtimetadata>
<qtimetadatafield>
<fieldlabel>qmd_itemtype</fieldlabel>
<fieldentry>String</fieldentry>
</qtimetadatafield>
<qtimetadatafield>
<fieldlabel>qmd_questiontype</fieldlabel>
<fieldentry>FIB-string</fieldentry>
</qtimetadatafield>
<qtimetadatafield>
<fieldlabel>cc_profile</fieldlabel>
<fieldentry>cc.fib.v0p1</fieldentry>
</qtimetadatafield>
<qtimetadatafield>
<fieldlabel>cc_weighting</fieldlabel>
<fieldentry>5</fieldentry>
</qtimetadatafield>
</qtimetadata>
</itemmetadata>
<presentation>
<flow>
<material>
<mattext texttype="text/html">open ended</mattext>
</material>
<response_str ident="RESPONSE6" rcardinality="Single">
<render_fib rows="1" columns="5">
<response_label ident="Choice" />
</render_fib>
</response_str>
</flow>
</presentation>
</item>
<!-- ordering question -->
<item title="Ordering question" ident="ITEM_7">
<itemmetadata>
<qtimetadata>
<qtimetadatafield>
<fieldlabel>qmd_itemtype</fieldlabel>
<fieldentry>Logical Identifier</fieldentry>
</qtimetadatafield>
</qtimetadata>
</itemmetadata>
<presentation>
<flow>
<material>
<mattext texttype="text/html">ordering</mattext>
</material>
<response_lid ident="RESPONSE7" rcardinality="Ordered">
<render_choice shuffle="Yes" minnumber="4" maxnumber="4">
<response_label ident="Choice0">
<flow_mat>
<material>
<mattext texttype="text/html">item1</mattext>
</material>
</flow_mat>
</response_label>
<response_label ident="Choice1">
<flow_mat>
<material>
<mattext texttype="text/html">itms2</mattext>
</material>
</flow_mat>
</response_label>
<response_label ident="Choice2">
<flow_mat>
<material>
<mattext texttype="text/html">item 3</mattext>
</material>
</flow_mat>
</response_label>
<response_label ident="Choice3">
<flow_mat>
<material>
<mattext texttype="text/html">items 4</mattext>
</material>
</flow_mat>
</response_label>
</render_choice>
</response_lid>
</flow>
</presentation>
<resprocessing>
<outcomes>
<decvar varname="SCORE" />
</outcomes>
<respcondition title="CorrectResponse">
<conditionvar>
<varequal respident="RESPONSE7">Choice0</varequal>
</conditionvar>
<setvar varname="Respondus_Correct">1.25</setvar>
</respcondition>
<respcondition title="CorrectResponse">
<conditionvar>
<varequal respident="RESPONSE7">Choice1</varequal>
</conditionvar>
<setvar varname="Respondus_Correct">1.25</setvar>
</respcondition>
<respcondition title="CorrectResponse">
<conditionvar>
<varequal respident="RESPONSE7">Choice2</varequal>
</conditionvar>
<setvar varname="Respondus_Correct">1.25</setvar>
</respcondition>
<respcondition title="CorrectResponse">
<conditionvar>
<varequal respident="RESPONSE7">Choice3</varequal>
</conditionvar>
<setvar varname="Respondus_Correct">1.25</setvar>
</respcondition>
</resprocessing>
</item>
<!-- matching question with partial marks -->
<item title="Mathcing question" ident="ITEM_3">
<itemmetadata>
<qtimetadata>
<qtimetadatafield>
<fieldlabel>qmd_itemtype</fieldlabel>
<fieldentry>Logical Groups</fieldentry>
</qtimetadatafield>
<qtimetadatafield>
<fieldlabel>qmd_questiontype</fieldlabel>
<fieldentry>Drag-and-drop</fieldentry>
</qtimetadatafield>
<qtimetadatafield>
<fieldlabel>cc_profile</fieldlabel>
<fieldentry>cc.pattern_match.v0p1</fieldentry>
</qtimetadatafield>
<qtimetadatafield>
<fieldlabel>cc_weighting</fieldlabel>
<fieldentry>5</fieldentry>
</qtimetadatafield>
</qtimetadata>
</itemmetadata>
<presentation>
<flow>
<material>
<mattext texttype="text/html">Simple match</mattext>
</material>
<response_lid ident="RESPONSE-34173cb38f07f89ddbebc2ac9128303f" rcardinality="Multiple">
<material>
<mattext texttype="text/html">A</mattext>
</material>
<render_choice shuffle="No">
<response_label ident="Option0">
<flow_mat>
<material>
<mattext texttype="text/html">A</mattext>
</material>
</flow_mat>
</response_label>
<response_label ident="Option1">
<flow_mat>
<material>
<mattext texttype="text/html">B</mattext>
</material>
</flow_mat>
</response_label>
</render_choice>
</response_lid>
<response_lid ident="RESPONSE-c16a5320fa475530d9583c34fd356ef5" rcardinality="Multiple">
<material>
<mattext texttype="text/html">B</mattext>
</material>
<render_choice shuffle="No">
<response_label ident="Option0">
<flow_mat>
<material>
<mattext texttype="text/html">A</mattext>
</material>
</flow_mat>
</response_label>
<response_label ident="Option1">
<flow_mat>
<material>
<mattext texttype="text/html">B</mattext>
</material>
</flow_mat>
</response_label>
</render_choice>
</response_lid>
</flow>
</presentation>
<resprocessing>
<outcomes>
<decvar varname="SCORE" />
</outcomes>
<respcondition title="CorrectResponse">
<conditionvar>
<varequal respident="RESPONSE-34173cb38f07f89ddbebc2ac9128303f">Option0</varequal>
</conditionvar>
<setvar varname="Respondus_Correct">5</setvar>
</respcondition>
<respcondition title="CorrectResponse">
<conditionvar>
<varequal respident="RESPONSE-c16a5320fa475530d9583c34fd356ef5">Option1</varequal>
</conditionvar>
<setvar varname="Respondus_Correct">5</setvar>
</respcondition>
</resprocessing>
<itemfeedback ident="FEEDBACK">
<solution>
<solutionmaterial>
<flow_mat>
<material>
<mattext texttype="text/html">Optional Feedback</mattext>
</material>
</flow_mat>
</solutionmaterial>
</solution>
</itemfeedback>
</item>
<!-- true or false question (aka multiple choice with two choices) -->
<item title="True or False question" ident="ITEM_8">
<itemmetadata>
<qtimetadata>
<qtimetadatafield>
<fieldlabel>qmd_itemtype</fieldlabel>
<fieldentry>Logical Identifier</fieldentry>
</qtimetadatafield>
<qtimetadatafield>
<fieldlabel>qmd_questiontype</fieldlabel>
<fieldentry>True/false</fieldentry>
</qtimetadatafield>
<qtimetadatafield>
<fieldlabel>cc_profile</fieldlabel>
<fieldentry>cc.true_false.v0p1</fieldentry>
</qtimetadatafield>
<qtimetadatafield>
<fieldlabel>cc_weighting</fieldlabel>
<fieldentry>5</fieldentry>
</qtimetadatafield>
</qtimetadata>
</itemmetadata>
<presentation>
<flow>
<material>
<mattext texttype="text/html">true</mattext>
</material>
<response_lid ident="RESPONSE8" rcardinality="Single">
<render_choice shuffle="No">
<response_label ident="ChoiceT">
<flow_mat>
<material>
<mattext texttype="text/html">True</mattext>
</material>
</flow_mat>
</response_label>
<response_label ident="ChoiceF">
<flow_mat>
<material>
<mattext texttype="text/html">False</mattext>
</material>
</flow_mat>
</response_label>
</render_choice>
</response_lid>
</flow>
</presentation>
<resprocessing>
<outcomes>
<decvar varname="SCORE" />
</outcomes>
<respcondition title="CorrectResponse">
<conditionvar>
<varequal respident="RESPONSE8">
ChoiceT </varequal>
</conditionvar>
<setvar varname="que_score" action="Set">5</setvar>
</respcondition>
</resprocessing>
</item> </section>
</assessment>
</questestinterop>

This issue is caused by that, the variable $question for holding an array is initiated as an empty string.
PHP7 has a much strict variable type validation. Before PHP7, when a variable is treated as a different type in the code than the type it initiates as, PHP silently convert it to the new type. With PHP7, the variable is treated as the initialized type throughout the code, in this case results in array values assigned to $question are truncated to compose a string by only taking the first character from each array value.

Related

what(): Actuation input port for model instance XXX must be connected

I am trying to build and simulate a simple diff-drive robot under drake to get familiar with the components offered. I created a simple URDF which bases on existing PR2 URDF. I load the model with AddMultibodyPlantSceneGraph. With following snippet,
std::string vox_nav_drake_ros_package_path =
ament_index_cpp::get_package_share_directory("vox_nav_drake_ros");
drake::systems::DiagramBuilder<double> builder;
auto [plant, scene_graph] =
drake::multibody::AddMultibodyPlantSceneGraph(&builder, 0.1 /* time_step */);
const std::string & pathname = vox_nav_drake_ros_package_path + "/urdf/botanbot.urdf";
drake::multibody::Parser parser(&plant);
parser.AddModelFromFile(pathname);
plant.Finalize();
auto context = plant.CreateDefaultContext();
auto zero_torque =
builder.AddSystem<drake::systems::ConstantVectorSource<double>>(
Eigen::VectorXd::Zero(3));
builder.Connect(
zero_torque->get_output_port(),
plant.get_actuation_input_port());
auto diagram = builder.Build();
drake::systems::Simulator<double> simulator(plant);
simulator.Initialize();
while (1) {
simulator.AdvanceTo(simulator.get_context().get_time() + 0.1);
}
The error says that I need to connect the Actuation input port for model instance, which I already do, but the error persists and I don't understand why.
Here is the URDF I use;
<?xml version="1.0"?>
<robot name="botanbot">
<!-- BEGIN LINKS -->
<!-- BEGIN LINKS RELATED TO ROBOT BODY-->
<link name="base_link">
<visual>
<origin xyz="-0.019375 0.005287 0.340756" rpy="0 0 0" />
<geometry>
<mesh filename="/home/atas/colcon_ws/install/vox_nav_drake_ros/share/vox_nav_drake_ros/meshes/base_simplified.obj" />
</geometry>
<material name="Cyan">
<color rgba="0 1.0 1.0 1.0" />
</material>
</visual>
<inertial>
<mass value="1326.0" />
<inertia ixx="2581.13354740" ixy="0" ixz="0" iyy="591.30846112" iyz="0" izz="2681.9500862" />
</inertial>
</link>
<!-- END JOINTS RELATED TO ROBOT BODY -->
<!--//////////////////////////////////-->
<!-- END JOINTS -->
<link name="base_footprint">
<inertial>
<mass value="1.0" />
<origin xyz="0 0 0" />
<inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01" />
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0" />
<geometry>
<box size="0.01 0.01 0.01" />
</geometry>
<material name="Cyan">
<color rgba="0 1.0 1.0 1.0" />
</material>
</visual>
</link>
<joint name="base_footprint_joint" type="fixed">
<origin rpy="0 0 0" xyz="0 0 0.051" />
<child link="base_link" />
<parent link="base_footprint" />
</joint>
<link name="base_link_0" />
<link name="base_link_1" />
<!-- RigidBodyTree only supports fixed or unactuated joints to the
world. Prismatic joints with a transmission don't work
correctly. -->
<link name="base_link_for_rbt_compat" />
<joint name="world_joint_for_rbt_compat" type="fixed">
<parent link="world" />
<child link="base_link_for_rbt_compat" />
</joint>
<joint name="x" type="prismatic">
<parent link="base_link_for_rbt_compat" />
<child link="base_link_0" />
<axis xyz="1 0 0" />
</joint>
<joint name="y" type="prismatic">
<parent link="base_link_0" />
<child link="base_link_1" />
<axis xyz="0 1 0" />
</joint>
<joint name="theta" type="revolute">
<parent link="base_link_1" />
<child link="base_footprint" />
<axis xyz="0 0 1" />
<limit effort="100" lower="-3.14" upper="3.14" velocity="100" />
</joint>
<transmission name="x_tran">
<type>transmission_interface/SimpleTransmission</type>
<joint name="x">
<hardwareInterface>PositionJointInterface</hardwareInterface>
</joint>
<actuator name="x_motor">
<hardwareInterface>PositionJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
<transmission name="y_tran">
<type>transmission_interface/SimpleTransmission</type>
<joint name="y">
<hardwareInterface>PositionJointInterface</hardwareInterface>
</joint>
<actuator name="y_motor">
<hardwareInterface>PositionJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
<transmission name="theta_tran">
<type>transmission_interface/SimpleTransmission</type>
<joint name="theta">
<hardwareInterface>PositionJointInterface</hardwareInterface>
</joint>
<actuator name="thata_motor">
<hardwareInterface>PositionJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
</robot>
The problem is that you passed the plant to the Simulator. You need to pass the diagram. (The plant doesn't have the input port connected, only the diagram does).

SVG bulge on iOS/safari with filter, feGaussianBlur and feColorMatrix

I'm trying to get a gooey effect with svg. Things are fine in chrome, but look weird on Safari & iOS. Here is the example: https://codepen.io/rubenhak/project/editor/ZoBENL
How it looks on Chrome:
How it looks on Safari/iOS:
The problem is when the one circle is too far, too small or missing, the other circle gets bulged. None of this is an issue on chrome.
Code:
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 500 200" width="500" height="200">
<defs>
<filter id="goo" color-interpolation-filters="sRGB">
<feGaussianBlur in="SourceGraphic" stdDeviation="8" result="blur" />
<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 21 -7" result="cm" />
</filter>
</defs>
<g >
<circle fill="green" r="15" cx="30" cy="95" />
</g>
<g filter="url(#goo)">
<circle fill="blue" r="30" cx="80" cy="50" />
<circle fill="green" r="15" cx="80" cy="95" />
</g>
<g filter="url(#goo)">
<circle fill="blue" r="20" cx="160" cy="50" />
<circle fill="green" r="15" cx="160" cy="95" />
</g>
<g filter="url(#goo)">
<circle fill="blue" r="20" cx="220" cy="60" />
<circle fill="green" r="15" cx="220" cy="95" />
</g>
<g filter="url(#goo)">
<circle fill="blue" r="20" cx="300" cy="50" />
<circle fill="green" r="15" cx="300" cy="95" />
</g>
<g filter="url(#goo)">
<circle fill="blue" r="10" cx="350" cy="50" />
<circle fill="green" r="15" cx="350" cy="95" />
</g>
<g filter="url(#goo)">
<circle fill="green" r="15" cx="400" cy="95" />
</g>
<g >
<circle fill="green" r="15" cx="450" cy="95" />
</g>
</svg>
Safari is clipping the output of the feGaussianBlur to the default filter region before handing it to the feColorMatrix. Chrome doesn't do that. You can fix it by expanding the default filter region.
<filter id="goo" x="-50%" width="200%" y="-50%" height="200%" color-interpolation-filters="sRGB">

Unable to receive HumanTask response to the BPEL process

I'm quite new to WSO2 BPS 3.2.0 and for BPEL as well. I created a BPEL process for firing a HumanTask using bpel4people extension. For that I took the sample humantask shipped with the BPS. I could successfully fire the task. But once I complete the task, My bpel process does not receive the response from the task. Is there any special procedure to get the respose ? Here are my bpel process and the HumanTask's WSDL file.
bpel file..
<!-- JavaTraining BPEL Process [Generated by the Eclipse BPEL Designer] -->
<!-- Date: Mon Mar 05 12:13:11 IST 2012 -->
<bpel:process name="JavaTraining" targetNamespace="http://loits.com/bps/training" suppressJoinFailure="yes" xmlns:tns="http://loits.com/bps/training" xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:ns1="http://www.w3.org/2001/XMLSchema"
xmlns:ns2="http://www.example.com/claims/" xmlns:xsd="http://www.example.com/claims/schema" xmlns:b4p="http://docs.oasis-open.org/ns/bpel4people/bpel4people/200803">
<!-- Import the client WSDL -->
<bpel:extensions>
<bpel:extension namespace="http://docs.oasis-open.org/ns/bpel4people/bpel4people/200803" mustUnderstand="yes"></bpel:extension>
</bpel:extensions>
<bpel:import namespace="http://www.example.com/claims/" location="ClaimsApprovalTask.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"></bpel:import>
<bpel:import location="JavaTrainingArtifacts.wsdl" namespace="http://loits.com/bps/training" importType="http://schemas.xmlsoap.org/wsdl/" />
<!-- ================================================================= -->
<!-- PARTNERLINKS -->
<!-- List of services participating in this BPEL process -->
<!-- ================================================================= -->
<bpel:partnerLinks>
<!-- The 'client' role represents the requester of this service. -->
<bpel:partnerLink name="client" partnerLinkType="tns:JavaTraining" myRole="JavaTrainingProvider" />
<bpel:partnerLink name="b4pPtlnk" partnerLinkType="tns:b4pPtlnkType" myRole="requester" partnerRole="receiever"></bpel:partnerLink>
</bpel:partnerLinks>
<!-- ================================================================= -->
<!-- VARIABLES -->
<!-- List of messages and XML documents used within this BPEL process -->
<!-- ================================================================= -->
<bpel:variables>
<!-- Reference to the message passed as input during initiation -->
<bpel:variable name="input" messageType="tns:JavaTrainingRequestMessage" />
<!--
Reference to the message that will be returned to the requester
-->
<bpel:variable name="output" messageType="tns:JavaTrainingResponseMessage" />
<bpel:variable name="dummyVar" type="ns1:boolean"></bpel:variable>
<bpel:variable name="b4pIn" messageType="ns2:ClaimApprovalRequest"></bpel:variable>
<bpel:variable name="b4pOut" messageType="ns2:ClaimApprovalResponse"></bpel:variable>
</bpel:variables>
<!-- ================================================================= -->
<!-- ORCHESTRATION LOGIC -->
<!-- Set of activities coordinating the flow of messages across the -->
<!-- services integrated within this business process -->
<!-- ================================================================= -->
<bpel:sequence name="main">
<!-- Receive input from requester.
Note: This maps to operation defined in JavaTraining.wsdl
-->
<bpel:receive name="receiveInput" partnerLink="client" portType="tns:JavaTraining" operation="process" variable="input" createInstance="yes" />
<!-- Generate reply to synchronous request -->
<bpel:if name="If_amount_1000">
<bpel:condition expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[number($input.payload/tns:amount) > number(1000)]]>
</bpel:condition>
<bpel:sequence>
<bpel:assign validate="no" name="Assign1">
<bpel:copy>
<bpel:from>
<bpel:literal>
<tschema:ClaimApprovalData xmlns:tschema="http://www.example.com/claims/schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tschema:cust>
<tschema:id>tschema:id</tschema:id>
<tschema:firstname>tschema:firstname</tschema:firstname>
<tschema:lastname>tschema:lastname</tschema:lastname>
</tschema:cust>
<tschema:amount>0.0</tschema:amount>
<tschema:region>tschema:region</tschema:region>
<tschema:priority>0</tschema:priority>
</tschema:ClaimApprovalData>
</bpel:literal>
</bpel:from>
<bpel:to variable="b4pIn" part="ClaimApprovalRequest"></bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from part="payload" variable="input">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[tns:customer/tns:custId]]>
</bpel:query>
</bpel:from>
<bpel:to part="ClaimApprovalRequest" variable="b4pIn">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[xsd:cust/xsd:id]]>
</bpel:query>
</bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from part="payload" variable="input">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[tns:customer/tns:firstName]]>
</bpel:query>
</bpel:from>
<bpel:to part="ClaimApprovalRequest" variable="b4pIn">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[xsd:cust/xsd:firstname]]>
</bpel:query>
</bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from part="payload" variable="input">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[tns:customer/tns:lastName]]>
</bpel:query>
</bpel:from>
<bpel:to part="ClaimApprovalRequest" variable="b4pIn">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[xsd:cust/xsd:lastname]]>
</bpel:query>
</bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from part="payload" variable="input">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[tns:amount]]>
</bpel:query>
</bpel:from>
<bpel:to part="ClaimApprovalRequest" variable="b4pIn">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[xsd:amount]]>
</bpel:query>
</bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from part="payload" variable="input">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[tns:priority]]>
</bpel:query>
</bpel:from>
<bpel:to part="ClaimApprovalRequest" variable="b4pIn">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[xsd:priority]]>
</bpel:query>
</bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from part="payload" variable="input">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[tns:region]]>
</bpel:query>
</bpel:from>
<bpel:to part="ClaimApprovalRequest" variable="b4pIn">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[xsd:region]]>
</bpel:query>
</bpel:to>
</bpel:copy>
</bpel:assign>
<bpel:extensionActivity>
<b4p:peopleActivity name="HumanTask" inputVariable="b4pIn" outputVariable="b4pOut">
<b4p:remoteTask partnerLink="b4pPtlnk" operation="approve" responseOperation="approvalResponse"></b4p:remoteTask>
</b4p:peopleActivity>
</bpel:extensionActivity>
<bpel:assign validate="no" name="Assign3">
<bpel:copy>
<bpel:from part="ClaimApprovalResponse" variable="b4pOut">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[xsd:approved]]>
</bpel:query>
</bpel:from>
<bpel:to variable="dummyVar"></bpel:to>
</bpel:copy>
</bpel:assign>
<bpel:if name="If_approved">
<bpel:condition expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[$dummyVar = true()]]>
</bpel:condition>
<bpel:assign validate="no" name="Assign">
<bpel:copy>
<bpel:from>
<bpel:literal>
<tns:JavaTrainingResponse xmlns:tns="http://loits.com/bps/training" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tns:result>tns:result</tns:result>
</tns:JavaTrainingResponse>
</bpel:literal>
</bpel:from>
<bpel:to variable="output" part="payload"></bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA["Approved"]]>
</bpel:from>
<bpel:to part="payload" variable="output">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[tns:result]]>
</bpel:query>
</bpel:to>
</bpel:copy>
</bpel:assign>
<bpel:else>
<bpel:assign validate="no" name="Assign4">
<bpel:copy>
<bpel:from>
<bpel:literal>
<tns:JavaTrainingResponse xmlns:tns="http://loits.com/bps/training" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tns:result>tns:result</tns:result>
</tns:JavaTrainingResponse>
</bpel:literal>
</bpel:from>
<bpel:to variable="output" part="payload"></bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA["Rejected"]]>
</bpel:from>
<bpel:to part="payload" variable="output">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[tns:result]]>
</bpel:query>
</bpel:to>
</bpel:copy>
</bpel:assign>
</bpel:else>
</bpel:if>
</bpel:sequence>
<bpel:else>
<bpel:assign validate="no" name="Assign2">
<bpel:copy>
<bpel:from>
<bpel:literal>
<tns:JavaTrainingResponse xmlns:tns="http://loits.com/bps/training" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tns:result>tns:result</tns:result>
</tns:JavaTrainingResponse>
</bpel:literal>
</bpel:from>
<bpel:to variable="output" part="payload"></bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA["Approved Automatically"]]>
</bpel:from>
<bpel:to part="payload" variable="output">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[tns:result]]>
</bpel:query>
</bpel:to>
</bpel:copy>
</bpel:assign>
</bpel:else>
</bpel:if>
<bpel:reply name="replyOutput" partnerLink="client" portType="tns:JavaTraining" operation="process" variable="output" />
</bpel:sequence>
</bpel:process>
and the wsdl..
<?xml version="1.0" encoding="UTF-8" ?>
<wsdl:definitions name="ClaimApproval" targetNamespace="http://www.example.com/claims/" xmlns:tns="http://www.example.com/claims/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tschema="http://www.example.com/claims/schema"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
<wsdl:documentation>
Example for WS-HumanTask 1.1 - WS-HumanTask Task Interface Definition
</wsdl:documentation>
<wsdl:types>
<xsd:schema targetNamespace="http://www.example.com/claims/schema" xmlns:tns="http://www.example.com/claims/schema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:element name="ClaimApprovalData" type="tns:ClaimApprovalDataType" />
<xsd:complexType name="ClaimApprovalDataType">
<xsd:sequence>
<xsd:element name="cust">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="id" type="xsd:string">
</xsd:element>
<xsd:element name="firstname" type="xsd:string">
</xsd:element>
<xsd:element name="lastname" type="xsd:string">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="amount" type="xsd:double" />
<xsd:element name="region" type="xsd:string" />
<xsd:element name="priority" type="xsd:int" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="ClaimApprovalNotificationData" type="tns:ClaimApprovalNotificationDataType" />
<xsd:complexType name="ClaimApprovalNotificationDataType">
<xsd:sequence>
<xsd:element name="firstname" type="xsd:string" />
<xsd:element name="lastname" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="ClaimApprovalResponse" type="tns:ClaimApprovalResponseType"></xsd:element>
<xsd:complexType name="ClaimApprovalResponseType">
<xsd:sequence>
<xsd:element name="approved" type="xsd:boolean"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="ClaimApprovalRequest">
<wsdl:part name="ClaimApprovalRequest" element="tschema:ClaimApprovalData" />
</wsdl:message>
<wsdl:message name="ClaimApprovalResponse">
<wsdl:part name="ClaimApprovalResponse" element="tschema:ClaimApprovalResponse" />
</wsdl:message>
<wsdl:message name="ClaimApprovalNotificationRequest">
<wsdl:part name="ClaimApprovalNotificationRequest" element="tschema:ClaimApprovalNotificationData" />
</wsdl:message>
<wsdl:portType name="ClaimsHandlingPT">
<wsdl:operation name="approve">
<wsdl:input message="tns:ClaimApprovalRequest" />
</wsdl:operation>
<wsdl:operation name="escalate">
<wsdl:input message="tns:ClaimApprovalRequest" />
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="ClaimsHandlingCallbackPT">
<wsdl:operation name="approvalResponse">
<wsdl:input message="tns:ClaimApprovalResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="ClaimApprovalReminderPT">
<wsdl:operation name="notify">
<wsdl:input message="tns:ClaimApprovalNotificationRequest" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ClaimSoapBinding" type="tns:ClaimsHandlingPT">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="approve">
<soap:operation soapAction="urn:approve" style="document" />
<wsdl:input>
<soap:body use="literal" namespace="http://www.example.com/claims/" />
</wsdl:input>
</wsdl:operation>
<wsdl:operation name="escalate">
<soap:operation soapAction="urn:escalate" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ClaimSoapBindingReminder" type="tns:ClaimApprovalReminderPT">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="notify">
<soap:operation soapAction="urn:notify" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ClaimSoapBindingCB" type="tns:ClaimsHandlingCallbackPT">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="approvalResponse">
<soap:operation soapAction="urn:approvalResponse" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ClaimService">
<wsdl:port name="ClaimPort" binding="tns:ClaimSoapBinding">
<soap:address location="http://localhost:9763/services/ClaimService" />
</wsdl:port>
</wsdl:service>
<wsdl:service name="ClaimReminderService">
<wsdl:port name="ClaimReminderPort" binding="tns:ClaimSoapBindingReminder">
<soap:address location="http://localhost:9763/services/ClaimReminderService" />
</wsdl:port>
</wsdl:service>
<wsdl:service name="ClaimServiceCB">
<wsdl:port name="ClaimPortCB" binding="tns:ClaimSoapBindingCB">
<soap:address location="http://localhost:9763/services/ClaimServiceCB" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Finally I could make it.
What we need to do is to add correlationFilter attribute to the corresponding provide activity in the deploy.xml file.
By adding this namespace will provide b4pFilter
xmlns:b4p="http://docs.oasis-open.org/ns/bpel4people/bpel4people/200803"
<provide partnerLink="b4p" correlationFilter="b4p:b4pFilter">
<service name="biApprove:ClaimServiceCB" port="ClaimPortCB"/>
</provide>
Full code of the deploy.xml
<?xml version="1.0" encoding="UTF-8"?>
<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
xmlns:biApprove="http://www.example.com/claims/"
xmlns:sample="http://loits.com/bps/training"
xmlns:b4p="http://docs.oasis-open.org/ns/bpel4people/bpel4people/200803">
<process name="sample:JavaTraining">
<active>true</active>
<retired>false</retired>
<process-events generate="all"/>
<provide partnerLink="client">
<service name="sample:BpelTest" port="BpelTestPort"/>
</provide>
<provide partnerLink="b4p" correlationFilter="b4p:b4pFilter">
<service name="biApprove:ClaimServiceCB" port="ClaimPortCB"/>
</provide>
<invoke partnerLink="b4p">
<service name="biApprove:ClaimService" port="ClaimPort"/>
</invoke>
</process>
</deploy>

direction="right-down" in rich:menuGroup tag?

I have a problem with direction attribute in rich:menuGroup tag :
pictures : rich:menuItem tag.
I want rich:menuItem moved to position like that pictures. I search a link has example similar my problem :
Live Demo Richfaces
Here is my code :
<rich:dropDownMenu showDelay="250" hideDelay="0" submitMode="none" direction="bottom-right"
rendered="#{identity.loggedIn and s:hasRole('P01')}">
<f:facet name="label">Báo cáo</f:facet>
<rich:menuGroup value="Báo cáo bán hàng" direction="auto">
<rich:menuItem rendered="#{s:hasRole('P01')}">
<s:link view="/report/ReportRevenueByItems.xhtml"
value="Báo cáo doanh thu theo mặt hàng" id="reportRevenueByItem"
includePageParams="false" propagation="none" />
</rich:menuItem>
<rich:menuItem rendered="#{s:hasRole('P01')}">
<s:link view="/report/ReportRevenueByCustomers.xhtml"
value="Báo cáo doanh thu theo khách hàng"
id="reportRevenueByCustomer" includePageParams="false"
propagation="none" />
</rich:menuItem>
<rich:menuItem rendered="#{s:hasRole('P01')}">
<s:link id="reportDetailSaleByCustomer"
view="/report/ReportDetailSaleByCustomers.xhtml"
value="Báo cáo chi tiết bán hàng theo khách hàng"
propagation="none" />
</rich:menuItem>
<rich:menuItem rendered="#{s:hasRole('P01')}">
<s:link view="/report/ReportDetailContract.xhtml"
value="Báo cáo chi tiết hợp đồng theo khách hàng"
id="ReportDetailContract" includePageParams="false"
propagation="none" />
</rich:menuItem>
<rich:menuItem rendered="#{s:hasRole('P01')}">
<s:link view="/report/ReportDetailsSales.xhtml"
value="Báo cáo chi tiết hợp đồng theo nhân viên"
id="reportDetailsSale" includePageParams="false" propagation="none" />
</rich:menuItem>
<rich:menuItem rendered="#{s:hasRole('P01')}">
<s:link view="/report/ReportProductDetailForecast.xhtml"
value="Báo cáo chi tiết cơ hội" id="reportDetailForecastProduct"
includePageParams="false" propagation="none" />
</rich:menuItem>
<rich:menuItem rendered="#{s:hasRole('P01')}">
<s:link view="/report/ReportProductForecast.xhtml"
value="Báo cáo tổng hợp cơ hội" id="reportForecastProduct"
includePageParams="false" propagation="none" />
</rich:menuItem>
<rich:menuItem rendered="#{s:hasRole('P01')}">
<s:link view="/report/ReportGeneralSales.xhtml"
value="Báo cáo tổng hợp doanh số theo nhân viên" id="saleReport"
includePageParams="false" propagation="none" />
</rich:menuItem>
<rich:menuItem rendered="#{s:hasRole('P01')}">
<s:link id="targetUser" view="/report/ReportUserTarget.xhtml"
value="Báo cáo chỉ tiêu doanh số" propagation="none" />
</rich:menuItem>
</rich:menuGroup>
<rich:menuGroup value="Báo cáo công việc" direction="right-down">
<rich:menuItem rendered="#{s:hasRole('P01')}">
<s:link view="/report/ReportSyntheticWorks.xhtml"
value="Báo cáo tổng hợp công việc" id="syntheticWorksReport"
includePageParams="false" propagation="none" />
</rich:menuItem>
<rich:menuItem rendered="#{s:hasRole('P01')}">
<s:link view="/report/ReportDetailsWorks.xhtml"
value="Báo cáo chi tiết công việc" id="reportDetailsWorks"
includePageParams="false" propagation="none" />
</rich:menuItem>
</rich:menuGroup>
<rich:menuGroup value="Báo cáo công nợ">
<rich:menuItem rendered="#{s:hasRole('P01')}">
<s:link view="/report/ReportGeneralDept.xhtml"
value="Báo cáo tổng hợp công nợ theo khách hàng"
id="reportGeneralDept" includePageParams="false" propagation="none" />
</rich:menuItem>
<rich:menuItem rendered="#{s:hasRole('P01')}">
<s:link view="/report/ReportGeneralDeptBySupplier.xhtml"
value="Báo cáo tổng hợp công nợ theo nhà cung cấp"
id="reportGeneralDeptBySuppier" includePageParams="false"
propagation="none" />
</rich:menuItem>
<rich:menuItem rendered="#{s:hasRole('P01')}">
<s:link view="/report/ReportDetailDeptBySupplier.xhtml"
value="Báo cáo chi tiết công nợ theo nhà cung cấp"
id="reportDetailDeptBySuppier" includePageParams="false"
propagation="none" />
</rich:menuItem>
</rich:menuGroup>
<rich:menuGroup value="Báo cáo khách hàng">
<rich:menuItem rendered="#{s:hasRole('P01')}">
<s:link view="/report/ReportCustomerCare.xhtml"
value="Báo cáo chăm sóc khách hàng" id="reportCustomerCare"
includePageParams="false" propagation="none" />
</rich:menuItem>
<rich:menuItem rendered="#{s:hasRole('P01')}">
<s:link view="/report/ReportCustomerNotReSigning.xhtml"
value="Báo cáo khách hàng không tái ký HĐ"
id="reportCustomerNotReSigning" includePageParams="false"
propagation="none" />
</rich:menuItem>
<rich:menuItem rendered="#{s:hasRole('P01')}">
<s:link view="/report/ReportNewCustomer.xhtml"
value="Báo cáo phát triển khách hàng mới" id="reportNewCustomer"
includePageParams="false" propagation="none" />
</rich:menuItem>
<rich:menuItem rendered="#{s:hasRole('P01')}">
<s:link view="/report/ExportCustomerListFounding.xhtml"
value="Báo cáo khách hàng thành lập chẵn"
id="reportCustomerListFounding" includePageParams="false"
propagation="none" />
</rich:menuItem>
</rich:menuGroup>
<rich:menuGroup value="Báo cáo kho" direction="right-down">
<rich:menuItem rendered="#{s:hasRole('UU03')}">
<s:link view="/report/ReportDetailXNT.xhtml"
value="Báo cáo chi tiết xuất nhập tồn kho" id="reportDetailXNT"
includePageParams="false" propagation="none" />
</rich:menuItem>
<rich:menuItem rendered="#{s:hasRole('UU03')}">
<s:link view="/report/ReportInventory.xhtml"
value="Báo cáo tổng hợp xuất nhập tồn" id="reportInventory"
includePageParams="false" propagation="none" />
</rich:menuItem>
</rich:menuGroup>
</rich:dropDownMenu>
How can i move position of rich:menuItem in rich:menuGroup ?
Assuming you're using RichFaces 3 the available values for #direction are:
"right", "left", "auto"(Default), "left-down", "left-up", "right-down", "right-up"
See the documentation for further information.
I had a very similar issue, adding unique ID to each
rich:menuGroup
helped. I hope it will solve your issue too. :)

Child Window Template SilverLight 3

How to change the GUI of the child window in silverlight , how to apply template or style any good example reference will help.
thanks in advance
For addition information:
I would like to change the title bar shape, the close button shape and the body area shape as well, you can say I want to change the View of the childWidow control.
Here's the template as outputted from Blend.
<ControlTemplate x:Key="ChildWindowControlTemplate1" TargetType="controls:ChildWindow">
<Grid x:Name="Root">
<Grid.Resources>
<Style x:Key="ButtonStyle" TargetType="Button">
<Setter Property="Background" Value="#FF1F3B53"/>
<Setter Property="Foreground" Value="#FF000000"/>
<Setter Property="Padding" Value="3"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFA3AEB9" Offset="0"/>
<GradientStop Color="#FF8399A9" Offset="0.375"/>
<GradientStop Color="#FF718597" Offset="0.375"/>
<GradientStop Color="#FF617584" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid x:Name="grid" Background="#02FFFFFF" HorizontalAlignment="Center" Height="14" VerticalAlignment="Center" Width="15">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz2">
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz1">
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz0">
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
</ObjectAnimationUsingKeyFrames>
<DoubleAnimation Duration="0" To="0.95" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="X"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<DoubleAnimation Duration="0" To="0.85" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="X"/>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz2">
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz1">
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz0">
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="X"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Path x:Name="X_Fuzz2" Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" Fill="#14C51900" HorizontalAlignment="Center" Height="8" Margin="0,-1,0,0" Opacity="1" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Stroke="#14C51900" Visibility="Collapsed" VerticalAlignment="Center" Width="9">
<Path.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleY="1.3" ScaleX="1.3"/>
</TransformGroup>
</Path.RenderTransform>
</Path>
<Path x:Name="X_Fuzz1" Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" Fill="#1EC51900" HorizontalAlignment="Center" Height="8" Margin="0,-1,0,0" Opacity="1" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Stroke="#1EC51900" Visibility="Collapsed" VerticalAlignment="Center" Width="9">
<Path.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleY="1.1" ScaleX="1.1"/>
</TransformGroup>
</Path.RenderTransform>
</Path>
<Path x:Name="X_Fuzz0" Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" Fill="#FFC51900" HorizontalAlignment="Center" Height="8" Margin="0,-1,0,0" Opacity="1" Stretch="Fill" Stroke="#FFC51900" Visibility="Collapsed" VerticalAlignment="Center" Width="9"/>
<Path x:Name="X" Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" Fill="#FFFFFFFF" HorizontalAlignment="Center" Height="8" Margin="0,-1,0,0" Opacity="0.7" Stretch="Fill" VerticalAlignment="Center" Width="9">
<Path.Stroke>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF313131" Offset="1"/>
<GradientStop Color="#FF8E9092" Offset="0"/>
</LinearGradientBrush>
</Path.Stroke>
</Path>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Grid.Resources>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="WindowStates">
<VisualState x:Name="Open">
<Storyboard>
<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Overlay">
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
<EasingDoubleKeyFrame KeyTime="00:00:00.3" Value="1"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX" Storyboard.TargetName="ContentRoot">
<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.4" Value="1"/>
<SplineDoubleKeyFrame KeySpline="0,0,0.5,1" KeyTime="00:00:00.45" Value="1.05"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.55" Value="1"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY" Storyboard.TargetName="ContentRoot">
<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.4" Value="1"/>
<SplineDoubleKeyFrame KeySpline="0,0,0.5,1" KeyTime="00:00:00.45" Value="1.05"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.55" Value="1"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Closed">
<Storyboard>
<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Overlay">
<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
<EasingDoubleKeyFrame KeyTime="00:00:00.3" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX" Storyboard.TargetName="ContentRoot">
<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="1.05"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.45" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY" Storyboard.TargetName="ContentRoot">
<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="1.05"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.45" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid x:Name="Overlay" Background="{TemplateBinding OverlayBrush}" HorizontalAlignment="Stretch" Margin="0" Opacity="{TemplateBinding OverlayOpacity}" VerticalAlignment="Top"/>
<Grid x:Name="ContentRoot" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Height="{TemplateBinding Height}" RenderTransformOrigin="0.5,0.5" VerticalAlignment="{TemplateBinding VerticalAlignment}" Width="{TemplateBinding Width}">
<Grid.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</Grid.RenderTransform>
<Border BorderBrush="#14000000" BorderThickness="1" Background="#14000000" CornerRadius="2" HorizontalAlignment="Stretch" Margin="-1" VerticalAlignment="Stretch"/>
<Border BorderBrush="#0F000000" BorderThickness="1" Background="#0F000000" CornerRadius="2.25" HorizontalAlignment="Stretch" Margin="-2" VerticalAlignment="Stretch"/>
<Border BorderBrush="#0C000000" BorderThickness="1" Background="#0C000000" CornerRadius="2.5" HorizontalAlignment="Stretch" Margin="-3" VerticalAlignment="Stretch"/>
<Border BorderBrush="#0A000000" BorderThickness="1" Background="#0A000000" CornerRadius="2.75" HorizontalAlignment="Stretch" Margin="-4" VerticalAlignment="Stretch"/>
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="#FFFFFFFF" CornerRadius="2">
<Border CornerRadius="1.5" Margin="1">
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFE5E8EB" Offset="1"/>
<GradientStop Color="#FFF6F8F9" Offset="0"/>
</LinearGradientBrush>
</Border.Background>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border x:Name="Chrome" BorderBrush="#FFFFFFFF" BorderThickness="0,0,0,1" Width="Auto" Background="{StaticResource LightBackground}">
<Grid Height="Auto" Width="Auto">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="30"/>
</Grid.ColumnDefinitions>
<ContentControl Content="{TemplateBinding Title}" FontWeight="Bold" HorizontalAlignment="Stretch" IsTabStop="False" Margin="6,0,6,0" VerticalAlignment="Center" Background="White" Foreground="White"/>
<Button x:Name="CloseButton1" Grid.Column="1" HorizontalAlignment="Center" Height="14" IsTabStop="False" Style="{StaticResource ButtonStyle}" VerticalAlignment="Center" Width="15" Foreground="White"/>
</Grid>
</Border>
<Border Background="{TemplateBinding Background}" Margin="0" Grid.Row="1">
<ContentPresenter x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</Grid>
</Border>
</Border>
</Grid>
</Grid>
</ControlTemplate>
HTH, Stimul8d

Resources