Accessing resource properties from fxml - internationalization

I know I can internationalize JavaFX application within fxml file by writing something like this
<Label id="versionLabel" text="%appVersion" />.
But what if I want to use a concatenation of two resource items.
I have tried this
<Label id="versionLabel" text="%appVersion.prefix%appVersion.number" /> but it does not work. How to do it correctly?

I'm not sure if this is possible. (but I might be wrong)
You might want to file an enhancement request: http://javafx-jira.kenai.com
As a work-around you could set the text in the controller.

Another way
<HBox spacing="0">
<children>
<Label id="versionLabel1" text="%appVersion.prefix" />
<Label id="versionLabel2" text="%appVersion.number" />
</children>
</HBox>

Related

Is there a way to display a details view in .NET MAUI, like you do with the <details> tag in html?

Hello I am trying to display data on labels and I want to provide extra details about the data, when the user clicks on a button e.g. .
I know there is the tag in html, where you can define a summary and the details below.
Is there a way, or even better a ContentView, which can do that in .NET MAUI?
I've thought about adding a temporary label under the summary label, with the details, but that looks weird and is not intuitive.
If by details you mean a collapse / expander (which seem to be what details is in html) you can use the expander from the .net maui community toolkit :
<Expander>
<Expander.Header>
<Label Text="Baboon"
FontAttributes="Bold"
FontSize="Medium" />
</Expander.Header>
<HorizontalStackLayout Padding="10">
<Image Source="http://upload.wikimedia.org/wikipedia/commons/thumb/f/fc/Papio_anubis_%28Serengeti%2C_2009%29.jpg/200px-Papio_anubis_%28Serengeti%2C_2009%29.jpg"
Aspect="AspectFill"
HeightRequest="120"
WidthRequest="120" />
<Label Text="Baboons are African and Arabian Old World monkeys belonging to the genus Papio, part of the subfamily Cercopithecinae."
FontAttributes="Italic" />
</HorizontalStackLayout>
</Expander>
Otherwise if you just want to provide some additional texte about an element I would go with tooltips.
<Button Text="Save"
ToolTipProperties.Text="Click to Save your data" />

Header image on SAPUI5 application

I am just trying to add the image on index.html. I have create a folder of images under webcontent and add the image in images folder. I am calling it in the following way:
<HBox >
<Image
src="{./images/abc1.jpg}"
width="100%"
height="100%"/>
</HBox>
But it is showing nothing on browser. Please advice.
You use curly brackets when you are trying to bind data from a model.
Since you are not using a model to bind data. You can remove it and try.
Code for the same is as mentioned here:-
<HBox>
<Image src="./images/abc1.jpg" width="100%" height="100%"/>
</HBox>

Can Nativescript 4.0 new Frame use more elements than Tabview or Sidedrawer?

I see that Frame works now much better.
We can have Tabview,that is a root of current view.
<TabView androidTabsPosition="bottom">
<TabViewItem title="First">
<Frame defaultPage="home/home-page" />
</TabViewItem>
<TabViewItem title="Second">
<Frame defaultPage="second/second-page" />
</TabViewItem>
</TabView>
This looks like home-page or second-page is “included”.
Now, i’m wondering if it’s possible to have app-root.xml that holds common elements, and needed page is included. I’ve tried this, but this is not working (why? This approach is possible only for tabview and sidedrawer ?)
app-root.xml
<Page>
<Frame defaultPage="create/create"></Frame>
</Page>
create/create.xml
<StackLayout class="footer white">
<Label text="test"></Label>
</StackLayout>
Instead of Page use layout like GridLayout Look at this test application as a reference and more specifically this page
However, the above approach would work for Android but for iOS, you should either remove the action bar for each Page (inside each Frame) or create multiple action bars (not recommended!).

NativeScript Floating Button

