清单2中展示的代码片段使用实例值加载表单字段。
The code snippet shown in listing 2 loads the form fields with instance values.
代码片段节点计算一个值或执行某一任务。
这些变量是代码片段使用的内部对象,您需要向其分配相应的值。
These variables are the internal objects used by the snippet to which you need to assign a corresponding value.
为了能够重用,并不让文本和样式值重复,XML 顶部的 XML代码片段专门指定可重用的值和样式。
To facilitate this reuse and avoid repeating text and style values, XML blocks at the top of the XML were set aside to specify reusable values and styles.
根据type属性的值的不同,标记文件执行不同的JSP代码片段,并设置与HTML元素同名的模型属性。
Depending on the value of the type attribute, the tag file executes different JSP fragments, which set the model property with the same name as the HTML element.
列表12代码片段设置了viewer是否控制form,如果server控制form,取得和设置form的值。
The code snippet in Listing 12 sets whether the viewer control owns the form. If the server control owns the form, can get and set values for the form.
使用 PreparedStatement 的那种代码片段在编码方面更为优雅,因为在将STATE和TYPE的值置入SQL语句时,不需要进行字符串运算。
The variant with the PreparedStatement is more elegant regarding the coding, as no string arithmetic is required to put the values for STATE and TYPE in the SQL statement.
具名与默认参数经常搭配使用,我们可以根据参数名称为参数赋值,同时对其他参数使用默认值,如下代码片段所示
Named and default arguments work hand in hand; one can pick a certain parameter by its name and use defaults for the others
具名与默认参数经常搭配使用,我们可以根据参数名称为参数赋值,同时对其他参数使用默认值,如下代码片段所示
Named and default arguments work hand in hand; one can pick a certain parameter by its name and use defaults for the others
应用推荐