struts2,如何在不更改主题的情况下更新HTML Struts标签的标准双列表布局(struts2, How to update Standard two-column table layout for the HTML Struts Tags without changing theme)
我正在为我的应用程序使用struts2。 在struts2中,默认情况下在两列表中放置表单,左列中的每个输入字段都有标签,右列中的输入字段(Label #input field#)。 但就我而言,我需要连续四列(Label #input field#Label #input field#)。 有没有办法做到这一点,而不改变我的主题(xhtml)?
我不希望对主题进行任何更改,是否有任何方法可以欺骗每个struts标记的#tr#,#td#标签。
I'm using struts2 for my application. In struts2,by default lays forms out in a two column table with the label for each input field in the left column and the input field in the right column (Label #input field#). But in my case, I need four-column in a row (Label #input field# Label #input field#). is there any way to do this, without changing my theme(xhtml) ?
I don't want any changes to theme, is there any way to cheat auto rendering #tr#,#td# tags for each struts tag.
原文:https://stackoverflow.com/questions/19065021
最满意答案
与GNU sed:
sed -E 's/^(tstop +)[^ ]*/\180/' file
要么
sed -E '/^tstop/s/[^ ]+$/80/' file
如果您想“就地”编辑文件,请使用sed的选项
-i
。
请参阅: 堆栈溢出正则表达式常见问题
with GNU sed:
sed -E 's/^(tstop +)[^ ]*/\180/' file
or
sed -E '/^tstop/s/[^ ]+$/80/' file
If you want to edit your file "in place" use sed's option
-i
.
相关问答
更多-
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
您好,您的问题是在文件的开头,因为您只显示富文本框中的第一部分,这就是保存的内容 richTextBox1.AppendText(adat[0] + Environment.NewLine); 如果你想保存所有的行,你必须把它们全部显示出来。 Hi your issue is with in the opening of file as you are showing only first part in the rich text box and that is what being saved bac ...
-
正如评论中指出的那样: 这很棘手; 您必须计算出有多少个进程正在解释字符串并删除反斜杠。 为了将单个反斜杠放入输出中,sed需要在s/…/…/操作的替换部分中看到两个连续的反斜杠。 既然你用双引号括起来,Perl也有机会解释反斜杠; 这意味着在输出中每个Perl需要4个反斜杠。 因为你在system调用中使用'数组'符号(除了语法是错误的 - 你需要在项目之间逗号,并且用明文引号),你可以避免让shell解释字符串。 这适用于macOS Sierra 10.12.2,适用于GNU sed (将文件重命名为d ...
-
perl -pe '$matched = /^param\.(\d+)=value/ and $num = $1; $num and ! $matched and $_ = "param.$last=valueD\n$_" and undef $num;' myfile.txt “你想要它在一条线上?它是否必须适合80列?” - 拉里沃尔 /usr/bin/perl -i -pe 'BEGIN{undef $/;}; s/(( ...
-
我可以想到两个解决方案。 选项一,使用之前/之后的列匹配atoms \%>123c和\%<456c 。 在您的示例中,以下命令仅在第42个字段和第94个字段之间的第二个字中替换下划线: :s/\%>42c_\%<94c/ /g 选项二,使用可视区域匹配atom \%V 。 在你的例子中,Visual选择第二个长字,离开Visual模式,然后执行下面的替换: :s/\%V_/ /g 这些正则表达式原子分别记录在:h /\%c和:h /\%V 。 Two solutions I can think of. ...
-
与GNU sed: sed -E 's/^(tstop +)[^ ]*/\180/' file 要么 sed -E '/^tstop/s/[^ ]+$/80/' file 如果您想“就地”编辑文件,请使用sed的选项-i 。 请参阅: 堆栈溢出正则表达式常见问题 with GNU sed: sed -E 's/^(tstop +)[^ ]*/\180/' file or sed -E '/^tstop/s/[^ ]+$/80/' file If you want to edit your file ...
-
如何读取文本文件中的特定行并返回其中的一部分?(How to read a specific line in a text file and return a part of it?)[2022-06-02]
首先,正如评论中所指出的,您需要匹配以#开头的行,因为有多行以#开头但具有不同的第二个字符。 接下来,您需要检查您正在读取的行的值以检查#字符。 因此,您可以删除firstHandler变量并使用line变量。 最后,你需要摆脱break语句,因为这会导致循环在第一行本身之后退出。 这就是你只能在屏幕上看到第一行的原因。 因此,您的代码可以更改为以下内容: while ((line = bufferedReader.readLine()) != null) { ... -
为什么我找不到任何......? 因为没有。 如果你想这样做,也许你可以这样做: some_code.tap{%q{some comments blah blah blah}}.some_more_code_to_continue 你可以阅读.tap{%q{...}}作为/ .tap{%q{...}}在C中的含义,尽管看起来并不那么好。 在某些语言中,人们确实设法使用现有语法制作内联注释; 例如,在TeX中, \if\false...\fi经常被使用。 How come I can't find any ...
-
有两种方法可以解决这个问题 这两个都使用“C”字符串。 你可以使用string.c_str()来获得它。 看一下strtok() - 这会根据一些分隔符(在你的例子中是逗号)分解一个字符串。 在Linux / UNIX上输入'man strtok' 设置指向字符串开头的指针并循环直到你点击逗号。 然后将指针递增1(以传递逗号)并保存该位置(设置指向它的指针)。 现在继续寻找下一个逗号。 当你有下一个逗号时,你可以将所有字符从开始指针复制到结束指针。 例如: char *string = "you're in ...
-
另一种方法是在同一轴上考虑它们并检查断开连接。 然后你可以说“最左边的点是什么?” 我将使用.l代表“left”而.r代表“right”。 leftmost = a.l < b.l ? a : b rightmost = leftmost == a ? b : a 现在你知道最左边一个,最右边一个。 为了使它们连接,最右边的一个必须在最左边的一个的左边和右边之间。 假设每行必须至少有1个长度,那么你可以简单地做: connected = rightmost.l < leftmost.r ? true : ...