I just recently started with NativeScript and ran into a roadblock.
I have a AppBuilder/NativeScript project (iOS only for now) in which I want to implement a floating action button. I have seen plenty of examples where the FAB is positioned above a ListView however my scenario is different:
I have 3 repeaters (displaying unrelated data).
each repeater may or may not be visible on the page (if there is no data to display, I am hiding it)
I would like to place the FAB on the bottom right regardless of what the content is
The whole page is wrapped in a ScrollView
I tried using nativescript-floatingactionbutton, but I cannot compile with this module installed. I keep getting "Cannot build project because module nativescript-floatingactionbutton contains insecure code. Remove the module and try again."
I also tried an AbsoluteLayout on the page level, but it seems that the layout overlays the rest of the page and I cannot even see the content, just the FAB.
Here is the markup
<Page id="MainPage" xmlns="http://schema.nativescript.org/tns.xsd" actionBarHidden="true" loaded="pageLoaded" xmlns:drawer="nativescript-telerik-ui/sidedrawer" xmlns:sharedDrawers="widgets/drawers">
<drawer:RadSideDrawer id="mainDrawer">
<drawer:RadSideDrawer.mainContent>
<ScrollView id="wrapper" opacity="0">
<DockLayout stretchLastChild="false">
<GridLayout id="mainHeader" cssClass="header" dock="top" columns="50, *, 50">
<Label class="icomoon-icon" text="" row="0" col="0" horizontalAlignment="center" tap="openDrawer" fontSize="18" />
<Label horizontalAlignment="center" text="{{ pageTitle }}" row="0" col="1" />
<Label class="icomoon-icon" text="" row="0" col="2" horizontalAlignment="center" tap="notifications" fontSize="18" />
</GridLayout>
<GridLayout cssClass="main" rows="auto, *" >
<StackLayout row="0">
<StackLayout cssClass="{{arr.length ? '' : 'hidden' }}">
<label cssClass="section-title" text="{{strings.activeLoans}}"></label>
<Repeater items="{{ arr }}" >
<Repeater.itemTemplate cssClass="item">
...
</Repeater.itemTemplate>
</Repeater>
</StackLayout>
<StackLayout cssClass="{{arr2.length ? '' : 'hidden' }}">
<label cssClass="section-title" text="{{strings.history}}" marginTop="20" />
<Repeater items="{{ arr2 }}">
<Repeater.itemTemplate>
...
</Repeater.itemTemplate>
</Repeater>
</StackLayout>
<StackLayout cssClass="{{arr3.length ? '' : 'hidden' }}">
<label cssClass="section-title" text="{{strings.data}}" marginTop="20" />
<Image src="~/images/pic.jpg" />
<Repeater items="{{ arr3 }}">
<Repeater.itemTemplate>
...
</Repeater.itemTemplate>
</Repeater>
</StackLayout>
</StackLayout>
</GridLayout>
</DockLayout>
</ScrollView>
</drawer:RadSideDrawer.mainContent>
<drawer:SideDrawer.drawerContent>
<sharedDrawers:mainDrawer />
</drawer:SideDrawer.drawerContent>
</drawer:RadSideDrawer>
<!--<AbsoluteLayout cssClass="fabContainer">
<Image src="res://fab_add" tap="newLoan" cssClass="fab" />
</AbsoluteLayout>-->
</Page>
I have truncated and changed some of the non-relevant code.
Any help is greatly appreciated.
Thank you.
Аs Brad Martin says, the plugin cannot be built inside Telerik Platform as not all of its maintainers are white listed. To be more precise, when an iOS build of a plugin containing a pod file is initiated in Telerik Platform, the service checks its maintainers. As a pod file can contain post build scripts, Telerik Platform is currently flagging plugins as safe by keeping a list of white listed maintainers.
This plugin has 5 maintainers - Brad Martin being only one of them. Brad’s email is white listed but ‘gabrielbiga’ and ‘lazaromenezes’ are not yet whitelisted. #Brad Martin- can you please let us know whether we should whitelist these users emails as well?
The other approach would be to replace the pod file with frameworks instead.
One last thing, moving forward with Telerik Platform releases Telerik Platform team will be working on improving the support for plugins containing pods. They will probably remove the "whitelisting” approach with sandboxing instead but we couldn’t yet comment on any specifics. 

Whats the easiest way to add custom style to the module parameters form at the admin in Joomla?

My simple module using 3 field, 2 text input and a tinymce textarea, but the textarea looks broken. http://img151.imageshack.us/img151/8648/joomla464.jpg
This is my config:
<config>
<fields name="params">
<fieldset name="basic">
<field name="moduleclass_sfx" type="text" default="" label="Module Class Suffix" description="PARAMMODULECLASSSUFFIX" />
<field name="url" type="text" default="" label="Paste the url" description="" />
<field style="clear:both;float:left;background-color:red;" name="description" type="editor" default="default" rows="20" cols="40" />
</fieldset>
</fields>
</config>
ty
You could add your css to
administrator/templates/bluestork/css/template.css (That is if your using the default administration template)
but there is a risk when joomla updates you will lose your css... you could alwasy copiy the template... give it a diffrent name and update the css there. so your copie wont be affected by any joomla update.
so adding your css there you just need to use the right css selector.
Otherwise i would use an artical selector or category selector
<field
name="category_id"
type="category"
description="JGLOBAL_FIELD_CATEGORIES_CHOOSE_CATEGORY_DESC"
extension="com_content"
label="JGLOBAL_FIELD_CATEGORIES_CHOOSE_CATEGORY_LABEL"
show_root="true"
required="true" />
And put what ever content you need in an artical.. you dont have much room to put the editor on the right for the modules configurations anyway.

Resources