Vishal Kumar Aruru

Greenhorn
+ Follow
since May 18, 2009
Merit badge: grant badges
For More
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 Vishal Kumar Aruru

Thanks for your concern,

I want to show preview, thats it
14 years ago
I am not understanding what you are saying, i will get a raw byte array, and how can i make generic one to open the file, i am bit confused, can you tell me scenario or any junk code such that i feel comfortable.
thanks in advance.
14 years ago
Hi,

I have a requirement of uploading the file like .doc, .xls, .jpeg, .txt, .gif, .pdf into database. so, i uploaded the file by converting them into bytearray and then to database like blob. Up to here it is fine. My problem is view the file. i.e. i know the file extension and i will get the byteArray from the database to the presentation layer. I need a logic such that i can use this byteArray and file extension to show the file like for example, if i upload a image, it converts to bytearray and then to blob to database. then i retrieves the bytearray from the database and i have to convert this byte array to image. similarly to .doc, .xls, .jpeg, .txt, .gif, .pdf.

Thanks in Advance.
14 years ago
Thanks,

But here my scenario is different, when i use method.invoke() function it returns an object, which i don't want this. My function returns a list of classes. So, when i use method.invoke() function, i need to typecast the list of the classes. but i will get the class name dynamically, so how to use this for a generic way.

Let me narrate you.

I will send a classname as parameter to a fucntion. that function will gets the fields name, in that fields having any list type fields, I have to traverse in to that list. So for traversing i used the getter of that list and i invoked that function it returns object. but i need to typecast the list of the classes. but i will get the class name dynamically, so how to use this for a generic way.
14 years ago
Hi,

I have a scenario where i am getting the function name from another class, so i am storing it in a string. Then i need to call the function which is in string.

for example i got some function name like "sampleFunction" then i store this name in a string. i need to trigger this function in the next step. how to do this.

Thanks in advance
14 years ago
Please help me,
if any body knows about jsf unit testing, i am not understanding with the things said @ jboss.org.
14 years ago
JSF
1. Create a layout.jspx page by including following code.

<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
xmlns:ui="http://java.sun.com/jsf/facelets">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="default.css" rel="stylesheet" type="text/css" />
<link href="cssLayout.css" rel="stylesheet" type="text/css" />
<title>Facelets Template</title>
</head>

<body>

<div id="top">
<ui:insert name="top">Header</ui:insert>
</div>

<div id="content">
<ui:insert name="content">Content</ui:insert>
</div>

<div id="bottom">
<ui:insert name="bottom">Footer</ui:insert>
</div>



</body>
</html>

</jsp:root>


2. Create a new JSP Page and add the following taglibraries in addition to existing core and html tag libraries.

<jsp:root xmlns:ice= “http://www.icesoft.com/icefaces/component”
xmlns:ui= “http://java.sun.com/jsf/facelets” >
</jsp:root>




3. Use the above layout file in JSP Page using <ui:composition> component.

<ui:composition template=layout.jspx"></ui:composition>



4. Change the content part of main page using <ui:define> component. Place this component inside <ui:composition>.

<ui:composition template="layout.jspx">
<ui:define name="content">
<f:view>
<ice:form>
<ice:outputText value=”welcome to Facelets”/>
</ice:form>
</f:view>
</ui:define>
</ui:composition>


5. Include following code in faces-config.xml

<application>
<view-handler>
com.icesoft.faces.facelets.D2DFaceletViewHandler
</view-handler>
</application>


6. Add Dependency for following jars
1. el-ri.jar
2. el-api.jar
3. icefaces-facelets.jar
4. servlet-api.jar






15 years ago
JSF
i was using icefaces, i created a login page which redirect to success and failure on user input, i used the bean scope to 'request', the problem i am facing is .....
i have given the correct information to login so it redirected to success page in that i am printing the username, its fine and again i redirected to another page to check the username is carried or not, the page contains only the username related stuff
<ice ':'outputText value=#{loginDataBean.uname}/>
this has to throw an error because i have given the managed bean scope is request but it is showing the username, not throwing any exception. But how this is coming for the second page, even i gave the scope to request...... i am using the net beans ide and IE7. so please resolve this issue.

and the same thing i tried for session, application, page ..............same output is coming ....................................
15 years ago
JSF