madupathi arun

Greenhorn
+ Follow
since Feb 25, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by madupathi arun

hi
Thanks for your reply
Actually the tooltip properties are not coming from javascript file.
I am using title attribute of jsf h:outputtext tag to display tooltip.
How I can change the delaytime of tooltip which is displaying from title attribute of h:outputtext tag ;
Please suggest me on this

12 years ago
JSF
hi

I am using java server faces and java script.

I used tool tips in <h utput Text> tag with title attribute.

I want to increase the tool tips delay time.

Can anyone suggest me on this.
12 years ago
JSF
Hi I solved this by using on change=submit()
12 years ago
JSF
hi yaji
I am unable to set the default value for h:selectOneMenu

my jsf is

<h:selectOneMenu id="requestStatus12" value="#{currentLanguageResolver.requestState}" onchange="submit()" valueChangeListener="#{currentLanguageResolver.valueChangeSelectOneMenu}">

<f:selectItems value="#{currentLanguageResolver.possibleStates}"/>
</h:selectOneMenu>

my currentLanguageResolver is
==========================

public List<SelectItem> getPossibleStates() {
RequestLanguageState[] states = RequestLanguageState.values();
List<SelectItem> result = new ArrayList<SelectItem>(states.length);
result.add(new SelectItem("", ""));
myMap.clear();
for (RequestLanguageState state : states) {
myMap.put(state.toString(), state);
// result.add(new SelectItem(state, new I18n(state.toString()).getDefault()));
result.add(new SelectItem(state.toString(), new I18n(state.toString()).getDefault()));
}
return result;
}
12 years ago
JSF
hi yaji
I am unable to set the default value for h:selectOneMenu

my jsf is

<h:selectOneMenu id="requestStatus12" value="#{currentLanguageResolver.requestState}" onchange="submit()" valueChangeListener="#{currentLanguageResolver.valueChangeSelectOneMenu}">

<f:selectItems value="#{currentLanguageResolver.possibleStates}"/>
</h:selectOneMenu>

my currentLanguageResolver is
==========================

public List<SelectItem> getPossibleStates() {
RequestLanguageState[] states = RequestLanguageState.values();
List<SelectItem> result = new ArrayList<SelectItem>(states.length);
result.add(new SelectItem("", ""));
myMap.clear();
for (RequestLanguageState state : states) {
myMap.put(state.toString(), state);
// result.add(new SelectItem(state, new I18n(state.toString()).getDefault()));
result.add(new SelectItem(state.toString(), new I18n(state.toString()).getDefault()));
}
return result;
}
12 years ago
JSF
Hi

if i select any value from selectOneMenu that value is not coming into java method
I used following code
<h:selectOneMenu id="requestStatus12" value="#{currentLanguageResolver.requestState}" valueChangeListener="#{currentLanguageResolver.valueChangeSelectOneMenu}">
<f:selectItems value="#{currentLanguageResolver.possibleStates}"/>
</h:selectOneMenu>

in java class
public void valueChangeSelectOneMenu(ValueChangeEvent evt) {
ArrayList selectedValueOfDropDown=new ArrayList();
selectedValueOfDropDown.add((Integer) evt.getNewValue());

}

Could you please suggest me on this.
this is very urgent for me.
12 years ago
JSF
Hi

if i select any value from selectOneMenu that value is not coming into java method
I used following code
<h:selectOneMenu id="requestStatus12" value="#{currentLanguageResolver.requestState}" valueChangeListener="#{currentLanguageResolver.valueChangeSelectOneMenu}">
<f:selectItems value="#{currentLanguageResolver.possibleStates}"/>
</h:selectOneMenu>

in java class
public void valueChangeSelectOneMenu(ValueChangeEvent evt) {
ArrayList selectedValueOfDropDown=new ArrayList();
selectedValueOfDropDown.add((Integer) evt.getNewValue());

}

Could you please suggest me on this.
this is very urgent for me.
12 years ago
JSF
hi

I am using java server faces and java script.

I used tool tips in <h utput Text> tag with title attribute.

I want to increase the tool tips delay time.

Can anyone suggest me on this.
12 years ago
JSF
Hi
I am developing multilingual

When I click on german commandlink it is showing german content and toggoling to english.this works fine

But When i click on english it is showing english content displaying all alnguages(except english)
my requirement is to show only one language.
my code

