Accessing variables in an object
Is there any reason why JSTL should not be able to find a variable in a object using the . operator specially if i am view it in the servlet before passing it on to the JSP ?
exception
javax.servlet.ServletException: Unable to find a value for "userid" in object of class "auction.Customer" using operator "."
root cause
javax.servlet.jsp.el.ELException: Unable to find a value for "userid" in object of class "auction.Customer" using operator "."That is the error message given. I am absolutely sure there is a String variable called userid in the class auction.Customer
JSTL only accesses bean attributes via get/set methods.
ie to tell JSTL that the customer class has a String attribute called userid, you need the following method
public String getUserid(){
return userid;
}If you also want to be able to change the value of userid, then you declare the setter as well
public void setUserid(String userid){
this.userid = userid;
}Note that any property "property" is accessed using a "get" method of the form getProperty, which is made by capitalizing the first letter of the property name, and putting "get" on the front.
ie ${customer.userid} is equivalent to <%=customer.getUserid() %>
Hope this clears things up.
Cheers,
evnafets
Similar Messages
-
How do I add a variable into an object as xml
I have a xml document with 2 protection order numbers. I want to get the information for one of them which is **protectionOrderNumber="1400042"**. I would like to add strPoNumber variable to the object objXmlCaseDoc. Inside this object is the xml
that was read and put inside the object. I want at the beginning of the xml code inside the objXmlCaseDoc to add the protectionOrderNumber at the end of the first line. This should be added at the beginning of the xml document. In my object (objXmlCaseDoc)
there is no variable strPoNumber. This is why I want to add it at the top. The object has xml document in it.
It should look like this:
<Integration xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:tsg="http://tsgweb.com" xmlns:IXML="http://tsgweb.com" xmlns:CMCodeQueryHelper="urn:CMCodeQueryHelper" protectionOrderNumber="1400042">
My vb code: I have the variable strPoNumber and the object where the xml document is. Object name is objXmlCaseDoc
I want to add the line of code where I have comment Tranform case information into the output format near the bottom of the code.
Option Strict On
Option Explicit On
Imports System.Xml
Public Class BcaPoRequests
Shared Sub Main()
Dim objMessageProcessor As New MessageProcessor
Dim objSchemasCollection As New Msc.Integration.MessageBroker.Library.v4.SchemasCollection
Dim objTransformsCollection As New Msc.Integration.MessageBroker.Library.v4.TransformsCollection
objMessageProcessor.ProcessInputQueue(False, False, objSchemasCollection, objTransformsCollection)
End Sub
Private Class MessageProcessor
Inherits Msc.Integration.ServiceCatalog.Library.v4.SoapMessageProcessor
Protected Overrides Sub ProcessMessage(ByRef aobjBroker As ServiceCatalog.Library.v4.Broker, ByRef aobjXMLInputSoapEnvelopeDoc As System.Xml.XmlDocument, ByRef aobjInstantiatedObjectsCstrollection As Microsoft.VisualBasic.Collection, ByRef aobjConsumer As ServiceCatalog.Library.v4.Consumer)
MyBase.ProcessMessage(aobjBroker, aobjXMLInputSoapEnvelopeDoc, aobjInstantiatedObjectsCollection, aobjConsumer)
Dim objXmlMessageDoc As XmlDocument
Dim objXmlMessageNode As XmlNode
Dim objNameTable As NameTable
Dim objXMLNameSpaceManager As XmlNamespaceManager
Dim objXMLSchemaException As Xml.Schema.XmlSchemaException
Dim strCaseNumber As String
Dim strPoNumber As String
Dim objXmlCaseDoc As XmlDocument
'create a namespace manager used for queries into inputmessage (because of namespace)
objNameTable = New NameTable
objXMLNameSpaceManager = New XmlNamespaceManager(objNameTable)
objXMLNameSpaceManager.AddNamespace("ext", "http://www.courts.state.mn.us/ProtectionOrderExtension/1.0")
objXMLNameSpaceManager.AddNamespace("exc", "http://www.courts.state.mn.us/ProtectionOrderQuery/1.0")
objXMLNameSpaceManager.AddNamespace("soap", "http://www.w3.org/2003/05/soap-envelope")
objXMLNameSpaceManager.AddNamespace("wsa", "http://schemas.xmlsoap.org/ws/2004/08/addressing")
objXmlMessageNode = aobjXMLInputSoapEnvelopeDoc.DocumentElement.SelectSingleNode("soap:Body/exc:ProtectionOrderQueryRequest", objXMLNameSpaceManager)
objXmlMessageDoc = New XmlDocument
objXmlMessageDoc.LoadXml(objXmlMessageNode.OuterXml)
'Check authorization
'Validate the input message
objXMLSchemaException = aobjBroker.ValidateXmlDocument(objXmlMessageDoc, "ProtectionOrderQuery_1_0.xsd", "NiemExchanges\ProtectionOrders\Exchange", , False)
If Not objXMLSchemaException Is Nothing Then
'return fault if invalid
aobjBroker.Reply(aobjBroker.CreateSoapFault(Msc.Integration.Utility.Library.v4.Soap.udtSoapCodes.Sender, Msc.Integration.Utility.Library.v4.Xml.FormatXmlSchemaValidationErrorText(objXMLSchemaException), Msc.Integration.Utility.Library.v4.Soap.udtSoapRoles.RoleUltimateReceiver, aobjXMLInputSoapEnvelopeDoc, "soap:InvalidMessage", "soap:Body", Msc.Integration.Utility.Library.v4.Soap.GetReplyEndpointReference(aobjXMLInputSoapEnvelopeDoc), aobjXMLInputSoapEnvelopeDoc.DocumentElement.SelectSingleNode("soap:Header/wsa:MessageID", objXMLNameSpaceManager).InnerText, aobjConsumer))
Exit Sub
End If
'Get the case number and the PO number from the input message
strCaseNumber = objXmlMessageDoc.DocumentElement.SelectSingleNode("ext:CourtFileNumber", objXMLNameSpaceManager).InnerText
strPoNumber = objXmlMessageDoc.DocumentElement.SelectSingleNode("ext:ProtectionOrderID", objXMLNameSpaceManager).InnerText
'Get the case information from Mncis
'Code for calling the case
objXmlCaseDoc = Msc.Integration.Mncis.Library.v4.Case.GetIxmlForCaseNumber(strCaseNumber, "CourtCaseHeader,ProtectionOrder,SubjectParties,HearingTrialSetting", False)
'Tranform case information into the output format
End Sub
End Class
End Class
xslt code
<?xml version="1.0" encoding="UTF-8"?>
<?altova_samplexml file:///Z:/Training%20with%20Tim%20XML%20code%20various/BcaRequestIxml.xml?>
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:poq="http://www.courts.state.mn.us/ProtectionOrderQuery/1.0" xmlns:ext="http://www.courts.state.mn.us/ProtectionOrderExtension/1.0" xmlns:nc="http://niem.gov/niem/niem-core/2.0" xmlns:j="http://niem.gov/niem/domains/jxdm/4.1" xmlns:mscef="courts.state.mn.us/extfun" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:exsl="urn:schemas-microsoft-com:xslt" extension-element-prefixes="exsl" exclude-result-prefixes="mscef msxsl exsl">
<xsl:import href="../General/ExtensionFunctions.xsl"/>
<xsl:import href="MNCIS_PO_BCA_ProtectionOrder_1_0.xsl"/>
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<!-- Path to environment folder used by document function. Relative to location of stylesheet. -->
<xsl:param name="gEnvPath">../..</xsl:param>
<xsl:template match="/">
<xsl:variable name="vPoNumber">
<xsl:value-of select="Integration/@protectionOrderNumber"/>
</xsl:variable>
<poq:ProtectionOrderQueryResponse>
<xsl:for-each select="//Integration/ProtectionOrder[ProtectionOrderNumber=$vPoNumber]">
<xsl:call-template name="ProtectionOrder"/>
</xsl:for-each>
</poq:ProtectionOrderQueryResponse>
</xsl:template>
</xsl:stylesheet>
XML document output from my xslt code
<?xml version="1.0" encoding="UTF-8"?>
<poq:ProtectionOrderQueryResponse xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:poq="http://www.courts.state.mn.us/ProtectionOrderQuery/1.0" xmlns:ext="http://www.courts.state.mn.us/ProtectionOrderExtension/1.0" xmlns:nc="http://niem.gov/niem/niem-core/2.0" xmlns:j="http://niem.gov/niem/domains/jxdm/4.1">
<ext:ProtectionOrder xmlns:exc="http://www.courts.state.mn.us/ProtectionOrderServiceExchange/1.0" xmlns:s="http://niem.gov/niem/structures/2.0" xmlns:usps="http://niem.gov/niem/usps_states/2.0">
<j:CourtOrderEnforcementAgency>
<nc:OrganizationIdentification>
<nc:IdentificationID>MN0700000</nc:IdentificationID>
</nc:OrganizationIdentification>
</j:CourtOrderEnforcementAgency>
<ext:ForeignOrderIdentification>
<nc:IdentificationID/>
<ext:ForeignOrderIdentificationTypeCode/>
</ext:ForeignOrderIdentification>
<ext:HearingHeldIndicator>false</ext:HearingHeldIndicator>
<nc:Location s:id="DB1618611387">
<nc:LocationAddress>
<nc:StructuredAddress>
<nc:LocationStreet>
<nc:StreetFullText>3434 Bohnsack Way</nc:StreetFullText>
<nc:StreetFullText>Unit 75 B</nc:StreetFullText>
<nc:StreetFullText/>
</nc:LocationStreet>
<nc:LocationCityName>New Prague</nc:LocationCityName>
<nc:LocationStateUSPostalServiceCode>MN</nc:LocationStateUSPostalServiceCode>
<nc:LocationPostalCode>56071</nc:LocationPostalCode>
</nc:StructuredAddress>
</nc:LocationAddress>
</nc:Location>
<ext:ProtectedParty>
<ext:PersonBirthDate ext:approximateDateIndicator="false" ext:currentIndicator="true">1987-11-21</ext:PersonBirthDate>
<nc:PersonName>
<nc:PersonGivenName>Jennifer</nc:PersonGivenName>
<nc:PersonMiddleName>Marie</nc:PersonMiddleName>
<nc:PersonSurName>O'Brien</nc:PersonSurName>
<nc:PersonNameSuffixText/>
<nc:PersonFullName>O'Brien, Jennifer Marie</nc:PersonFullName>
</nc:PersonName>
<ext:PersonRaceCode/>
<nc:PersonSexCode>F</nc:PersonSexCode>
<ext:PetitionerIndicator>true</ext:PetitionerIndicator>
</ext:ProtectedParty>
<ext:ProtectedParty>
<ext:PersonBirthDate ext:approximateDateIndicator="false" ext:currentIndicator="true">2008-03-24</ext:PersonBirthDate>
<nc:PersonName>
<nc:PersonGivenName>Eli</nc:PersonGivenName>
<nc:PersonMiddleName>Rose</nc:PersonMiddleName>
<nc:PersonSurName>Noir</nc:PersonSurName>
<nc:PersonNameSuffixText/>
<nc:PersonFullName>Noir, Eli Rose</nc:PersonFullName>
</nc:PersonName>
<ext:PersonRaceCode/>
<nc:PersonSexCode>F</nc:PersonSexCode>
<ext:PetitionerIndicator>false</ext:PetitionerIndicator>
</ext:ProtectedParty>
<ext:ProtectionOrderBradyIndicator>N</ext:ProtectionOrderBradyIndicator>
<ext:ProtectionOrderCondition>
<ext:ConditionText>Respondent must not have any contact with the Protected Person(s) whether in person, with or through other persons, by telephone, mail, e-mail, through electronic devices, social media, or by any other means except as follows: [] </ext:ConditionText>
<ext:ConditionCode>08</ext:ConditionCode>
</ext:ProtectionOrderCondition>
<ext:ProtectionOrderCondition>
<ext:ConditionText>Respondent must stay a reasonable distance away from the residence(s) of the Protected Person(s), specifically as follows: [distance]; and Respondent must stay a reasonable distance away from ANY FUTURE RESIDENCES of the Protected Person(s). </ext:ConditionText>
<ext:ConditionCode>04</ext:ConditionCode>
</ext:ProtectionOrderCondition>
<ext:ProtectionOrderCondition>
<ext:ConditionText>Respondent shall not call or enter Petitioner's place of employment which includes all land, parking lots, and buildings at: </ext:ConditionText>
<ext:ConditionCode>04</ext:ConditionCode>
</ext:ProtectionOrderCondition>
<ext:ProtectionOrderExpirationDate>2015-12-22</ext:ProtectionOrderExpirationDate>
<ext:ProtectionOrderFinding>
<ext:FindingText>Respondent personally appeared or had reasonable notice and opportunity to be heard. The procedures for service upon Respondent set forth in the Minnesota Domestic Abuse Act (Minn.Stat. 518B.01) were followed, and the court has jurisdiction over the parties and subject matter. </ext:FindingText>
<ext:FindingCode>OAH1</ext:FindingCode>
</ext:ProtectionOrderFinding>
<ext:ProtectionOrderFinding>
<ext:FindingText>Acts of domestic abuse have occurred, including the following: [] </ext:FindingText>
<ext:FindingCode>OAH4A</ext:FindingCode>
</ext:ProtectionOrderFinding>
<ext:ProtectionOrderID>1400042</ext:ProtectionOrderID>
<ext:ProtectionOrderIssuingCourt>
<nc:OrganizationIdentification>
<nc:IdentificationID>MN070015J</nc:IdentificationID>
</nc:OrganizationIdentification>
<ext:CourtFaxNumber>
<nc:TelephoneNumberFullID>952-496-8211</nc:TelephoneNumberFullID>
</ext:CourtFaxNumber>
<ext:CourtTelephoneNumber>
<nc:TelephoneNumberFullID>952-496-8200</nc:TelephoneNumberFullID>
<nc:TelephoneSuffixID/>
</ext:CourtTelephoneNumber>
</ext:ProtectionOrderIssuingCourt>
<ext:ProtectionOrderIssuingDate>2014-12-22</ext:ProtectionOrderIssuingDate>
<ext:ProtectionOrderIssuingJudicialOfficial>
<nc:PersonName>
<nc:PersonGivenName>Do</nc:PersonGivenName>
<nc:PersonMiddleName>P.</nc:PersonMiddleName>
<nc:PersonSurName>Ande</nc:PersonSurName>
<nc:PersonNameSuffixText/>
<nc:PersonFullName>Ande, Do P.</nc:PersonFullName>
</nc:PersonName>
</ext:ProtectionOrderIssuingJudicialOfficial>
<ext:ProtectionOrderOtherIdentification>
<nc:IdentificationID>12345</nc:IdentificationID>
<ext:ProtectionOrderOtherIdentificationTypeCode>NCICNUM</ext:ProtectionOrderOtherIdentificationTypeCode>
</ext:ProtectionOrderOtherIdentification>
<ext:ProtectionOrderService>
<ext:ProtectionOrderServiceAgency>
<nc:OrganizationIdentification>
<nc:IdentificationID>MN0191000</nc:IdentificationID>
</nc:OrganizationIdentification>
</ext:ProtectionOrderServiceAgency>
<ext:ProtectionOrderServiceDate>2015-01-10</ext:ProtectionOrderServiceDate>
<ext:ProtectionOrderServiceTime>16:25:00-06:00</ext:ProtectionOrderServiceTime>
<ext:ProtectionOrderServiceToCode>Respondent</ext:ProtectionOrderServiceToCode>
<ext:ProtectionOrderServiceTypeCode>BYPUB</ext:ProtectionOrderServiceTypeCode>
</ext:ProtectionOrderService>
<ext:ProtectionOrderService>
<ext:ProtectionOrderServiceAgency>
<nc:OrganizationIdentification>
<nc:IdentificationID>MN0191000</nc:IdentificationID>
</nc:OrganizationIdentification>
</ext:ProtectionOrderServiceAgency>
<ext:ProtectionOrderServiceDate>2015-01-10</ext:ProtectionOrderServiceDate>
<ext:ProtectionOrderServiceTime>16:25:00-06:00</ext:ProtectionOrderServiceTime>
<ext:ProtectionOrderServiceToCode>Respondent</ext:ProtectionOrderServiceToCode>
<ext:ProtectionOrderServiceTypeCode>BYPUB</ext:ProtectionOrderServiceTypeCode>
</ext:ProtectionOrderService>
<ext:ProtectionOrderService>
<ext:ProtectionOrderServiceAgency>
<nc:OrganizationIdentification>
<nc:IdentificationID>MN0191000</nc:IdentificationID>
</nc:OrganizationIdentification>
</ext:ProtectionOrderServiceAgency>
<ext:ProtectionOrderServiceDate>2015-01-10</ext:ProtectionOrderServiceDate>
<ext:ProtectionOrderServiceToCode>Respondent</ext:ProtectionOrderServiceToCode>
<ext:ProtectionOrderServiceTypeCode>BYPUB</ext:ProtectionOrderServiceTypeCode>
</ext:ProtectionOrderService>
<ext:ProtectionOrderService>
<ext:ProtectionOrderServiceAgency>
<nc:OrganizationIdentification>
<nc:IdentificationID>MN0250800</nc:IdentificationID>
</nc:OrganizationIdentification>
</ext:ProtectionOrderServiceAgency>
<ext:ProtectionOrderServiceDate>2015-01-09</ext:ProtectionOrderServiceDate>
<ext:ProtectionOrderServiceToCode>Respondent</ext:ProtectionOrderServiceToCode>
<ext:ProtectionOrderServiceTypeCode>BYMAIL</ext:ProtectionOrderServiceTypeCode>
</ext:ProtectionOrderService>
<ext:ProtectionOrderService>
<ext:ProtectionOrderServiceAgency>
<nc:OrganizationIdentification>
<nc:IdentificationID>MN0720100</nc:IdentificationID>
</nc:OrganizationIdentification>
</ext:ProtectionOrderServiceAgency>
<ext:ProtectionOrderServiceDate>2014-12-22</ext:ProtectionOrderServiceDate>
<ext:ProtectionOrderServiceToCode>Respondent</ext:ProtectionOrderServiceToCode>
<ext:ProtectionOrderServiceTypeCode>BYPUB</ext:ProtectionOrderServiceTypeCode>
</ext:ProtectionOrderService>
<ext:ProtectionOrderStatus>
<ext:ProtectionOrderStatusCode>SBJO</ext:ProtectionOrderStatusCode>
<ext:ProtectionOrderStatusDate>2014-12-22</ext:ProtectionOrderStatusDate>
</ext:ProtectionOrderStatus>
<ext:ProtectionOrderTypeCode>OFP</ext:ProtectionOrderTypeCode>
<ext:QualifyingRelationship>
<ext:QualifyingRelationshipCode>LIVTOGTHR</ext:QualifyingRelationshipCode>
<ext:QualifyingRelationshipText>Lived Together</ext:QualifyingRelationshipText>
</ext:QualifyingRelationship>
<ext:Respondent>
<nc:PersonEthnicityCode/>
<nc:PersonEyeColorCode/>
<nc:PersonHairColorCode>XXX</nc:PersonHairColorCode>
<nc:PersonHeightMeasure>
<nc:MeasureText>71</nc:MeasureText>
<nc:MeasureUnitText>inches</nc:MeasureUnitText>
<nc:LengthUnitCode>INH</nc:LengthUnitCode>
</nc:PersonHeightMeasure>
<ext:PersonRaceCode>W</ext:PersonRaceCode>
<nc:PersonSexCode>M</nc:PersonSexCode>
<nc:PersonWeightMeasure>
<nc:MeasureText>210</nc:MeasureText>
<nc:MeasureUnitText>pounds</nc:MeasureUnitText>
<nc:WeightUnitCode>LBR</nc:WeightUnitCode>
</nc:PersonWeightMeasure>
<ext:AddressReference ext:currentIndicator="true">
<nc:LocationReference s:ref="DB1618611387"/>
</ext:AddressReference>
<ext:PersonBirthDate ext:approximateDateIndicator="true" ext:currentIndicator="false">1990-12-23</ext:PersonBirthDate>
<ext:PersonBirthDate ext:approximateDateIndicator="false" ext:currentIndicator="false">1989-12-23</ext:PersonBirthDate>
<ext:PersonBirthDate ext:approximateDateIndicator="false" ext:currentIndicator="true">1991-12-23</ext:PersonBirthDate>
<ext:PersonName ext:currentIndicator="true">
<nc:PersonGivenName>Guy</nc:PersonGivenName>
<nc:PersonMiddleName>Andr</nc:PersonMiddleName>
<nc:PersonSurName>Noir</nc:PersonSurName>
<nc:PersonNameSuffixText>Jr.</nc:PersonNameSuffixText>
<nc:PersonFullName>Noir Jr , Guy Andr</nc:PersonFullName>
</ext:PersonName>
</ext:Respondent>
<ext:RespondentPresentAtHearingIndicator>false</ext:RespondentPresentAtHearingIndicator>
</ext:ProtectionOrder>
<ext:SupersededProtectionOrderID xmlns:exc="http://www.courts.state.mn.us/ProtectionOrderServiceExchange/1.0" xmlns:s="http://niem.gov/niem/structures/2.0" xmlns:usps="http://niem.gov/niem/usps_states/2.0"/>
<ext:Hearing xmlns:exc="http://www.courts.state.mn.us/ProtectionOrderServiceExchange/1.0" xmlns:s="http://niem.gov/niem/structures/2.0" xmlns:usps="http://niem.gov/niem/usps_states/2.0">
<ext:HearingDateTime>2015-01-20T09:00:00-06:00</ext:HearingDateTime>
<ext:HearingLocationText>Scott County</ext:HearingLocationText>
</ext:Hearing>
</poq:ProtectionOrderQueryResponse>Inert to root as first nood.
http://msdn.microsoft.com/en-us/library/system.xml.xmlnode.insertbefore(v=vs.110).aspx
Dim doc As New XmlDocument()
doc.LoadXml("<book genre='novel' ISBN='1-861001-57-5'>" & _
"<title>Pride And Prejudice</title>" & _
"</book>")
Dim root As XmlNode = doc.DocumentElement
'Create a new node.
Dim elem As XmlElement = doc.CreateElement("price")
elem.InnerText = "19.95"
'Add the node to the document.
root.InsertBefore(elem, root.FirstChild)
Console.WriteLine("Display the modified XML...")
doc.Save(Console.Out)
remember make the reply as answer and vote the reply as helpful if it helps. -
How to access variables outside user exit
Hi,
I'm working with a user exit and my problem is that in a particular moment I have to access variables located outside the scope of the user exit (they are in a standard program)
How can I reach these variables?
thanks in advanceHi,
If they are global variables then you can access them using Global assign technique,
For example,
FIELD-SYMBOLS: <fs_value> TYPE ANY.
ASSIGN ('(SAPMV45A)XVBAK') TO <fs_value>.
It is basically,
ASSIGN ('(<Std. Program Name>)<Variable name>') TO <field symbol>.
NOTE: To make sure they are accessible in your user exit, just put a break-point in the user exit and once you are there in debugging, type in,
(<Std. Program Name>)<Variable name> in the Field names section and if it does not show it in RED then it is accessible..
Hope this helps..
Sri
Message was edited by: Srikanth Pinnamaneni -
How to Access Variables defined in the PopUpWindow
Hi Friends
I am building a flex site using flex builder 2.....
Here I need your help.....
My Problem is how to store a variable from a popup window
I have this problem while in the login window comes as popup
while clicking login button in the page a popup where user
can enter username and password...
after submitting if the login is successufl the popup
vanish...
After a successful login I need to store the logged user name
in the main index page but I am not able to store
At first I created a variable 'loggedUsername' in the popup
panel and after success log i assigned the username to it ... after
it i am not able to get the loggedUsername..
doubting I defined the variable in the main index.mxml page
but this variable is not accessible from the loginwidow.mxml page
where the popup will function...
Heip me
how to store the name if the user login is success..
thanks
Chintu...Lets say you have a public property in your application like
public var name:String = "John Smith";
to access this using an inline item renderer:
<mx:itemRenderer>
<mx:Component>
<mx:VBox>
<mx:TextInput text={outerDocument.name} />
</mx:VBox>
</mx:Component>
</mx:itemRenderer>
To access variables of the applicaton you can use
Application.application.name (for example) to reference "global"
variables, so you might also use this technique. With an inline
item renderer, the outerDocument property will refer to the
component which contains the renderer. -
How to access variables declared in main mxml in itemrenderer files
Hi,
I have a main mxml which has a cutomRenderer that defines two
mxml components
namely raidobutton and textinput.
Now in this TextInput.as i need to access variable defined in
main mxml.
Please suggest a way.
Thanks,
LuckyLets say you have a public property in your application like
public var name:String = "John Smith";
to access this using an inline item renderer:
<mx:itemRenderer>
<mx:Component>
<mx:VBox>
<mx:TextInput text={outerDocument.name} />
</mx:VBox>
</mx:Component>
</mx:itemRenderer>
To access variables of the applicaton you can use
Application.application.name (for example) to reference "global"
variables, so you might also use this technique. With an inline
item renderer, the outerDocument property will refer to the
component which contains the renderer. -
How can I assign a hard coded value to a variable of type OBJECT.
Hi,
I have to call the following method
lc_action_execute->get_ref_object(
exporting
io_appl_object = io_appl_object
importing
ev_guid_ref = lv_guid_ref.
Now I have to hard code the io_appl_object variable (of type OBJECT) to test my application for the time being. How can I assign a value to the variable? Is there any way to do that?I wouldn't use WDR_CONTEXT_ATTR_VALUE_LISTGEN. Use wdr_context_attr_value_list instead:
data l_topics type zpm_main_topic_tbl.
l_topics = wd_assist->read_all_topics( ).
data lt_valueset type wdr_context_attr_value_list.
field-symbols <wa_topic> like line of l_topics.
field-symbols <wa_vs> like line of lt_valueset.
loop at l_topics assigning <wa_topic>.
append initial line to lt_valueset assigning <wa_vs>.
<wa_vs>-value = <wa_topic>-main_topic.
<wa_vs>-text = <wa_topic>-main_topic_desc.
endloop.
data lo_nd_meeting type ref to if_wd_context_node.
* navigate from <CONTEXT> to <MEETING> via lead selection
lo_nd_meeting = wd_context->get_child_node( name = wd_this->wdctx_meeting ).
data lo_node_info type ref to if_wd_context_node_info.
lo_node_info = lo_nd_meeting->get_node_info( ).
lo_node_info->set_attribute_value_set(
name = 'MAIN_TOPIC'
value_set = lt_valueset ). -
Passing Global Variable in Sql Object
Hi
How can i pass my global variable into SQL object? I tried to pass it but then I tried to update the schema it giving me the error at varble
Please advise meThe Update schema is used only to get the structure for the Output.
Once you have a valid structure and the SQL Parses without any variables use the syntax for applying variables as in any Script within DI.
$GV_MyVar enclosed within square brackets will be replaced by Value of the variable.
$GV_MyVar enclosed within curly brackets will be replaced by Value of the variable enclosed in single quotes.
When the job runs, the variables will be replaced with values OR values with quotes. It is at this time, the SQL send to the database is validated for syntax.
Therefore, you will not know the validity of your SQL with Global Variables until you run the job.
Hope this helps!
Thanks & Regards
Tiji
Edited by: Tiji Mathew on May 8, 2009 3:40 PM
The actual syntax was being posted as a link. edited to make the text descriptive. -
Accessing list of DISPLAY objects in a table component.
Hi there,
I am using a class that extends ObjectListDataProvider to populate a JSF table component.
I need to access the list of objects that are actually displayed currently in the table. The table uses pagination so there are other table elements not displayed and I do not want those.
Can someone help me?
thanksHello,
I've been working with this method and it works good with pagination as far as you do not start to sort the table... it starts to append new rows at the end.
The only workaround I've found so far is to call clearSort() before getting the ids... but that is just partially nice...
So, maybe I'm doing something wrong or maybe there is a bug that could be fixed in 1.2?
Regards,
Rob -
Can't access variables in specific S7-1200 DB's in LabVIEW project
Hi all,
I'm trying to establish a connection between LabVIEW and a Siemens S7-1200 though Ethernet and SIemens OPC Server.
The physical connection is OK (I can ping S7-1200 with no problem).
When I needed to access variables from specifics DB's inside S7-1200 ( I want to access variable DB190,X0.4), I called Siemens support and they said I had to modify the variable's definition when using OPC Scout, from "MX0.4" to "DB190,X0.4", and then it was possible to access this variable.
Same solution (renaming the path) applies to NI OPC Client, I can read and write variables properly.
My problem is that when I try to add variables in LabVIEW Project, I can't find those variables whose address were modified, so I can't access the correct variable in my program.
I tried to change the variable path in Multiple Variable Editor, but it doesn't work either.
Any suggestions on what I can try??First: Avoid the ODBC/JDBC Bridge if at all possible.
It's the worst JDBC driver I've ever seen. It's buggy
and a great hindrance both to learning and to
producing usefull code.I agree that there might be problems with M$ Access, but there are problems with all databases, including MySQL (e.g., no referential integrity in free download version). It's capable enough for the query the OP is trying to execute.
The problem is with his code, not Access or the bridge driver. He'll go through a lot of effort to switch databases and still have this problem. Better to understand what HE'S done wrong and fix it so he'll do it correctly for all databases, including Access.
You just need to be more careful with your query, I'm sure.
% -
BPM SMQ2 in sysfail Access using a 'ZERO' object reference is not possible
Hi ,
I am working on a IDOC to SOAP synchronous scenario
So I am using a BPM....
I have written a operation mapping outside BPM
1) Request MM creates the SOAP rquest
2) Response is a ABAP mapping where i am checking the response from webserice and then generating an email using ABAP code.
now when i am running this scneario works fine and the mail gets generated...
however i get a green flag in moni and in SMQ2 in sysfail Access using a 'ZERO' object reference is not possible
PS : Also the response coming from the webserice has a custom header which does not match with the response ABAP mapping source MT
however if I work on the same thing using Proxy to SOAP sync there is no sysfail message and it works fine
Is this a bug in the system ...i am using PI 7.1Hi,
Try to implement SAP note 1164228 or apply package SAPKB71007 to resolve your issue. -
How does Apex access and manage db objects in other schemas?
I'm looking for a description of how Apex accesses and manages database objects in other schemas.
I'm sure I've seen such a description somewhere earlier but am unable to find it again...Hi Rene,
When you are connected to sqlworkshop, it is basically connected to the sceham owner of the workspace. If you execute the query
select sys_context( 'userenv', 'current_schema' ), user, username from user_users;you would see the schema and user(currently connected) and schema owner through which you have logged in. The user will have all the privileges granted to schema owner. So basically you get connected through APEX_PUBLIC_USER and it has all the privileges of the schema owner.
In order to run scripts in another schema you would need grants on other schema same like you are connected to user A through sqlplus and wants to create objects in schema B. For example lets say you want to create a table in schema B and you have create table privileges in scehma B , you can execute command create table B.emp as select * from A.emp;
I hope this answers your question.
Regards,
Manish -
Session Variable in any Object
Hi, I've been developing on java, jsp and struts for a while now, and I've got something that I can't resolve:
I have some session variables in struts, such as User, role, etc... I can get the session using request.getSession() and then get them without any trouble. My design uses the MVC pattern, so I also have a Model Object. I also have a database controller class to store my model. The problem is that I wanna retrieve the session variables from the database controller, and there I don't have the request object. I could use a set, or take the parameters I need, put them on a bean and pass that bean as a parameter; but that would be very ugly, and I would have to change almost every class of my application.
Is there a way to have session variables from any object?
Thanks!!!
Leandronope... you have to pass the reference in like anything else.
-
Cost center planning data-Plan Variable Costs in Object Currency
Dear All:
I have copied a standard planning layout and for the field, 'Planned Fixed Cost' and 'Planned Variable Cost', I have selected 'Plan Variable Costs in Object Currency' and 'Plan Fixed Costs in Object Currency' as the Key Figure.
I am doing this because our Controlling Area currency is TWD and the other company will upload the planning data in RMB .
However when I do the above settings and try to save, I am getting the following errors.
The column 'Plan Fixed Costs in Object Currency' can input correctly but the column 'Plan Variable Costs in Object Currency' canu2019t be update in KP06 .
ex.
Planner profile: SAPALL
layout :1-101
I can't update the column "Plan Variable Costs "
I copy the layout 1-101 and change the column to 'Plan Fixed Costs in Object Currency' and it still can't input variable cost
BR,
CarolHi Carol
I have done this many times and never faced this issue
Just delete the copied layout and Copy it again from 1-101....
May be delete the existing columns of the layout and choose the desired key figure of object currency
Then assign the layout to Planner Profile
Regards
Ajay M -
Access variables in Package.
Hi I have a apackage called share.server , in which I have defined
Hashtable hash;
i have another file in share package as Impl, here i want to call the "hash"
how can i access the same "hash" in Impl.java from FilServer which is in share.server package.
Please respond urgent, assignment is due soon.
Thanks for any response.what?!
variables belong to classes, not packages. If you want to access variables between classes you need to define some kind of public interface for them (getters and setters... ring any bells?). This is basic basic OOP, and is called encapsulation. First thing you need to do is get a basic 'OOP with java' type book and read it fully. We can't help you if you can't help yourself/ -
Website needs Microsoft Data Access - Active X Data Objects
I have a number of websites for work that are seem to be built around Internet Explorer. When I try to open them on my Mac at home with Safari, I get message that I pasted below.
I'm thinking this might be related to the fact that when I open them on a PC for the first time it shows a similar message, but Internet Explorer prompts me to download and run "Microsoft Data Access - Active X Data Objects", and then it runs fine.
Based on this I'm assuming it's a lack of these "objects" that are causing this problem. Is there any equivalent to these components for the Mac? Anything I can try to access these websites from my Mac? I've tried using Firefox as well, which has the exact same issue.
Right now I've got to fire up my 2006 PC laptop to use Internet Explorer every time I need access to these sites. I realize I could install windows on my Mac with bootcamp and restart in windows every time I need access, but that seems like a waste just to visit 2 websites. Any advice?
+"Scanning Required components...+
+The user's Internet browser requires proper configuration to access our site. Read the following instructions on how to set up the browser properly.+
+Active Scripting Configuration:+
+Select Tools from the Internet Explorer menu bar.+
+Select Internet Options ...+
+Select the Security tab.+
+In the Web Content Zone list, select «Internet».+
+Click Custom level....+
+In the Settings list, scroll down to the Scripting section.+
+Check the Enable option under the «Active scripting» item and click OK.+
+Click Yes to confirm the change in the security settings.+
+In the Internet Options dialog box, select the «Local intranet» and repeat steps 5 to 8.+
+Click OK to close the dialog box."+Hi,
Try this...
From your Safari menu bar click Safari / Preferences then select the Advanced tab. Enable the develop menu.
In the menu bar click Develop / User Agent.
Try IE 8, 7, or 6.
No guarantees but can't hurt to try. ActiveX requires Windows.........
Carolyn
Maybe you are looking for
-
Report for Branch wise Trail Balance & Profitability
Hi, I need a report for Branch wise trail balance and Profitability. Is there any standard report in FI for that or do i need to define with Report painter functionality? Please advise BR, Yadayya
-
I've got a form with some scripted buttons for attaching files. When I set security settings on the form my buttons stop working and I get the following error: NotAllowedError: Security settings prevent access to this property or method. The security
-
Make a field obligatory by clicking on a check box
SELECT-OPTIONS: so FOR ztable-so OBLIGATORY. SELECTION-SCREEN END OF BLOCK b1. SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-b02. PARAMETERS: check1 TYPE char1 AS CHECKBOX. SELECTION-SCREEN END OF BLOCK b2. here my requirement
-
Event ID 91 Could not connect to the Active Directory. Active Directory Certificate Services
Could not connect to the Active Directory. Active Directory Certificate Services will retry when processing requires Active Directory access. Event ID: 91 Task Category: None Level: Error Keywords: Classic User: SYSTEM Com
-
Can you add Keyword search option in images uploaded from Aperture to Mobile me or any website??