SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
CourseSites New User Profile
pages
Powered by SpringMVC 2.5
Goals
• Modernize the code-base from SpringMVC 2.0
to SpringMVC 2.5  with the end goal of
SpringMVC 3.0 in the future
• More engaging User experiences  drive
adoption (91 countries, 6000+ institutions )
Spring MVC 2.5
key concepts
• The importance of annotations
– @Controller (no more inheriting from
SimpleFormController, MultiActionController on
2.0 version)
– @ModelAttribute
– @SessionAttribute
General Architecture (Controller)
• @Controller
• @RequestMapping(value="/profile.form")
• @SessionAttributes("spring25UserVO")
• public class ProfileForm {
• ……
• ……
• }
General Architecture …(1)
• @RequestMapping(method =
RequestMethod.GET)
• public String setupForm(HttpServletRequest
request, HttpServletResponse response,
Model model) {
• …….
• }
General Architecture….(2)
• @RequestMapping(method =
RequestMethod.POST)
• public String processSubmit(HttpServletRequest
request, @ModelAttribute("spring25UserVO")
Spring25UserVO spring25UserVO,
• BindingResult result, SessionStatus status, Model
model) {
• ….
• }
Profile
Profile page
Model
in particular  wiring the Gender
• public class Spring25UserVO {
– private UserVO userVO;
• …….
• }
Model…(1)
• public class UserVO {
– private User user;
• ………..
• }
Model…(3)
• public class User {
• …….
• /**
• * Returns the gender of this <code>User</code> object.
• * <p>
• * Requires AttributePermission with name "user.personalinfo", actions "get".
• *
• * @return a gender value as defined in {@link User.Gender}
• * @see User.Gender
• */
• public User.Gender getGender()
• {
• if ( _checkPerms )
• {
• SecurityUtil.checkPermission( _getPersonalInfo );
• }
• return (User.Gender) _bbAttributes.getBbEnum( UserDef.GENDER );
• }
• ……
• }
Profile Controller
• @InitBinder
• public void initDataBinder(WebDataBinder
dataBinder)
• {
• dataBinder.registerCustomEditor(Gender.class,
new GenderEditor());
•
dataBinder.registerCustomEditor(EducationLevel.class,
new EducationEditor());
• }
Custom Editor
• public class GenderEditor extends PropertyEditorSupport {
– @Override
– public String getAsText() {
• // TODO Auto-generated method stub
• Gender value = (Gender) getValue();
• return value.toFieldName();
– }
– @Override
– public void setAsText(String text) throws IllegalArgumentException {
• // TODO Auto-generated method stub
• //super.setAsText(text);
• if (text.equalsIgnoreCase(Gender.FEMALE.toFieldName())) {
– setValue(Gender.FEMALE);
• }
• else if (text.equalsIgnoreCase(Gender.MALE.toFieldName())) {
– setValue(Gender.MALE);
• }
• else {
– setValue(Gender.UNKNOWN);
• }
– }
• }
Profile View/JSP
• <form:form id="profileForm"
name="NewUserProfileForm"
modelAttribute="spring25UserVO"
method="POST">
• ……
• </form:form>
Profile View/JSP
• <spring:message code="bb.userProfile.gender" var="gender">
</spring:message>
• <bbNG:dataElement label="${gender}" isRequired="false">
• <!-- the "path" element (gender) points to the
userVO.user.gender property
• so as long as the userVO.user.gender reflects the value from the
• DB (User.gender) such as "MALE"...this will be automatically
• "selected" as well -->
• <form:select path="userVO.user.gender" items="${genders}"/>
• </bbNG:dataElement>
Social Page
jQuery Dialog
Social Page
jQuery dialog
jQuery Dialog
• jQuery("#dialog").dialog({
• modal: true,
• bgiframe: true,
• width: 500,
• height: 200,
• autoOpen: false
• });
• jQuery("#confirmDeleteImage").dialog({
• modal: true,
• bgiframe: true,
• autoOpen: false });
jQuery Dialog …(cont)
• jQuery(".myavatar").click(function (e) {
• jQuery("#dialog").dialog({
• buttons : {
• "Update" : function() {
• window.location.href = "imageUpload.form";
• },
• "Delete" : function() {
• jQuery(this).dialog("close");
• jQuery('#confirmDeleteImage').dialog('option', 'buttons', {
• "No": function() { jQuery(this).dialog("close"); },
• "Yes": function() { window.location.href = "imageDelete.form"; }
• });
• jQuery('#confirmDeleteImage').dialog('open');
•
• },
• "Cancel" : function() {
• jQuery(this).dialog("close");
• }
• }
• });
• jQuery("#dialog").dialog("open");
• return false;
• });
Q&A
• Questions?! Comments?!

Mais conteúdo relacionado

Semelhante a Course sites new user profile pages

