aneesh vijayakumar

Greenhorn
+ Follow
since Jul 01, 2008
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 aneesh vijayakumar

Actually I got it working...



the list was left empty..

this would have worked fine for the edit...
but while updating , now i checked whether any ehicle types exist in database for the object of reference and i had to give like



and it works fine

Thanks all

Aneesh

15 years ago
i am using the struts library tags..


the multiple select is inside form tag..


I have some select box and some multiple select box in it.


i want to retain the value of this multiple select box while doing an update.

the user goes to the edit page to update details using a edit url, through which i am passing the id as a parameter.

in doing so, i am getting the object there by using the method



i am able to retain the values of checkbox's and textfield's in the page. but when it comes to select box, i am not able to retain their values.

since this page is used by the user to update his previously entered details, all the entries must be populated.

any help to solve this will be appreciated.
15 years ago
yes...i am using struts 2
15 years ago
Hello,

I am doing an edit page. The edit page contains multiple select box. I have no issue while saving the form.
The issue is while the user updates the details.

i was able to retain the values in text field's etc, but I don,t know how to retain the value in multiple select box.

I gave the multiple select like



i tried to retain theselected values by giving

but in vain...

any help to solve this will be appreciated.

thanks in adavance.
Aneesh

15 years ago
Thanks David for the suggestion

But i am using tiles in my application.

So I gave like

<action name="download" class="com.trivand.apps.autos.action.***Action" method="downloadReport">
<result name="success" type="tiles">***.****.downloadAuto</result>
</action>

Is there any specific advantage of using stream result in downloading?

Thanks
Aneesh
15 years ago
Hello,

I have done the download

I did like



Now the download option is working..But there is some error in console like

java.lang.IllegalStateException: getOutputStream() has already been called for this response

It is actually not affecting the result. When i googled it, its given like this is not a critical error.

If anyone has a resolution to it please post here...

Thanks
Anees
15 years ago
Hello,

I am using struts 2 in my application. I have to do report download. I am doing the report build in one action and then moving to another page. I need the download option to come when i move to the page after report build.

For the reporting stuff i am using jasper reporting.
I gave like

response.sendRedirect("../../../images/upload/reportDestDir/1GenericReport.pdf");

in the downloadDetailsPage.

In struts i gave like

<action name="download" class="com.trivand.apps.autos.action.***Action" method="downloadReport">
<result name="success">/pages/common/public/downloadDetailsPage.jsp</result>
</action>

But i need to do it like after the action is performed it should go to the downloadDetailsPage and show the download or openwith option..

Please help me out...

Thanks in advance

Aneesh
15 years ago
Hi

Thanks David,/public will be alright for me, again thanks.


if I give the <s:url> us mentioned above, the url will look like

http://localhost:8282/Autos/pages/sell/public/partView.action?itemid=30

I have included includeParams="none", then why the itemid is being viewed in the url?

I dont want this itemid to be dispalyed in the url.
Can any one help me to hide or encrypt the itemid=30(other parameters,if any) in the url?

Thanks
Aneesh

[ December 11, 2008: Message edited by: aneesh vijayakumar ]
[ December 11, 2008: Message edited by: aneesh vijayakumar ]
15 years ago
Thanks David,

I have given like this.

<s:url id="viewUrl" encode="true" includeParams="none" action="partView" namespace="../public"><s aram name="itemid" value="itemId" /></s:url>

if i am giving like this won't the itemId be passed?

Thanks
Aneesh
15 years ago
Hello,

Can any of you please tell me how attributes of <s:url>, the includeParams and encode, will work.

Thanks

Aneesh
15 years ago
Just implement a validate() method, call super.validate() to run the XML- and/or annotation-driven validation, then do your own DB-driven validation. (This assumes your action extends ActionSupport, if not, you'll need to implement ValidationAware and Validatable.)

David thanks for the reply..
but as i said i am new to this. So if you don't mind can you explain the above.
Presently I validate using the javascript. Its working fine. but i would really like to do the validation through struts.
15 years ago
Hello,

I am using struts 2 in my application. I have to implement validation in one of my form. I was able to do the basic validation using the struts default validators.

My issue is that, I have to submit the form only when the integer value I entered is greater than a predefined value which is database driven.
I have no idea in writing the interceptor and calling it in struts.xml

The basic code i wrote was like

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;

public class AuctionValidationInterceptor implements Interceptor {

public String intercept(ActionInvocation invocation) throws Exception {

AuctionAction auction = (AuctionAction)invocation.getAction();
Integer bidPriceTextField = 0;
auction.setBidPriceTextField(bidPriceTextField );
AutoAction auto = (AutoAction)invocation.getAction();
auto.getReservepriceTextField();
if(bidPriceTextField <auto.getReservepriceTextField())
{

}
return invocation.invoke();
}
public void destroy() {
}
public void init() {
}
}



I don't know whether it is correct or not. AuctionAction and AutoAction are the 2 action classes used.

I someone can guide me in this, I will be really greatfull.

Thanks in advance

Aneesh
15 years ago
Hello,

I am looking to encrypt my application URL displayed in Clients Browser
Is there any solution on server-side to encrypt URL query-string parameters
that applies to all links in my application.

My query string is
http://localhost:8282/MyProject/pages/auction/public/View.action?selectedTab=Used&context=auction&locationSelect=Location

I want it to be encrypted such that user should not be able to interpret or
change query-string parameters in URL.

the desired query string is

http://localhost:8282/MyProject/pages/auction/public/View.action?KTEkH5z3UQISTDFYfTFCGH

Can some one help me out.Thanks in advance

Aneesh
15 years ago