Nested layouts in elm-mdl - elm

I need to show 5 blocks that work independently in a page. I think that it is reasonable to nest 5 layouts into one top layout.
Is that approach reasonable or possible in elm-mdl package? I couldn't find any example or explanation about that case.

According to the view of elm-mdl-dashboard, you should use a Layout.render which take a Contents as parameter and return a Html m.
type alias Contents m =
{ header : List (Html m)
, drawer : List (Html m)
, tabs : ( List (Html m), List (Style m) )
, main : List (Html m)
}
What's good about it is that it takes a List (Html m) as main, so you can redefine Layouts inside main safely! :)
I think you should take inspiration from elm-mdl-dashboard in general.

Related

How can I remove the search bar at footer added to top?

I want to move the search bar which is at bottom of the data table in admin template to top ..
as this is defined in javascript .. any suggestion pls..
Taking this piece of code from the link you provided.
/*
* Set DOM structure for table controls
* #url http://www.datatables.net/examples/basic_init/dom.html
*/
sDom: '<"block-controls"<"controls-buttons"p>>rti<"block-footer clearfix"lf>',
Here you can see this sDom right. Thats the option in datatable used to set the Table structure and to place the sections accordingly. I would suggest you to take a look at Datatables Dom Settings
The letters you see in the settings are p , r,t, i, l, f. They actually mean
p - pagination control
r - processing display element
t - The table!
i - Table information summary
l - length changing input control
f - filtering input
So by replacing this Dom settings you should be able to place the items as you wish.
So what you would need is .
sDom: 'lftir'
Add the div's and styling accordingly as explained in the Markup and Styling in the above provided link.

How can I test items with variable IDs?

I want to test variable pictures and variable check-boxes in my web page. It is like an online market, so every time you refresh the same page you will get different pictures with different IDs and check-boxes with different IDs too.
I have tried XPath, but it contains an ID so I can't use it every time with the same page:
INPUT[#name="data[car.**88535**]"]
You can actually "list" all your checkboxes with xpath.
Like :
List<WebElement> elements = driver.findElements(By.xpath("//input[#type='checkbox']"));
I think you can use the same for your pictures.
So with that you can do something like that :
void checkCB(List<WebElement> c) {
for (WebElement e : c)
if ("yes".equals(e.getAttribute("checked")))
Systeme.println("Element is checked");
}
(Currently writing with selenium 2.0)

Adding a view on perspective in particular folder

In my Eclipse RCP application I have four views A, B, C, D. I want to display only A, B, C view at application start-up, and D view to be displayed when user click on button.
I am adding a view dynamically
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("D_ViewID",null, IWorkbenchPage.VIEW_ACTIVATE);
this view is added at the bottom but I want this D view adjacent to B_View in such a way
my perspective code is here:
#Override
public void createInitialLayout(IPageLayout layout) {
String editor = layout.getEditorArea();
layout.setEditorAreaVisible(false);
IFolderLayout top=layout.createFolder("view",IPageLayout.TOP , 0.80f, editor);
top.addView(B.ID);
layout.addView(A.ID, IPageLayout.LEFT, 0.20f, BrowserView.B);
layout.addView(c.ID, IPageLayout.BOTTOM, 0.20f,editor);
}
You need to add a placeholder to the perspective, just like you added your already visible views. If you look at the top of the IPageLayout documentation, there is an example adding the bookmarks view as placeholder.

Fixed text when scrolling

My program displays an ABAP list, I'm trying to show a header (some lines of text, nothing fancy) fixed when scrolling down in a report.
Is there some kind of tag or declaration that I have to use?
In SE38 you can define list heading with 'GOTO -> Text Elements -> List Headings`.
You can define a list header, and titles for your list (Columns heading).
One advantage: With GOTO -> Translations you can define different texts in different languages.
Another way to get this maintenance screen:
From your list, you can choose: System -> List -> List Header.
Another way:
You can use top-of-page to define your header text inside your report code.
top-of-page.
write 'My header'.
You can use the TOP OF PAGE event to write something that will stick at the top of the page while scrolling. You can find more info here.
You can also use the list headers from Text Elements menu. More info here.
Best regards,
Sergiu
One way is directly using top-of-page in your code.
Other way is calling reuse_alv_grid_display or reuse_alv_list_display (depending on your output type) and declaring "top-of-page" in the I_CALLBACK_TOP_OF_PAGE line. Then create a sub-routine with the same name as your "top-of-page". In that you can write
wa_list-typ = 'H'.
wa_list-info = ''.
APPEND wa_list to it_list.
clear wa_list.
OR
wa_list-typ = 'A'.
wa_list-info = 'Report Header'.
APPEND wa_list to it_list.
clear wa_list.
OR
wa_list-typ = 'S'.
wa_list-info = 'Report Header'.
APPEND wa_list to it_list.
clear wa_list.
depending on what you want (header, action or selection).
Finally you can use REUSE_ALV_COMMENTARY_WRITE function and call the table(in this example it_list).
Hope it helped.

How to display simple mathematical formulas in a rich internet application

I have some mathematical formulas of the type
p = (l + m + n) / (i+j*2)
Note: This is just an example. The real equations are more complicated with several variables participating in the equations.
I want to display these formulas in a tree like structure in an interactive, rich web component.
Initially the screen should display
p = x/y
with p, x and y as boxes. The user can click on the box labeled x which will "unfold" the box to expand and display
x = (l + m + n) and so on.
Since this is a J2EE based application, I can use any RIA library compatible with J2EE.
Are there any 3rd party RIA libraries out there that can help me render these formulas?
Looks like MathOverflow has this down... check it out.
please see the below links:
http://www.math.union.edu/~dpvc/jsMath/examples/Henrici.html
http://www.myphysicslab.com/web_math.html
http://amaya.software.informer.com/11.1/
http://en.wikipedia.org/wiki/MathML