Click on the product image to display the detailed product page

Source: Internet
Author: User

1. Click on the product link:
* Pass the Product ID.


2. Write Action:
* Write the action class, inheriting the Actionsupport implementation model-driven interface.
* Write a method for execution.

 Public classProductactionextendsActionsupportImplementsModeldriven<product> {    //model-driven for receiving data    PrivateProduct product=NewProduct ();  PublicProduct Getmodel () {returnproduct; }        //Check the product based on the product ID     PublicString findbypid () {//Call the service's method to complete the queryproduct=Productservice.findbypid (Product.getpid ()); return"Findbypid"; }}

3. Configure the action:
* Configure action in Applicationcontext.xml
* Configure action in Struts.xml


4. Display the appropriate data on the page:
* Page Steering
* Edit Page
* Show Data

Click on the product image to display the detailed product page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.