Dharmesh Chheda

Ranch Hand
+ Follow
since May 08, 2001
Merit badge: grant badges
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 Dharmesh Chheda

Hey Bharath ..

I dont have any sample with me as of now.. Let me see if I can bring up with a sample code by day end .
15 years ago
Hi

Create an ActionURL and make the form with that action submit in your javascript method. Have you tried that?
15 years ago
Hi Vipul

From what I understand, you have a link in your portlet A. On click of that link you want to call processAction of Portlet A and then later redirect to Portlet B..

If this is what you are looking you can try out this solution.

Step 1> In the JSP of Portlet A, use the wps:captureContent tag to capture link pointing to Portlet B. For this you need to export the page details on which the Portlet is residing to get the object id's of the page and the portlet on it.

Step 2> your wps:captureContent tag will look something like this



Consider PARAM1 to be the value that you need to pass to portlet B. In case you want to pass a value that the user has submitted you can do it in the processAction of Portlet A.(in such case you can consider VALUE1 as a placeholder.)

At this point you now have a link pointing to portlet B with the necessary params encoded in the URL.This will be your redirect URL , the one where you will redirect to from Portlet A processAction method.

Step 3> Capture this value in a javascript variable.


serverBaseURL is the detail of the URL before the relative part of the URL.

Step 4> have a form action that, on submit will invoke processAction of Portlet A and have a property for the redirectURL.


Step 5> on click of form submit, get hold of the form and set the redirectURL to its property and let the control will go to processAction of Portlet A. Once that is done in the processaction you can get the redirect URL as one of the form element.

Step 6> do what you want in your processAction. In case you want to push in new values to the params, you can locate the String "VALUE1" in the redirect URL and update it with the value you want to pass.

Step 7> do response.sendRedirect(redirectURL);

Hope this helps
[ October 17, 2008: Message edited by: Dharmesh Chheda ]
15 years ago
Which portal server are you using ?
15 years ago
Why are you calling the portlet again in a solo mode (an AJAX) to get the content back?.. that usually is not a good practice.

wont a plain AJAX call suffice?..
15 years ago
I am just throwing out the idea.

What you can do is have a table in the database that will hold the data the user entered in the form. So once the the user clicks the submit form, capture all the data in the table and use the generated key as an identifier.

Append the generated key as a request parameter (within the URL).. so when the user (at his/her own convenience) clicks on the link in the email, fetch all the previously stored data based on the id and proceed.

note:
-- You can come up with an encrypting logic to encrypt the identifier so that no user will play around with it.

does this make any sense?
15 years ago
Hi Gangadhar

This will only work if you have both the portlets in the same portlet application... only then will the APPLICATION_SCOPE work
15 years ago
Well got the issue resolved.

For some strange reason(atleast I noticed this for the first time), in IBM portal, the parameters stored in the Object state are held as string array .. so when I was setting the values as type String, it was throwing a ClassCastException.

now setting the values as String array and works fine.. Phew!!!
15 years ago
Hi,

I am using JSR168, WPS 5.1

I have a requirement wherein I need to forward control from my struts action to a page URL. I am able generate URL to that page but how do i pass some parameters to that page so that the portlets on that page can utilize them?.. Here is what i have


Using this i am able to redirect. Now i have this code to append my params



The last statement throws ClassCast Exception .. tried different things .. wonder why.. is there any other means to do what i am trying to achieve.?


thanks
dharmesh

[ August 21, 2008: Message edited by: Dharmesh Chheda ]
[ August 21, 2008: Message edited by: Dharmesh Chheda ]
15 years ago
Hi,
I have an XMLType Column in my database and I am using Spring StoredProcedure to persist values in the database.

Any inputs as to how i can get data into the column.
Hi
I have an app which returns a DOM back as an AJAX response. I loop through the result and populate the results in a table by dynamically inserting rows in the table.

My Issue is the browser becomes unresponsive and waits for the loop to complete and once all the records are inserted, only then it shows all records. Its not a very major hit .. but is there any way i can make the rows visible as and when one iteration of the javascrpt loop is completed. i.e one row in inserted in the table.?

here is the manner in which the rows are inserted. (not actual code just logic)

for all the records
insertRow in the table tbody
insertCell in the rows
end for..
Hi

I have a huge table to display which might have around 500-1000 rows based on certain criteria which is based on what the user enters.

My servlet is returning an XML back and I am using the DOM api to navigate through the XML and create dynamic rows for the table.

the problem is that while rendering the page, i.e. creating the rows, my browser blocks user access for the time it is creating the rows and displays all the records at once ..

Is it possible to make each row visible as it is bein added to the table?...

any help will be appreciated.

Me using Java
Hi jyotish

Your question is very vague. If you want to create a URL that points to the same portlet instance, use

renderResponse.createActionURL and renderResponse.createRenderURL
15 years ago
hi

try this

System.out.println("Store Type: " + session.getAttribute("storeType",PortletSession.APPLICATION_SCOPE));
16 years ago