Field as link soruce

03 Dec '12, 04:22 PM
50,098 Views
No Forum Badges

Hello there!

Page 28 of the Webratio WebML User Guide says the following about links:

The target and the source denote the content of the parameter, which is either an attribute or a field of the source unit of the link

How can I change that? I don't see any way of changing this in my version. It is 6.1.3.

Thanks for helpping!

 
x 0
Follow
Answer Answer at this question and get points!
No Forum Badges

Hello,

you can visualize the link on the attributes by setting the "Links Position" Layout Parameter of the Index Unit equal to "on_row". Select the Index Unit in the Grid and in the Properties Panel open the Unit Layout parameters dialog. Set "Links Position" = "on_row".

alt text alt text

If the Index Unit shows more than one attribute (in your case: "name" and "city") and you wish to display the link on one attribute only (e.g. "city"), you need to customize the template of the Index Unit. You have to add a condition for printing the link only if the attribute name is the desired one. For example:

....
<wr:Iterate var="attr" context="unit" select="layout:Attribute">
....
[% if ((linkPosition == "on_row") && (!links.empty)) {%]
  .....
  [% if (attr["name"]=="city") { %]  // added condition
    <wr:Visible context="unitLink" position="'index'">
      <a href="<wr:URL context="unitLink"/>" class="<wr:StyleClass context="unitLink"/>
      link ........>
    </wr:Visible>
  [% } %]
  ....
  ....

The customized template has to be applied to the Index Unit.

This an example of the final result page:

alt text

   
x 1
No Forum Badges

Hello,

the Source and the Target refer to the units connected by the Link. During the modeling, when you draw a Link you define the source unit and the target unit.

You can edit the Link Parameters in the Parameters Coupling dialog. To open the dialog double-click on the Link, or select the Link and click on the button next to the ""Coupling"" item in the Properties Panel. In this dialog you can couple the parameters of the source unit with the ones of the target unit. To set a coupling, select a parameter of the source unit from the drop-down, or write a constant value for the corresponding target parameter.

The source and the target parameters depends on the units (source parameters = output parameters of the source unit; target parameters = input parameters of the target unit). For example, the output parameters of a Data Unit are all the Attributes of the selected Entity, while the input parameters of a Data Unit consists of all the Conditions defined on the Unit.

You can see the details of a Link Parameter in Properties Panel: expand the Link in the Outline View -> select the Link Parameter.

For more details / examples:

  • Links and coupling

 
x 1
No Forum Badges

Thanks for the answer Laure.

Now I understand the links in a better way but I think I didn't descrive my problem well.

When I use a link from a Index Unit to another page I'd like to have the link from the attribute and not from a new link. I'll try to explain it with an example.

I have a Index Unit which displays Name and City. Then I add a Link from the Index to a new page where there's another Index Unit with information of all citizien in the City.

The problem there is that I have a new link for each row and I'd like to click on the City name to go to the new page, not in this new link.

Can I change the 'source'?

I missunderstood what the guide said and that's why my first question was ambigous I think.

Thanks for the efforts!

 
x 0
Forum Expert - Level 5

.

 
x 0
Answer at this question and get points!

Related questions

2 grids inside one/same cell result in non-selectable 2nd grid Access page variable in a page template add html Ajax and FCK Editor (WebRatio 5.x) Ajax is not working in own style project Ajax onchange and jQuery 2.x (with migrate plugin) incompatible Ajax on change selection field and modify units Ajax web app with javascript history object using the WebRatio Alimentar graficas con base de datos Alternate way to get current User Oid in layout template groovy script? Any way to localize the Tab Grid Template (Webratio Store)? Applicare un template ad un Web Project Autocomplete template Automatic date in form Automatic file upload Ayuda Simple List Component Layout personalizado Bootstrap Style BPMN: URL field Button to go on another page Cambiare dimensioni bottoni - Change button size Can I inject html into custom unit template?! Change color template bootstrap style Change Style Changing the login page does not work ckeditor - change directory for the browser Clean a form Colore Attributi index unit Dinamico - Index unit dynamic attribute color Como abrir una ventana en ajax desde una master page Como crear cambio de contraseña Como embeber un video subido desde archivo ? Como mostrar una imagen de portada arriba del menu? Como mostrar una imagen en una lista o en la componente detalles? Como tener dos botones juntos en un formulario independientes de una accion? Como usar la función autocomplete en un field Compare with the current time Confirm Dialog coupled mandatory fields Cryptic error when submitting a form Customize layout mobile platform Custom Tooltip Position Default error pages default login page Disabilitare campi durante evento AJAX Display contents of a URL Drop down menu question Dudas sobre modelado(Data Flow,Forms y Operation Create) Dynamic attribute/field names. Possible? Dynamic instantiation of fields on a page for any Class type Dynamic link labelling for Custom Unit Empty record mistakenly saved entry form logic. Entry Unit - Default field timestamp Entry Unity, Field Date Type Error Error in Excel Unit - Font size Export to a HTML/CSS/JS project File CSS non considerato in generazione Form element Form template Get date pattern Get home page from template Getting the absolute path of a RTXBLOBData Google map is not shown properly in the tab grid Guardar Saltos de LINEA HelloWorld Unit sample code Hide form until a flow is triggered Hiding form components based on page conditions Hiding landmarks (or flows) when the user is logged in Hierarchy component How can i create pagemenu or landmarkmenu with multiple levels. How can I modified the htmls files to perform my style How I can receive the primary key value after adding into database from OK Port. How to add an image in a modal/pop-up window? How to include a template into other template? How to localize AJAX waiting dialog? How to localize the multi message unit in the notification layout How to modify template? How to modify the FertileEnviroment Default page How to redirect to the correct site view after a successful login attempt How to remove default Linked Resources? How to use LandmarkMenu as AJAX navigation how to use the landmark menu as AJAX navigation input mask integrate framework to webratio mobile Integrazione javascript Javascript and html javascript history object Localize "Welcome..." and "Process details" logo webratio meaning of each tag in the XML code (Show XML/Show Layout XML) modify field html Modify html generated by wr:NavigationBar Multi Entry Unit: How to forward only checked rows? Multi-Image Upload Multiple forms on one page. HTML5 input attributes. Possible? (2 questions) multi selections field problem Multi Selects didn't work in update page Pages Problem After Project Generation pass template variable Prelevare la chiave del record da una Selection Field in una Multiple Form Problem Login Form only if user not logged Problem print Problem saving multi selection from input Problems with the page refresh (Tab Grid) Problem with adding templates Progress bar when uploading big file(s) in a form? Pulire URL query unit who to hide fields that are used in a link Recursive Hierarchical Index Unit Style Tree Redirecting users to another site view Redirect to the default module Remove default BPM css import for all templates Resize fields Responsive Bootstrap Grid Responsive Layout Manager Search by Selector component does not work selection fields on cascade Select multiple files for upload Set context parameter Setting Upload directory Showing items that have a relation with an entity Simple Static Page Slot in Selection Field Standard confirm dialog replacement Style hierarchical unit help!! Supoort for Mobile and Desktop display Target tabs in Tab Grid Control Tooltip on a field Too much layout parameters = no scroll in parameters config window Update fields based on selection of other fields Updating attributes of an entity upload file and the move it to other location upload file html Uppercase Use image as interaction flow Uso de la componente chart de webRatio Validacion validation fields Value Length (Min) fails to validate when field is empty? Vista de diferentes Site Views Webratio Add-ons no permite login WebRation - Create Navigation diagram What are the new features of WebRatio 6.1? which of these three models is closer to webratio/ifml way of creating web applications wr-ajaxDivs break layout on ajax pages.