Doxygen Link to page - hyperlink

I want to create a link to a page in the documentation.
I am currently using
/// You will find a copy here.
///
/// \ref clicn
I want the link to be here rather than the name of the page
that clicn refers to.

This should work with \ref
//! \page handle MyPage
//! text in MyPage
//! Some variable. For additional information look at \ref handle "this cool page"
int myvar;
This is also answered here

Related

Write to Roomle parameter from external page

I'm looking to change an internal Roomle parameter from externally from a webpage. I have 3 icon menus within roomle, the webpage that the Roomle is hosted on has users logins, so depending on who has logged in I want to hide certain Roomle Icons Menus, for example if Person1 is logged in I want to set the internal Roomle parameter of allowSplinta==true, allowCB==true, allowTB==true but if Person2 is logged in I want to set allowSplinta==false, allowCB==true, allowTB==false, so Person2 will only see 1 icon menu.
I see from the documentation this seems to be possible but unsure how to implement it, there is a section on the roomle site "Parameter Implementation outside of the configurator iFrame"
As you mentioned there is a section in the docs which explains this.
Basically you have to make sure the configuration is loaded (await loadObject) and then get all the parameters using your configurator instance:
const params = await configurator.extended.getParametersOfRootComponent();
If you know which parameter you want you can search it in the params array:
const viewParam = params.find(({key}) => key === 'door');
All valid values for this parameter are then stored in validValues (viewParam.validValues).
You can then use setParameterOfRootComponent to set the desired value:
configurator.extended.setParameterOfRootComponent(viewParam, value)
I created a CodeSandbox where you can take a look at the full example.

how to test for a presence of a text in a view page?

When doing integration tests, does Grails have any methods that assert the presence of a text in the view page?
For example: sometimes we want to assert that the view page contains certain elements. For example: in a movies list page we want to assert the given movies are shown in the view page. How can we achieve that effectively in Grails? Thanks!
Well! As per my knowledge when we render a view we get String in return and hence you could use String's contains method to test whether page contains some text or not.
There are plenty of such examples available.
Below is the one from http://mrhaki.blogspot.in/2013/05/grails-goodness-testing-views-and.html blog:
package com.grails.views
import grails.test.mixin.TestMixin
import grails.test.mixin.web.GroovyPageUnitTestMixin
import spock.lang.Specification
#TestMixin(GroovyPageUnitTestMixin)
class HeaderTemplateSpecification extends Specification {
def "if username is set then show message Hi with username"() {
expect: 'Template output must contain Hi, Johnson'
(render(template: '/sample/header', model: [username: 'Johnson'])).contains 'Hi, Johnson'
}
}
Above, if you notice have rendered gsp view and checked for presence of Hi,mrhaki string in view.
Hope it answers your question.

How do I code PDF download from external site on Image click?

I have one "Download PDF" Image link, I am calling an action of a controller in order to allow users to download specific file from external site (so has given complete URL of PDF file link)
I have written following code, but its not working.
public virtual ActionLink OpenPDF()
{
string fileName = "http://mysite/filetodownload.pdf";
return File(fileName, "application/pdf", Server.UrlEncode(fileName);
}
This controller action gets called from an Image link.. and I can see this action gets called..
When I click on image, the code gets executed, and asks to Open/Save file, but when I say Save it says "This file cannot be downloaded"
what do you think can be wrong here.
Why don't you just point your link directly to the site
Download File
You don't need to go through a controller for this
As a side not, if you are returning a FileResult you need to pass it a stream, a byte array, or a path to a file on disk. You can't pass it a third party URL. It doesn't work like that. It is meant to work like this:
public virtual ActionLink OpenPDF()
{
string fileName = Server.MapPath("~/Download/filetodownload.pdf");
return File(fileName, "application/pdf");
}
I think
Show images in table from database in Asp.net-mvc3
Azure blobs and thumbnails
ASP.NET MVC - user managment of folder with pictures (FTP?)
links as you meet the answer.

in Symfony, Frontend App, Using one of Module's form on another Module

I am building a project with Symfony. Its blog-like web site. I need to implement:
Writing comment for every article. Every comment must be moderationed by editors etc.
Everything is ready. I have a backend, use group, perms. so on. Just i need to comment form on article's show page.
My question is can i use my comment module's newSuccess temp. If yes, how? When i copy and paste the content of newSuccess, its not working evenif some conf.
Do you know there is way to use comment module's form at article module? and how can i configure it?
Thanks for spend your time to read -maybe to answer (;-
Just create the form in your controller:
public function executeShowArticle(sfWebRequest $request)
{
// assume weve already retrieved and set $this->article
$comment = new Comment();
$comment->setArticle($this->article);
$this->commentForm = new CommentForm($comment);
}
then you can use echo $commentForm in the template for your article. If you are customizing the layout of the comment form then move that form to a partial and do include_partial('comment/form', array('form' => $commentForm); from your article view. alternatively you could make a componet instead of using a straight partial... something like:
// in commentComponents.class.php
public function executeArticleCommentForm()
{
$comment = new Comment();
$comment->setArticle($this->article);
$this->form = new CommentForm($comment);
}
// in article/showArticleSuccess.php
<?php include_component('comment', 'articleCommentForm', array('article' => $article)); ?>

Wicket page links do not use mounted URL coding strategy?

In the Wicket Application class I have mounted a page at the location /about
mountBookmarkablePage("about", AboutPage.class);
I verify that the about page is available at /about. Then in the page which needs a link to the about page, I use the Wicket Link class:
add(new Link("link") {
#Override
public void onClick() {
setResponsePage(AboutPage.class);
}
};
)
The links work as expected but the target URL diplayed in the browser status bar when the mouse is over the link looks like
http://localhost:8080/?wicket:interface=:0:linkpage:repeating:1:link::ILinkListener::
A workaround which I have found is to use ExternalLink
new ExternalLink("link", "/about", "about");
This changes the target URL to
http://localhost:8080/about
which is displayed in the browser status bar when the mouse is over the link.
Is there a way to use the mounted URL as the target link with Wicket Link class, or is there a way to get the mount location for a class, so that I can use it to build the link url for AboutPage.class (instead of hard coding it in the ExternalLink constructor)?
For this purpose you should use BookmarkablePageLink (as you're saying you're doing), to set the link label (or any other content for that matter) just call .add(Component... c) since BookmarkablePageLink is actually a MarkupContainer.
So, to create a link to AboutPage.class you need to do this:
BookmarkablePageLink aboutLink = new BookmarkablePageLink("link", AboutPage.class);
aboutLink.add(new Label("linkText", "Go to About page"));
add(aboutLink);
and the matching markup
<a wicket:id="link"><span wicket:id="linkText">Link text goes here</span></a>
Yeppers, it's slightly more verbose but also very easily extensible. If you want to, you can create your own convenience subclass of BookmarkablePageLink called BookmarkableTextLink and have a
new BookmarkableTextLink(String id, Class<Page> pageClass, String linkText);
constructor for it.
Found a solution: the BookmarkablePageLink class
add(new BookmarkablePageLink("link", AboutPage.class));
This solution only has a small problem: the link label can not be set, maybe this can be done by assigning a model.

Resources