text wrapping on re-render of component - android only

0
I have a button with a caption. The first time I navigate to the button it renders just fine with the caption all on one line like I would hope. However, on android, if I go back to the location of the button without completely restarting the app it wraps like this: I have tried setting numberOfLines to 1 and setting includeFontPadding to false but neither had any luck.We have experienced similar behaviors in a few areas of our app ever since upgrading to mendix 10 so any info on how to fix this would be very much appreciated!
asked
3 answers
0

Avoid using a fixed height on the Button or its Container in your native styling. If a fixed height is set, it can cause the caption to wrap incorrectly or get clipped when the layout is recalculated (for example, after navigating back).


Instead, remove the height property and use minHeight. This allows the button to grow naturally based on its content and ensures the caption is always fully visible.


answered
0

Dear Steve ,

Instead of placing the button directly you can use the layout grid and place the button .The grid forces a consistent width calculation on re-render.

Column width: Auto


Thanks ,

Mohamed Rasik.N


answered
-1

If You Are Using the Database Connector Module

You need to modify the connection properties, not the JVM.

Option A — Add It in the JDBC URL (Recommended)

In your Database Connector configuration (usually in a constant or connection string), update the JDBC URL like this:


jdbc:snowflake://<account>.snowflakecomputing.com/?JDBC_QUERY_RESULT_FORMAT=JSON

Example:


jdbc:snowflake://abc123.eu-central-1.snowflakecomputing.com/?db=MYDB&schema=PUBLIC&warehouse=WH1&JDBC_QUERY_RESULT_FORMAT=JSON

That’s it.

This forces Snowflake to return JSON instead of Apache Arrow.

  • Works in all environments
  • Production-safe
  • No JVM change needed

Option B — Execute ALTER SESSION Before Query

If you cannot change the URL, then:

In your microflow before executing query:

  1. Add Execute Statement
  2. Run:

ALTER SESSION SET JDBC_QUERY_RESULT_FORMAT='JSON';

Then run your actual SELECT query.

This works too — but URL-level configuration is cleaner.

Do NOT Use JVM Option

Avoid adding JVM parameters like:


-Dnet.snowflake.jdbc.disableArrow=true

Reasons:

  • Not portable
  • Can break after driver upgrade
  • Harder to maintain across environments
  • Not recommended for production

Final Best Practice

Set it in:


JDBC URL → JDBC_QUERY_RESULT_FORMAT=JSON

That is the cleanest and most production-ready solution.

answered