I have to massage some XML like this:
<Action ID="actDashboardRenamePanel" Type="Link">
<Target Type="Link" Link="javascript: LogiXML.Dashboard.pageDashboard.rdShowRenamePanel('rdDashboardPanelID', 'rdPnlInstanceID');" ID="tgtRenamepanel" />
</Action>
</PopupOption>
<PopupOption Caption="Remove" ID="ppoRemove_rdPnlInstanceID">
<Action ID="actDashboardRemovePanel" Type="Link" ConfirmMessage="Remove? Are you sure?">
<Target Type="Link" Link="javascript: LogiXML.Dashboard.pageDashboard.rdRemoveDashboardPanel('rdDashboardPanelID');" />
</Action>
</PopupOption>
within a Logi Analytics program.
I am using this XPATH:
<DefinitionModifier>
<SetAttribute XPath="//Action[#ID[starts-with(.,'ppoRemove_')]]" Caption="Remove###" />
</DefinitionModifier>
Do I use starts-with correctly (it currently does not work).
It seems that you meant to filter <Action> by ID of <PopupOption>. If this is the case, you can try following XPath :
//PopupOption[starts-with(#ID,'ppoRemove_')]/Action
Related
I want to express the following use case :
A patient is pregnant. She's seen by two specialists : an endocrinologist and an obstetric gynecologist.
The gynecologist sends her to the hospital, for a care he can't give.
The patient has then :
a family doctor
a referring doctor (obstetric gynecologist)
a specialist (endocrinologist)
The family doctor is referenced in the Patient Resource, by the generalPractitioner element.
But I want to reference the two others practitioners in the Encounter Resource.
I'm ok with the first (the referring), but I don't know where to reference the second.
<?xml version="1.0" encoding="UTF-8"?>
<Encounter xmlns="http://hl7.org/fhir">
<id value="99289910"/>
<contained>
<ReferralRequest>
<id value="p1"/>
<status value="active"/>
<category value="request"/>
<requester>
<reference value="Practitioner/99003499686"/>
<identifier>
<type>
<coding>
<system value="http://hl7.org/fhir/v2/0443"/>
<code value="RP"/>
<display value="Referring Provider"/>
</coding>
<text value="Referring doctor"/>
</type>
<system value='urn:oid:1.2.250.1.71.4.2.1'></system>
<value value='99003499686'/>
<assigner><display value="RPPS"/></assigner>
</identifier>
</requester>
</ReferralRequest>
</contained>
<status value="finished"/>
<class>
<system value="http://hl7.org/fhir/v3/ActCode"/>
<code value="IMP"/>
</class>
<patient>
<reference value="/patient/3803218"/>
</patient>
<incomingReferral>
<reference value="#p1"/>
</incomingReferral>
<period>
<start value="2016-09-07T15:39:00"/>
<end value="2016-09-11T16:35:00"/>
</period>
<location>
<location>
<reference value="/uf/1835"/>
</location>
<status value="completed"/>
<period>
<start value="2016-09-07T15:39:00"/>
<end value="2016-09-08T00:28:00"/>
</period>
</location>
<location>
<location>
<reference value="/uf/3650"/>
</location>
<status value="completed"/>
<period>
<start value="2016-09-08T00:28:00"/>
<end value="2016-09-11T16:35:00"/>
</period>
</location>
<serviceProvider>
<reference value="/uf/2407"/>
</serviceProvider>
</Encounter>
Where can I reference the specialist (endocrinologist) in the Encounter ?
If I understand correctly, the first would be identified as the referring practitioner, but the other is essentially just an "interested party" - someone who should be notified of the admission, the discharge and presumably should receive a copy of the discharge summary.
The concept of "interested party" isn't part of the value set for Encounter.participant.type, but the value set is extensible, so you're free to define your own code for that concept. It seems like a generally useful idea, so I'd encourage you to submit a change request (propose a change link at the bottom of each page in the spec) for us to add that to the specification for everyone.
I am trying to validate user credentials details during application log in.I have changed my struts config and validation xml but the validation gets invoked on the page load itself.
I want that this validation should be invoked only during the click of a button(submit button).
My struts config is as under:
<action-mappings>
<action attribute="loginForm" input="jsp/LoginPage.jsp" name="loginForm"
parameter="method" path="/loginAction" scope="request"
type="com.pcs.bpems.portal.struts.action.LoginAction" validate="false">
<forward name="schoolloginpage" path="/jsp/SchoolLoginPage.jsp" />
</action>
<action attribute="loginForm" input="/jsp/SchoolLoginPage.jsp" name="loginForm"
parameter="method" path="/loginAction" scope="request"
type="com.pcs.bpems.portal.struts.action.LoginAction" validate="true">
<forward name="schoolloginpage" path="/jsp/SchoolLoginPage.jsp" />
<forward name="schoolhomepage" path="/ownerHome.do?method=showHome" />
</action>
My validation xml is as under
<form name="loginForm">
<field property="userId" depends="required,minlength">
<arg0 key="label.userName"/>
<var>
<var-name>minlength</var-name>
<var-value>6</var-value>
</var>
<arg1 key="${var:minlength}" resource="false" />
</field>
<field property="password" depends="required,minlength">
<arg0 key="label.password"/>
<var>
<var-name>minlength</var-name>
<var-value>6</var-value>
</var>
<arg1 key="${var:minlength}" resource="false" />
</field>
</form>
#Anish Try this code instead of your first LoginAction attribute,
<action path="/loginAction" parameter="method"
type="com.pcs.bpems.portal.struts.action.LoginAction" validate="false">
<forward name="schoolloginpage" path="/jsp/SchoolLoginPage.jsp" />
</action>
My thought is form name is not necessary for load the form, though you are made validate attribute to false. Let me know if this helps.
If you do not pass through the input, Struts performs the validation. There are several ways to solve it.
Request directly to the JSP
Make a request to the JSP file directly and not through the org.apache.struts.action.ActionServlet.
http://localhost:8080/MyContext/jsp/SchoolLoginPage.jsp
With a forward
<action path="/login" forward="/jsp/SchoolLoginPage.jsp" />
Use:
http://localhost:8080/MyContext/login.do
I want to extract information from the jms-bus node. Specifically the busid,
//[local-name()='jms-bus'][#busid=//[local-name()='jms-listener']/#busidref]/#busid matches perfectly and returns quickstartGwChannel and quickstartESBChannel if the have matching providers and services.
However, I want to return the jms-bus(s) where it has a jms-listener is-gateway='true'
I am not sure where to put the 'and' clause. When I put it at the beginning //*[local-name()='jms-listener]/[#is-gateway='true']and .... it returns a boolean.
I need to extract from this xml
<providers>
<jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
<jms-bus busid="quickstartGwChannel">
<jms-message-filter
dest-type="QUEUE"
dest-name="queue/quickstart_helloworld_Request_gw"
/>
</jms-bus>
<jms-bus busid="quickstartEsbChannel">
<jms-message-filter
dest-type="QUEUE"
dest-name="queue/quickstart_helloworld_Request_esb"
/>
</jms-bus>
</jms-provider>
</providers>
<services>
<service
category="FirstServiceESB"
name="SimpleListener"
description="Hello World">
<listeners>
<jms-listener name="JMS-Gateway"
busidref="quickstartGwChannel"
is-gateway="true"
/>
<jms-listener name="helloWorld"
busidref="X12"
is-gateway="false"
/>
</listeners>
<actions mep="OneWay">
<action name="action1"
class="org.jboss.soa.esb.samples.quickstart.helloworld.MyJMSListenerAction"
process="displayMessage"
/>
<action name="action2" class="org.jboss.soa.esb.actions.SystemPrintln">
<property name="printfull" value="false"/>
</action>
<!-- The next action is for Continuous Integration testing -->
<action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>
</actions>
</service>
</services>
Something like this:
//*[local-name()='jms-bus']
[#busid=//*[local-name()='jms-listener']
[#is-gateway='true']/#busidref]/#busid
or
//*[local-name()='jms-bus']
[#busid=//*[local-name()='jms-listener' and #is-gateway='true']/#busidref]/#busid
How can i add another element after <li>
So i can get this tree structure <ul><li><span><a>Logout</a></span></li></ul>
Currently my rendered html is looking like this. I want to have span element to do bit more with logout. I have tried a lot but no luck. Please help. Thank you
<ul class="links">
<li class="first last">
Logout
</li>
</ul>
layout to top.links is
<customer_logged_in>
<reference name="account.links">
<action method="addLink" translate="label title" module="customer">
<label>Logout</label>
<url helper="customer/getLogoutUrl"/>
<title>Log Out</title>
<prepare/>
<urlParams/>
<position>2</position>
<liParams></liParams>
<aParams>class="logout-link"</aParams>
</action>
<action method="removeLinkByUrl">
<url helper="customer/getRegisterUrl" />
</action>
</reference>
If i am changing the links.phtml then change will apply for all the links or else i need to put if else in there but i needed it only for logout. so what is the best way to do that?
Is this achievable using addLinks method?
You can do this using the beforeText and afterText parameters, like this:
<action method="addLink" translate="label title" module="customer">
<label>Logout</label>
<url helper="customer/getLogoutUrl"/>
<title>Log Out</title>
<prepare/>
<urlParams/>
<position>2</position>
<liParams></liParams>
<aParams>class="logout-link"</aParams>
<beforeText><![CDATA[<span>]]></beforeText>
<afterText><![CDATA[</span>]]></afterText>
</action>
Which will modify your link to look something like this:
<li class="first last">
<span>Logout</span>
</li>
You can create your own template (a copy of links.phtml) and apply it only for Top Links.
Do it like this in your theme's local.xml:
<default>
<reference name="top.links">
<action method="setTemplate">
<template>page/template/my_links.phtml</template>
</action>
</reference>
<default>
Then copy page/template/links.phtml and rename it to page/template/my_links.phtml and do whatever you need inside that new template file. It will be only used to render Top Links, not for any other links
I have a working link being added to the top.links block like this:
<block type="page/template_links" name="top.links" as="topLinks">
<action method="addLink">
<label>About Us</label>
<url helper="mymodule/getAboutUsUrl"/>
<title>About Us</title>
<prepare/>
<urlParams/>
<position>20</position>
</action>
</block>
Eventually I wanted getAboutUsUrl to turn into getExternalSiteUrl. I want that one function to take parameters. For instance, getExternalSiteUrl('about-us') which would then return something like /the/url/about-us. However, I can't seem to find a way to send a helper class parameters in a Layout XML file. I searched for other modules doing this already, and couldn't find one in the Customer module where I searched.
Can anyone help?
<block type="page/template_links" name="top.links" as="topLinks">
<action method="addLink">
<label>About Us</label>
<url helper="mymodule/getAboutUsUrl">
<arg>Now with more args!</arg>
<!-- will result in the string being passed as first arg -->
</url>
<title>About Us</title>
<prepare/>
<urlParams/>
<position>20</position>
</action>
</block>
Note that helpers do not extend Varien_Object, therefore your method will need to explicitly define the getAboutUsUrl() method.