Spring 3.x - Spring MVC - Advanced topics
Spring 3.x - Spring MVC - Advanced topicsSpring 3.x - Spring MVC - Advanced topics
Spring 3.x - Spring MVC - Advanced topicsGuy Nir
 
Spring MVC Annotations
Spring MVC AnnotationsSpring MVC Annotations
Spring MVC AnnotationsJordan Silva
 
Breaking the limits_of_page_objects
Breaking the limits_of_page_objectsBreaking the limits_of_page_objects
Breaking the limits_of_page_objectsRobert Bossek
 
WordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a FrameworkWordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a FrameworkExove
 
Ajug - The Spring Update
Ajug - The Spring UpdateAjug - The Spring Update
Ajug - The Spring UpdateGunnar Hillert
 
Database Programming Techniques
Database Programming TechniquesDatabase Programming Techniques
Database Programming TechniquesRaji Ghawi
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...Fabio Franzini
 
Understanding backbonejs
Understanding backbonejsUnderstanding backbonejs
Understanding backbonejsNick Lee
 
Simple blog wall creation on Java
Simple blog wall creation on JavaSimple blog wall creation on Java
Simple blog wall creation on JavaMax Titov
 
前端MVC之BackboneJS
前端MVC之BackboneJS前端MVC之BackboneJS
前端MVC之BackboneJSZhang Xiaoxue
 
MVC & SQL_In_1_Hour
MVC & SQL_In_1_HourMVC & SQL_In_1_Hour
MVC & SQL_In_1_HourDilip Patel
 
Guide to the jungle of testing frameworks
Guide to the jungle of testing frameworksGuide to the jungle of testing frameworks
Guide to the jungle of testing frameworksTomáš Kypta
 
Building Modern Websites with ASP.NET by Rachel Appel
Building Modern Websites with ASP.NET by Rachel AppelBuilding Modern Websites with ASP.NET by Rachel Appel
Building Modern Websites with ASP.NET by Rachel Appel.NET Conf UY
 
More on Fitnesse and Continuous Integration (Silicon Valley code camp 2012)
More on Fitnesse and Continuous Integration (Silicon Valley code camp 2012)More on Fitnesse and Continuous Integration (Silicon Valley code camp 2012)
More on Fitnesse and Continuous Integration (Silicon Valley code camp 2012)Jen Wong
 
Resource Routing in ExpressionEngine
Resource Routing in ExpressionEngineResource Routing in ExpressionEngine
Resource Routing in ExpressionEngineMichaelRog
 

Semelhante a Course sites new user profile pages (20)

Spring 3.x - Spring MVC - Advanced topics
Spring 3.x - Spring MVC - Advanced topicsSpring 3.x - Spring MVC - Advanced topics
Spring 3.x - Spring MVC - Advanced topics
 
Jersey
JerseyJersey
Jersey
 
Requery overview
Requery overviewRequery overview
Requery overview
 
Spring MVC Annotations
Spring MVC AnnotationsSpring MVC Annotations
Spring MVC Annotations
 
Breaking the limits_of_page_objects
Breaking the limits_of_page_objectsBreaking the limits_of_page_objects
Breaking the limits_of_page_objects
 
WordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a FrameworkWordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a Framework
 
The Spring Update
The Spring UpdateThe Spring Update
The Spring Update
 
Ajug - The Spring Update
Ajug - The Spring UpdateAjug - The Spring Update
Ajug - The Spring Update
 
Database Programming Techniques
Database Programming TechniquesDatabase Programming Techniques
Database Programming Techniques
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Understanding backbonejs
Understanding backbonejsUnderstanding backbonejs
Understanding backbonejs
 
Simple blog wall creation on Java
Simple blog wall creation on JavaSimple blog wall creation on Java
Simple blog wall creation on Java
 
前端MVC之BackboneJS
前端MVC之BackboneJS前端MVC之BackboneJS
前端MVC之BackboneJS
 
MVC & SQL_In_1_Hour
MVC & SQL_In_1_HourMVC & SQL_In_1_Hour
MVC & SQL_In_1_Hour
 
Guide to the jungle of testing frameworks
Guide to the jungle of testing frameworksGuide to the jungle of testing frameworks
Guide to the jungle of testing frameworks
 
Building Modern Websites with ASP.NET by Rachel Appel
Building Modern Websites with ASP.NET by Rachel AppelBuilding Modern Websites with ASP.NET by Rachel Appel
Building Modern Websites with ASP.NET by Rachel Appel
 
Backbone js
Backbone jsBackbone js
Backbone js
 
More on Fitnesse and Continuous Integration (Silicon Valley code camp 2012)
More on Fitnesse and Continuous Integration (Silicon Valley code camp 2012)More on Fitnesse and Continuous Integration (Silicon Valley code camp 2012)
More on Fitnesse and Continuous Integration (Silicon Valley code camp 2012)
 
Backbone js-slides
Backbone js-slidesBackbone js-slides
Backbone js-slides
 
