I'm working on a theme that utilises Layouts quite heavily and have come across the 'Visibility Rule' section which I have never noticed before.
Can anyone explain how this is used and perhaps give a use case for it, as I can't find anything in the docs.
Thanks!
This is for custom logic to rule the visibility of an element. Let's say you want to hide an element based on some criterion. You can specify the condition in there, and it will get evaluated. If it evaluates to true, it's visible, otherwise it will be hidden.
The code that does the evaluation is in ElementRuleCoordinator and relies on IConditionManager, which is the exact same interface that's used for evaluating widget rules for widget layers. If you go to the layer documentation, you can find examples.
Related
So I just discovered you can enable the grid footer. And in theory you can show whatever you want in there e.g. display text or sum etc.
The Text property seems to work. The SummaryType doesn't. I feel like there's a missing step or something.
Has anyone managed to make the Footer work ? Just so you know, StatusField is not going to cut it here as it won't fit.
TIA
If you look in the source code for the Sales Order Screen functionality, there is a constant called 'Availability_AllocatedInfo' which is used to construct the 'On-hand...' message in the summary above. If you search for that, you'll see that there is a 'Availability_FieldSelecting' function that sets that information. The field called 'Availability' that is updated is what is used to show the status. Look in the aspx for SO301000, to see all the elements you'll need to replicate the behavior.
Hope that helps
On a Custom Control I have defined a Navigation Rule xsp-success go to xpDemo.xsp. This works fine, but the Navigation rule is probably one of the only places that there is not the little blue diamond to allow for a computed result. What I want to do is something like this
(viewScope.get("vsSomething") == "Something) ? "/xpSomeWhere.xsp" : "/xpSomeWhereElse.xsp"
I could define a different xsp-??? for each possible success but that would be a blow-up waiting to happen.
In addition I want to re-use the CC in several different situations and the major difference is that where I want to navigate to. I could do a context.reDirectTo() but that then means that I have to repeat the code many times in several different places that might not be totally obvious thus creating a maintenance headache. The obvious place would seem to be the Navigation Rules. I can't believe that I'm the first person wanting to do this but my search has turned up nothing.
They can indeed be computed, just not using the "Navigation" section of the properties pane. If you go instead to the XSP source or to the "navigationRules" element of the "All Properties" section, you can modify the "viewId" property to include a computed value as normal.
Here is my scenario...
Using Orchard CMS 1.7.1 I have created a custom Content Type named 'VistaImage' using the Orchard UI. This Content Type defines one field based on a Media Library Picker Field, this field is also named 'VistaImage'.
A Projection of groups of Vista Images are placed in the 'Featured' Zone as a Widget reference and works well.
Using the Shape Tracer on the resulting page(s), the shape hierarchy looks as follows:
Zone [Featured]
Widget
List
Content Alt: Content-VistaImage
Fields_MediaLibraryPicker Alt: Fields.MediaLibraryPicker-VistaImage
Media
Parts_Image_Summary
What I want to do is to provide alternative shapes from the Content shape downwards. This is easy enough for Content itself and for Fields_MediaLibraryPicker (as the Shape Tracer automatically provides applicable alternatives (as indicated above)).
My problem comes in providing alternatives for the Media and Parts_Image_Summary parts.
Looking at the documentation for Alternates on the Orchard web site, I thought that if I created a new shape in my Theme at at /Views/Parts/Image.Summary-VistaImage.cshtml this would get referenced, but it does not (though if I remove the '-VistaImage' the shape does get used, but this would, I believe change this shape for every Content Type, which is not what I want to do).
Any advice/direction on how I should approach this requirement would be apprciated.
Thanks.
From personal experience, when you get that low level in the shapes, alternatives don't work very well, if at all. The only way I best deal with those scenarios is to choose the next applicable shape above it, and do an if statement to determine if its the content you want, in which case to remove the default shape display and implement your own hard-coded layout.
eg if the shape simplay says #display(Model.whatever) and you know that displays is garbage for you, look into the model.
For example, I had trouble creating a 4 leveled menu for bootstrap as it only typically deals with 2 levels, so i manipulated the lowest level shape. I.e:
if{Model.Items.Any()}{
//code to generate another submenu for that menuItem
}
This may not even be the most correct way to address this, just the solution I found has worked.
So in your case I'd use VS debug and breakpoint where the mediafield picker is rendered, and find out if the model holds any information letting you know it's your VistaImage content.
Do anyone know on how to create 3d carousel effect in LWUIT?. Can anyone explain me with a sample program on how to implement?.
First of all, I'm considering you want to use Lists, that's the most sensible way to do it, isn't is?
The first thing you want to know is this List.setFixedSelection(List.FIXED_CENTER), and that's the easy part. Tha method makes the list scroll around the middle displayed element, it's to say, it will add the carousel effect.
The difficult part comes when adding the 3D. First ad all, you should have a look to this article, if you haven't done it yet. It's compulsory to understand how LWUIT Lists work and what you can do (and how) with them. Basically you would need to implement a ListCellRenderer and specially the getListCellRendererComponent(List list, Object value, int index, boolean isSelected), there you would have to add the corresponding logic to detect where the list element is going to be painted, and play with the Styles to set shadows, gradients, or whatever you want.
And I'm sorry but I don't have any sample for you, maybe you can have a look at Shai's Blog, I don't know whether there is that specific sample, but there are a lot of them.
Good luck and regards.
well i tried their web site also,they are only providing details regarding there use i mean about controls.
what is the exact difference between both of the above mentioned?
This Telerik's forum post answers, I think: http://www.telerik.com/community/forums/silverlight/maskedtextbox/is-it-possible-to-use-a-radmaskedtextinput-as-a-multiline-text-area.aspx#1863327
The RadMaskedInput controls don't support a "no-mask" scenarios at
the moment...
This is why ... it would be best to take
advantage of the RadMaskedTextBox control. It has a property MaskType,
which you can set to None. Also in order to make it multi-line, you
need to apply a custom style to its ExtendedTextBox element and set
its AcceptsReturn property to True.