<div class="link">
<h:commandLink rendered="#{currentLanguageResolver.german}"
styleClass="substituteCare"
action="#{currentLanguageResolver.toEnglish}"
title="#{i18n['ENGLISH_LANGUAGE']}">English</h:commandLink>
<h:commandLink rendered="#{currentLanguageResolver.english}"
styleClass="substituteCare"
action="#{currentLanguageResolver.toGerman}"
title="#{i18n['GERMAN_LANGUAGE']}">Deutsch</h:commandLink>
</div>



<div class="link">
<h:commandLink rendered="#{currentLanguageResolver.french}" styleClass="substituteCare"
action="#{currentLanguageResolver.toEnglish}"
title="#{i18n['ENGLISH_LANGUAGE']}">English</h:commandLink>
<h:commandLink rendered="#{currentLanguageResolver.english}"
styleClass="substituteCare"
action="#{currentLanguageResolver.toFrench}"
title="#{i18n['FRENCH_LANGUAGE']}">French</h:commandLink>
</div>
13 years ago
JSF
hi

i have search.jsp,by entering serach parameters--->i am calling action(ResultActino)-->showing result.jsp-->update the values using result.jsp


after updating i am tryring to show result.jsp with updated values

how i can execute action class again
13 years ago
hi

i am having one search screen.by using this i am getting resultset(result.jsp)

when ever i update the values ,i am again displaying result.jsp

but iam not getting updated values

any help
13 years ago
JSP
hi

my requirement is to show saveas dialogue when i clickm on download button
13 years ago
hi

i am having folowing problem

I need to take the user specific directory and pass that to servlet file

I am calling document.execCommand('SaveAs','1','filename.xml'); on the click of download button


but I was unable to pass that file directory using this
13 years ago
hi

i am having folowing problem

I need to take the user specific directory and pass that to servlet file

I am calling document.execCommand('SaveAs','1','filename.xml'); on the click of download button


but I was unable to pass that file directory using this


can aybody help me on this
13 years ago
JSP
hi
actually i am having following requirement

i have to download pdf from server and save it as a xml in local machine

i neeed to run one offline tool to read xml and take i/p from end user

later I upload that file in to server


I changed my code but i am getting following error

[Fatal Error] :1:1: Content is not allowed in prolog.
Exception in thread "main" org.xml.sax.SAXParseException: Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at parser.Writingxml.bytesToXml(Writingxml.java:27)
at parser.Writingxml.main(Writingxml.java:36)


my code is

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
byte[] test=TestingPdf.getRequestBufferAsBytes(request);
byte[]test5=Base64.encodeBase64(test);
org.w3c.dom.Document test4 = null;
try {
test4 = TestingPdf.bytesToXml(test5);
} catch (ParserConfigurationException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (org.xml.sax.SAXException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
TransformerFactory transfac = TransformerFactory.newInstance();
Transformer trans = null;
try {
trans = transfac.newTransformer();
} catch (TransformerConfigurationException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperty(OutputKeys.INDENT, "yes");
StringWriter sw = new StringWriter();
StreamResult result = new StreamResult(sw);
DOMSource source = new DOMSource(test4);
try {
trans.transform(source, result);
} catch (TransformerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String xmlString = sw.toString();

//print xml
System.out.println("Here's the xml:\n\n" + xmlString);
}

private static org.w3c.dom.Document bytesToXml(byte[] test5) throws ParserConfigurationException, org.xml.sax.SAXException, IOException {
// TODO Auto-generated method stub
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
return builder.parse(new ByteArrayInputStream(test5));
}

public static byte[] getRequestBufferAsBytes(HttpServletRequest request) throws IOException, ServletException
{
ServletInputStream oInput = request.getInputStream();


long nContentLength = request.getContentLength();

@SuppressWarnings("unused")
String contentType = request.getContentType();
if(nContentLength <= 0L)
return null;
byte cContent[] = new byte[(int)nContentLength];
int nRead = 0;
int nToRead = (int)nContentLength;
int nBlkSize = 512;
byte cTemp[] = new byte[512];
do {
int n = 0;
int i = 0;
if(nToRead - nRead < 512)
nBlkSize = nToRead - nRead;
n = oInput.read(cTemp, 0, nBlkSize);
for(i = 0; i < n; i++)
cContent[i + nRead] = cTemp[i];
nRead += i;
} while(nRead < nToRead);
@SuppressWarnings("unused")
Long nBytesRead = new Long(nRead);

return cContent;
}
13 years ago