Resource Routing in ExpressionEngine
Resource Routing in ExpressionEngineResource Routing in ExpressionEngine
Resource Routing in ExpressionEngine
 

Último

Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...amber724300
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFMichael Gough
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessWSO2
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...itnewsafrica
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfAarwolf Industries LLC
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentMahmoud Rabie
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 

Último (20)

Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDF
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with Platformless
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdf
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career Development
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 

Course sites new user profile pages

  • 1. CourseSites New User Profile pages Powered by SpringMVC 2.5
  • 2. Goals • Modernize the code-base from SpringMVC 2.0 to SpringMVC 2.5  with the end goal of SpringMVC 3.0 in the future • More engaging User experiences  drive adoption (91 countries, 6000+ institutions )
  • 3. Spring MVC 2.5 key concepts • The importance of annotations – @Controller (no more inheriting from SimpleFormController, MultiActionController on 2.0 version) – @ModelAttribute – @SessionAttribute
  • 4. General Architecture (Controller) • @Controller • @RequestMapping(value="/profile.form") • @SessionAttributes("spring25UserVO") • public class ProfileForm { • …… • …… • }
  • 5. General Architecture …(1) • @RequestMapping(method = RequestMethod.GET) • public String setupForm(HttpServletRequest request, HttpServletResponse response, Model model) { • ……. • }
  • 6. General Architecture….(2) • @RequestMapping(method = RequestMethod.POST) • public String processSubmit(HttpServletRequest request, @ModelAttribute("spring25UserVO") Spring25UserVO spring25UserVO, • BindingResult result, SessionStatus status, Model model) { • …. • }
  • 9. Model in particular  wiring the Gender • public class Spring25UserVO { – private UserVO userVO; • ……. • }
  • 10. Model…(1) • public class UserVO { – private User user; • ……….. • }
  • 11. Model…(3) • public class User { • ……. • /** • * Returns the gender of this <code>User</code> object. • * <p> • * Requires AttributePermission with name "user.personalinfo", actions "get". • * • * @return a gender value as defined in {@link User.Gender} • * @see User.Gender • */ • public User.Gender getGender() • { • if ( _checkPerms ) • { • SecurityUtil.checkPermission( _getPersonalInfo ); • } • return (User.Gender) _bbAttributes.getBbEnum( UserDef.GENDER ); • } • …… • }
  • 12. Profile Controller • @InitBinder • public void initDataBinder(WebDataBinder dataBinder) • { • dataBinder.registerCustomEditor(Gender.class, new GenderEditor()); • dataBinder.registerCustomEditor(EducationLevel.class, new EducationEditor()); • }
  • 13. Custom Editor • public class GenderEditor extends PropertyEditorSupport { – @Override – public String getAsText() { • // TODO Auto-generated method stub • Gender value = (Gender) getValue(); • return value.toFieldName(); – } – @Override – public void setAsText(String text) throws IllegalArgumentException { • // TODO Auto-generated method stub • //super.setAsText(text); • if (text.equalsIgnoreCase(Gender.FEMALE.toFieldName())) { – setValue(Gender.FEMALE); • } • else if (text.equalsIgnoreCase(Gender.MALE.toFieldName())) { – setValue(Gender.MALE); • } • else { – setValue(Gender.UNKNOWN); • } – } • }
  • 14. Profile View/JSP • <form:form id="profileForm" name="NewUserProfileForm" modelAttribute="spring25UserVO" method="POST"> • …… • </form:form>
  • 15. Profile View/JSP • <spring:message code="bb.userProfile.gender" var="gender"> </spring:message> • <bbNG:dataElement label="${gender}" isRequired="false"> • <!-- the "path" element (gender) points to the userVO.user.gender property • so as long as the userVO.user.gender reflects the value from the • DB (User.gender) such as "MALE"...this will be automatically • "selected" as well --> • <form:select path="userVO.user.gender" items="${genders}"/> • </bbNG:dataElement>
  • 18. jQuery Dialog • jQuery("#dialog").dialog({ • modal: true, • bgiframe: true, • width: 500, • height: 200, • autoOpen: false • }); • jQuery("#confirmDeleteImage").dialog({ • modal: true, • bgiframe: true, • autoOpen: false });
  • 19. jQuery Dialog …(cont) • jQuery(".myavatar").click(function (e) { • jQuery("#dialog").dialog({ • buttons : { • "Update" : function() { • window.location.href = "imageUpload.form"; • }, • "Delete" : function() { • jQuery(this).dialog("close"); • jQuery('#confirmDeleteImage').dialog('option', 'buttons', { • "No": function() { jQuery(this).dialog("close"); }, • "Yes": function() { window.location.href = "imageDelete.form"; } • }); • jQuery('#confirmDeleteImage').dialog('open'); • • }, • "Cancel" : function() { • jQuery(this).dialog("close"); • } • } • }); • jQuery("#dialog").dialog("open"); • return false; • });