Struts property file value not printing properly - struts2

Hi i am using struts2 and hibernate in my project. When i am trying to print messages from property file the value is not printing instead its key is displaying
I have set salesMan.login.ErrorMessage=Invalid Username or Password in my mydrdirect.prperties file and also i have set <constant name="struts.custom.i18n.resources" value="myDrDirect" />. But when i call the getText function from action file the value print in the browser is salesMan.login.ErrorMessage. Anybody have idea about it?

Case 1: If the key you are using to get the value will not match with the key you provided in the property file, then it will display the "key" in the browser.
Case 2: mydrdirect.prperties
is this correct file name?

Related

Why can't open a link from field type - string > url

I have a custom string field with url pattern, after I populate the field with my link (a link to a Pdf file on my local pc)
I try to open it from my entity form and it doesn't work. The link is valid: I checked it on my local computer and I use it as attachment on a crm email entity and it opens with no prob. But when I try to open my PDF from the field that holds the link on my entity form it doesn't work.
Am I missing something? are there special rules for string field with URL pattern? Does saving a string path in that kind of field mixs/breaks the path?
Text fields cannot display navigable file paths. When the URL format option is specified only http:// and https:// schemes are valid.
An alternative could be to create a custom HTML web resource and design a custom UI control allowing navigation to or download of files.
To have clickable links you need to create the text field accordingly.

How to read the attribute value which is within CDATA from XML in Talend

I am trying to read attribute value which is within a CDATA from XML in Talend. I am getting the value along with CDATA and not the value alone.
My XML format is :
<root>
<node attribute="![CDATA[value]]" />
</root>
In Xpath if i give attribute it is retrieving the value as ![CDATA[value]]. I want to get only "value". Is it possible to get the value inside the CDATA?
tMap or tJavaFlex set output value as:
row1.value.replaceAll("!\\[CDATA\\[","").replaceAll("\\]\\]","")
row1.value - change for You real name

Grails 2.3.8 Internationalization coded strings

I don't understand why some strings in my messages.properties files won't show in my gsp. More exactly, the show in term of the key name in the file not the value.
For example, this string in my messages.properties:
gtunes.store.subtitle=Your online music store and storage service!
is showing up on the gsp where I have this line of code:
<h1><g:message code='gtunes.store.subtitle'/></h1>
simply as:
gtunes.store.subtitle
My code is here.
I downloaded your app and the reason for the error is because there's no message with this key configured in messages.properties.
If you try to render a message for a key that doesn't exist, the key is displayed instead.

Sharepoint Lists.asmx: remove "ows_MetaInfo" field from GetListItems method response xml

The following question was posted in other forum, but there was no response, I am facing the same problem and I think it will get some answers here :
Question :
I am making use of the SharePoint 2007 GetListItems web service to programatically retrieve all documents within a document library. However, my program is throwing an Exception due to an invalid character contained within the XML response. The bad data is within the Word document itself. There are control characters within the Comments section of the document properties. The bad characters are then ending up as  in the ows_MetaInfo field in the XML output which is invalid.
I have no need for the ows_MetaInfo field and so I have been trying to use the viewFields parameter to specify which fields to return along with setting the query option IncludeMandatoryColumns to false but the ows_MetaInfo field is always returned.
Does anyone know if it is possible to remove the ows_MetaInfo field from the output or somehow handle these invalid characters that are appearing in the XML output
In my case (SharePoint 2010) this solved the problem:
<soap:viewFields>
<ViewFields Properties="True">
<FieldRef Name="MetaInfo" Property="ModifiedBy" />
<FieldRef Name="ID" />
<FieldRef Name="LinkFilename" />
</ViewFields>
</soap:viewFields>
This works for me to exclude the ows_MetaInfo field:
<soap:GetListItems>
<soap:listName>{....}</soap:listName>
<soap:viewFields>
<ViewFields Properties="True">
<FieldRef Name="*"/>
<FieldRef Name="MetaInfo"/>
</ViewFields>
</soap:viewFields>
</soap:GetListItems>
See also http://msdn.microsoft.com/en-us/library/dd964860(v=office.12).aspx
There are no way to remove this field from the output, or at least none that I've found.
The MSDN documentation says that even if you set the IncludeMandatoryColumns to false, it will returns some mandatory fields.
I think your best option here is to fill a bug report to Microsoft, saying that invalid characters are put inside the ows_MetaInfo field.
Another thing you can try, but I don't know if it will resolve the problem it setting the Properties attribute of the ViewFields element to TRUE.
<ViewFields Properties="TRUE">your fieldrefs</ViewFields>

BizTalk 2006 R2 mapping problem

I have this data (all the elements are optional):
<data>
<optionalElement1>...</optionalElement1>
<optionalElement2>...</optionalElement2>
<optionalElement3>...</optionalElement3>
</data>
I need to map this to another schema (all the elements are required):
<request>
<Element1>...</Element1>
<Element2>...</Element2>
<Element3>...</Element3>
</request>
Since the elements in the original request are optional, the mapping will
only generate the corresponding elements for the originally included
elements. But the validation of the request will fail.
Example:
<data>
<optionalElement3>
<value1>1</value1>
<value2>2</value2>
</optionalElement3>
</data>
will be mapped to
<request>
<Element3>
<subelement1>1</subelement1>
<subelement2>2</subelement2>
</Element3>
</request>
And the validation will fail because i'm missing Element1 and Element2. The
response should be (I think):
<request>
<Element1 xsi:nil="true" />
<Element2 xsi:nil="true" />
<Element3>
<subelement1>1</subelement1>
<subelement2>2<subelement2>
</Element3>
</request>
How can I do this in the mapping? How can I ensure that the element is
created in the output message?
And, by the way, if a subelement is not present (let's say
"data/optionalElement1/value1" how can I make sure that the destination
subelement "request/Element1/subelement1" is created?
Make it very simple. Use the xlst file for mapping.
Using simple if condition you can check for value exist for opetion element or not, if value exist then map that else map the null (Empty) value. So the complex element will get generated even if there is no value for optional element.
Hope it will solve your problem.
You can do all this in the mapper. I haven't been into Biztalk for a while and I don't have it near me, but I know there are functiods in the mapper that lets you check for the existence of the fields you need. Depending on the existence of these field, you can specify what the appropriate action for the mapper is.
You force the creation of fields by giving them default values in the target schema. This can also be done using the mapper, via the properties window.
Jose,
You'll want to look at the table looping functoid. Here's a post about it.
http://geekswithblogs.net/Chilberto/archive/2008/04/16/121274.aspx
Using this functoid with the table extraction should give you your solution. Also here's a good series on understadning the mapper.
http://www.bizbert.com/bizbert/2008/02/07/Understanding+The+BizTalk+Mapper+Part+1+Introduction.aspx
-Bryan

Resources