Home Dojo Dojo-1.0.2 Dojo Inline Edit Box

Related Tutorials


 
 

Share on Google+Share on Google+

Dojo Inline Edit Box

Advertisement
Complete Java Server Faces (JSF) Tutorial - JSF Tutorials. JSF Tutorials at Rose India covers everything you need to know about JSF, This JSF Tutorial contains readable and interesting content organized in proper and sequential manner. Each concept has been explained by simple examples so that you can understand easily and implement immediately into your java web application. It provides coverage of key JSF concepts such as User Interface(UI) components, Renderers, Backing beans, Validators, Converters, Navigation, Event handling, Expession language, Messages etc...

Dojo Inline Edit Box

         

In this section, you will learn how to edit any data. The InlineEditBox provides the better facility for editing any data and save it. 

InlineEditBox describes a widget wrapper that takes a child widget declared in markup and makes it inline-editable. This widget performs the role as a <div> tag when not in edit mode. When you click widget text then it open as an editable mode. In this mode, you edit the text and save it. Whenever you don't save the editable text then it can't be save so, after editing the text you must have to save it. Without editing text you can't be save it. 

Here is the code of Program:

<html>
<head>
<title>InlineEdit Demo</title>
  <style type="text/css">
  @import "../resources/dojo.css";
  @import "../dijit/themes/tundra/tundra.css";
  
  </style>

  <script type="text/javascript" src="dojo.xd.js" 
   djConfig="parseOnLoad: true"></script>

  <script type="text/javascript">
 dojo.require("dojo.parser");
 dojo.require("dijit.form.InlineEditBox");
 dojo.require("dijit.form.Textarea");
 </script>
</head>
  <body>
  Edit Please:<br>
  <p id="areaEditable" dojoType="dijit.form.InlineEditBox"
    renderAsHtml="true" autoSave="false">
  <textarea dojoType="dijit.form.Textarea">
  vinod
  </textarea>
  </p> 
  </body>
</html>

Output of Program:

When you click the following text then it open as editable mode:

After editing it, save it:

Then you get:

 

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: April 18, 2011

Related Tutorials

Discuss: Dojo Inline Edit Box  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com