Problems encountered in background development: struts2 s:text cannot pass values

In the background development process, I want to display the id data through s:text, but I don't want to display it through s:textfield, because the display of s:textfield can be modified, and it is necessary to set the readonly attribute to set it to be unmodifiable, and also to set the length, but The value cannot be passed to the action through s:text, the solution:

                <s:hidden value="%{id}" name="marketCar.id" ></s:hidden>
                <td><s:text name="%{id}"></s:text></td> 

Use s:text to display, s:hidden to pass values, record every problem encountered, and facilitate the next reference.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325636695&siteId=291194637