sudhakar Tadepalli

Ranch Hand
+ Follow
since Dec 27, 2001
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 sudhakar Tadepalli

Thanks Rudy. Actually I did not change anny code in jsp. I just passed the value from the database and JSTL took care of pre-selecting.

Note : I have a conditional statement in FormBean.

Thanks
Sudhakar
9 years ago
Hi all,

I am using JSTL for displaying the dropdown. After selecting value, I am saving selected value in dropdown. When I retrieve it from the data base, I need to auto select that value from could someone help please. Thanks.

<html:select property="paymentFrequency">
<html:option value="0"> </html:option>
<c:forEach var="paymentType" items="${paymentFrequencies}">
<html:option value="${paymentType.paymentFrequencyID}">${paymentType.paymentFrequencyDesc}</html:option>
</c:forEach>
</html:select>

Ex: value =1 display value is "Monthly". So from the databse if the value I am geting as 1, I need to auto populate that value in the dropdown.

Thanks.
Sudhakar
9 years ago
I am looking for a best to read files on the network through Java batch application.

1. FTP to the network server and use FileReaders ? is there any otherways ?

Arreciate your suggestions

Thanks
14 years ago
Thank you. I will give it a try. I may ask you how to give a name to the wondow also . But let me try first.
I have a requirement that the first time I need to load main page and a pdf document in the another window. When user clicks next document button in the main window I need to refresh the already opend window with new document.Could some one help me with sample code ? Any suggestions also welcome.

Thanks
I have an arrayList of LabelValueBeans set to an attribute in form bean and the FormBean is in the session. I was able to get the bean and the list in the JSP(Tried to print). But not able to populate in the drop down. Could some one fill the balnk ?

<html:select property="selectBatchNumber" size="10">
<logic:notEmpty name="docInfoForm" property="batchList">
---?? -----
</logic:notEmpty>
</html:select>
14 years ago
I solved the problem myself. Thanks
14 years ago
I have following code for displaying error or messages in the jsp. But it doesn't work. Could some see where I am doing wrong ?

In Action Class :

MessageResources messageResources = getResources(request);
ActionErrors actionErrors = new ActionErrors();
actionErrors.add("error", new ActionMessage("message.lockbatch",
batchNumberFromList, lockedUID));
saveMessages(request, actionErrors);

Properties file:
message.lockbatch= The batch you have selected or enterted a batch number :<font color="red"> {0} </font> which is locked by user <font color="red"> {1} </font>

IN JSP:

<logic:messagesPresent message="true">
<html:messages id="msg" message="true">
<bean:write name="msg"/> <br/>
</html:messages>
</logic:messagesPresent>
14 years ago
I need to display some values in drop down in diferent colors. Please see the below to know line what I am doing.

batchList.add(new LabelValueBean(ldb.getBatchId().toString() + "- <B><FONT color=\"RED\"> L </FONT></B>-" + "<B>" + ldb.getLockedByUserid(),ldb.getBatchId().toString() + "</B>-"));

The result in dorp down is

1000003- <B><FONT color="RED"> L </FONT></B>-<B>svt001

Just displaying the html code as it is insted of converting. Have any suggestions please ?
14 years ago
It would be nice if could explani how you fixed the problem. Just to know.
14 years ago
It is a working application without any problem when my childAction extends LookupDispatchAction. Here is the sample code from JSP,ofcurse it is calling edit method in my Action class.

I tried to copy the code from JSP and website now allowing me because of html coding.

Now I changed as follows.

ChildAction extends BaseAction
BaseAction extends LookupDispatchAction

BaseAction overrides execute method for doing some authentication then it shoud call appropriate childAction method to excute. Which is not happening.

Thnaks
14 years ago
I think you can write a javascript function to set a default value(Method Name) when you hit Enter key(KeyCode==13).But I doubt one thin what if you focus a button with tab and hit eneterkey ?. Techincally it should call the selected method. If you convert your submit buttons to just button and submit through javascript will works for all. Not sure if it help u
14 years ago
Can some one answer this ?
14 years ago
Can some one answer how to use Reset tag ?. I have this line in my JSP.
<html:reset></html:reset>. Do I need to do anything in the ActionForm ?.

This is similar question like this. But didn't find the solution.
https://coderanch.com/t/51896/Struts/html-reset-Not-working-as
14 years ago