Forum Stats

  • 3,838,793 Users
  • 2,262,399 Discussions
  • 7,900,757 Comments

Discussions

Wrapping af:link component inside table column in 12.2.1.2

TechieInnovator
TechieInnovator Member Posts: 171
edited May 29, 2018 5:30PM in JDeveloper and ADF

I use Jdeveloper 12.2.1.2.

I have af:link component and want to wrap the complete link inside the table column. Basically, I want to display complete length link text in table column without truncating or hiding some portions.

I have tried with af:link component and its not working.

It used to work with af:commadLink in 11g which is deprecated now. If I use the same depricated 11g component af:commandLink, it works also; but it does not work for af:link which supposed to be the replacement for af:commandLink in 12.2.

Did anyone face this issue or there any other work around for it to get working in 12.2 with af:link?

My source code for the table as below.(One colum with use of deprecated af:command link where it works and another one with af:link where it doesn't work)

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE html>

<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">

    <af:document title="view1.jsf" id="d1">

        <af:messages id="m1"/>

        <af:form id="f1">

            <af:table value="#{bindings.ViewObj1.collectionModel}" var="row" rows="#{bindings.ViewObj1.rangeSize}"

                      emptyText="#{bindings.ViewObj1.viewable ? 'No data to display.' : 'Access Denied.'}"

                      rowBandingInterval="0" selectedRowKeys="#{bindings.ViewObj1.collectionModel.selectedRow}"

                      selectionListener="#{bindings.ViewObj1.collectionModel.makeCurrent}" rowSelection="single"

                      fetchSize="#{bindings.ViewObj1.rangeSize}" id="t1">

                <af:column sortProperty="#{bindings.ViewObj1.hints.ViewAttr.name}" sortable="true"

                           headerText="AF COmmand Link" id="c1" width="120px" noWrap="false">

                    <af:commandLink id="cl52"

                                        immediate="true" >

                           <af:outputText value="aaadd 2ss dfhgfdhd hhhhhhfd hhhhhhhh" id="ot4"/>

                        </af:commandLink>

                </af:column>

                <af:column sortProperty="#{bindings.ViewObj1.hints.ViewAttr1.name}" sortable="true"

                           headerText="AF Link" id="c2" width="120px" noWrap="false">

                     <af:link id="cl53"

                                        immediate="true" >

                           <af:outputText value="aaadd 2ss dfhgfdhd hhhhhhfd hhhhhhhh" id="ot44"/>

                        </af:link>

                </af:column>

            </af:table>

        </af:form>

    </af:document>

</f:view>

Tagged:
managed BEANDanielD7777

Comments

  • dvohra21
    dvohra21 Member Posts: 14,618 Gold Crown
    edited May 25, 2018 3:10PM

    Has the app been migrated? Is the migration path supported?

    Oracle JDeveloper and ADF 12.2 Supported Systems

  • TechieInnovator
    TechieInnovator Member Posts: 171
    edited May 25, 2018 3:20PM

    Yes, its migrated and the path is supported from the link you shared. I ma doing it from 11.1.17 to 12.2.1

  • DanielD7777
    DanielD7777 Member Posts: 45
    edited May 25, 2018 8:37PM

    Hi, you can get that link inside a panelGroupLayout or panelFormLayout component.   Hopefully it will work.

    Best Regards.

  • dvohra21
    dvohra21 Member Posts: 14,618 Gold Crown
    edited May 26, 2018 7:33PM

    The af:link component has some limitations on placement. Also "This component will be included when the page is being displayed in emailable and printable modes.". Please refer "Geometry Management".

    https://docs.oracle.com/cd/E50629_01/adf/TROAF/tagdoc/af_link.html

  • TechieInnovator
    TechieInnovator Member Posts: 171
    edited May 29, 2018 10:38AM

    I have tried both. It did not work. Do you think setting any property to panelGroupLayout or panelFormLayout component may makes some difference?

  • TechieInnovator
    TechieInnovator Member Posts: 171
    edited May 29, 2018 10:40AM

    Then, How do we display a link in without wrapping in a table column?

  • DanielD7777
    DanielD7777 Member Posts: 45
    edited May 29, 2018 11:42AM

    Can you provide us the jsf code?  perhaps we can find out a good work around for you with that component my friend

  • TechieInnovator
    TechieInnovator Member Posts: 171
    edited May 29, 2018 11:58AM

    Thanks..  Here you go:

    <?xml version='1.0' encoding='UTF-8'?>

    <!DOCTYPE html>

    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">

        <af:document title="view1.jsf" id="d1">

            <af:messages id="m1"/>

            <af:form id="f1">

                <af:table value="#{bindings.ViewObj1.collectionModel}" var="row" rows="#{bindings.ViewObj1.rangeSize}"

                          emptyText="#{bindings.ViewObj1.viewable ? 'No data to display.' : 'Access Denied.'}"

                          rowBandingInterval="0" selectedRowKeys="#{bindings.ViewObj1.collectionModel.selectedRow}"

                          selectionListener="#{bindings.ViewObj1.collectionModel.makeCurrent}" rowSelection="single"

                          fetchSize="#{bindings.ViewObj1.rangeSize}" id="t1">

                    <af:column sortProperty="#{bindings.ViewObj1.hints.ViewAttr.name}" sortable="true"

                               headerText="AF COmmand Link" id="c1" width="120px" noWrap="false">

                        <af:commandLink id="cl52"

                                            immediate="true" >

                               <af:outputText value="aaadd 2ss dfhgfdhd hhhhhhfd hhhhhhhh" id="ot4"/>

                            </af:commandLink>

                    </af:column>

                    <af:column sortProperty="#{bindings.ViewObj1.hints.ViewAttr1.name}" sortable="true"

                               headerText="AF Link" id="c2" width="120px" noWrap="false">

                            <f:facet name="footer"/>

                            <af:link id="cl53" immediate="true">

                                <af:outputText value="aaadd 2ss dfhgfdhd hhhhhhfd hhhhhhhh" id="ot44"/>

                            </af:link>

                    </af:column>

                </af:table>

            </af:form>

        </af:document>

    </f:view>

  • TechieInnovator
    TechieInnovator Member Posts: 171
    edited May 29, 2018 5:30PM

    Thank you all. It's fixed by adding following inline style to af:link  inlineStyle="white-space: normal;"

    TechieInnovatormanaged BEANDanielD7777
This discussion has been closed.