Wicket Drop down choice to set default value - wicket

I want to replace "choose one" option in drop down choice with other String "successfully occured" and I dont want to show list item to set the default.
DropDownChoice<Person> customer = new DropDownChoice<Person>(
"customer", new PropertyModel<Person>(customermodel, "customer"),list, new ChoiceRenderer<Person>("name", "id"));

The best way to do this is to put the definition
customer.null=successfully occured
in a properties file associated with the form or page containing the choice.
The properties file can also be localized so that what's shown depends on the locale.

For me I had to do following to get this done.
customer.setNullValid(true);
Then created a file named "HomePage.properties" (I added the drop down to HomePage)
set the null text in the .properties file as bellow.
nullValid=Choose one..

Related

How to dynamically change dialog with select field

I'm new to Magnolia, and I'm making my own module.
I have a dialog box when adding a component and I want to change next fields below dynamically using a select field.
Example:
Select field with {"type 1", "type 2", ...}
IF "type 1" is selected
->show a text field below
ELSE
->show a basicUpload field below
Thanks in advance.
I believe same was already discussed here and few other places if you look over questions tagged "magnolia".
Long story short, fields are atomic, independent entities. They do not know about each other. So the only way to create such dynamic connection is over "parent" form. You need to extend form presenter and field factory (if you want select that would be SelectFieldFactory) and in there, when field is created, attach value changed or similar listener to it so when value is changed in the field, you can inform presenter to make some other field visible or hide it.
IIRC you can see example of that done in External Forms module (if you have access to enterprise code). Not sure if any of the community modules show the same.

Worklist template i18n <ObjectName>

Does the <ObjectName> refer to a variable which contains the name of the object? Or should I replace it manually with a suitable name?
The IDE generated #XTIT: Table view title worklistTableTitle=<ObjectName> in i18n.
The line which you have mentioned
#XTIT: Table view title worklistTableTitle=<ObjectName>
This is just a sort of comment in i18n file.
appDescription=<you can fill anything you can here> to reflect in your app.
When you use SAP WebIDE to create a template/application, it may create i18n files with placeholders for you to replace them with your own application specific texts. In your case, in the code below <ObjectName> represents a placeholder for your own text.
#XTIT: Table view title
worklistTableTitle=<ObjectName>
It does not refer to any variable, you simple have to add you own text in that field. Something similar to this :
#XTIT: Table view title
worklistTableTitle=My Products List

Cannot add a third content field

I'm kinda new to typo, so maybe I am just missing something.
I'm trying to add a third content field to Typo3 4.5.
What I've done so far.
Edit my template and added a new block
Added the block via TemplatVoila > Update Mapping > Modify DS / TO with Element Preset "Page-Content Elements [Pos.: 0]
Mapped it to the new block in the template
But I am missing something as the new field isn't showing up in the Page edit screen.
EDIT: I've found the Block in the "Edit page properties" but how to show it on standard edit screen?
Any added content area will appear automatically in your TV-View-module. So if you dont see it in there, then
you may have duplicate fields names
wrong column positions
or the existing template is using a »beLayout«-section, which shows only the first two content areas (see example in reference http://docs.typo3.org/typo3cms/extensions/templavoila/ExtTemplavoila/StaticDataStructures/ExampleForBelayout/Index.html)
The TemplaVoila template is split into TS (TemplaVoilà Template Object) and DS (TemplaVoilà Data Structure) records, may you paste the content of the field „Data Structure XML“ of the DS record here? In there are all necessary information.
The two template files should be located in your general storage folder, your TypoScript root file should be there as well.

How to translate a label of a custom field in SugarCRM

I have created a custom field in Opportunities, but I also have to translate its label into Russian and there is no option for it in the "Edit labels" menu.
I prefer to create translated labels without Studio.
Main idea is that module string label is a value of *$mod_strings* array key which is defined in language file(s) located in modules//language/ , custom/modules//language/ and/or custom/modules/Accounts/Ext/Language/*.lang.ext.php
Thus to have an existing string in English translated into your native language manually you should do the following:
Copy your English string to be translated in browser (e.g. "Description")
Use your IDE or OS find/search function to find needed $mod_strings key that has value of the string above (e.g. *$mod_strings['LBL_DESCRIPTION']*)
Copy that key name
Change to custom/Extension/modules//Ext/Language (so called Master Directory) and create new (or append to existing) file named (in your case) ru_ru.custom.lang.php
Add a line like
$mod_strings['LBL_DESCRIPTION'] = 'Описание';
Make Quick Repair and Rebuild
Go to
Studio » Contacts » Labels,
then you can see that label and then select
'US English' or 'Russian'
from the language drop down.

transfer netbeans made component to lwuit's "Resource Editor"

I tried to use "table" Component in a Form with "Resource Editor" in lwuit, but I could not add/edit the rows items. so I end up with this question:
Is it possible to create/edit the table component in the generated "StateMachine" class in Netbeans and see the result in "Resource Editor"?
And if it's not possible, how can I hack the .res file in order to make the "table" as it should be?
There is support for live embedding in the resource editor but its deprecated and obtuse.
I suggest you just add a label where you want the custom component to be, give it a unique name and override the method createComponentInstance which is invoked internally with the name of the label (name it something unique).
You can then just return the instance of your custom made component and it will appear where the label is in the GUI builder.