Showing posts with label layout. Show all posts
Showing posts with label layout. Show all posts

14 March 2011

Refreshing page components with BC UI Hints/Control Hints changes

Sometimes you change something in the UI Hints of an BC and it is not reflected to the page.

The reason is the page is not refreshed properly with the changes.

To refresh it perform the following:

  • Re Build Model Project
  • Refresh Data Controls
  • Full Refresh the page (1st choose design mode)

15 December 2010

Define your alternative format/pattern for af:inputDate

You want to input date in your page without using the ADF predefined pattern eg. 7/7/1977
but just writing 07071977
then
use  secondaryPattern="ddMMyyyy"

Also,
Check for Common patterns at  java.text.SimpleDateFormat.

Test if your pattern is valid, on the Online SimpleDateFormat Test.


Note: 
The Pattern and SecondaryPattern string of af:convertDateTime should respect the pattern syntax specified by the java.text.SimpleDateFormat.

Note2:
Of course you can also define pattern property, instead of taking it from bindings, but it is better to define it in the UI hints of VO attribute and access it from bindings.
Most probably the pattern in the VO's attr UI hints follows the above pattern syntax, too. Although the available formats are defined in formatinfo.xml (under JDev system dir), other values are accepted (eg. I remember using "yyyy-MM-dd hh:mm:ss" which is not specified in the  formatinfo.xml, but is a valid pattern).

Example:



Src:



09 December 2010

Display only icon in LOV

IF you want to use an LOV but display only its icon then use contentStyle="display:none"

Keep af:inputText component width the same either when it is enable or read only

There is a nasty behavior on this component that which is to have different width when it is enable and when readonly. To fix this use contentStyle="width:70.0px property.



What is ContentStyle

According to JDevelopers help documentation ContentStyle is the style of the content piece of the component. You can style width by setting this attribute like this: width: 100px. 

06 December 2010

Prevent wrapping of af:column's header of an af:table

You should put to all columns headerNoWrap="true".  This also puts a shortDescription when the header is not clearly visible.


12 November 2010

TROUBLESHOOTING: ADF UI layout components cannot inherit width from trinidad components.

The very nice article Layout Tips - Organizing page content using  by Jobinesh, triggered some memories on combining ADF layout coomponents and trinidad:

  • ADF components cannot see trinidad components.
    • So if for eaxmple you put a trinidad cell to have width=979 and the PanelBox inside it width=100%, then the PanelBox will be cropped.
    • Also if you put ADF component, Trinidad, ADF component and in 1st ADF component you specify the width in pixels, you CANNOT put 100% in the 2nd AF component cos it won’t see it because if the trinidad in between.
    • BUT if you put trinidad cell with width= xx, ADF cpmponent eg. Panel Box, and then another trinidad table [trinidad_table, adf_component, trinidad_table], then you can tell the last  table to be 100% and it will underastand that it will be 100% of the above cell

  • Best practises:
·        [Trinidad_table: width=###px],  [Panel_Something: no width[sd1] ], [Trinidad_table: width=100%][sd2] 
·        [Trinidad_table: width=###px],  [Panel_Something: no width], [adf:component: width=100%][sd3] 



 [sd1]Will take its above trinidad

 [sd2]Will understand the above trinidad component, that is the 2nd above component

 [sd3]Will understand cos above component is adf

02 November 2010

Auto Stretch a column

To stretch the column in order to occupy the remaining space on the right,
use af:table property columnStretching
eg


Note: Beware that there is a performance penalty when this feature is enabled.

You might also like:

Related Posts Plugin for WordPress, Blogger...