Vikas K Gupta

Greenhorn
+ Follow
since Dec 07, 2010
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 Vikas K Gupta

Hi Sandeep,

I am also new here and saw a way to do this by using dijit.InlineEditBox from javascript framework of Dojo.

Use it http://dojotoolkit.org/reference-guide/dijit/InlineEditBox.html#id3

11 years ago
I am currently using eclipse helios, JBoss 5, Struts 2.2.1.

I use IDE to run/stop JBoss, to publish Struts applications and I love this automated task. But I saw in many book that they prefer build process of Ant or more specifically say Maven. Why do they prefer it. What are the advantages of using maven over IDE. I am loving the way my IDE is doing for me. I just click run as- on server (specified) and IDE even opens browser in eclipse and show me the output.

I'm new to Web Application Development and want to know why experts prefer this.

And also I want to thank you Dave Newton, for a wonderful book on Struts 2 (Apache Struts 2 - Web Application Development) for easy to understand language and example everywhere and that too in a small sized book.

Thank you Dave.
11 years ago
In the following code what I want is when I click edit in a particular row of the table showing list of employee number and employee name passing employee number as parameter............. the name and employee number should be populated in the form so that I can edit and resubmit the form .

when edit will be clicked a topic will be published with parameter as employee number and wanted to use dojo plugin to populate the same in the form.

Please help to get the code in "//WHAT TO WRITE HERE"


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>#### Gurgaon | Welcome</title>
<sx:head debug="true" cache="false" parseContent="true"/>
<script type="text/javascript">
dojo.event.topic.subscribe("/submittedTopic", function(event, widget){
dojo.byId("empName").value="";
dojo.byId("empCode").value="";

});
dojo.event.topic.subscribe("/editTopic", function(data, type, request){


//WHAT TO WRITE HERE


}
})
</script>
</head>
<body>



<s:form action="addEmpAction" id="addEmp">
<s:textfield id="empName" name="employee.name" label="Name"/>
<s:textfield id="empCode" name="employee.employeeCode" label="Employee Code"/>
<sx:submit highlightColor="blue" highlightDuration="2000" targets="tableDiv" afterNotifyTopics="/submittedTopic"
/><s:reset/>
</s:form>
<s:if test = "employeeList.size > 0">
<table border=1 >
<tr>
<th >Name</th>
<th>Code</th>
</tr>
<s:iterator value="employeeList" status="stat">
<tr class="row${stat.count % 2} first${stat.first} last${stat.last}">
<td><s:property value="name" /></td>
<td><s:property value="employeeCode" /></td>
<td><s:url var="deleteUrl" action="deleteEmp">
<s:param name="employee.employeeCode" value="employeeCode"/>
</s:url>
<sx:a highlightColor="blue" highlightDuration="2000" href="%{deleteUrl}" targets="tableDiv" notifyTopics="/deletedTopic">Delete</sx:a>
</td>
<td><sx:a id="a_%{employeeCode}" notifyTopics="/editTopic">edit</sx:a></td>
</tr>
</s:iterator>
</body>
</html>
11 years ago
Thanks Rajiv,

I'm currently using sx tag but I want to use more features of dojotoolkit and that's I want to know "how to integrate dojo codes in my struts 2 application?"

eg suppose I need to use

<<input type="text" id="...." name="....." dojoType="dijit.form.ValidationTextBox"> which validate the input from the user using javascript without the need to communicate with the server.
How can I use this with the struts2
11 years ago
Thanks Rajiv,

I'm currently using sx tag but I want to use more features of dojotoolkit and that's I want to know "how to integrate dojo codes in my struts 2 application?"

eg suppose I need to use

<<input type="text" id="...." name="....." dojoType="dijit.form.ValidationTextBox"> which validate the input from the user using javascript without the need to communicate with the server.
How can I use this with the struts2
11 years ago
I'm new to Struts and want to add ajax features to my struts application.

I'm using struts 2.2.1 with dojo plugin which comes with it.

added this
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>

this in head
<sx:head debug="true" cache="false" parseContent="true"/>

dojo which comes with it is 0.43 whereas dojo has now reached to 1.5.0

what is the way to introduce ajax in my application ?

Is it by using <sx:textbox ....../> tags

or what if I want to use dojo specific tags like
<input type="text" id="...." name="....." dojoType="dijit.form.ValidationTextBox"> as in it we can validate on change


please reply in details as I'm new to it like which files to add............

Need help urgently
Will be thankful for reply....
11 years ago