Change isRequired star position in Struts 1 - struts

I am using Struts 1 on a form and need to mark some inputs as required. The thing is that the red star ('*') showing the required fields when marking them with isRequired="true" is by default shown right after the textbox:
alt text http://img402.imageshack.us/img402/2345/input.png
Is there a way to change the star position to the left, right before "Input"?
If needed, the code of this is now:
<layout:text property="input" key="form.input" styleClass="FormInput" mode="E,E,I" isRequired="true" />

You will likely have to write your own custom tag that basically extends the layout:text tag but overrides the output (i.e. where the star is generated if the field has an error).
Start here: http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags.html You could probably skip ahead to the "Examples" page, but the other stuff is good to know too

Related

Access Setting Theme VBA using MsoThemeColorSchemeIndex is off by 1

When setting a control/form theme, I often use VBA, as I can change the color on the fly. Works great. I have been trying to move my Database away from using hard-coded numbers, and built up a theme module that is included which has themes mapped so I could just change them there instead of everywhere else.
Then I realized, hey, there's an easier way to do this (or...so I thought).
Enter Enums MsoThemeColorIndex and MsoThemeColorSchemeIndex. This way, I can even do fancy things like decide that when I use myInternalTheme1 constant, I could just switch it out with MsoThemeColorSchemeIndex.msoThemeAccent1.
A long while back I noticed that if I used what is shown on the help docs (above), the themes were "off" by 1. Namely 5 (msoThemeAccent1 "Theme1"), instead of mapping to msoThemeAccent1 actually maps to "Theme2", and "Theme 2" Color is displayed. So, I just manually adjusted. But I'm wondering if I'm missing something here, and I'm using the value incorrectly?
I've used SaveAsText to export these forms after saving the values, and when I do, the field that's had "Theme 1" manually applied in Properties shows that the value 4 is used, which "should" map to msoThemeColorLight2, but doesn't.
Field's Backtheme setting:
BackThemeColorIndex =4
How I'm using this:
' In my "modColor"
Public Const MythemeAccent1 As Integer = 4 ' (help docs specify this as MsoThemeColorIndex.msoThemeColorLight2)
' This one colors the header in Theme2 "wrong color, correct enum value???"
' MsoThemeColorSchemeIndex.msoThemeAccent1 = 5 (as docs say)
Me.section(acHeader).BackThemeColorIndex = MsoThemeColorSchemeIndex.msoThemeAccent1
' This one colors the header with Theme1 "correct color, wrong enum value???"
' MsoThemeColorSchemeIndex.msoThemeLight2 = 4 (as docs say)
Me.section(acHeader).BackThemeColorIndex = MsoThemeColorSchemeIndex.msoThemeLight2
' my internal module, this works correctly (code looks correct, and correct color used).
Me.section(acHeader).BackThemeColorIndex = MythemeAccent1
If I assign the color in Design View via Form Properties > FormHeader > Format > Back Color > "Accent 1" it works correctly, and the theme is properly applied.
FormHeader Properties Format
I've verified the theme is correct, numerous times. I exported the theme, and verified that the XML for "Accent 1" is correct, and that "Accent2" is different. "Theme 1" is "Bluish" and "Theme 2" is "Redish" for reference, so it's not like my monitor rendering is just making me think it's different.
Excerpted XML from .Thmx file:
<a:accent1>
<a:srgbClr val="5C83B4"/>
</a:accent1>
<a:accent2>
<a:srgbClr val="E74B4B"/>
</a:accent2>

How to move to sibling in selenium

I have this code in html. and I want to go to a sibling node.
I search by title (since this is a unique value in the UI), but I want to move to the same level but with different class name that will contains ant-select-tree-switcher_close.
This is the xpath to what is marked, and I just want to move in the same level for the first span, but without span1, or any hard coded solution. I want to search by class name that contains the words ant-select-tree-switcher_close as some text in the class name.
the xpath is:
//*[#title='Arts/Ent'] this is marked in yellow
I want to go to the purple section regards
You can use preceding-sibling
//*[#title='Arts/Ent']/preceding-sibling::*[contains(#class, 'ant-select-tree-switcher_close')]
If you want to use the 'Arts/Ent' WebElement to locate the sibling you can use
./preceding-sibling::*[contains(#class, 'a')]

Can <condPageBreak height='?cm'> change dynamically?

I have a <blockTable> that change size depending an user input.
I want to continue drawing on next page if there is no sufficient space to draw the blocktable on the same page.
<condPageBreak height='1in'/>
<blocklTable ...>
...
How can I change blockTable height to jump to the next page if there is not enough space on the current page?
I'm not sure about dynamically change or break page. But I use below method. May be it will useful to you.
Try with this RML reports.
The <condPageBreak/> tag is a "CONDitional Page Break". To use it, you give it a height in any units that RML can handle.
It then compares this height with the remaining available space on a page. If the space is sufficient, then the next elements are placed on the current page, but if there is less space than the height you have given it anything following the <condPageBreak/> is continued on the next page
<condPageBreak/> has only one attribute - the mandatory one of
height
For Example:
<condPageBreak height="1in"/>
<condPageBreak height="72"/>
For more details: RML User Guide
NOTE:
Use above examples before the start of <blockTable> tag
For Example:
<condPageBreak height="1in"/>
<blockTable style="Table4">
.
.
.
</blockTable>

XSL / XSL-FO: Different formatting of a block depending on its page position on PDF page

I'm new in this mailing list, so please apologize any of my wrongdoings.
FOP 1.1
Question: Is there any condition to find the position of a text-block in on PDF page.
This is the problem:
I need to change the formatting of a title-block depending on its position on the page.
If the title-block appears somewhere in the (vertical) middle of the page, I want to add a line on top of it.
if the title-block appears at the beginning/top of a page the line must not appear
Does XSL-FO have a way to do that?
From http://lists.w3.org/Archives/Public/www-xsl-fo/2015Sep/0002.html:
I used a white background on the
fo:region-before and a negative margin on the title to 'push' the
'border-before' of the title under the fo:region-before.
This requires that the FO processor supports negative values of
'margin-top', which is allowed but not required (http://www.w3.org/TR/xsl11/#margin-top). It also requires
that the FO processor will 'paint' the fo:region-before after painting
the fo:region-body.

Add non-breaking space between required field label and asterisk in Yii

I need to add a non-breaking space ( ) between the required field label and the *, to hopefully prevent the *'s from wrapping onto a new line (e.g. for the first field, I need the * to stay on the same line with at least one of the words in the label).
Can anyone help me find this in the Yii core? I've looked for a while.
Here's another example of where this is happening:
You need to override $afterRequiredLabel in CHtml.
The default value is currently set to ' <span class="required">*</span>'
You will want to change it to ' <span class="required">*</span>'
You could change the Yii core, but this is not advisable. Instead, you should extend CHtml and reference your child class moving forward.