Alignment on a specific character in an af:table column
Hello,
I have an af:table with columns containing vehicle kilometer counter, average speeds, running hours... These values may contain décimals, but not always. And I would like these values to be aligned on the decimal separator (. or ,) in the table column. Could you tell me how to do this?
The only solution I have found now is using text-align=right and using minFractionDigits/maxFractionDigits. Working, but not very attractive...
Thank you for your help
Stephane
The approach used by you - seems to be fine for me.
1) For aligning the text to the right, you would need to use the text-align:right as an inlineStyle property for the column.
2) For formatting of numbers, you can use the specify the pattern directly-
<af:column sortProperty="Salary" sortable="false"
headerText="#{bindings.Employees.hints.Salary.label}"
id="resId1c8" inlineStyle="text-align:right">
<af:outputText value="#{row.Salary}" id="ot8">
<af:convertNumber groupingUsed="true" pattern="###,###,###.000"/>
</af:outputText>
</af:column>
Thanks,
Navaneeth
Similar Messages
-
To delete specific character and digit from a column
Hi Everyone,
THis is the input table, Lot and digits should not be available in the output, but if its lotus then it should be there.
ADDRESS ADDRESS_FORM
LOT 201 JOHN RENSHAW DR
LOT 12 WANNEROO RD
LOT 1 OLD COAST RD
LOTUS CREEK RD
LOT 94 VICTORIA HWY
Out put table should be like this
ADDRESS ADDRESS_FORM
JOHN RENSHAW DR
WANNEROO RD
OLD COAST RD
LOTUS CREEK RD
VICTORIA HWYLike this..?
sql>select * from t;
ADDRESS ADDRESS_FORM
LOT 121 ABCD
LOT 562 XYZB
LOTUS DRTGH
LOT 1 FGET
sql>select decode(trim(address),'LOTUS',address,null) address,address_form
from t;
ADDRESS ADDRESS_FORM
ABCD
XYZB
LOTUS DRTGH
FGET
jeneesh -
How to select a substring in oracle up to a more than one specific character
How to select a substring in oracle up to a more than one specific character
for ex : 121.051^NP: FAMILY PRACTICE ( trim the values before ^ )
121.051^*NP: FAMILY PRACTICE (trim the value before *).
with below function I can only get rid of ^ , I want both the specific characters ^ and ^* to be removed at the same time.
SUBSTR(p.phys_sub_grp_2_desc,INSTR(p.phys_sub_grp_2_desc, '^') +1)Another option is to boldly replace 'em:
SQL> with t as (
2 select '121.051^NP: FAMILY PRACTICE' str from dual union
3 select '121.051^*NP: FAMILY PRACTICE' from dual
4 )
5 --
6 -- actuel query:
7 --
8 select substr( replace(str, '*')
9 , instr(replace(str, '*'), '^')+1
10 ) str
11 from t;
STR
NP: FAMILY PRACTICE
NP: FAMILY PRACTICE
2 rows selected. -
Substring to a specific character in SPD
In a SharePoint Designer workflow, is it possible to extract a substring from the beginning of a string up until a specific character?
thanks!Hi,
In SharePoint Designer 2010 workflow, there are OOB actions for extract string:
You could use any of them per your situation. Should you have any questions, please provide detail example of your requirement, so I can try to help.
Regards,
Rebecca Tu
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
String function to count total number of a specific character.
Gurus,
I've been trying to use INSTR to decipher a string to count the number of pipes in each string. Anyone have a simple SQL which shows how to use a string function to return a count of a specific character?
Thanks
-ScottHi, Scott,
To see how many '|' characters are in txt, you can see how much txt shrinks when you remove the '|'s.
LENGTH (txt) - NVL ( LENGTH ( TRANSLATE ( txt
, 'x|'
, 'x'
, 0
)The expression above works in any version of Oracle.
Starting in Oracle 11, you can also use REGEXP_COUNT:
REGEXP_COUNT (txt, '\|')'|' is a special symbol in regular expressions, so it has to be "escaped" ('\|') to indicate the pipe character. -
How can I read a specific character from a text file?
Hi All!
I would like to read a specific character from a text file, e.g. the 2012th character in a text file with 7034 characters.
How can I do this?
Thanks
Johannesjust use the skip(long) method of the input stream that reads the text file and skip over the desired number of bytes
-
Socket read wait for specific time limit for specific character
Hello again,
Is there a way to have a socket read for a specific time limit for a specific character?
An example would be to wait for 30 seconds for an <ENQ> to be read. Naturally if the time limit is reached a SocketTimeoutException exception would be thrown...
Much thanks.
-JeffdatagramSocket.setSoTimeout(30000); isn't what you
are looking for?.setSoTimeout() was it... Thanks. -
References to Specific Character String in a Schema
Hi,
In a 10g database, I am looking for all ways to list references
to a specific data string in any table of a specific schema, assuming
that the fields are all VARCHAR2.
For example, suppose that there is a schema named OLYMPICS.
That schema has many tables, and I am looking for all tables that
have a data value of 'Vancouver' (Hopefully, case insensitive), in
any field. The fields are all VARCHAR2.
So, the script will, hopefully, generate the following data. The most
important
info. is the tablename... I can live without the fieldname and value.
I would
prefer the case insensitivity, but I can live without that also.
Schema Table Field Data Value
OLYMPICS- HOST Currenthost vancouver
OLYMPICS- CITIES 2010host Vancouver
Regards
SandeepPlease check below link and my last reply.
Re: why there is a error in this query ?
HTH
Girish Sharma -
Problem with "Row-specific or Cascading Lists in Table Layout"
Hello, friends!
I have read article "Row-specific or Cascading Lists in Table Layout" written by Steven Davelaar. I have maked several table layouts with this technique and it worked fine.
But now I have one problem, and this problem is very strange. One of VOs for which I use this table layouts throw exception after commit changes on first LOV attribute (Deptno). First time it was error
(oracle.jbo.ReadOnlyAttrException) JBO-27008: for atribute mgrList
at oracle.jbo.AttrValException.<init>(AttrValException.java:112)
at oracle.jbo.ReadOnlyAttrException.<init>(ReadOnlyAttrException.java:40)
at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:815)
at oracle.jbo.jbotester.JboTesterUtil.setData(JboTesterUtil.java:173)
Then I setted updateable property of MgrList attribute to always and now i have this error:
oracle.jbo.domain.DataCreationException: JBO-25009: Cannot create an object of type:java.util.List with value:[{}]
at oracle.jbo.domain.TypeFactory.get(TypeFactory.java:721)
at oracle.jbo.domain.TypeFactory.getInstance(TypeFactory.java:85)
I don't know why, but all worked fine yestarday. And same code works fine for another VOs. And article Test application works fine too.
Help me, please.
Thank you.<table id="OsnovaniyaPrikazEnd" model="${jhsTableBindings.OsnovaniyaPrikazEnd_1B}" detailDisclosure="${uix.eventResult.detailData}" partialRenderMode="multiple" partialTargets="messageBox _uixState " proxied="true" alternateText="${nls.NO_ROWS_FOUND}" width="50%" rendered="${bindings.newGroup_end2Iterator.findMode!='true'}">
<tableFormat tableBanding="rowBanding"/>
<contents>
<formValue value="${uix.current.rowKeyStr}" name="rowKeyStr" id="${ui:concat('OsnovaniyaPrikazEnd:rowKeyStr:',uix.current.tableIndex)}"/>
<column>
<columnFormat displayGrid="true" cellNoWrapFormat="true" columnDataFormat="numberFormat"/>
<columnHeader>
<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.OsnovaniyaPrikazEnd,'Id')}" text="Id" required="yes"/>
</columnHeader>
<contents>
<messageTextInput id="${ui:concat('OsnovaniyaPrikazEnd:Id:',uix.current.tableIndex)}" model="${ui:cond(uix.current.isNewRow,null,uix.current.newGroup_end2Id)}" text="${uix.current.OsnovaniyaPrikazEndId}" name="Id" promptAndAccessKey="&Id" rows="1" maximumLength="1" columns="1">
<onSubmitValidater>
<decimal/>
</onSubmitValidater>
</messageTextInput>
</contents>
</column>
<column>
<columnFormat displayGrid="true" cellNoWrapFormat="true" columnDataFormat="numberFormat"/>
<columnHeader>
<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.OsnovaniyaPrikazEnd,'IdPrikaz')}" text="IdPrikaz"/>
</columnHeader>
<contents>
<messageTextInput id="${ui:concat('OsnovaniyaPrikazEnd:IdPrikaz:',uix.current.tableIndex)}" model="${ui:cond(uix.current.isNewRow,null,uix.current.newGroup_end2IdPrikaz)}" text="${uix.current.OsnovaniyaPrikazEndIdPrikaz}" name="IdPrikaz" promptAndAccessKey="&IdPrikaz" rows="1" maximumLength="1" columns="1">
<onSubmitValidater>
<decimal/>
</onSubmitValidater>
</messageTextInput>
</contents>
</column>
<column>
<columnFormat displayGrid="true" cellNoWrapFormat="true" columnDataFormat="numberFormat"/>
<columnHeader>
<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.OsnovaniyaPrikazEnd,'IdOsnovanie')}" text="На основании"/>
</columnHeader>
<contents>
<messageChoice id="${ui:concat('OsnovaniyaPrikazEnd:IdOsnovanie:',uix.current.tableIndex)}" model="${ui:cond(uix.current.isNewRow,null,uix.current.IdOsnovanie)}" name="IdOsnovanie" promptAndAccessKey="&IdOsnovanie" selectedValue="${uix.current.newGroup_end2IdOsnovanie}">
<contents childData="${jhsTableBindings.Osnovaniya_not_viewVO_1T.rangeSet}">
<option value="${uix.current.Id}" text="${uix.current.Text}"/>
</contents>
<primaryClientAction>
<firePartialAction event="whenListChanged" formSubmitted="true" unvalidated="true" targets="${ui:cond(uix.current.isNewRow,'OsnovaniyaPrikazEnd', 'OsnovaniyaPrikazEnd')}"/>
</primaryClientAction>
</messageChoice>
</contents>
</column>
<column>
<columnFormat displayGrid="true" cellNoWrapFormat="true" columnDataFormat="numberFormat"/>
<columnHeader>
<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.OsnovaniyaPrikazEnd,'IdMoves')}" text="IdMoves"/>
</columnHeader>
<contents>
<messageChoice rendered="${uix.current.ListLength>'1'}" id="${ui:concat('OsnovaniyaPrikazEnd:IdMoves:',uix.current.tableIndex)}"
model="${ui:cond(uix.current.isNewRow,null,uix.current.OsnovaniyaPrikazEndIdMoves)}" name="IdMoves" promptAndAccessKey="&IdMoves"
selectedValue="${uix.current.newGroup_end2IdMoves}">
<contents childData="${uix.current.MovesList.inputValue}">
<option value="${uix.current.Id}" text="${uix.current.Fam1}"/>
</contents>
</messageChoice>
</contents>
</column>
<column>
<columnFormat displayGrid="true" columnDataFormat="iconButtonFormat"/>
<columnHeader>
<text text="Удалить?"/>
</columnHeader>
<contents>
<checkBox name="deleteRow" value="ok"/>
</contents>
</column>
</contents>
</table>
Thank you. -
How to align a String value to the right side inside a table column?
Hi,
I have a text view inside a table column which is mapped to a string attribute. I need to align the text in the text view to the right hand inside the table column. But its always getting aligned towards the left side. I have tried by setting the <b>hAlign</b> property of Element properties of Text View to <b>right / forced right</b> but still the text is getting aligned to the left side.
How do I align the String values in Text View towards the right hand side inside a Table Column?
Thanks and Regards,
Sayan GhoshHello Sayan,
if i do get it right, you are adding an TextView element to a Table Cell. Then you should consider setting aligment within the particular cell. By calling:
YourCell.setHorizontalAlignment(CellHAlign.RIGHT)
regards.
mz -
I need to make a spreadsheet based on info from specific table columns and headlines above those tab
Hi all,
A client of mine is requesting that I create a spreadsheet from a huge catalog that I am doing for him (this will also be done for all similar huge catalogs). The spreadsheet needs to pull information from some of the table columns, as well as the headline for each table. (This spreadsheet will then go out to some other people who will be putting this information into an online database/website for the client.) Let me be more specific and show you an example below.
Information from InDesign Catalog:
Tea Set
Part #
MFG #
Description
123-456
654321
Tea Cup
789-010
010987
Saucer
Here is how the Excel Spreadsheet needs to look:
Part #
MFG #
Product Name
Description
Page #
123-456
654321
Tea Set
Tea Cup
2
789-010
010987
Tea Set
Saucer
2
You have no idea how I have been pulling my hair out over this. Doing this manually will be a nightmare each time. My first thought was that I could assign specific cell styles to the columns (cells) and then create a TOC and then finangle with that - well, that didn't quite work, especially because of the headline I needed to pull into the spreadsheet as well. Is there ANY way I can get this information onto a spreadsheet? Knowing how wonderful InDesign is and all the tremendous capability it has, I am sure there IS a way and I just dont know how. Please PLEASE can someone point me in the right direction?
Thank you very much in advance for your assistance:) Any help would be greatly appreciated.
ChristineSorry for the delay.
I am sure that this can somehow be done by making use of the styles. For example, when creating the TOC InDesign does a GREAT job of pulling in the styles (that are of course associated with the headlines and whatever needs to be included in the TOC) and associating them with the correct page numbers. I had experimented a little with creating specific paragraph styles and working these into the table and cell styles...then applying the Table Style to the table. I was halfway getting to where I wanted to be by creating a TOC that pulled in all of these styles and applied the corresponding page numbers (that I could somehow work into converting back into a table to then flow onto an Excel spreadsheet) but the wrench in the works was of course the Product Name. That said, I am VERY confident that this CAN be done somehow, by making use of the styles, using the same (or similar) methodology that is used to create the TOC. If only I were a pro at scripting...
Well, it's great that you're certain and confident, but I think your confidence is misplaced.
I had sort of hoped that running headers could be convinced to support this, but that doesn't seem to be true.
I think you need to postprocess the data somehow. If I was doing this for real I'd probably export the document to IDML and have a seperate program read the IDML XML, find the product names and page numbers, and insert them in tables. Though...that might mess up the page numbers. And it'd be a lot of work.
An much-faster-to-rapid-prototype solution is to have an indesign script go through the document and add in page numbers and the product names. Here's a rough prototype:
var d,s,story,table,product,page,c2,c3,c5,i,j.k;
d=app.activeDocument;
s=d.stories;
for (i=0; i<s.length; i++) {
story = s[i];
for (j=0; j<story.tables.length; j++) {
table = story.tables[j];
product = story.chara
cters[table.storyOffset.index-2].paragraphs[0].contents;
page = table.parent.parentPage.name;
// $.writeln("This is table "+j+". Product name: "+product+" page "+page);
c2=table.columns[1];
c3=table.rows[0].columns.add(LocationOptions.AFTER, c2);
c3.contents=product;
c5=table.rows[0].columns.add();
c5.contents=page;
This doesn't handle the header rows in tables, but hopefully that's ok.
It may get page numbers wrong on multipage tables. Probably it would be better to just use
SpecialCharacters.AUTO_PAGE_NUMBER on the last full line (c5.contents=).
It should also probably not just look back 2 characters from the start of the table to find the paragraph, but it's probably good enough. -
Vertical Alignment in table columns
Using JHeadstart 10.1.3.4.
Different display types are differently positioned in table columns. Single text seems vertically centered; text fields with multiple lines are vertically aligned at the top of a table column; vertical radio buttons are vertically aligned at the bottom of a table column. The resulting display is quite messy.
I have not found any formating option in JHeadStart that allows for controlling vertical alignment. Am I a missing something?
If JHeadStart 10g does not support controlling vertical alignment directly, how should this be handled? Does JHeadStart 11g add such vertical alignment support?Hello,
If you need anything special considering vertical alignment in tables, you can simply perform that in the resulting JSPX page. In other words, just alter the JSPX file to whatever you need.
Save your customizations in JHeadstart using velocity templates, so your page is regenerateable while keeping your changes. See the JHeadstart Developers Guide on how to change such customizations in the templates.
Also in release 11 there is no vertical alignment (yet); I suppose because for most tables, each row just has a single line and vertical alignment is therefore not needed. However, I have put it on the wish-list, so we will check on it later. Thanks!
Regards,
Evert-Jan de Bruin
JHeadstart Team -
Programmatically refresh components inside a specific row of an af:table
How to programmatically refresh components inside a specific row of an af:table without refreshing the whole table ?_
I have an af:table displaying a read-only view object. There is an edit button inside the table calling an af:popup, where the user can update some informations and click a submit button to validate his changes.
The action property of this button is a method in a backing been where
- 1 : A stored procedure is called to update several tables (related to my read-only VO).
- 2 : The VO is re-queried (VO. refreshQueryKeepingCurrentRow() )
- 3 : The whole table is refreshed (AdfFacesContext.getCurrentInstance().addPartialTarget(myTable) )
Is it possible to programmatically refresh some components of the current row of the table without refreshing the whole table (point 3)?
I’ve tried to play with the “partialTrigger” property of af:outputText (table:column:outputText), without success.
Thanks
Nicolas"+do you happen to want to refresh following an action on the row? Like a link/button click?+" : NO
There is a table on my page. The user select a row and click on an edit button. This edit button call a popup where the user can modify some information (not directly on the viewObject. All fields in the popup are dummy fields bind to attributes in my backing bean) and then he click on a submit button.
The submit button action execute a method "submitInformation" in a backing been.
public String submitInformation(){
Map<String, Object> params = new HashMap<String, Object>();
params.put("pManNo", xManNo.getValue()); //xManNo is an attribute of the backing bean
params.put("pDate", xPeriod.getValue()); //xPeriod is an attribute of the backing bean
// Execute Operation
OperationBinding oper = ADFUtils.findOperation("serviceSubmitInfo");
oper.getParamsMap().putAll(params);
String results = (String)oper.execute();
// Close Popup & Refresh Row if OK
if(!StringUtils.isStringEmpty(results) && results.equals("TRUE")){
closePopup("pt1:popAbs");
refreshMyCol();
}The serviceSubmitInfo method is defined in my serviceImpl
public String serviceSubmitInfo (String pManNo, String pPeriod, ......){
String results =
callStoredFunction("? :=myDatabaseFunction(?, ?, ?, ?)",
new Object[] { pManNo, pPeriod, ...... });
// Commit
getDBTransaction().commit();
// Refresh VO (re-query & set currentRow)
getMyVO().refreshQueryKeepingCurrentRow();
return results; // TRUE if ok
}I want the " refreshMyCol()" method to refresh only the current row and not the whole table...
Regards
Nicolas -
Alignment of advnaced table column
Hi, All
When I apply numberFormat(alignment attribute) on advance table column, the data places on right uppper side.
i'd like to make it place right-middle side.
is it possible?
Thanks.
Andrew
Message was edited by:
user649623thanks for reply
As I know, iconButtonFormat makes item place the center.
The customer wants item to place right-middle side. -
How do I find the font for a specific character in a textItem?
I'm writing a script that builds a font list for an open document. While I could have lookup the fonts for the file as a whole, my goal is to iterate over specific layerSets to build a font list from. The issue I'm facing, is that referencing:
app.fonts[text[n].textItem.font].name
Only pulls the font name of the first character of the textItem. I need to get the names of all the fonts in the textItem, and while I can successfully loop through each of the letters, they do not have the character attributes associated with them.
I tried this: app.fonts[text[n].textItem.contents.font].name
As well as many iterations of a similar idea, and I cannot get it to pull the font name, as it's not an attribute of each character. I apologize if this is a remedial question, but I'm a bit of a novice with javascript in Adobe programs.
For an example of what I'm trying to acheive, I was easily able to do this in illustrator, by using the following statement:
fontName = text.characters[j].characterAttributes.textFont.name;
When placed in a loop, this goes through each font in the text Layer.This should get a list of the fonts used in Type Layers in the selected Group.
// get list of fonts used in the active group;
// based on code by paul riggott;
// 2014, use it at your own risk;
#target "photoshop-70.032"
if (app.documents.length > 0) {
var theFonts = main ();
alert ("the fonts used in the folder " + activeDocument.activeLayer.name + " are"+"\n"+theFonts.join("\n"))
function main () {
var theFonts = new Array;
var someLayerStuff = getActiveLayerIIndex();
if (someLayerStuff[1] != "layerSectionStart") {return []};
var aNumber = 0;
// get number of layers;
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
var applicationDesc = executeActionGet(ref);
var theNumber = applicationDesc.getInteger(stringIDToTypeID("numberOfLayers"));
// determine the start index;
if (activeDocument.layers[activeDocument.layers.length - 1].isBackgroundLayer == true) {var theStart = someLayerStuff[0] - 2}
else {var theStart = someLayerStuff[0] - 1};
for (var p = theStart; p >= 0; p--) {
try {
var ref = new ActionReference();
ref.putIndex( charIDToTypeID( "Lyr " ), p);
var layerDesc = executeActionGet(ref);
var layerSet = typeIDToStringID(layerDesc.getEnumerationValue(stringIDToTypeID("layerSection")));
var isBackground = layerDesc.getBoolean(stringIDToTypeID("background"));
var theName = layerDesc.getString(stringIDToTypeID('name'));
// check if group closes;
if (layerSet == "layerSectionStart") {aNumber++};
if (layerSet == "layerSectionEnd" && aNumber == 0) {return theFonts};
if (layerSet == "layerSectionEnd" && aNumber != 0) {aNumber--};
// if not layer group collect values;
if (layerSet != "layerSectionEnd" && layerSet != "layerSectionStart" && isBackground != true) {
var hasText = layerDesc.hasKey(stringIDToTypeID("textKey"));
if (hasText == true) {
var textDesc = layerDesc.getObjectValue(stringIDToTypeID('textKey'));
var paragraphStyle = textDesc.getList(stringIDToTypeID('paragraphStyleRange'));
var kernRange = textDesc.getList(stringIDToTypeID('kerningRange'));
var rangeList = textDesc.getList(stringIDToTypeID('textStyleRange'));
for (var o = 0; o < rangeList.count; o++) {
var styleDesc = rangeList.getObjectValue(o).getObjectValue(stringIDToTypeID('textStyle'));
var aFont = styleDesc.getString(stringIDToTypeID('fontPostScriptName'));
// add to array;
var theCheck = true;
for (var n = 0; n < theFonts.length; n++) {
if (theFonts[n] == aFont) {theCheck = false}
if (theCheck == true) {theFonts.push(aFont)}
catch (e) {};
return theFonts
////// get some stuff from the active layer //////
function getActiveLayerIIndex () {
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
var layerDesc = executeActionGet(ref);
var theIndex = layerDesc.getInteger(stringIDToTypeID("itemIndex"));
var theSection = typeIDToStringID(layerDesc.getEnumerationValue(stringIDToTypeID("layerSection")));
var hasText = layerDesc.hasKey(stringIDToTypeID("textKey"));
return [theIndex, theSection, hasText]
Maybe you are looking for
-
Can i delete all my cookies and still be able to access the websites some of the cookies came from
can i delete all my cookies and still be able to access the websites some of the cookies came from?
-
Organization object self servicable option
Hi All What does this option exactly mean? Thank u sas
-
Hello Im having a bit of bother with a extension that allows me to easily add files such as images, however updating the file doesnt work, There own support forums are practcaly non existant to ive had to wider my search to resolve this. I think some
-
Back light not working on MacBook Pro
The backlight for the keyboard is not working? I don't know what happened to it, but it's just dark now.
-
HT3529 i cant send pictures with my text.
All of a sudden I can't send pictures with my text??