Multilingual support for struts2 tooltips - internationalization

I need to show the text in the tooltips as per the user langguage.
I am using
s:textfield name="userName" title="This is the name of the user"/
How do i pick up the text "This is the name of the user" from a property file based on locale.

Struts2 textfiled already have parameter namely tooltip.All you need to use struts2 build in mechanism to fetch tool tip as per user locale.
here is what you have to do
<s:textfield name="myTextFiled" key="field.key" tooltip="%{getText('field.tooltip')}"/>
Please refer to the official documents for more details.
textfield

Related

Add new type of item in Oracle APEX

I'm trying to add new type of items in Oracle APEX 19.1. I need to have oportunity to use
<input type="number">
Default "Number Field" is just a
<input type="text" ... class="number_field ..." >
I'm not exactly sure why the APEX team decided not to include the "Number" as a Subtype for a Text Field. It likely has to do with cross-browser consistency and may involve future plans for the Number Field type (perhaps that will be enhanced to better meet your needs at some point).
In the meantime, a little bit of JavaScript can achieve the desired result. Add something like this to the page level attribute Execute when Page Loads:
$('#P7_CREDIT_LIMIT').attr('type', 'number');
Just replace the item name with the correct one, but leave the "#" at the beginning.
Are you trying to get the number keyboard on mobile devices? If so, just add inputmode="numeric" to the Custom Attributes field as explained by Stefan Dobre here: https://twitter.com/stefan__dobre/status/1186553984091328512

Display user's default group without extension

I am using PHPBB 3.2.5 and I can't find any documentation regarding how to display a user's default group name (by code). I am currently modifying a theme and I want to display the user's default group name in a specific area.
How can I do that?
Hard to answer the question, if we don't have all the details, so I'm going to take some guesses... but first - what specific area are you trying to display the group name? It is already displayed on the viewprofile page of the memberlist. The variable you'd be interested in would be {L_USERGROUPS} I believe.
IE:
/memberlist.php?mode=viewprofile&u=123
<!-- IF S_GROUP_OPTIONS --><dt>{L_USERGROUPS}{L_COLON}</dt> <dd><select name="g">{S_GROUP_OPTIONS}</select> <input type="submit" name="submit" value="{L_GO}" class="button2" /></dd><!-- ENDIF -->

Changing locale programmatically will refresh form input

I'm implementing a multilanguage page which allow use to select their desire language.
I have implemented something like this and everything work perfectly. JSF 2.0 set locale throughout session from browser and programmatically
However, when I click to change my language, the whole page is refreshed and the locale for all the text is changed, but the text i input in the form also gone.
Example:
1. I have locale in English and got a form with input Username
2. I enter "ABC" in username
3. I click on the change language link to Chinese language
4. Username become Chinese word
5. "ABC" I entered previously is gone.
Is it possible to change the language and in the same time preserving my input?
I tried use ajax but similar issue happen. I need to use #all as I got menu, footer and other text which is not in the form to be translated.
Sample of my code:
<h:commandLink immediate="true" value="#{msg[localeType.resourceKey]}"
rendered="#{languageBean.isCurrentLocale(localeType.value) == false}">
<f:ajax render="label" execute="#all"
listener="#{customerDetailBean.preserveFormData(localeType.value)}"/>
</h:commandLink>
Thanks in advance for the great help.

How to specify a numeric component parameter for article selection

In setting up the parameters for my component,I want one of them to be an article ID that is opened and used. According to Joomla Standard Parameter Types, text is the only option.
Can integers be specified, or is there a way to validate the input?
As far as I know, text is your only standard solution. Joomla does, however, allow for custom parameter types. You could conceivably do one for integers, but if it's only for article selection, you can do what Joomla does for the com_content component.
Create a new folder in your admin component called: administrator\components\com_mycomponent\elements
Copy administrator\components\com_content\elements\article.php to your new folder (and index.html for security)
You can now specify a parameter type of "article" in your component as shown below, and you'll have a dropdown of your articles in the component configuration.
Be sure to include addpath to your elements folder in your "params".
<params addpath="/administrator/components/com_mycomponent/elements" />
<param type="article" name="article_id" default="0" label="Select Article" />

Autonomy teamsite item status

I am wondering if you can assign a status to .page or dcr files in teamsite such as new, review, revise, publish and archive so that this would display in the cms system so each item is clearly identified?
I think it's not possible to assign it in the CMS interface. When I try to control the file status, I do it with workflows. For instance, developing a review workflow that creates a dcr, assigns the review to a review user, then finally creates the edition and deploys it to the Livesite server.
Cheers
You could add your own extended attribute to keep the status of the file, but it won't be seen in the main teamsite interface. You'll have to click on the Tag link in order to see what the status of the file is, then do with the file as you wish. But if you have some backend to check the file's extended attribute, you would know the status. You can use either the command line tool iwextattr or use the cssdk api to get the extended attribute.
You can try using metatags. You can add metatags to files using file->tag. Please configure \interwoven\TeamSite\local\config\datacapture.cfg to add fields to the meta tag ui. You can also add the statuses you mentioned as categories in taxonomy and add a field to select taxonomy categories as meta tag values. Use below code for that. Once we add meta tags. You can find those files via LSCS query filter the documents.
<item name="ContentCategories">
<label>Related Categories</label>
<description>Select other locations on the site where you would like this content to be visible.</description>
<textarea required="f" rows="8" cols="70" wrap="virtual" maxlength="250" readonly="t">
<cgi-callout url="/iw-cc/livesite/taxonomyexplorer/Taxonomy.do?categoryTypeId=Content Categories&method=loadTaxonomyExplorer&selectMode=multiple" label="Select Related Categories..." window-features="width=495,height=375,resizable=no,toolbar=no,scrollbars=yes,status=no"/>
</textarea>
</item>

Resources